Skip to content

Instantly share code, notes, and snippets.

@s0h4m
Created June 8, 2016 07:12
Show Gist options
  • Save s0h4m/eb3efe57d36c2892ebfba2c8433555cc to your computer and use it in GitHub Desktop.
Save s0h4m/eb3efe57d36c2892ebfba2c8433555cc to your computer and use it in GitHub Desktop.
Generates an anonymous analytics ID for non play-services powered devices
import android.content.Context;
/**
* A basic implementation of {@link Id} to be used in non play-services environments
*/
public class BasicId extends Id {
/**
* Get an analytics ID for non play-services powered devices, uses UUID to get the id
* @param context
* @return
*/
@Override
public String getId(final Context context) {
return getUUIDPoweredId();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment