Android Open Source - countly-sdk-android Open U D I D_service






From Project

Back to project page countly-sdk-android.

License

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.

Java Source Code

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;
      }
    };
  }
}




Java Source Code List

ly.count.android.api.AdvertisingIdAdapter.java
ly.count.android.api.ConnectionProcessor.java
ly.count.android.api.ConnectionQueue.java
ly.count.android.api.CountlyStore.java
ly.count.android.api.Countly.java
ly.count.android.api.DeviceId.java
ly.count.android.api.DeviceInfo.java
ly.count.android.api.EventQueue.java
ly.count.android.api.Event.java
ly.count.android.api.OpenUDIDAdapter.java
ly.count.android.api.UserData.java
ly.count.android.example.CountlyActivity.java
org.OpenUDID.OpenUDID_manager.java
org.OpenUDID.OpenUDID_service.java