Saturday, 24 February 2018

Important Library for Android

Using Parceler


Although creating Android Parcelables is usually at least 10x faster than using Serializable, creating Parcelable objects requires creating a lot of boilerplate code in defining exactly the stream of data that should be serialized and deserialized as documented in this section.

https://github.com/codepath/android_guides/wiki/Using-Parceler



---------------------------------------------------------------------------------




Reducing View Boilerplate with Butterknife


Butterknife is a popular View "injection" library for Android. This means that the library writes common boilerplate view code for you based on annotations to save you time and significantly reduce the lines of boilerplate code written.


Android Plugin
-----Android ButterKnifeZelezny----



https://github.com/codepath/android_guides/wiki/Reducing-View-Boilerplate-with-Butterknife

Wednesday, 29 November 2017

All Size design scalable size unit






An android SDK that provides a new size unit - sdp (scalable dp). This size unit scales with the screen size. It can help Android developers with supporting multiple screens.
for text views please refer to ssp which is based on the sp size unit for texts.

dependencies {
  compile 'com.intuit.sdp:sdp-android:1.0.5'
}

Wednesday, 15 November 2017

Device ID







final TelephonyManager tm = (TelephonyManager) getBaseContext().getSystemService(Context.TELEPHONY_SERVICE);

final String tmDevice, tmSerial, androidId;
tmDevice = "" + tm.getDeviceId();
tmSerial = "" + tm.getSimSerialNumber();
androidId = "" + android.provider.Settings.Secure.getString(getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);

UUID deviceUuid = new UUID(androidId.hashCode(), ((long)tmDevice.hashCode() << 32) | tmSerial.hashCode());
String deviceId = deviceUuid.toString();


Log.e(TAG,"deviceId........."+deviceId);

Wednesday, 8 November 2017

Data Send in android



integer data send from activity to service

-------------Activity--------------

Intent serviceIntent = new Intent(this, StatusService.class);
serviceIntent.putExtra("QB_Friend_Id",QB_Friend_Id);
startService(serviceIntent);



----------------service-------------------


@Overridepublic int onStartCommand(Intent intent, int flags, int startId) {
    // Let it continue running until it is stopped.
    if (intent != null && intent.getExtras() != null) {
        userID = intent.getIntExtra("QB_Friend_Id", 0);
        Log.v(TAG, "number........." + userID);
    }


AutoComplete Address (Updated)

-------------------------------------Activity---------------------------------- package placeautocomplete.iteritory.com; import androi...