We are developing a PhoneGap application for iOS and Android in which I need to store a small configuration variable securely (Not LocalStorage, SQLite or any DB implementation). I know this can be done using the KeyChain feature of iOS. Please help me out in finding the similar feature in android or suggest any such Android PhoneGap plugin for Secure Storage to implement in our project.
Use LocalStorage. Documentation is HERE
If you are looking for KeyChain Plugin, you can find it in HERE
There are plugins available in Cordova/ PhoneGap to store data in the device itself. If you are building a native application then you can go for SQLite and if you are building a Hybrid mobile app then you can go for PouchDB .
You can check what all browser's it supports over here. (There he has stated in terms of the browser which Android/IOS/Windows makes use of).
For securely saving key, password or string in mobile application especially in cordova/phonegap apps there is different approaches for different platforms.
For iOS application we can use - Keychain Services
For android application we can use - Android Keystore System
There is plugin named - cordova-plugin-secure-key-store. This plugin uses Keychain for iOS and Keystore for android.
For more details follow blog post here - http://stackskull.com/posts/how-to-save-key-securely-in-mobile-devices
Hope this will help someone.
Use this plugin: https://build.phonegap.com/plugins/161
Note: a phonegap plugin is made of native code, i.e. here Android SDK Java code. This plugin use secured Keychain system. Phonegap plugins simply adds a JS/Java cross-code interface, making possible to call native features with javascript functions. Btw geolocation, notification and so third, in Phonegap doc, are working this way.
Related
I need help with some information which I couldn't find anywhere online. is it possible to convert my existing android app to ios using PhoneGap/Cordova? if it is yes, could u guys send me any link to do it. if its no, can I know why? please...
No, you can not convert it. Code base and frameworks are to different. For making cross platform app you can use Flutter, Xamarin or others...
Only if your android app is already a web application. Cordova and phonegap are a set of libraries for extending mobile web applications with native functionalities.
Apache Cordova is an open-source mobile development framework. It allows you to use standard web technologies - HTML5, CSS3, and JavaScript for cross-platform development. If your current Android application is a Native application; you cant convert application to iOS.
For more details : https://cordova.apache.org/docs/en/latest/guide/overview/
Please, am a web developer. I just built a web app for a school to manage their results and fees.
Now, i intend to build an app on android and ios so its 'easier' for both staff and students to get notifications and interact better.
Is JQuery mobile the asnwer?
Thanks for your reply
jQuery Mobile doesn't create an application for Android nor for iOS, it only makes websites look better on said platforms.
To create a real, native, application for Android you should use Android Studio. To do the same for iOS you need XCode and MAC OS X.
But, if you prefer to write websites, Apache Cordova does what you need. Allows you to create apps for any platform using your usual HTML, CSS and Javascript.
I'll drop the link here so you can check it out.
https://cordova.apache.org/
Another approach is creating a basic Android and iOS app that simply opens a web page (your website), but it is most of the time lacking in performance. If this last approach interests you, just look up "WebView" for Android, "UIWebView" for iOS (Obviously you'll need Android Studio and XCode)
EDIT
This is an old answer, now a ton of different technologies exist to build multiplatform applications, without even losing out on performance (for example, see react-native)
If you have already built the app using JQuery mobile and want to make it into an app I recommend looking at Cordova (PhoneGap) https://cordova.apache.org/
For notifications etc I found https://www.pushwoosh.com/ to have the best integration
I have a cordova hybrid application and mobile web application. I came across a problem while application upgrade. Mobile web application works perfectly as all the static files which are modified are fetched from web server. But my hybrid application is not upgraded. I can push a new version to PlayStore or iTuneStore, but users has to manually update the application. Is there any way to update the resources(such as JavaScript, JSON or CSS) in assets folder? I gave a try, but failed. Assume that as part of a WebService request or push notification, I will get a list of files that are modified on the web server. How can I get these files in my hybrid app?
Please help if any of you faced the same problem.
You will need to check out the FileSystem and the FileTransfer APIs
I still did not get a concrete answer . But there is a tool called TriggerIO which offers this feature. Also PhoneGap cloud provides this for collaborative testing.
I believe behind the scene they may be using ApplicationCache to check for the resources.
Depends on your app usecase there is another way too. If you are okay for lesser performance, rather than packaging your static files along with the bundle, refer it from web. In config.xml, content src="mydomain.com/index.html". I use this for a specific product implementation.
You can remote update your hybrid apps with codova-app-loader, please refer https://github.com/markmarijnissen/cordova-app-loader.
I developed an android application with Phonegap and I want to convert it to iOS as well. Before starting my project I heard that we are able to convert same project with multiple platforms using phone gap. But now I don't know how to convert my project to IOS. Can any one suggest good tutorial OR examples to do it.
And also mention what are all prerequisites to convert my android application to IOS using phone gap.
Suggest me some tutorials with examples.
With phongap you can target all platforms including iOS, android and windows etc. using HTML 5, avoiding each mobile platforms' native development language. Code base remains same for every platform. Applications execute within wrappers targeted to each platform, and rely on standards-compliant API bindings to access each device's sensors, data, and network status. refer docs http://docs.phonegap.com/en/3.2.0/guide_overview_index.md.html#Overview
Phonegap is not for converting one build to another.. Using phonegap you can develope for all platforms using phonegap framework, you can generate .apk,.ipa,ota, etc as you wish using sdk in your pc or using phonegap build service. You can read here(phonegap authentic doc) how can you do it for different plaforms.
Nb:Phonegap provides complete documents in their site itself, you can go through and understand, it is helpfull.
You can build on each platform. If you don't want to do that, they offer a Build service that build your app on each platform for you. See https://build.phonegap.com/ for more info.
With phonegap you can create all platform application with same package just you need to clear yourself that for IOS you need certificates to build it. Otherwise same package you are using for android can use for IOS also.
I am trying to build a cross mobile platform app to sync files and photos between devices, something like dropbox but for mobile or like sugarsync.
I want it to run on iphone/ipad , android, windows phone.
So for example the user can put a file on his iphone and can see it on his windows phone automatically.
Is that possible using phonegap apis or should i search for another solution?
Yes.
You retrieve the file from the local device and upload to your server.
You can then download the file from the server on the other device.
You can do this using the FileTransfer functionality in PhoneGap (supported on Android, iOS, BlackBerry & WP7) without the need to write any plugins or native code.
You'd just have to write the permissions side of things, the ability to return a list of files stored on the server and manage the syncing of changes.
BEWARE: There a legal, privacy and security issues with accessing and storing other peoples files.
Do you mean P2P or using a server?
In both cases I guess your best chance is using Sockets.
http://remysharp.com/2010/10/04/websockets-in-phonegap-projects/
You will need to natively write a Sync service for each platform, and then expose that Sync service via a PhoneGap plugin. PhoneGap is still the way to go due to its cross platform support