Mobile development industry rapid development, in order to meet the needs of users, most traditional internet companies in the dominant Web site, but also need to take into account the direction of mobile development. On the basis of existing PC-side websites, many companies choose to develop fast, easy-to-maintain and lower-cost webapp, taking into account factors such as manpower, cost and technology, and development cycles.
Appcan and WebApp
Mobile Cloud Platform Appcan provides developers with a simple and efficient hybrid mixed-mode app development service, as well as a webapp development model, and supports most mainstream models in terms of resolution adaptation.
If your apk has an adaptation problem, check the following:
1.3.0 Online packaging (IDE local packaging engine does not guarantee the latest version);
2. Ensure that the start-up diagram is uploaded at the required resolution;
3. Add standard properties to the Web page:
<metaname= "Viewport" content= "Target-densitydpi=device-dpi,width=device-width, initial-scale=1, user-scalable= No, minimum-scale=1.0,maximum-scale=1.0 ">
4. Comment out the code that you wrote to modify the resolution;
5. Create a new project, use the official template to package, and then compare the code with the appropriate version.
Here is a brief introduction to how you can The Appcan platform creates the WebApp in 3 ways:
1. Create WebApp online automatically
Register Appcan develop account, create a project, select WebApp Channel, enter the Web URL to generate webapp in the URL field, configure app-related options, from the start icon, launch diagram, status bar to plug-in selection, certificate selection, and finally click Generate installation package, Download and install (support Android &ios platform).
Precautions:
(1) Web address to fill in accordance with the specification of the HTTP protocol, and does not support the level two directory.
(2) This method conforms to a URL to create a project app standard, once created cannot be modified.
(3) Installation of the generated WebApp, users need to have a network in order to browse normally, otherwise the prompt page is not connected.
2. Configure the CONFIG. www file as a web address
Create a project online, select Hybird mode, and then open the IDE Local development tool, using the Online Sync Project feature, refer to using the document "IDE development process Synchronization Appcan project":
http://newdocx.appcan.cn/newdocx/docx?type=1480_1234
Select the hybrid project you just created, synchronize to the local IDE, and prompt you to check out the code successfully, stating that your operation is basically normal.
You can edit the CONFIG. webapp file, there are 2 places involved in the configuration:
Top: The start page is replaced with your Web URL, which opens your Web address on behalf of the app you generated.
no.2:<webapp>false</webapp> This option can be configured to True and false, which means that the generated app launches without the loading progress bar, False represents the generated app launcher with loading progress bar.
3. Create WebApp using Hybird mode code
the specific reference document, "Create a Appcan application, which does not make too many statements here:
http://newdocx.appcan.cn/newdocx/docx?type=1353_1291 ,
Open IDE, modify the code on the start page:
Appcan.ready (function () {
var titheight = $ (' #header '). Offset (). Height;
Appcan.frame.open ("Content", "http://www.appcan.cn", 0,titheight); Window.onorientationchange = Window.onresize = function () {
Appcan.resizepopoverbyele ("Content", 0, $ ("#header"). Offset (). height);
}
}
In the above code, Appcan.frame.open ("content", "http://www.appcan.cn", 0,titheight);
The second parameter URL is the page address of the page to be loaded by the window.
To configure the CONFIG. metabase file:
add <webapp>false</webapp> , this option can be configured with True and false, as described in Method 2.
The last few points to note:
(1) The above webapp are needed to ensure the adaptation of the mobile side, how to adapt to the Appcan forum has a lot of developers to share the tutorial, no longer described here;
(2) The basic framework of the Appcan package has been adapted to the mobile end, using the method described above in 3.
(3) Using Appcan platform development, all support call Appcan native function plug-in, if your web address has the call Integrated Appcan native plug-in interface, can refer to each plug-in document configuration.
The above 3 ways for your reference. To further enhance the user experience, it is recommended to use Appcan Hybrid mode to develop mobile apps, which is also simple and efficient, greatly reducing development costs.
3 Ways to teach you to easily create WebApp