I am going to create an Android application using HTML5/jQuery and Phonegap In app Browser. I will display web page inside the In app Browser,
I want to implement the functionality that the user only enters his Name when he first time access the application.
I can save value using Phonegap's Local Storage but can't find how to access this value inside In app Browser.
Any help will be much appreciated.
Thanks.
Check the following documentation for more information
Is local storage for a Phonegap app on an Android device separate from the built in browser?
I just tested it but it seems like the inappbrowser and your phone gap app uses different localStorage as if they are two different browser instances.
Related
I am using a web development tool called Oracle APEX 21.1 to create an app which will run on the web for some users and as desktop app for other users. The application runs in a browser in both cases. My problem is with the users that will use it as a desktop app. Sometimes I need to run a local file or run a specific program from the computer the user uses to run the app. The user is instructed to use google chrome to use the app. My question is, is there a setting of google chrome that I can set to allow my app to access local files or run Windows commands? Is there any other way i.e an add-on? If not, is there any other browser that can do the job? P.S: In my app, I can make use of JavaScript, JQuery, Oracle PL/SQL. Of course, a browser simple setting to set is the best option for me, if any.
in browser you you have to do use "href" string like this :
window.location = "notes:///server/file";
"notes:///" program name
And "server/file" parameter for programe
I have developed a program which detects human in real time(webcam) and displays it to the webpage of the local network. This is done by creating a server and websockets using Node.js and opencv.
Now, I have to develop an android app where i should get a notification everytime when the human is detected from the webcam video of a local host. How can i achieve this using node.js server and android interfacing?
Any suggestions or inputs with code examples would be more helpful.
Try using ionic to convert between webpages and android. Then use push notifications to alert the user.
I have two different apps, one is a native android app and other is a web app built using sencha and javascript.
I need to get some information from the web app to my native app.
Any idea how this communication can be done ? I am not using any webview since both are two different apps.
Please let me know. I even tried cookies, local storage etc.. But seems to be the native android app cannot access the browser cookies or local storage..
Please help.
You can try the following:
Run an httpd at your app. If you use cordova, you can take a look at org.chromium.socket plugin. There is an example of how to set up a local http server:
https://github.com/MobileChromeApps/mobile-chrome-app-samples/blob/master/webServer/server.js
At your webapp you issue AJAX calls (replacing html with JSON would fit very well) to localhost, where your app is running at the background. Your app will respond the requests, using JSON for instance.
In the other way around, your app can make AJAX calls to the server, that can update your html/js app using websockets.
If you are not using cordova, it is even easier to build an httpd in Java:) just google around.
I am new to mobile app development. I am creating cross-platform app using Sencha + Phonegap. My goal is to store user-written text in mobile (offline storage) and some other text data related to it, that would persist even if mobile restarts, which would be then uploaded to server, once mobile has connection.
According to this http://docs.sencha.com/touch/2.3.2/#!/api/Ext.data.proxy.Proxy
Sencha provides 2 client side storages.
LocalStorageProxy - saves its data to localStorage if the browser supports it
MemoryProxy - holds data in memory only, any data is lost when the page is refreshed
MemoryProxy is out of question. And LocalStorage uses HTML5 storage and I dont believe that that lasts after reboot.
So what I need is some kind of database, which will be accessible from Sencha, on both Android and IOS, in offline mode. Is there such a thing?
Your assumption is wrong, localStorage is persistent between applications restarts and application reboots. Are you maybe confusing it with sessionStorage? As far as I know, data will be wiped out only if the user actively clears application data (for example on Android from the application menu).
Anyway, since you are using Cordova/Phonegap, you have these Storage options:
localStorage, key/value persistent storage (support table)
WebSQL, offers more full-featured database tables accessed via SQL queries (Android, BlackBerry 10, iOS, Tizen).
IndexedDB, more features than LocalStorage but fewer than WebSQL (only Windows Phone and Blackberry).
Plus you could use:
filesystem Cordova Api
The localstorage is persistent.
For example in android the localstorage data can only be deleted if the app deletes it, or the app is erased, or if the user goes to the setting and erases the app data for that one particular app.
Hope this helps.
Local storage is persistent. for better implementation you can refer this
:
http://www.sencha.com/blog/creating-an-online-offline-proxy-in-sencha-touch
I need to develop an app for iOS with some basic functionality and since I'm not experienced with Objective C but with Web development, I need to know if it's possible to do it using Phonegap.
This app will be like a book with chapters that needs to be updated on a daily basis.
There'll be a CMS in a server where the content will be updated. Text and pictures.
The app will be running on iPhone and iPad that sometimes may not be connected to the network. When connected they need to check for updates and save in a local database to be available when off-line.
Is this possible using Phonegap?
Is there any local database in iOS like SQLite? Or do I need to store everything in files?
Can we save the text in a database and the pictures somewhere in a folder? Or everything needs to be saved in the local database?
What are the best plugins, features, methods that I'll need to look into?
You can use both LocalStorage and WebSQL in a PhoneGap app. LocalStorage is just... localStorage. Check the MDN docs for it. Ditto for WebSQL.