Android app restart after Google Play update - android

I have just updated my app on Google Play (just in beta mode yet), and I was quite surprised that when I tested the update the app did NOT restart. How is this possible? For correct behaviour it should restart. (It uses Activities only.)
What if I had significantly changed the app functionality? The old version would run until the user manually restarted the app?
I didn't find a guide on updating Android apps. (just user guides, but they are useless for me).

I figured out what the problem was. I am using a Nexus 7 device, with multiple users, and I had the app installed on both. While the internal storage is different for these apps, the path for the App Expansion Files (shared-storage/Android/obb/package-name) is the same. This caused issues in the non- updated version, because it saw the updated Expansion File, and re-downloaded its own version again.
I think this is quite an issue of the OS, because the two user's versions should not interfere with each other at all.

Related

Android Alpha Update - No Download Showing

I've recently released an Alpha build of my app via Google Play Console (as I've done many times in the past). This is a closed testing build and I've opted in with my device/account via the URL console provides.
There is an existing production version of the app.
I waited a little while then went to PlayStore app to download the update.
Strange thing is, the version shown in PlayStore is updated (to the one used by my Alpha build) but there is no option to 'Update', only the option to Open the already installed (older) production version I have installed on my phone.
Has anyone seen this before? Could it just be Google are still in the process of rolling out my Alpha build?
Update
I've waited over 12 hours now since upload to console
I've tried clearing the cache on the PlayStore app to see if the update option appears but it didn't.
Update 2
I've got the update to work but in a very convoluted way. I had to:
Open the 'download' link on the testing opt-in page using Chrome (not PlayStore)
Click 'Buy' (not Update) and let it install
The result is though that it didn't seem to update the app, rather overwrite it. As a result a migration routine I had in the new app to pull over old data didn't run and my previous app data was lost (this is a separate issue though).
It does sound like something is wrong with my PlayStore app but what!?
This is weird. This sounds like you changed package name (essentially released a new app) rather than just release a new Alpha.

How to set updated apps to System apps?

So i'm gonna be as elaborative as much as I could..
I have a Xperia L with latest firmware and I was trying to set some third party apps to system apps, and I succeeded after some time I thought that if I could set App updates to system app (meaning removing the older version) and I succeeded again but when I was doing the same to Chrome I stumbled upon to a problem..
So before I tell you what was the problem i'll tell you how I did it..
1.I updated Chrome.
2.I moved the original. apk from "system/app" dir to My SD so that it can be changed to new one. (My set is ROOTED)
3.Then I moved the. apk from "Data/app" folder to "system/app" folder.
4.And renamed it to the Original. apk 's name.
5. And changed the Read/Write Permissions as it should be.
6.That's that.
So after that I tried launching chrome but it said
"Chrome failed to start due to an Unexpected Error"
but with above methods I replaced a lot of apps like Walkman, Calendar, PlayStore, Play Services and some i don't remember...
and they all worked fine even after restarting it..
so then I uninstalled Chrome with Titanium Backup since it was a system app..
and then I tried the same with Album app.
I replaced it's. apk and tried it but it started crashing.. so I deleted it. too and placed the original one back..
and restarted my set..
But now it is stuck on Black Screen after Sony logo...
I know I can Flash the ROM to get going but if there's any other way to do so please let me know..
now i know it's kinda two questions in one but I really need to know both..
Thanks in advance...
You can use Link2SD or other root apps to add them automatically to the system image

Why are Android app updates/patches sizes are like its setup files?

