change html file but apk not update in cordova - android

I am new in use phonegap, i create an app but i don't know how can i change html file to my purpose? when i changed index html file in www folder in HelloWorld/www and run again program via Eclipse, i see defualt apk file, i dont see any changes! I want to write a sample app for send and receive SMS but i can't, i can't change html file. Can you help me? or send a simple tutorial about create and change js or html file in www folder?
If i cant create this or simple change this, phonegap is not a good thing for use cross platform!
Thanks for your advises :)

If you make changes in the root www folder, you won't see changes in eclipse or apk built by eclipse unless you run cordova prepare or cordova build to copy the files from /www/ to /platforms/android/assets/www.

You can automate the execution of the prepare command and the refresh, take a look at this response:
https://stackoverflow.com/a/25361187/591254

Check files permissions, the project files must have your user permissions.

Related

How to load data file in Cordova plugin?

I am developing a Cordova plugin that comes with some data files. I need these files to
Be copied to the mobile device, and
Be loaded the files in the runtime.
What I am currently doing is to define these files in plugin.xml as resource files, like:
<resource-file src="assets/data.xml" target="assets/data.xml"/>
However, I do not know how to open these files in my Android Java code. If I use a File class to open the file, what path should I use?
Any help is appreciated.
Since no one has answered this question after a few days, and I have not found a solution elsewhere, I am going to post my own workaround here.
Package all the data files with directory in a zip file.
Put zip file in the Cordova app.
When the app starts up for the 1st time, the app uploads the zip file to the plug-in, using a FileTransfer plug-in.
The plug-in unzips the file in the application's sandbox.
I have to admit that this is not a decent solution. It makes the plug-in depend on the app. However, if there is no better solution, this one just works.
Still, if there is a better solution, please post share it here.

Using a linked file in Assets directory - FileNotFound Exception

I am trying to link to an external file from a shared repository between my iOS and Android apps. This does not present a problem for iOS, but it does for Android. My current solution is to create a copy of the file from the external repository and place it in my projects Assets folder. This solution works, but is not much of a good one in my opinion and involves too many extra steps.
Using Eclipse, I am able to link to a resource. It's as simple as copying a file into my Assets folder and being prompted to either copy the file or link to the resource. If I link to the resource and try to run my app, I get a FileNotFoundException. If I copy the file instead, the app file is found just fine.
Ideally, I'd like to link to the file so that when I pull a new update from git then I don't need to copy the file over every single time. I'd prefer to link to the file.
I don't know what Eclipse uses "under the covers" for "Link here" drag-and-drop stuff. However, it is an Eclipse-ism. Android's build tools are fairly isolated from Eclipse proper, and so they won't know about those links.
Using a hardlink, or perhaps a symlink, at the OS X filesystem level should work, as both Eclipse and Android's build tools should treat it like a local file.

Connection with SQLLite on Unity3D using Javascript in Android

How can connect with SQLLite from Android using Unit3D and Javascript?
Someone can'i help me?
Here are the specific steps to getting SQLite set up in your project.
Download SQLite - you'll want the ZIP file with the DLL inside
that's in the Precompiled Binaries for Windows section.
Important Copy sqlite3.dll into your into your project's Plugins folder (make a folder called Plugins if you don't have one).
You won't get a warning if you don't do this, and your project will run fine in the editor, however, it will fail to work when you actually build your project, and will only provide information about this in the log file.
This will give you a License Error if you're using Unity Indie, but it doesn't seem to have an effect on the actual play in the editor, nor does it seem to effect the ability to build stand-alone versions.
Alternately, you can leave it out of your project entirely, but when you build your application, you'll need to include a copy of sqlite3.dll in the same directory as the .exe in order for it to work.
In your project, add in the dbAccess.js file: http://wiki.unity3d.com/index.php/SQLite#dbAccess.js
You should be good to go!
Source (and the above is pretty much copied word-for-word from):
http://wiki.unity3d.com/index.php/SQLite

How to use the root phonegap www folder?

When you create a phonegap project you start off with a root www folder, among other files.
/www
You then need to add devices to work, for example andriod or IOS. This then creates a new www folder inside the respective playforms:
\platforms\android\assets\www
My question is, when using Android Studio how are you meant to use the root www folder? If at all? Which www folder am I meant to be building with?
It appears that when importing with Android Studio to go straight to the platform/andriod.
You should be editing the files in the /www/ file. When the CLI tools run prepare, which happens a lot, these files are copied into the appropriate platform's /www/ file. (This is because each platform can have it's web assets in a different location.) So do all of your work in the main /www/ folder - this is the one you should be putting into version control.
For more information try reading the documentation guide about The config.xml file which describes some of this: http://cordova.apache.org/docs/en/3.1.0/config_ref_index.md.html#The%20config.xml%20File
I've also written up a pretty long answer in another question that is pretty similar: Should a phonegap plugin be declared in the config.xml file?

Can I convert .apk files to html5?

Can I convert .apk files to html5?
I need to modify an existing app, but don't know how to handle .apk.. if there is any tool that can covert it into html5 tht would save me.
Let me know..
Thanks.
An apk file is just a jar file for Android. You can unpack it using unzip, jar, etc., which will extract any HTML files within (if any).
If the app you're trying to work with isn't actually an HTML5 app, then there probably won't be any HTML files for you to play with. There is no automatic way to convert a native app to HTML5.
No, you can't, some tool can help you to decompile apk to java, but not HTML5
.apk files cannot be converted to .html files.
You cannot do it Straight away.. First you should get the Source Code of an APK then you should check whether the www or assets folder contains HTML Codes. If the App is created through PhoneGap you can do that.. Best of luck!
You can extract your apk file.
Then go to that folder and click on the assets folder in which you will find your www folder.
So in your www folder you will find your html, js, css files.
But the main thing is that
your project must be the phonegap project or hybrid project.
i tried using "apk editor.apk" and i also opened the assets folder and i saw a bunch of xml , html and some other files, then you can see some html5 files. here is the link to download apk editor
https://apkpure.com/apk-editor-pro/com.heagoo.apkeditor

Categories

Resources