Reclaim User History Android - android

How to check if the app is a fresh installation or a re installation. I want the user to have his history downloaded if its a re-installation like whats app. I thought of writing the user id in the shared preference but that is not possible as the data may get erased once the app is uninstalled. I am already having a folder of my app on the device which is used for image caching and downloading new images, but this is not reliable as the user may delete the folder. What else can I try ???

Obtain the user storage with getExternStorage, then leave a file there that specifies the usage history. The file you save there will survive uninstalls and reinstalls. Of course the user can delete that file but generally they will not, and if you name it properly they will realize it is part of a program.

I'd suggest you integrate with Android's Backup Service.
People switch phone every two years. Some factory reset their device. Some have more than one device. And some share their device with their kids. Linking a user history so that it follows a particular google account is the ideal way to go.
As to your question regarding Facebook integration, I'm afraid I know too little about that topic to be of any help.

Related

Android scoped storage and persistent files

I have an app that creates a directory for backup files on the external storage and automatically creates backup files when the user exits the app. One backup file per week is created and then one backup file that is overwritten all the time with latest info.
The backup files can't be located in getExternalFilesDir since they needs to survive that the user reinstalls the app.
I can't use MediaStorage because it's not an image or video.
I can't use Storage Access Framework to ask the user every time he exits the app to save a backup file.
So how to automatically create persistent backup files with the new Scoped Storage?
(I also need to list all created backup files, if the user wants to restore one of them.)
Backup is appropriate in the case when the user loses the device, buy new, install the app, login and get his data as they were.
Your question is looks like you try to leave on the user device something that he probably doesn't need, as far he deletes the app. If it's the general files like images, music, documents that many apps can view or edit - leave them there and do not care. If it's only your app data - they should live while your app is installed and die when the app is deleting.
It makes sense to back up to the cloud only. In case you don't need a personal server, here is the option: implement syncing with Dropbox or Google Drive. It's the best option just to update the app's data after each closing of the app using the service.

Is there a way to serve a dynamic (config data changing) apk file in my web service?

What I mean is, I want to know which device downloaded this specific apk file.
Let's just say I want to have a single string key that is provided by my webapp that my android application can resolve.
To make it more realistic, I want to know how many people will download the apk that a specific user of my webapp shared and the counter will just be incremented when the apk is successfully installed and the app is opened.
The link that is shared by the user is just opened via the device browser.
So, I think I need my android app to know the userId of the user that shared it.
Is the APK gonna be download through another android app? Aside from the userId of that certain app user, you might want to check out the device's IMEI, which is a unique value. I'm honestly quite confused with your question for a bit.

How to detect, if Android App was already installed at the device?

Is it possible to save some information at the device, if user deletes the application from his device? Something like a key-value (f.e. ("app id","date of installation")) which will not be removed?
Background: we are working on an application, which has an anonymous user for "exploring the app". This user should be removed, if user logs in. We can cover all cases, but not if user deletes the whole application. In iOS you can achieve this, by saving some values in the iOS-Keychain.
Any ideas or workarounds are welcome!
You have to save the data to some external file. So when you want to get the data you can read the data based on the file path.
Is it possible to save some information at the device, if user deletes the application from his device?
You can put stuff out on external storage in a place that will not be automatically deleted when your app is uninstalled (e.g., one of the roots supplied by Environment). However, the user can delete that file whenever the user wants.
Beyond that, there are no options, specifically so apps do not leave cruft behind that builds up and clutters up the user's device.
we are working on an application, which has an anonymous user for "exploring the app". This user should be removed, if user logs in.
It is unclear what this has to do with your original question.

How to Manage Offline Trial Expiration for an Android Application?

I have developed an application that I want to share with my clients. I want to share its trial, taking care of following points
Application should expire (i.e. User cannot move from main activity) after 30 Days
Internet connection is not required for my application so I don't want to manage trial expiration by managing a server where device's IMEI can be stored or sort of thing.
I want to restrict user from using application even if he uninstall and later on re-Install my app.
I want to protect application trial against a manual date changing hack normally applied by users
I was planning to maintain a file for my application with time token of first run saved in it which can be compared with GPS time on each run but the issue I am facing here is of file storage. If I save a file in Internal memory it gets deleted with application un-install and cannot be used when user reinstalls the app and if I store it on SD card/ External memory it is vulnerable to user deletion. I have investigated this issue from everywhere I can but got no success. Any idea or suggestion by you guys would be a relief. :-)
There will have internet access when the app is installed, or they wouldn't be able to install it.
Simply require that the user activate the app with a server the first time they use it. The app gets a "this app was first activated on yyyy-mm-dd" response from the server, and stores that info on a file in internal storage. From that point on, the user won't need to be on-line to use the app.

Android: saving info for trial application

I want to save some info regarding a trial version an application.
I want this info to be persistent in order to detect if the user removed the application and installed it again after the trial expiry.
what is the best place to store such info
thanks
Most of the times the solution to this problem is to keep an server side check,
But if you dont want to involve a server its better to give some limited functionality in your trail app and full in the paid version.
There are other methods too like Time Trial but again they all depends on persistent data so they also fails if the user uninstalls and installs again your applucation
Store it in external file.
it wont be deleted after user uninstalled the app.
but
Serverside check by Device ID is the good way ..
I'm working on the same "problem" at the moment (offline solution for trial time expired apps):
My findings: There is no way to ensure that a user never can reinstall & reuse a (time) trial app but there is a way to 'nearly' prevent it:
Use shared preferences / a database / file saved on internal storage containing the install timestamp.
If the device has an external storage card (most devices have) also save the timestamp on the sd card.
The only possiblity to use your application also after expiring is if the user 1. clears app data on the phone and 2. finds the timestamp file on the sd card and also kills this one.
If he "just kills" the first or second check the killed one can be restored on next app start.

Categories

Resources