Table of Contents
回复内容:
Home Web Front-end H5 Tutorial Cordova 如何实现所有的h5html 来自于远程服务器呢?

Cordova 如何实现所有的h5html 来自于远程服务器呢?

Jun 07, 2016 am 08:44 AM
apk cordova

Cordova 如何实现所有的h5html 来自于远程服务器呢?网上搜了半天,竟然没有人问这个问题,是说大家都把Cordova 里面的www目录一起打包到apk 里面么

回复内容:

谢邀

最简单的方式。你找个服务器放上你的静态页面

然后在你cordova 项目中找到 config.xml 中的



把 src 中的值改成 http://you.server.xxx

就能直接访问服务端的页面了。

然后如果要调用 native 功能的话。你需要先放在本地调试好。然后把
位于 project/platforms/ios/www/ (或对应安卓目录) 下的

cordova.js
cordova_plugins.js
plugins 文件夹

一起上传到服务器

然后调用摄像头扫描二维码什么的功能也能使用了。

至于为什么大家不这么做呢。一个是因为流量消耗较多,载入速度是个大问题。

然后还一个。这样做似乎无法通过 appstore 的审核。

大概就是这样 处于安全的考虑,淘宝、微信、支付宝、天猫 等,他们的网页应该是放在服务器端。 额,这个嘛
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1663
14
PHP Tutorial
1263
29
C# Tutorial
1236
24
Google app beta APK teardown reveals new extensions coming to Gemini AI assistant Google app beta APK teardown reveals new extensions coming to Gemini AI assistant Jul 30, 2024 pm 01:06 PM

Google's AI assistant, Gemini, is set to become even more capable, if the APK teardown of the latest update (v15.29.34.29 beta) is to be considered. The tech behemoth's new AI assistant could reportedly get several new extensions. These extensions wi

How to grab apk network package in frida How to grab apk network package in frida May 16, 2023 pm 07:16 PM

1. Analyze the pitfalls and find hook points from a system perspective instead of capturing packets just for the sake of capturing them. 1.okhttp calling process publicstaticfinalMediaTypeJSON=MediaType.get("application/json;charset=utf-8");OkHttpClientclient=newOkHttpClient();Stringpost(Stringurl,Stringjson)throwsIOException{RequestBodybody=RequestBody

How to Conduct Authorized APK Penetration Testing How to Conduct Authorized APK Penetration Testing May 20, 2023 pm 12:29 PM

As a penetration testing novice, the purpose of this article is to provide some testing ideas for those novices like me. The content involved may be relatively basic, cousins, please forgive me. After unpacking the APK and getting the apk, use 7-Zip to unzip it directly to get several folders, an AndroidManifest.xml file, and a dex file. Use dex2jar https://sourceforge.net/projects/dex2jar/ to decompress this dex file to generate a jar file, and then use jd-gui to view the java source code. Of course, you can find loopholes in the code from the source code, but there is usually confusion, so we won’t discuss it in depth here.

How to rename apk software How to rename apk software Dec 08, 2023 am 10:23 AM

Change steps: 1. Make sure that the APK file whose name you want to change has been saved to your computer; 2. Right-click the APK file and select the "Rename" option; 3. Replace the original file name with the new name you want. Make sure to only change the file name part and not the file extension ".apk"; 4. Press the Enter key or click the "Rename" button in the window to save the changes.

How to open APK files on Windows 11 How to open APK files on Windows 11 Apr 14, 2023 am 11:19 AM

Have you ever downloaded a file ending with the letters APK? This usually happens with apps that work on your phone and are loaded onto your computer. Most of these files end with the letters APK. You may have been trying to open these files but can't figure out where they are stored or how to open them due to their unusual extensions. If you're looking for a way to open such files on Windows 11 and have Googled your hair out, don't worry! It's actually much easier than that. In fact, it's free to do so and you don't even need to install anything. Well, you'll have to download an APK file opener for your operating system - but only if you haven't already

How to encrypt Android apk released by unity How to encrypt Android apk released by unity May 13, 2023 am 11:10 AM

Security Issues of the Unity3D Program Code Security Issues The core assembly file Assembly-CSharp.dll of the Unity3D program is a standard .NET file format and comes with rich metadata information such as method names, class names, type definitions, etc. You can use tools such as DnSpy to It can be easily decompiled and tampered with, and the code logic, class names, method names, etc. can be seen at a glance. Once the code logic is decompiled, it is easy to breed various types of plug-ins and destroy the balance of the game. If there are loopholes in the code logic, it is easy to be discovered and exploited, which may cause unpredictable losses to developers. Resource security issues: During the compilation and packaging phase, the Unity3D program will package resources into AssetBun through the Unity editor.

Win11 apk installation guide Win11 apk installation guide Jan 03, 2024 pm 10:24 PM

As we all know, Microsoft announced that win11 will be able to run Android applications and install local apk. However, after updating win11, users found that they did not know how to install the local apk. In fact, this is because Microsoft has not yet implemented this feature for win11. It is necessary Wait for the function to be installed before you can use it. How to install local apk in win11: 1. According to Microsoft, after win11 has installed this function, you can directly double-click the downloaded apk file to install it directly. 2. After the installation is completed, users can also run it directly in the system. 3. Although it is now the official version of win11, Microsoft has not yet implemented this feature for win11. 4. So if the user wants to use win11

How to perform APK simple code injection How to perform APK simple code injection May 14, 2023 am 11:43 AM

1. Foreword When the apk is not encrypted, the smail file is obtained by decompiling it. Just inject the code that needs to be injected. Then seal and sign it! 2. Make apk Use androidstudio to generate a simple apk. Just use the default code. packagecom.example.myapplication1;importandroidx.appcompat.app.AppCompatActivity;importandroid.os.Bundle;publicclassMainActivityextendsAppCompatActivity{

See all articles