Back to project page countly-sdk-android.
The source code is released under:
Copyright (c) 2012, 2013 Countly Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Soft...
If you think the Android project countly-sdk-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.OpenUDID; /* w w w. ja v a2s . com*/ import android.app.Service; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.Binder; import android.os.IBinder; /* * You have to add this in your manifest <service android:name="org.OpenUDID.OpenUDID_service"> <intent-filter> <action android:name="org.OpenUDID.GETUDID" /> </intent-filter> </service> */ public class OpenUDID_service extends Service{ @Override public IBinder onBind(Intent arg0) { return new Binder() { @Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) { final SharedPreferences preferences = getSharedPreferences(OpenUDID_manager.PREFS_NAME, Context.MODE_PRIVATE); reply.writeInt(data.readInt()); //Return to the sender the input random number reply.writeString(preferences.getString(OpenUDID_manager.PREF_KEY, null)); return true; } }; } }