I was just wondering the same when try to update from PlayStore.
Generally, say for Windows, when it is updated, downloads the files and patches them. From size perspective, these are significantly small compared to its setup which is around 3.5 GB.
So why its not applicable for ANDROID apps? E.g. any update to WhatsApp is almost equivalent to its original setup file (~18 MB).
Although Play Store calls them updates, you actually download the whole Android app again. In a way, it's still an update because you do actually upgrade to a newer apk version but not quite the way you would've liked. It's taxing on your bandwidth but it's easy.
However, your app's settings (shared preferences) and data (SQLite databases or custom files) survive this update/install process which won't be the case if you manually uninstall & install the app's new version again.
In cases where the app's database schema has evolved between the two versions, Android notifies the app on startup that it wasn't a fresh install by calling a life cycle method onUpgrade() where the app has a chance to upgrade its data left over by the previous version.
When you compare this with Windows, both the OS and the update server are from Microsoft and they must have worked together to figure out what needs to be pushed (.dll, .ini, .sys etc.), update bundle's format/compression and security implications (some sort of encryption to prevent malware injection by any one intercepting the traffic).
No such standard update mechanism has been made available by Google for the Play Store see update and I believe so is the case with every other app store. Obviously, the developers can't roll out one on their own since the updates are handled by Google both at the device and server side.
But, the developers are certainly not unhappy about it. It's much more convenient to test the new apk, see it working and uploading the same rather than fiddling with what changes to push and breaking the app if you miss something. The bandwidth is cheap anyway.
I've just recently discovered that at Google I/O 2012 Google announced that they were working on a Smart Updates technology using some delta encoding algorithm. The idea was to compute the DIFF between two APKs (sort of like we do for text between two source code files), create a patch on the server-side and only send that over the wire.
This feature went live on Play Store later that year as reported by AndroidPolice and TechCrunch.
Developers, Google said at I/O, won’t have to do anything to enable
this feature and according to the folks over at Android Police, this
feature quietly went live late last night or early this morning.
You can see it in action in this video. Notice how the apps start installing once the progress bar hits just 40-50%. This is absolutely brilliant because not only this saves Google terabytes of bandwidth, its pure server-side approach means developers don't have to fiddle with anything. Perhaps, that's the reason it finds no mention on the android developers site and so takes time to get discovered.
With that said, my personal experience seems to coincide with yours. I see most of my app updates download almost the whole of the app. Maybe it's because I don't download very frequently. It's not unusual for me to skip several minor revisions and perhaps the app changes far too much to derive any size benefits out of the patch generated.
There is nothing like an "update" for an Android app. It is always a full app. It is called update, because it is a new version of the app currently installed in a device.
But when it is an "update" the whole app is not fully downloaded. For many years the Google Play downloads just parts of the app and patches the currently installed app with the difference. So in the case of 20MiB the Google Play can download just few megabytes to reconsctruct the new version in a phone. Google calls is Smart App Updates or something like that.

Blocking Apk's from installing directly into BB10.2.1 updated devices

I port my android apps for making bb10 builds . Since now from bb10.2.1 update blackberry has introduced a new concept wherein apk's can be directly installed and can be installed in BB10 devices if the manage apps in settings menu of the phone is made ON. My question is that I wanna restrict my users from doing so and not installing the apk's into bb10 . And take download my app only from appworld.
Has anyone faced and has fixed this issue kindly tell me on how to solve the same.
Based on the Android behaviour, I don't think you can restrict users from doing so.
I haven't tried it on BlackBerry but from what you say, that option sounds analogue to the Unknown sources setting under Security settings on Android. If the user enables the installation of applications from unknown sources on their phone, there is now way to prevent the direct install of the apk (by adding something to your apk or any other way).
There is no way to restrict it to BlackBerry World only. If they get the APK, they can load it directly this way. There may be other ways around it though.
If, for example, your app is for sale and people are side loading a pirated copy, you could change your app to be free, and put some advanced functionality in your app behind an in-app purchase. That way they'll be forced to go through the storefront at some point to pay. This takes bigger changes to your app though, and the IAP implementation is likely different between BBW and GPlay.
You could also put in a version check: when your app launches, it checks a special file on your web server to see what the latest version of the app is. If they don't have the latest version, it doesn't let them use the app until they upgrade. This won't prevent side loading or piracy outright, but you can put out updates often enough to make side loading very annoying. When they are roadblocked and told to get the new version, you can link directly to the storefront to encourage them to get the latest version there.
Thirdly, and lastly, if you port your app to a BlackBerry 10 native, cascades, or WebWorks app, the app file is fully protected and can't be pirated or extracted from BlackBerry World (since the platform is secure). That will 100% protect you from piracy on BlackBerry 10.
I hope this helps!

Android/iOS Apps Crashing, do they need deletion for new update to occur?

I've got a development partner who says that in order to fix bugs that cause an application on iOS & Android to crash on load that end users need to delete the original app and re-download the new updated version. Are they for real? Shouldn't it just be incorporated into a standard app update and work like any other update?
The answer depends on how your app was distributed. If you just sent out a link like http://www.mysite.com/mytestApp.apk, it's easiest to uninstall. If they're updating via the Google Play Store, you have to set your version number higher than the installed version. Users can then get the newer version more seamlessly. I haven't done an ad hoc distribution with iOS yet, but updates via the app store seem to work similarly to the Play store. Users get a notification and can then update if their device meets the required specs.
Usually an update should resolve these issues. However, I have seen rare instances where users running older apps will need to uninstall/reinstall to get the new version of the application working. Like I said, these are rare instances where some major configuration has to take place. It's not something most updates need to do.

Categories

Resources