Adobe Flash App -- Unique Device ID - android

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.

Related

Share and persist an ID/string between Android apps

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

Is there a unique id for applications like IOS vendor id?

Is there a unique id for every Android application that changes when the application is re-installed? Some people say Application Id = Package Name for Android applications but I need a unique identifier to track applications.
EDIT: I need something other than package name because Although package name is unique for applications it's not unique for devices/users. For example, my app has a package name like com.example.myapp, it's same as every device that has the app. And yet it doesn't change when I re-install the app.
I had a similar requirement for one of my apps. What I did, is whenever the app is running for a first time after install, it connects to my server and requests a new unique ID. It's similar to authentication process, yet it runs automatically on first app launch.
Also, there is one more thing you might find useful. There is such thing as Linux user ID, it's unique for each app installation.
At install time, Android gives each package a distinct Linux user ID.
The identity remains constant for the duration of the package's life
on that device. On a different device, the same package may have a
different UID; what matters is that each package has a distinct UID on
a given device.
If you want it to change upon reinstallation of app, it is better to create a UUID in your app and save it in SharedPreferences. Then you will need to check SharedPreferences each time you need this identifier. If it exists, use it and if not regenerate it and save it.
The only draw back of this approach is that if user do a clear data on the app, this id will be lost. If it is important for you to not lost it in this case, you can save it in a file so as it only deletes when your app is deleted.
Other than this, you can use androidId which is mostly stays the same even upon reinstallation of app and is a better approach to track each installation uniquely, although its has some details to note specially on android oreo.
It depends on what is the purpose of this identification. For privacy, you shouldn't not be able to identify certain user with your application.
You can follow this article here
And depending on your requirement of the scope, resettability, uniqueness and integrity of that ID, you can choose the one that works for you best.

Unique Android Device ID that can be acceptable by Play Store without Privacy Policy

I am new to Android Development so i do not have much knowledge about the Android Unique Ids and whether Play Store will accept my app or ask for me to include any PP. Purpose of using this is to identifier that which user is interested in the promotions that i will provide in my App (For this purpose I have my own view similar to Admob banner).
Please let me know that how i can achieve this.
I use Settings.Secure.ANDROID_ID
A 64-bit number (as a hex string) that is randomly generated when the user first sets up the device and should remain constant for the lifetime of the user's device. The value may change if a factory reset is performed on the device.
android.provider.Settings.Secure.getString(
context.getContentResolver(), Settings.Secure.ANDROID_ID);
It gets reset if user performs factory reset of device.

cordova detect if app was downloaded from Google Play

I'm making a Cordova 4.0 Android app that will be sold in Google Play, and I would like to prevent illegal use of it (for example preventing someone to extract the APK from the system and re-distributing it).
One theoretical way of doing this would be by checking that when the app is launched by the user, he did actually download it from Google Play (versus being it sideloaded). I'm not even sure if this is possible or if there's an alternate way of doing something like this.
One way that works in other cases is to use require some sort of login when accessing the app, but in this case I can't do that. Any advice would be appreciated!
Google offers a way to implement validation / licensing:
http://developer.android.com/google/play/licensing/index.html
Take a look if this is what you need!
One suggestion would be for those apps which are get connected to a server to fetch some data.
App verification token
Generate an encoded 64-bit long token and store on both device & server as well. This will be a unique token per app
Whenever app tries to connect to server, it sends the device token details. Server needs to verify it before fulfilling its request.
On specific events, server can generate a new token for a device.
Same way, device token can be mapped to a user or an app on the server side.
Token could carry some app related information, for instance.
first 4 or 6 digits represent app size
second block of digits could represent user specific or device or some other details
Or another block could hold app contents modification date
In case of any change, server could verify the app size, last app contents modification dates, etc.
Generally it is recommended to uglify, obfuscate and minimize app resources before submission.
You can use the package manager class to determine the source of an app (only google or amazon currently detected)
You can similarly use google analytics which gives same information.
This is pretty neat since Android stores the source of every package, allowing apps to know where they came from, to prevent piracy and sideloading.
Great if you always publish to google or amazon. Useless if you sideload your app.

Is FlurryAgent.getPhoneId() unique for each customer?

I was tracking the user behavior using flurry in my android app.
I came across a function called FlurryAgent.getphoneId()
I had 2 questions:
1) Is this Id unique to every single phone? I am trying to make this the unique Id for each customer.
I have checked this id with 2 different devices and FlurryAgent.getphoneId() gives 2 different Ids. However, I am confused if those 2 ids are device Ids or unique user ids.
(I am afraid 2 Motorola Fire XT 530 may have the same FlurryAgent.getphoneId().)
2) After I clear app data this phoneId doesn't seem to be changed.
Where is this phoneId stored?
I have checked their website but no documentation on getphoneId is available. Please help.
Flurry uses SHA1 Mac for iOS and Android ID for Android apps as device identifiers. These are used solely for internal identification purpose, and are not disclosed to developers. You need to use setUserID method to assign a unique user ID for a user in your app. Please be sure not to use this method to pass any private or confidential information about the user.
(Full disclosure: I work in the Support team at Flurry)

Categories

Resources