I've just started using Phonegap with iOS and I'm wondering if there's a way to update the look of the application remotely (forgetting about App Store updates in this case).
I know that I can store data in a local database on the device and in files, but I'd like to navigate to that downloaded file. My app would start and check for updated HTML and JS files on my server. If there were none, it would continue to use the HTML already saved on the device. I don't want to navigate straight to a page on my server as Apple native APIs wouldn't work and I want the app to work offline too. I found this existing Stackoverflow question asking for something similar and persistent storage was mentioned by a commenter. I want to find out if it's possible to navigate to something in persistent storage.
Is it possible to download a HTML with Phonegap/Apache Cordova and then navigate to it?
The answer is YES.
You'll need a FileTransfer,
then store the file to the filesystem
You have to store the absolute path in the local-storage and navigate to it
I'am pretty sure, that this app will be removed from the apple-app store, because loading code from a server is prohibited.
Apple will remove this app from the store.
Related
I am developing a project with NextJs. The project is an editor application. That's why I want the page(editor) not to work when they save the page differently. For example Youtube, Instagram etc. applications do not work when the page is saved as. How do they do this? And what approach should I take ?
The editor should not work when the page is saved as different. So I can use this project commercially.
Youtube and Instagram work fine after saving, you just need a server to serve the files
Nothing you can do to prevent this
I make Windows Store apps with HTML + Javascript, WinJS type apps.
I normally use localStorage to store most information, and I know how to navigate to where that localStorage is in the file system:
C:\Users\user\AppData\Local\Packages\-package-string- is the base folder for all the info, and I drill down to \AC\Microsoft\Internet Explorer\DOMStore and the localStorage xml file is in there in one of the
Knowing this makes it easy for me to take localStorage from one persons app, download it and put it into my debugging app and investigate any problems they might have related to their localStorage.
I need the same info for IndexedDb. I use Dexie.js which uses IndexedDb and I want to be able to move the file from one persons computer onto my own to debug it if necessary.
On Windows 10 (v1803) is IndexedDB located in:
C:\Users\user\AppData\Local\Packages\--package-string--\AppData\Indexed DB
I published a phonegap/webview application on the Play Store.
Now, that the app has some problems,
I need to access localStorage data to recover them, but I can't.
I can't because it's no more "debuggable", it's signed.
Wondering if I can access to those data through filesystem, mounting it via usb cable.
I guess under
/data/data/package_name (on a rooted phone)
I can find it.
Please share your experience if any.
You can use cordova file plugin to delete and read files and directories. Complete docs is available : https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/
In Android you can get the data from any file manager app: InternalStorage/data//files/
Is there a way to hold a large block of text, or images/videos, embedded in a FirefoxOS app, while directly accessing them from the app (similar to /res/raw/ in Android)? I don't see where the /data/ directory is being accessed in the example app.
There are many ways that you can do this:
Distribute your web app as a packaged app. In this scenario all your resource files are zipped up in a single file, available after install via a URL scheme described in the documentation.
The Application Cache allows you to instruct the browser to download files for offline use. I like Rob Hawkes' utility for generating appcache manifest files.
You can manage the data yourself by downloading the files via XMLHttpRequest and storing the data in an IndexedDB database or on the SD card via the DeviceStorage API.
I think that your best bet is the filehandle API, but more importantly keep in mind that a Firefox OS app is basically a website so you shouldn't be thinking as an android app that can carry it's media and so on.
Good luck
If you want to display images in a website you place images in the same root folder or sub folder. The same thing works with firefox OS.Place your images in your app folder and use them. If you want to use images from the mobile then you can use device Storage API .you can find the example here
I am creating a html5 and javascript web page that allows you to draw your own picture. The page itself works, but I want to make it so my web application will create a folder in their Appdata (or Application Data if they're on a mac) directory.
Then I also want to make it so when a user logs back on to the website, all of their work is saved and they can pick up where they left off.
So basically, I want to be able to create a file on a client's directory, then be able to download that file once they have saved a change to their drawing. Is there a way I can do this? Thanks.
All of these things can be done by using the HTML5 file APIs.
Here are some links which will help you with your task:
http://www.html5rocks.com/en/tutorials/file/dndfiles/
http://www.html5rocks.com/en/features/file_access
Storing state can be accomplished by using one of the following technologies:
Cookies
localStorage
indexeddb
WebSQL