Share and persist an ID/string between Android apps - android

I'm working on an app for a customer that already have a couple of apps. Request is to find a way to have an ID/string that could be generated (using a GUID) and shared between that set of apps. A sort of "CustomerDeviceID".
i.e. When user installs the first app from that publisher an ID is generated and stored in some way. Then, when user installs the second or third app, that ID could be retrieved and used. Obviously that process should NOT be driven by the user (no pickers, no permissions, no intents).
Android provides ANDROID_ID to do that but it is generated using keystore, so apps should also be signed using the same keystore (customer apps aren't!).
On iOS we are using shared keychain, but I can't find a way to do that on Android... any ideas? Thanks in advance

Related

Same account, multiple applications

I am developing an SDK which multiple applications will use. This SDK should login to the user's account and will provide the application with server interaction works. My problem is that I want to share this user's account between these applications. So there should be a mechanism in which applications will first look up the account if it exists, they will use it, if not, they will create it. But I am having technical challenges.
I looked up android's custom accounts so that the account credentials could be stored there. But I am not sure if it is possible there. First, is it possible to see if an account under a certain type exists? Second, is it possible for an application to use an account which another application created? For example, google games is doing exactly this functionality. Any game can login with user's google game account. But I need to do this without installing a third-party service on user's device.
Generally, if you have anything helpful to solve this situation, it is much appreciated.
If you looking for a solution on the device you can use a content provider to share data between the two apps.
After digging deep in the explained situation, I got my answer
First, yes it is possible to see if there exist an account under an specific name. This name can be different from the application's URI.
Second, it is possible to use an account which another application has been created.
So in the SDK, I can first lookup a contracted account name which there will be an stored token. If it exists, the SDK will store it in the shared preferences. If it does not exist, the SDK will create the token using the user's credentials. This way, other applications can use this account and if the application which created the account has been uninstalled, the next application which runs, will recreate the token in accounts from its shared preferences.

Merging apps on Google Play and App Store

I have a client for whom I have made three apps for different regions (App 1, App2, App3).
Now the client changed his strategy and instead of having a different brand for every region he wants just one global brand which also means one app. He obviously doesn't want to lose the users of the three old apps in the process so my question is: can I somehow merge all these apps into one on Google Play and Apple Store?
I couldn't find sufficient information anywhere. All I could think of was to update all three with a new package but that would mean that three apps (now with the same name and same everything) remain in the stores, which would probably result in deletion.
Is there any way to do this?
you should tell all the users of 3 applications by notification that they need to download new application and their data will be transferred into the new application.
While Prashant Jaiswal has already answered it, let me elaborate it a bit.
Step-1
Provide an update to each of your 3 apps that shows an overlay with a message saying that We have a brand new version the app and current version of the app is going to be obsolete. Please install the new app from playstore
Step-2
If there are any local databases associated with your app, then make a provision to update all the user data to server as a backup which they can retrieve again from the new app.
Step-3
If your app has social media login associated with your app, then it will no longer be continued, since changing the package name will result in creation of new app, so you have to make necessary changes in your server to handle the social media login.
step-4
Make the provision to accommodate the changes of step-1 to step-3 in your existing apps so that the migration can be taken place, and once user clicks on the install new version, begin your migration process before redirecting user to the play store.
step-5
Then use this link for Android Implicit intent to uninstall application? to uninstall your existing apps once the new app is downloaded and follow something similar for iOS part.
final step
All the above steps I mentioned by considering the general app design, there might be few more things that you have to consider based on the complexity of your app and its interaction with the servers
Just so that you know, you can not merge the three apps directly at
playstore. The only way to merge the apps is create a merged app and
redirect the users.

Single Android Account for multiple apps

in my company, we have two apps that access an authentication (from our own webservice) token from the android account manager. Because this is a SSO, we decided to extract the login (activity and AbstractAccountAuthenticator) into a library, that both apps are binding to.
In order to keep the account in the android system, if one of our apps gets uninstalled (assuming the user installed both of our apps), we gave the accountType a unified name ex. my.company.auth (both apps however have the package name my.company.a and my.company.b respectively).
The problem lies when both of our apps gets uninstalled: the entry in the account settings in android is still there.
Does anyone know why or what I am doing wrong?
Does it have to do with the accountType, that has a different 'package name' then the apps?
Thank you very much in advance
You need to separate your custom account type component and provide a separate apk file.
When user tries to use any of your app, you need to check if custom account type app exsits on the device or not.
If your account type app doesn't exist, direct user to playstore for downloading your custom account type app so that user can create account for your custom account type and continue to use your app.
In this way, since user created account is not tied to one app and custom account type is separate app, uninstalling any of your app won't delete account created for your custom account type.

Adobe Flash App -- Unique Device ID

I'm developing an application using Adobe Flash (AS3) which runs mainly on tablets.
I would like users to pay. So they have to activate their application.
To do this I thought about providing an activation Code that is built using a univoque Device Identifier (UDID)
So, the customer provides me his UDID and I return the activation code which works only on his device.
My problem is (I searched everywhere)... how can I obtain an UDID using AS3?
Or also, do you suggest a different approch to reach my goal?
Thank you very much!
Daniele
There is no single correct solution to what you are asking , It depends entirely on your needs and kind of app you are publishing.
createUID() function in mx.utils package Generates a UID (unique
identifier) based on ActionScript's pseudo-random number generator and
the current time.
But that may not help you as this ID is not machine dependent , user can simply publish his UID and your authentication key . User may need to install the app in other of his devices, user may accidentally delete the file which will delete the originally generated UID too.
A 64-bit number (as a hex string) is randomly generated when the user first sets up the device and remains constant for the lifetime of the user's device. The value may change if a factory reset is performed on the device.This is accessible using java by constant ANDROID_ID there is no library in ActionScript-3 to access this . But you can use this ane to get it.
Or You can use a sign in from facebook using this ane or google+ and use the customers unique id from there , but it would require him to give your app permissions to view some basic information.

How do I let some users to install for free a paid Android App?

I am developing an Android application, and common users have to pay for it. But, I want to offer that application for free to my webpage users. I have a login in that webpage, so I can control what users access to the application. So the question is:
If I put the .apk into the private zone of my webpage, and users access it through the mobile, Do they download the application and can distribute it, or it just get installed on the phone?
And what if they access by PC?
Is there any way to avoid the download of the file, and just install it on the phone?
I fear installing without downloading is not possible, maybe you shoud think about a second version which needs a key (e.g. created by the device ID and a secret Prefix.
User is downloading your apk
User get the message he needs to register
User send his Device ID to yor Webpage (and have to login before)
Your Website create a hashkey with the device ID and a secret password
The Application stored the key in the Preferences and will check at startup, if the stored key fit to the Device ID/password Hash.
If you let some download your apk, then it just get downloaded. Users will have to install it manually and what is worse, they won't get updates through the common android market mechanism.
if they have rooted phone then they can do anything with your apk. there is no security in android even you can get the source code of an app.
in your case the only way is to implement certificates.

Categories

Resources