Doubts about Cordova 3.6 webviews, events & updating application - android

I am using PhoneGap / Cordova 3.6 to build my first Android Application. I have successfully created a static application however I still have a few conceptual doubts, I am listing them below it will be great if someone can help me out with these.
PhoneGap events: Do I require installing any plug-in to access or make use of these events?
Ref: https://cordova.apache.org/docs/en/3.6.0/cordova_events_events.md.html#backbutton
Embedding WebViews: How important is this for creating an application using PhoneGap. Does it improve the performance of the application in any way?
Ref: https://cordova.apache.org/docs/en/3.6.0/guide_hybrid_webviews_index.md.html#Embedding%20WebViews
How can I change the version of Android Application created using PhoneGap: I read that the application version requires to be changed in order to update the application. To do so I went into my /application folder/platforms/android/ in AndroidManifest.xml & edited the android:versionCode & android:versionName to a higher number. However after doing so when I re-build the app using "cordova build" in CLI; the default version number is restored. So am I doing the right thing by updating the version number? or is there any other method to do so using CLI
EDIT: Hi Kerri, as per your advise I changed the version identifier in the config.xml. However when I download the apk file on my phone & run it; it asks me to re-install the entire application & not the updates.
Thanks for your time.
Thanks,
Utpal

No. If you look at the top of that page, it does list a few events added by other plugins, but back button and the like are built in.
Ignore this. It's only useful if you are trying to embed a bit of PhoneGap into a native app. For example, you might have an existing native app that you want to add new functionality to, but you want to do that portion in PhoenGap. You can embed PG in your native app and get the benefits of both worlds.
Check out config.xml in your project root -- there's a version identifier in there.

Related

Ionic getting to know what was the recently run apps on android

I'm writing a simple android app detection using Ionic (fairly new too as well with mobile apps dev using Ionic). Using this plugin App Availaibility I was able to get a list of installed apps, however is there a way or plugin or is it possible to know what was the recent app that was used in the foreground? Like if a com.android.appname was run, it may be able to detect it? Thanks.
No there is not, I'd assume that there won't be a plugin for this either. In order for the device to know what app has ran in the past, it must hold this data somewhere. I doubt google or apple does anything like this.
or
you can always try and build a plugin yourself and see if its possible.

Shifting Android app development framework without relaunching the app

I have an Android/iOS app built with Apache Cordova. I am having some issues in getting some enhancements done to it.
Is it possible to shift to a different architecture of the app like from Apache Cordova to Flutter, without relauncing the app in the AppStore?
It could be Cordova to Native Android App, or hybrid ones like Flutter, but I want to know if I can change the app development framework architecture.
I have checked in here, but could not get the exact answer.
I dont think it is possible, but I wanted to check one final time before re-architecting. If the answer is yes, please do provide some pointers so that I can take a look.
So long as you sign it with the same key, yes. The store doesn't know or care what framework an app is written in. All it cares is that the signing key is the same, and that the version code increases.

BackgroundFetch / Background running app using PhoneGap Build

OK I have done a lot of research over the last few days, reading a lot of posts on here. I have build an app that using the accelerometer and geo-location.
Now thanks in part to many different posts on here and other sites I have got most of my app working without any problems.
I now have to get it working as a background app. I am building this for iOS and android, but the main aim is iOS. I know that iOS7 changed a few things but also add support for BackgroundFetch, how do I use that within a app that I will be building with build.phonegap.com?
Now I have found this plugin, de.appplant.cordova.plugin.background-mode but when I added it to the config.xml file, phonegap build says its unsupported?
I know there is a list of areas, What's solution to make task background in iOS same service in Android? , where you can list in your 'plist file' for iOS and state what type of application it is and iOS will run it in the background because its using one of these features.
Now I have read somewhere - not to sure where - that the config.xml is built, when phonegap build runs into the plist file, so somewhere in that file I should be able to state that it is application using this and that, therefore run in the background?
So is there any many of making my app run in the background?
Any help would be most welcome
Thanks
Glenn.
The resources you have found are referring to building apps locally on your machine, not with phonegap build. You will not be able to achieve the functionality you are looking for with PGBuild as they don't allow that level of configuration.
To achieve this you will need to setup a local cordova/phonegap client and build your app from your computer.

how to implement application update for android Apps

The way I develop android apps is, by Making an App with Sencha Touch ExtJS, then I use Eclipse like we normally do for android app development and just package my already build Sencha Touch ExtJS app. And i get an APK.
Now what i want is, when the app load it should check from a predefined server whether there is a newer version of the app available, if yes then download it and update the installed app.
How to implement it. I am new to Sencha and Android Packaging so please explain to me like, i am a dummy.

Set up Phonegap with eclipse

I went through some documentation regarding Phonegap. Coming from an Android background, I wanted to try out phonegap so that I could develop multiple-platform apps relatively fast, however I am uncertain on a specific point. Is it possible to install phonegap on eclipse and code a multiple-platform app from there? Or do I have to stay installing xcode, visual basic etc and coding for every one?
Can someone kindly indicate what the best practice is in this situation?
Check out this link :
Integrate Phonegap with Eclipse
That will show you step by step process.
if you want to use the same code for multiple platform then you have
to upload the code which is under www folder to Phonegap site.
They will provide you multiple builds directly. Or if you proceed
separately like Android above then you have to generate separate
builds with separate ides available like eclipse for Android and xcode
for iphone.
Thanks.
When you will download PhoneGap that will be included with an example just import that example & run that example in eclipse & go through all the files available in that Project . So that you will understand that which files you have to put where & how .

Categories

Resources