how to implement application update for android Apps - android

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.

Related

How can I put a web site into a mobile native application?

First, I have a web app made with angular + angular material that looks like a mobile app, now I "ported" this webapp to a native mobile app using capacitor + cordova plugins and works fine, all the features work fine.
My deployment proces is:
Build angular app, sync to android, build android and then publish in play store (same for ios), it works, but, every time I make a change to my web app, I have to repeat this process and you know, the user has to download the new version of the app, install, and use, I would like to avoid this.
Since my app is web, located on a site (It can be accesses via web too) I would like to know if there is something that inside my webview opens the url of my site (without exiting the app, I tried making a redirection but it opens a web browser), so, the end user won't have to download the new version of the app every time I make a change and I won't have to upload the build to play store and app store.
I know that it can be done because my bank app does something like this but I don't know how to do it or how to search for it
How can I achieve this?
Thanks and sorry for my english, I hope I have explained what I want to do
"Live updates" are one way to solve this. Live updates allow you to send patches to your app and actually change the app code to some extent without going through app store review. Big updates will still have to go through app store review, but you can make lots of little updates "live" by using a live update service.
You can do live updates with Ionic. Ionic is open-source, but the live updates are part of the Ionic team's Appflow package, which is a paid service. Pricing currently starts at $499/month for 25,000 updates.
In this same space, there's Capgo, which is cheaper and works with Capacitor in general (does not require Ionic).
More info: Long discussion on this topic in the capacitor-community github repo
Ionic is the framework that would fit your use case. You can build apps in angular and ionic wraps it in a webview of native android apps. If you need to access native android feature, you can install capacitor lib too along with ionic. Capacitor is a library to interact with mobile's api (IOS and Android) with javascript.
Anoter approach to build native android apps with JS would be reactnative. It is different from ionic. You would have to be familiar with react sytax to get statrted easily. React native is not a webview app rather it is compiled to native platform code.
Look into flutter too. It uses dart but apps perform faster made with flutter and it can build both for android and IOS with same codebase
CONCLUSION
If you want to stay in angular code, go with IONIC

How to install a PWA with Android WebView/TWA

Scenario
I have an existing native android app in which I want to add some new features. These features have already been implemented as a PWA because some users needed to use them directly from the web.
I want to be able to open the PWA with an Android WebView (as if it was part of my native application) and install it 'locally'. With 'locally' I mean that the PWA should not be visible as an app in the phone, it would just be part of my existing native app. In a way, what I'm trying to achieve is a king of "plugin" system, where I could have extra features that the user can install to the native app.
Where am I stuck?
Opening the PWA with a WebView is fairly straight forward. The part that I am unable to do is installing the PWA. Maybe TWA could solve this issue, but I am not sure it is meant for that.
Moreover, ideally I would like to keep everything in a Fragment since I would like to have the toolbar and others created by the native app (that is why I've leaned more towards using WebView instead of TWA).
EDIT---------------
After messing around I was able to understand that it actually gets installed with WebView. Since I haven't been able to find any information about how it works online I've been researching it on my own.
First of all ServiceWorkerController is only available from Android 7 (24). I haven't been able to test if with Android 6 this can work or not due to the fact that I don't have any phone with that version and I can't update the WebView apk of my emulators for some reason.
Then, I found out that the webpage crashed in my newer emulators because the WebView apk installed was too low and didn't support some newer features. So another thing to take into consideration the WebView version installed. This apk gets installed separately from the Android version (it's as if it was an app on your phone). The solution to this is to just use a real device, because the apk is usually always up to date.
As you can see in the following picture the PWA gets installed inside the app folder and it also keeps all the info (databases, localstorage, sessionstorage, etc.) in there.
It is unclear how this data is handled (I created this question) but it appears to be at least in the following cases:
WebStorage.Instance.DeleteAllData()
App uninstalled
App Data Cleared
Clearing the Cache of the app doesn't delete the persistent data.
So now I would say that the question would be:
From which Android Version does the Service Worker install? Just from the Android version that has support for the webview apk version that supports Service Workers?
Does it depend at all on ServiceWorkerController? Or is it just a utility class to have more control over what happens?

Is Possible to make program or software to convert source android app to ios app version by one click?

i have develop more than 30 android app and now our clients need ios version of those apps can anyone developer make an tools to do this by uploading android source code to this tool to perform by conversation to ios version
No, it's not possible for one click.
You need write native application or use cross-platform framework like react-native, xamarin but in this variant better rewrite current application

How do I use the Alexa Voice Service device SDK in an Android app?

I have successfully built the AVS Device SDK on Android with the help of the reference guide to building Device SDK on Android that the Amazon team sent me. However, as a novice Android developer, I don't know where to go from here to actually use the SDK in an Android app. For example, I'd like to press a button in my app to activate Alexa and speak to her/it. How would I proceed after successfully building SDK on Android? I have pushed the local build with all the compiled libraries to the adb shell and have ran most tests successfully.
I know I'm most likely going to have to user NDK and JNI, but yeah, some guidance would be great.
Also, would it be possible to run your sample app on Android? I am aware of the previous Android sample app, but I'd like to try running this new C++ SDK sample app on Android too.
You'd need to build it on your own. There is no official support to iOS/Android in avs-device-sdk and Alexa assets are not public (e.g. Alexa logo for the button).
In order to make it work, you should integrate LoginWithAmazon SDK and once you have a valid token you should be able to start using AVS.
I hope an official iOS/Android AVS SDK will come anytime soon.

Doubts about Cordova 3.6 webviews, events & updating application

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.

Categories

Resources