Android BackupManager not restoring after uninstall or other devices? - java

I am using the BackupManager to backup SharedPreferences to the cloud. Now this works as expected when I use it on a single device and only perform a reinstall not a full uninstall. To do that I am clearing data which wipes prefs and than reinstalling the app from eclipse. If I first uninstall the app and after reinstall it the restore call reports no data to restore. The same happens when I install the app on another device.
From my understanding I would expect the data to be restored to any device regardless of the app being reinstalled or being a fresh install. Let me know if posting code will help but I figured that because it is working I might just have misunderstood what the service should be used for and how it works. I am trying to backup a users settings and possibly some information they enter into search fields. I would like this data to follow the user to a new device or if the user uninstalls the app and reinstalls at a later date. Please let me know if BackupManager is not the correct tool to accomplish this.

As I know from the words of Android Advocate:
Generally it seems that BackupManager is only reliable for backing
up app data that will later be restored on the same device if the app
is re-installed from the Play Store.
If you want to do backup syncing across multiple devices then you can try to use Google Drive API, not BackupManager, and that there is very useful session from Google I/O 2012 on the subject.

Related

Adapter not showing data after installing app from playstore

so i am working on android app programmed in java which shows a list of animals sounds in recycler view. The app works fine when i install it on my device from android studio but when i upload the apk to play console and install from play store the adapter becomes real mess and apps gets crashing untill i clear cache and app data from settings.
Here is what app looks like on first install from play store (https://i.stack.imgur.com/OTQkX.jpg)
When i clear cache and app data from settings and relaunch the app it works absolutely fine.(https://i.stack.imgur.com/HPbgM.jpg)
I have tries all possible solutions which i found online but they could not help. Can anybody explain why this occurs and whats the solution to this?
Update: Following #Tenfour4,s comment i switched to production build in android studio but surprisingly app is working fine . The issue only occurs when app is uploaded to play console and installed from there.

Can you make an app auto download for android on contact with an nfc tag?

I have an idea for an app and after doing some research I couldn't find anything that would answer my question, what I want is for when a user touches their android phone off a tag, it auto downloads an app for them, kind of like a QR Code, but specifically nfc.
All help appreciated.
No app can be installed without user interaction. This is required because the user is in charge of the device and he has to manually allow an app to be installed, otherwise you have a great recipe for allowing malicious apps to find their way to your device undetected.
Best you can do is direct them to the play store page with your app, but it is up to the user to decide whether to install it or not.

Lost debug.keystore, can I update the Android app or retrieve the app data?

We have an internally deployed company app that has been signed with a developer's debug.keystore. The debug.keystore has been lost. Is there any possible way to:
Update a copy of the app using a new debug key.
Failing 1, is there any way an app with a new debug key could access the data of the already installed app (e.g. extract the data somehow, install the old and new apps side-by-side, adb uninstall -k)? The app does not have the debuggable flag set in its manifest.
I know the above is unlikely but I wanted to confirm before considering options as most stories about this concern Android market apps.
Looks like there's no way around this.

Message while app is deleted

I want to know why users delete my app. So, I what to know why users do it. Is it possible to ask the user why they deleted my app? API something like ACRA library.
It´s not!
When an Android-APP was uninstalled there is an INTENT coming up.
http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_REMOVED
So every other App might be able to recognize your app beeing uninstalled but not your app itself.

Access SQLite DB without the emulator?

I have been trying to pull out my SQLite database from my android application onto my computer.
I only get results, when I run my application on the eclipse android emulator and then I can access to the DB. But the thing is using the emulator is to slow and it doesn't have all the data I have been storing on my app on the cellphone.
I have been googling that for a day and all I can see is "use the emulator".
Isn't it possible without the emulator ?
On commercially released Android devices, you aren't allowed access to your app's internal SQLite database (for security reasons). Thus, if you simply can't stand the emulator, or if you just want to test your app on an actual device to make sure it works properly, there are two options to consider.
Root your device. This will give you access to the /data folder where your app's internal SQLite database is stored.
Use a 3rd party library to write the contents of your database to the SD card. This is a nice workaround if you don't want to bother rooting your device. Check this post for one such implementation.
The SQLite database in your app is just a file. You can use the DDMS file view in Eclipse to pull the file off your device, but only if you have a rooted or development device, or if you're using the emulator.
Once youve got the file on your computer you'll be able to run queries against it using the sqlite3 command (which, depending on your system, you may have to install).

Categories