Step 1 : Create project on facebook developer page and get facebook app id Step 2 : Insert following gradle file and sync your project compile ‘com.facebook.android:facebook-android-sdk:4.5.0’ Step 3 : Put your facebook app id in string resources as given below <string name=”facebook_app_id”>1763757463948957</string> Step 4 …
Android
RecyclerView space between items expanding when scrolling
We need to change row child item layout parent properties android:layout_height=”match_parent” to android:layout_height=”wrap_content”
Turn on speakerphone whenever an outgoing call is made
You can set it through programmatically as below : AudioManager audioManager = (AudioManager)getApplicationContext().getSystemService(Context.AUDIO_SERVICE); audioManager.setMode(AudioManager.MODE_IN_CALL); audioManager.setSpeakerphoneOn(true); But, keep in mind that don’t forgot to set speaker off when stop the call: audioManager.setSpeakerphoneOn(false); And, Set permission in manifest: android.permission.RECORD_AUDIO android.permission.MODIFY_AUDIO_SETTINGS This code is working fine for me.hope …
How to log request and response body with Retrofit-Android?
Below code is working for both with header and without header to print log request & response. Note: Just comment .addHeader() line if are not using header.