Muennighoff/xP3x-sample huggingface dataset:
inputs: Given the following code:
Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
intent.putExtra(SearchManager.QUERY, query); // query contains search string
startActivity(intent);
Describe it:
targets: Start Google search query from activity - Android
inputs: Description:
How to resize AlertDialog on the Keyboard display

Implementation:
targets: alertDialog.getWindow().setSoftInputMode(
    WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
inputs: Description:
How to remove drawableleft

Implementation:
targets: yourTextView.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
yourTextView.setText("The Text You Need In There");
inputs: Description:
How to get the current sqlite database size or package size in Android?

Implementation:
targets: File f = context.getDatabasePath(dbName);
long dbSize = f.length();
inputs: Description:
How can I use SensorManager.getOrientation for tilt controls like "My Paper Plane"?

Implementation:
targets: if (SensorManager.getRotationMatrix(m_rotationMatrix, null, m_lastAccels, m_lastMagFields)) {
}
inputs: Description:
Android google maps marker disable navigation option

Implementation:
targets: GoogleMap map;
map.getUiSettings().setMapToolbarEnabled(false);
inputs: Given the following code:
if (mBitmap != null && !mBitmap.isRecycled()) {
    mBitmap.recycle();
    mBitmap = null; 
}
Describe it:
targets: Canvas: trying to use a recycled bitmap android.graphics.Bitmap in android
inputs: Given the following code:
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
Describe it:
targets: Start new navigation without exiting from previous navigation in Google Map
inputs: Description:
How to disable marker click event?

Implementation:
targets: map.setOnMarkerClickListener(new OnMarkerClickListener() {
        @Override
        public boolean onMarkerClick(Marker marker) {
            return true;
        }
    });
inputs: Given the following code:
PendingIntent pintent = 
   PendingIntent.getActivity(context,0,intent,PendingIntent.FLAG_CANCEL_CURRENT);
Describe it:
targets: Android Status Bar Notifications - Intent getting the old extras on the second time
inputs: Given the following code:
Drawable clone = drawable.getConstantState().newDrawable();
Describe it:
targets: Android: Cloning a drawable in order to make a StateListDrawable with filters
inputs: Given the following code:
if (Looper.getMainLooper().getThread() == Thread.currentThread()) {
  // On UI thread.
} else {
  // Not on UI thread.
}
Describe it:
targets: How to detect UI thread on Android?
inputs: Given the following code:
public static void clearLightStatusBar(@NonNull View view) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        int flags = view.getSystemUiVisibility();
        flags &= ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
        view.setSystemUiVisibility(flags);
    }
}
Describe it:
targets: Android M Light and Dark status bar programmatically - how to make it dark again?
inputs: Description:
How to add back button arrow functionality in navigation bar

Implementation:
targets: @Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
// Respond to the action bar's Up/Home button
case android.R.id.home:
    NavUtils.navigateUpFromSameTask(this);
    return true;
}
return super.onOptionsItemSelected(item);
}
inputs: Description:
How to close Android Soft KeyBoard programmatically?

Implementation:
targets: //to show soft keyboard
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);

//to hide it, call the method again
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
inputs: Given the following code:
Intent reLaunchMain=new Intent(this,MainActivity.class);
reLaunchMain.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(reLaunchMain);
Describe it:
targets: Restarting Android application after process is killed
inputs: Given the following code:
public class ShutdownReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        //Insert code here
    }

}
Describe it:
targets: Is there any way to receive a notification when the user powers off the device?
inputs: Given the following code:
Glide.with(mContext)
   .load(url)
   .diskCacheStrategy(DiskCacheStrategy.SOURCE)
   .into(imageView);
Describe it:
targets: glide force load cached image, don't care what resolution
inputs: Given the following code:
ViewCompat.setImportantForAccessibility(
        decorativeTextView,
        ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO);
Describe it:
targets: Android - prevent TalkBack from announcing TextView title aloud
inputs: Given the following code:
Resources resources = context.getResources();
Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + resources.getResourcePackageName(resId) + '/' + resources.getResourceTypeName(resId) + '/' + resources.getResourceEntryName(resId) );
Describe it:
targets: Get URI from drawable image
inputs: Description:
How do I open the Bluetooth Settings Activity programmatically?

Implementation:
targets: Intent intentOpenBluetoothSettings = new Intent();
intentOpenBluetoothSettings.setAction(android.provider.Settings.ACTION_BLUETOOTH_SETTINGS); 
startActivity(intentOpenBluetoothSettings);
inputs: Given the following code:
// globally 
TextView myAwesomeTextView = (TextView)findViewById(R.id.myAwesomeTextView);

//in your OnCreate() method
myAwesomeTextView.setText("My Awesome Text");
Describe it:
targets: Android - Set text to TextView
inputs: Given the following code:
myWebView.setWebViewClient(new WebViewClient() {
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
        view.loadUrl(request.getUrl().toString());
        return false;
    }
});
Describe it:
targets: Link should be open in same web view in Android
inputs: Given the following code:
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
// Respond to the action bar's Up/Home button
case android.R.id.home:
    NavUtils.navigateUpFromSameTask(this);
    return true;
}
return super.onOptionsItemSelected(item);
}
Describe it:
targets: How to add back button arrow functionality in navigation bar
inputs: Description:
Set Title inToolBar from Fragment in Android

Implementation:
targets: TextView mTitle = view.findViewById(R.id.toolbar_title);
 mTitle.setText("set your title");
inputs: Given the following code:
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP){
    // Do something for lollipop and above versions
} else{
    // do something for phones running an SDK before lollipop
}
Describe it:
targets: Retrieving Android API version programmatically
inputs: Given the following code:
lvlist.setDivider(null);
lvlist.setDividerHeight(0);
Describe it:
targets: How to hide the horizontal line at the bottom of each item in android listview?
inputs: Given the following code:
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("geo:<lat>,<long>?q=<lat>,<long>(Label+Name)"));
startActivity(intent);
Describe it:
targets: How to show marker in Maps launched by geo uri Intent?
inputs: Given the following code:
if (thread.getState() == Thread.State.NEW)
{
     thread.start();
}
Describe it:
targets: When I run Thread second time: java.lang.IllegalThreadStateException: Thread already started
inputs: Given the following code:
yourImageView.post(new Runnable() {
    @Override
    public void run() {
        // set the downloaded image here

    }
});
Describe it:
targets: runOnUiThread inside a View
inputs: Given the following code:
Gdx.graphics.getWidth();
Gdx.graphics.getHeight();
Describe it:
targets: How to get screen resolution of an android device using LIBGDX?
inputs: Given the following code:
WifiManager wifiMan = (WifiManager) this.getSystemService(
                Context.WIFI_SERVICE);
WifiInfo wifiInf = wifiMan.getConnectionInfo();
String macAddr = wifiInf.getMacAddress();
Describe it:
targets: How to obtain MAC address of WiFi network interface?
inputs: Given the following code:
((ViewGroup)scrollChildLayout.getParent()).removeView(scrollChildLayout);
//scrollView.removeView(scrollChildLayout);
Describe it:
targets: Call removeView() on the child's parent first
inputs: Description:
Using full screen Activity

Implementation:
targets: getWindow().getDecorView().setSystemUiVisibility(
  View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
inputs: Description:
SoftKeyboard open and close listener in an activity in Android?

Implementation:
targets: yourEditText.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
    if (hasFocus) {
      //got focus
    } else {
      //lost focus
    }
  }
});
inputs: Description:
Android Google Sign In: check if User is signed in

Implementation:
targets: if (mGoogleApiClient != null && mGoogleApiClient.isConnected()) {
   // signed in. Show the "sign out" button and explanation.
   // ...
} else {
   // not signed in. Show the "sign in" button and explanation.
   // ...
}
inputs: Description:
Don't display the overlay with the Android Navigation Drawer

Implementation:
targets: mDrawerLayout.setScrimColor(Color.WHITE);
// OR
mDrawerLayout.setScrimColor(Color.TRANSPARENT);
inputs: Description:
Android KitKat securityException when trying to read from MediaStore

Implementation:
targets: i = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(i, CHOOSE_IMAGE);
inputs: Description:
Calling startActivity() from outside of an Activity?

Implementation:
targets: Intent i = new Intent(this, Wakeup.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
inputs: Given the following code:
try {
 Class.forName( "your.fqdn.class.name" );
} catch( ClassNotFoundException e ) {
 //my class isn't there!
}
Describe it:
targets: How to check if class exists somewhere in package?
inputs: Given the following code:
Intent i = new Intent(this, NewlyStartedActivity.class);
startActivity(i);
overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
Describe it:
targets: How to perform a fade animation on Activity transition?
inputs: Given the following code:
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("tg://resolve?domain=partsilicon"));
            startActivity(intent);
Describe it:
targets: Open telegram channel in android
inputs: Description:
How to check if class exists somewhere in package?

Implementation:
targets: try {
 Class.forName( "your.fqdn.class.name" );
} catch( ClassNotFoundException e ) {
 //my class isn't there!
}
inputs: Description:
How to start an Activity with an animation set entirely programmatically

Implementation:
targets: startActivity(intent);

overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);
inputs: Given the following code:
textView.setTextSize(TypedValue.COMPLEX_UNIT_PX,
    getResources().getDimension(R.dimen.textsize));
Describe it:
targets: How to set text size of textview dynamically for different screens
inputs: Description:
Restarting Android application after process is killed

Implementation:
targets: Intent reLaunchMain=new Intent(this,MainActivity.class);
reLaunchMain.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(reLaunchMain);
inputs: Given the following code:
getResources().getInteger(android.R.integer.config_shortAnimTime);
getResources().getInteger(android.R.integer.config_mediumAnimTime);
getResources().getInteger(android.R.integer.config_longAnimTime);
Describe it:
targets: What are the actual ms time values for Android's animTime constants?
inputs: Given the following code:
webView.setWebViewClient(new WebViewClient(){
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        return true;
    }
});
Describe it:
targets: Don't navigate to other pages in WebView,disable links and references
inputs: Description:
Error getting window size on android: "The method getWindowManager is undefined"

Implementation:
targets: ((WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE))
  .getDefaultDisplay().getMetrics(metrics);
inputs: Description:
How to set text size of textview dynamically for different screens

Implementation:
targets: textView.setTextSize(TypedValue.COMPLEX_UNIT_PX,
    getResources().getDimension(R.dimen.textsize));
inputs: Description:
Close android application programmatically

Implementation:
targets: getActivity().finish();
System.exit(0);
inputs: Given the following code:
if (keepScreenOn)
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
else
    getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
Describe it:
targets: How to prevent the screen of an android device to turn off during the execution of an Activity?
inputs: Given the following code:
scrollView.setOnTouchListener(new View.OnTouchListener() {

    @Override
    public boolean onTouch(View v, MotionEvent event) {
      // TODO Auto-generated method stub
      return isBlockedScrollView;
    }
  });
Describe it:
targets: Disable ScrollView Programmatically?
inputs: Given the following code:
private int fetchAccentColor() {
    TypedValue typedValue = new TypedValue();

    TypedArray a = mContext.obtainStyledAttributes(typedValue.data, new int[] { R.attr.colorAccent });
    int color = a.getColor(0, 0);

    a.recycle();

    return color;
}
Describe it:
targets: How to get accent color programmatically?
inputs: Description:
Android: How to rotate a bitmap on a center point

Implementation:
targets: public static Bitmap RotateBitmap(Bitmap source, float angle)
{
   Matrix matrix = new Matrix();
   matrix.postRotate(angle);
   return Bitmap.createBitmap(source, 0, 0, source.getWidth(), source.getHeight(), matrix, true);
}
inputs: Given the following code:
XAxis xAxis = chart.getXAxis();
xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);
Describe it:
targets: MPAndroidChart: bottom x-axis and multiple y-axes
inputs: Description:
Uncheck all RadioButton in a RadioButtonGroup

Implementation:
targets: RadioGroup radioGroup = (RadioGroup)findViewById(R.id.radiogroup);
radioGroup.clearCheck();
inputs: Description:
How to 'restart' an android application programmatically

Implementation:
targets: Intent i = getBaseContext().getPackageManager()
             .getLaunchIntentForPackage( getBaseContext().getPackageName() );
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(i);
inputs: Description:
RecyclerView.Adapter.notifyItemChanged() never passes payload to onBindViewHolder()

Implementation:
targets: DefaultItemAnimator animator = new DefaultItemAnimator() {
        @Override
        public boolean canReuseUpdatedViewHolder(RecyclerView.ViewHolder viewHolder) {
            return true;
        }
    };
mRecyclerView.setItemAnimator(animator);
inputs: Given the following code:
String sql = "DELETE FROM myTable WHERE Save_Date <= date('now','-2 day')"; 
db.execSQL(sql);
Describe it:
targets: deleting android sqllite rows older than x days
inputs: Description:
Android: How to scroll ScrollView in top

Implementation:
targets: scrollViewEventDetails.fullScroll(View.FOCUS_UP);//if you move at the end of the scroll

scrollViewEventDetails.pageScroll(View.FOCUS_UP);//if you move at the middle of the scroll
inputs: Description:
Showing the soft keyboard for SearchView on ActionBar

Implementation:
targets: ((InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE)).
    toggleSoftInput(InputMethodManager.SHOW_FORCED,
                    InputMethodManager.HIDE_IMPLICIT_ONLY);
inputs: Description:
Back button and refreshing previous activity

Implementation:
targets: @Override
public void onRestart() { 
    super.onRestart();
    //When BACK BUTTON is pressed, the activity on the stack is restarted
    //Do what you want on the refresh procedure here
}
inputs: Given the following code:
String url = "http://www.YOUR-URL.com";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
Describe it:
targets: Easiest way to launch webpage in android with an icon
inputs: Description:
Framework7 inside webview pages not loading

Implementation:
targets: webSettings.setAllowFileAccessFromFileURLs(true);
webSettings.setAllowUniversalAccessFromFileURLs(true);
inputs: Description:
Navigation drawer menu icon is not displayed correctly

Implementation:
targets: NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
 navigationView.setItemIconTintList(null);
 navigationView.setNavigationItemSelectedListener(this);
inputs: Description:
Push up content when clicking in edit text

Implementation:
targets: getActivity().getWindow().setSoftInputMode(
                WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
inputs: Given the following code:
Intent startMain = new Intent(Intent.ACTION_MAIN);
        startMain.addCategory(Intent.CATEGORY_HOME);
        startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        startActivity(startMain);
Describe it:
targets: How to Launch Home Screen Programmatically in Android
inputs: Given the following code:
public class MyDialog extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        final AlertDialog alertDialog = new AlertDialog.Builder(this).create();
        alertDialog.setTitle("your title");
        alertDialog.setMessage("your message");
        alertDialog.setIcon(R.drawable.icon);

        alertDialog.show();
    }
}
Describe it:
targets: Android Alert dialog from inside an intent service
inputs: Given the following code:
void someMethodThatUsesActivity(Activity myActivityReference) {
    myActivityReference.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
Describe it:
targets: How to call getWindow() outside an Activity in Android?
inputs: Description:
Open telegram channel in android

Implementation:
targets: Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("tg://resolve?domain=partsilicon"));
            startActivity(intent);
inputs: Description:
SwipeRefreshLayout trigger programmatically

Implementation:
targets: mSwipeRefreshLayout.post(new Runnable() {
        @Override
        public void run() {
            mSwipeRefreshLayout.setRefreshing(true);
        }
    });
inputs: Description:
android set button background programmatically

Implementation:
targets: // If you're in an activity:
Button11.setBackgroundColor(getResources().getColor(R.color.red));
// OR, if you're not: 
Button11.setBackgroundColor(Button11.getContext().getResources().getColor(R.color.red));
inputs: Given the following code:
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Describe it:
targets: Resume the Activity instead of Starting if already exists in back stack
inputs: Given the following code:
/**
* Gets the state of Airplane Mode.
* 
* @param context
* @return true if enabled.
*/
private static boolean isAirplaneModeOn(Context context) {

   return Settings.System.getInt(context.getContentResolver(),
           Settings.System.AIRPLANE_MODE_ON, 0) != 0;

}
Describe it:
targets: How can one detect airplane mode on Android?
inputs: Given the following code:
sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://"
            + Environment.getExternalStorageDirectory())));
Describe it:
targets: Android How to use MediaScannerConnection scanFile
inputs: Given the following code:
if(android.os.Build.VERSION.SDK_INT >= 14) {
    // Do something fancy
}
else {
    // Do something regular
}
Describe it:
targets: Higher API calls when lower SDK targeted
inputs: Given the following code:
String url = "http://www.twitter.com/intent/tweet?url=YOURURL&text=YOURTEXT";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
Describe it:
targets: How can I post on Twitter with Intent Action_send?
inputs: Description:
Android Alert dialog from inside an intent service

Implementation:
targets: public class MyDialog extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        final AlertDialog alertDialog = new AlertDialog.Builder(this).create();
        alertDialog.setTitle("your title");
        alertDialog.setMessage("your message");
        alertDialog.setIcon(R.drawable.icon);

        alertDialog.show();
    }
}
inputs: Description:
glide force load cached image, don't care what resolution

Implementation:
targets: Glide.with(mContext)
   .load(url)
   .diskCacheStrategy(DiskCacheStrategy.SOURCE)
   .into(imageView);
inputs: Given the following code:
mDrawerLayout.setScrimColor(Color.WHITE);
// OR
mDrawerLayout.setScrimColor(Color.TRANSPARENT);
Describe it:
targets: Don't display the overlay with the Android Navigation Drawer
inputs: Description:
SwipeRefreshLayout setRefreshing() not showing indicator initially

Implementation:
targets: mSwipeRefreshLayout.post(new Runnable() {
  @Override
  public void run() {
    mSwipeRefreshLayout.setRefreshing(true);
  }
});
inputs: Description:
Second AsyncTask not executing

Implementation:
targets: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
    task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} else {
    task.execute();
}
inputs: Given the following code:
View view = (View) LayoutInflater.from(ctx).inflate(R.layout.preference_report_bug_layout, null);
EditText editText = view.findViewById(R.id.bug_description_edittext);
builder.setView(view);
Describe it:
targets: How to get elements(findViewById) for a layout which is dynamically loaded(setView) in a dialog?
inputs: Given the following code:
// map is a GoogleMap object
map.setMyLocationEnabled(true);
Describe it:
targets: How to display my location on Google Maps for Android API v2
inputs: Description:
Open url with an browser

Implementation:
targets: Intent intent= new Intent(Intent.ACTION_VIEW,Uri.parse(YOUR_URL));
startActivity(intent);
inputs: Given the following code:
Intent browserIntent = new Intent(Intent.ACTION_VIEW,
          Uri.parse("https://play.google.com/store/account"));
  startActivity(browserIntent);
Describe it:
targets: Redirect user to the Subscription page in the playstore
inputs: Description:
android: Softkeyboard perform action when Done key is pressed

Implementation:
targets: editText.setOnEditorActionListener(new OnEditorActionListener() {        
    @Override
    public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
        if(actionId==EditorInfo.IME_ACTION_DONE){
            //do something
        }
    return false;
    }
});
inputs: Given the following code:
mRecyclerView.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
 @Override

public void onLayoutChange(View v, int left, int top, int right,int bottom, int oldLeft, int oldTop,int oldRight, int oldBottom)
{

mRecyclerView.scrollToPosition(mMessages.size()-1);

}
    });
Describe it:
targets: How to push recylerView up when keyboard appear?
inputs: Description:
Android Layout make all children's not clickable

Implementation:
targets: YOUR_RELATIVE_LAYOUT.setOnTouchListener(new OnTouchListener() {
    @Override
    public boolean onTouch(View v, MotionEvent event) {
        // ignore all touch events
        return true;
    }
});
inputs: Description:
How to kill an application with all its activities?

Implementation:
targets: @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  switch(resultCode)
  {
  case RESULT_CLOSE_ALL:
    setResult(RESULT_CLOSE_ALL);
    finish();
  }
  super.onActivityResult(requestCode, resultCode, data);
}
inputs: Given the following code:
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {   
   return true;
}
Describe it:
targets: How to prevent OnItemClickListener work when long click performed?
inputs: Given the following code:
if(getResources().getBoolean(R.bool.portrait_only)){
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    }
Describe it:
targets: Android: allow portrait and landscape for tablets, but force portrait on phone?
inputs: Description:
Android - Simulate Home click

Implementation:
targets: Intent i = new Intent(Intent.ACTION_MAIN);
i.addCategory(Intent.CATEGORY_HOME);
startActivity(i);
inputs: Given the following code:
// If you're in an activity:
Button11.setBackgroundColor(getResources().getColor(R.color.red));
// OR, if you're not: 
Button11.setBackgroundColor(Button11.getContext().getResources().getColor(R.color.red));
Describe it:
targets: android set button background programmatically
inputs: Description:
how to make edittext field for decimals

Implementation:
targets: et.setInputType(InputType.TYPE_CLASS_NUMBER 
                         | InputType.TYPE_NUMBER_FLAG_DECIMAL);
inputs: Description:
How to perform a fade animation on Activity transition?

Implementation:
targets: Intent i = new Intent(this, NewlyStartedActivity.class);
startActivity(i);
overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
inputs: Given the following code:
// Check if no view has focus:
View view = this.getCurrentFocus();
if (view != null) {   InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);  imm.hideSoftInputFromWindow(view.getWindowToken(), 0);}
Describe it:
targets: Close/hide the Android Soft Keyboard
inputs: Given the following code:
getWindow().getDecorView().setSystemUiVisibility(
        View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
Describe it:
targets: Android 4.4 translucent Status and Navigation bars style on Android 5.0
inputs: Description:
Higher API calls when lower SDK targeted

Implementation:
targets: if(android.os.Build.VERSION.SDK_INT >= 14) {
    // Do something fancy
}
else {
    // Do something regular
}
inputs: Description:
Using ProgressDialog in ActionBar (Android)

Implementation:
targets: requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);  
setProgressBarIndeterminateVisibility(true);
inputs: Description:
What are the actual ms time values for Android's animTime constants?

Implementation:
targets: getResources().getInteger(android.R.integer.config_shortAnimTime);
getResources().getInteger(android.R.integer.config_mediumAnimTime);
getResources().getInteger(android.R.integer.config_longAnimTime);
inputs: Description:
Make new activity appear behind old one during transition

Implementation:
targets: startActivity(new Intent(this, Activity2.class));
overridePendingTransition(R.anim.push_down_in,R.anim.push_down_out);
inputs: Description:
How to query for the default SpeechRecognizer

Implementation:
targets: String serviceComponent = Settings.Secure.getString(mContext.getContentResolver(),
        "voice_recognition_service");
inputs: Given the following code:
Settings.System.putInt(getContentResolver(), 
    Settings.System.SCREEN_BRIGHTNESS_MODE, Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL);
Describe it:
targets: How can we turn automatic brightness off in android?
inputs: Given the following code:
CameraUpdate center=
    CameraUpdateFactory.newLatLng(new LatLng(40.76793169992044,
                         -73.98180484771729));
  CameraUpdate zoom=CameraUpdateFactory.zoomTo(15);

  map.moveCamera(center);
  map.animateCamera(zoom);
Describe it:
targets: Google Maps v2 - set both my location and zoom in
inputs: Given the following code:
public class WifiReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {     
        ConnectivityManager conMan = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); 
        NetworkInfo netInfo = conMan.getActiveNetworkInfo();
        if (netInfo != null && netInfo.getType() == ConnectivityManager.TYPE_WIFI) 
            Log.d("WifiReceiver", "Have Wifi Connection");
        else
            Log.d("WifiReceiver", "Don't have Wifi Connection");    
    }   
};
Describe it:
targets: Wifi Connect-Disconnect Listener
inputs: Given the following code:
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  switch(resultCode)
  {
  case RESULT_CLOSE_ALL:
    setResult(RESULT_CLOSE_ALL);
    finish();
  }
  super.onActivityResult(requestCode, resultCode, data);
}
Describe it:
targets: How to kill an application with all its activities?
inputs: Description:
How to kill my own Activity - the hard way

Implementation:
targets: public void onDestroy() {
        super.onDestroy();
        android.os.Process.killProcess(android.os.Process.myPid());
    }
inputs: Given the following code:
public boolean isColorDark(int color){
    double darkness = 1-(0.299*Color.red(color) + 0.587*Color.green(color) + 0.114*Color.blue(color))/255;
    if(darkness<0.5){
        return false; // It's a light color
    }else{
        return true; // It's a dark color
    }
}
Describe it:
targets: Check if color is dark or light in Android
inputs: Given the following code:
Intent intent= new Intent(Intent.ACTION_VIEW,Uri.parse(YOUR_URL));
startActivity(intent);
Describe it:
targets: Open url with an browser
inputs: Given the following code:
Intent callIntent = new Intent(Intent.ACTION_CALL);
    callIntent.setData(Uri.parse("tel:123456789"));
    startActivity(callIntent);
Describe it:
targets: make a phone call click on a button
inputs: Given the following code:
getActivity().getWindow().setSoftInputMode(
                WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
Describe it:
targets: Push up content when clicking in edit text
inputs: Description:
Android VideoView repetition

Implementation:
targets: myVideoView.setOnPreparedListener(new OnPreparedListener() {

        @Override
        public void onPrepared(MediaPlayer mp) {
            // TODO Auto-generated method stub
            mp.setLooping(true);

        }
    });
inputs: Given the following code:
public class MVAccelerateDecelerateInterpolator implements Interpolator {

    // easeInOutQuint
    public float getInterpolation(float t) {
        float x = t*2.0f;
        if (t<0.5f) return 0.5f*x*x*x*x*x;
        x = (t-0.5f)*2-1;
        return 0.5f*x*x*x*x*x+1;
    }
}
Describe it:
targets: Custom android AccelerateDecelerateInterpolator
inputs: Given the following code:
startActivity(new Intent(this, Activity2.class));
overridePendingTransition(R.anim.push_down_in,R.anim.push_down_out);
Describe it:
targets: Make new activity appear behind old one during transition
inputs: Description:
Detecting when screen is locked

Implementation:
targets: KeyguardManager myKM = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
if( myKM.inKeyguardRestrictedInputMode()) {
 //it is locked
} else {
 //it is not locked
}
inputs: Description:
OnScreen keyboard opens automatically when Activity starts

Implementation:
targets: getWindow().setSoftInputMode(
    WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
inputs: Given the following code:
SoapPrimitive result = (SoapPrimitive)envelope.getResponse();
String strRes = result.toString();
Describe it:
targets: How to call a .NET Webservice from Android using KSOAP2?
inputs: Description:
dismiss the popup window by back button

Implementation:
targets: if(popup!=null){
   //dismiss the popup
   popup.dismiss();
   //make popup null again
   popup=null;
}
inputs: Description:
Reliably get height of status bar to solve KitKat translucent navigation issue

Implementation:
targets: public int getStatusBarHeight() {
      int result = 0;
      int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
      if (resourceId > 0) {
          result = getResources().getDimensionPixelSize(resourceId);
      }
      return result;
}
inputs: Given the following code:
public boolean isOnline() {
  ConnectivityManager cm =
    (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
  NetworkInfo netInfo = cm.getActiveNetworkInfo();
  return netInfo != null && netInfo.isConnectedOrConnecting();
}
Describe it:
targets: How to check internet access on Android? InetAddress never times out
inputs: Given the following code:
editText.setOnEditorActionListener(new OnEditorActionListener() {        
    @Override
    public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
        if(actionId==EditorInfo.IME_ACTION_DONE){
            //do something
        }
    return false;
    }
});
Describe it:
targets: android: Softkeyboard perform action when Done key is pressed
inputs: Description:
Easiest way to launch webpage in android with an icon

Implementation:
targets: String url = "http://www.YOUR-URL.com";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
inputs: Given the following code:
notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
                            |Intent.FLAG_ACTIVITY_SINGLE_TOP);
Describe it:
targets: Click on notification starts activity twice
inputs: Description:
android: How to call the number by android application

Implementation:
targets: Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:123456789"));
startActivity(callIntent);
inputs: Description:
How to check internet access on Android? InetAddress never times out

Implementation:
targets: public boolean isOnline() {
  ConnectivityManager cm =
    (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
  NetworkInfo netInfo = cm.getActiveNetworkInfo();
  return netInfo != null && netInfo.isConnectedOrConnecting();
}
inputs: Given the following code:
Intent i = getBaseContext().getPackageManager()
             .getLaunchIntentForPackage( getBaseContext().getPackageName() );
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(i);
Describe it:
targets: How to 'restart' an android application programmatically
inputs: Description:
Drag & Drop Espresso

Implementation:
targets: public static ViewAction swipeUp() {  
return new GeneralSwipeAction(Swipe.FAST, GeneralLocation.BOTTOM_CENTER,  
    GeneralLocation.TOP_CENTER, Press.FINGER);  
}
inputs: Description:
runOnUiThread inside a View

Implementation:
targets: yourImageView.post(new Runnable() {
    @Override
    public void run() {
        // set the downloaded image here

    }
});
inputs: Description:
How to hide the horizontal line at the bottom of each item in android listview?

Implementation:
targets: lvlist.setDivider(null);
lvlist.setDividerHeight(0);
inputs: Given the following code:
Configuration config = getResources().getConfiguration();
if(config.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) {
    //in Right To Left layout
}
Describe it:
targets: Identifying RTL language in Android
inputs: Given the following code:
YOUR_RELATIVE_LAYOUT.setOnTouchListener(new OnTouchListener() {
    @Override
    public boolean onTouch(View v, MotionEvent event) {
        // ignore all touch events
        return true;
    }
});
Describe it:
targets: Android Layout make all children's not clickable
inputs: Given the following code:
String url = "http://www.example.com";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
Describe it:
targets: Sending an Intent to browser to open specific URL
inputs: Given the following code:
if (android.os.Build.VERSION.SDK_INT>=android.os.Build.VERSION_CODES.HONEYCOMB) {
  // call something for API Level 11+
}
Describe it:
targets: How do I check HoneyComb or higher is running, and accordingly call a method for that Version?
inputs: Given the following code:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON|
            WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD|
            WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED|
            WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
Describe it:
targets: Android activity over default lock screen
inputs: Given the following code:
myButton.setBackgroundColor(Color.parseColor("#RRGGBB"));
Describe it:
targets: How to access drawable resources (color) in java
inputs: Description:
How to display my location on Google Maps for Android API v2

Implementation:
targets: // map is a GoogleMap object
map.setMyLocationEnabled(true);
inputs: Given the following code:
CrashlyticsCore core = new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build();
Fabric.with(this, new Crashlytics.Builder().core(core).build());
Describe it:
targets: Crashlytics deprecated method disabled()
inputs: Description:
Programatically set '?selectableItemBackground' on Android view

Implementation:
targets: TypedValue outValue = new TypedValue();
getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground, outValue, true);
cardView.setBackgroundResource(outValue.resourceId);
inputs: Given the following code:
mViewPager = (ViewPager)findViewById(R.id.pager);
mViewPager.setOffscreenPageLimit(2);
Describe it:
targets: Prevent ViewPager from destroying off-screen views
inputs: Description:
Force application to restart on first activity

Implementation:
targets: Intent i = getBaseContext().getPackageManager()
             .getLaunchIntentForPackage( getBaseContext().getPackageName() );
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(i);
inputs: Description:
How to Launch Home Screen Programmatically in Android

Implementation:
targets: Intent startMain = new Intent(Intent.ACTION_MAIN);
        startMain.addCategory(Intent.CATEGORY_HOME);
        startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        startActivity(startMain);
inputs: Description:
Android: ScrollView force to bottom

Implementation:
targets: scroll.post(new Runnable() {            
    @Override
    public void run() {
           scroll.fullScroll(View.FOCUS_DOWN);              
    }
});
inputs: Description:
Setting WebView to view Desktop Site and Not Mobile Site

Implementation:
targets: String newUA= "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/20100101 Firefox/4.0";
 mWebView.getSettings().setUserAgentString(newUA);
inputs: Description:
Adding titles to ViewPager

Implementation:
targets: statePagerAdapter = new FragmentStatePagerAdapter(fragmentManager) {
  @Override
  public CharSequence getPageTitle(int position) {
    return "Title Here";
  }
};
inputs: Given the following code:
((WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE))
  .getDefaultDisplay().getMetrics(metrics);
Describe it:
targets: Error getting window size on android: "The method getWindowManager is undefined"
inputs: Description:
Hide status bar android

Implementation:
targets: requestWindowFeature(Window.FEATURE_NO_TITLE);// hide statusbar of Android
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
    WindowManager.LayoutParams.FLAG_FULLSCREEN);
inputs: Given the following code:
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(editTextField.getWindowToken(), 0);
Describe it:
targets: How to remove auto focus/keyboard popup of a field when the screen shows up?
inputs: Given the following code:
Snackbar snack = Snackbar.make(findViewById(R.id.coordinatorLayout),
    "Your message", Snackbar.LENGTH_LONG);
CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams)
snack.getView().getLayoutParams();
params.setMargins(leftMargin, topMargin, rightMargin, bottomBar.height);
snack.getView().setLayoutParams(params);
snack.show();
Describe it:
targets: Move snackbar above the bottom bar
inputs: Given the following code:
TextView mTitle = view.findViewById(R.id.toolbar_title);
 mTitle.setText("set your title");
Describe it:
targets: Set Title inToolBar from Fragment in Android
inputs: Description:
End animation event android

Implementation:
targets: anim.setAnimationListener(new Animation.AnimationListener(){
    @Override
    public void onAnimationStart(Animation arg0) {
    }           
    @Override
    public void onAnimationRepeat(Animation arg0) {
    }           
    @Override
    public void onAnimationEnd(Animation arg0) {
    }
});
inputs: Description:
How can we turn automatic brightness off in android?

Implementation:
targets: Settings.System.putInt(getContentResolver(), 
    Settings.System.SCREEN_BRIGHTNESS_MODE, Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL);
inputs: Description:
How to add a line break in an Android TextView?

Implementation:
targets: String s = "Line 1"
           + System.getProperty ("line.separator")
           + "Line 2"
           + System.getProperty ("line.separator");
inputs: Given the following code:
BufferedReader r = new BufferedReader(new InputStreamReader(inputStream));
StringBuilder total = new StringBuilder();
String line;
while ((line = r.readLine()) != null) {
    total.append(line).append('\n');
}
Describe it:
targets: Android Reading from an Input stream efficiently
inputs: Given the following code:
dialog.setOnCancelListener(new DialogInterface.OnCancelListener() {     
  @Override
  public void onCancel(DialogInterface dialog) {
    //do whatever you want the back key to do
  }
});
Describe it:
targets: How to handle Back button with in the dialog?
inputs: Description:
deleting android sqllite rows older than x days

Implementation:
targets: String sql = "DELETE FROM myTable WHERE Save_Date <= date('now','-2 day')"; 
db.execSQL(sql);
inputs: Description:
Android WebView click open within WebView not a default browser

Implementation:
targets: this.mWebView.setWebViewClient(new WebViewClient(){

    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url){
      view.loadUrl(url);
      return true;
    }
});
inputs: Given the following code:
KeyguardManager myKM = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
if( myKM.inKeyguardRestrictedInputMode()) {
 //it is locked
} else {
 //it is not locked
}
Describe it:
targets: Detecting when screen is locked
inputs: Given the following code:
//noinspection ResourceType
UsageStatsManager usageStatsManager=(UsageStatsManager)context.getSystemService("usagestats");
Describe it:
targets: Cannot use getSystemService("usagestats") Android Studio
inputs: Description:
How do I restart an Android Activity

Implementation:
targets: Intent intent = getIntent();
finish();
startActivity(intent);
inputs: Given the following code:
Intent intent = getIntent();
finish();
startActivity(intent);
Describe it:
targets: how do I restart an activity in android?
inputs: Given the following code:
getActivity().getActionBar().setDisplayOptions(
    ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_SHOW_TITLE);
Describe it:
targets: Restore default actionbar layout
inputs: Description:
How to detect UI thread on Android?

Implementation:
targets: if (Looper.getMainLooper().getThread() == Thread.currentThread()) {
  // On UI thread.
} else {
  // Not on UI thread.
}
inputs: Description:
How to obtain MAC address of WiFi network interface?

Implementation:
targets: WifiManager wifiMan = (WifiManager) this.getSystemService(
                Context.WIFI_SERVICE);
WifiInfo wifiInf = wifiMan.getConnectionInfo();
String macAddr = wifiInf.getMacAddress();
inputs: Description:
How to use Room Persistence Library with pre-populated database?

Implementation:
targets: Room.databaseBuilder(context.getApplicationContext(), 
                     AppDatabase.class, 
                     "database_name.db")
.openHelperFactory(new AssetSQLiteOpenHelperFactory())
.allowMainThreadQueries()
.build();
inputs: Description:
How to Inflate view from XML in Android?

Implementation:
targets: LayoutInflater inflater = (LayoutInflater)getApplicationContext().getSystemService
 (Context.LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.new_layout,null);
main.addView(view);
inputs: Given the following code:
getSupportActionBar().hide();  // for hiding
getSupportActionBar().show();  // for showing
Describe it:
targets: How To Show and hide ActionBar with AppCompat v.7
inputs: Given the following code:
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select Picture"),SELECT_IMAGE);
Describe it:
targets: How to open phones gallery through code
inputs: Given the following code:
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
Describe it:
targets: How to exit from the application and show the home screen?
inputs: Description:
How to Retrieve Text from Textbox in Android widget?

Implementation:
targets: EditText editText = (EditText)findViewById(R.id.yourId);
String editTextStr = editText.getText().toString();
inputs: Given the following code:
public int getStatusBarHeight() {
      int result = 0;
      int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
      if (resourceId > 0) {
          result = getResources().getDimensionPixelSize(resourceId);
      }
      return result;
}
Describe it:
targets: Reliably get height of status bar to solve KitKat translucent navigation issue
inputs: Given the following code:
Retrofit retrofit = new Retrofit.Builder()
    .baseUrl("**sample base url here**")
    .addConverterFactory(GsonConverterFactory.create())
    .build();
Describe it:
targets: Unable to create converter for my class in Android Retrofit library
inputs: Description:
How to set View alpha in lower Api than 11?

Implementation:
targets: if (Build.VERSION.SDK_INT < 11) {
  final AlphaAnimation animation = new AlphaAnimation(alpha, alpha);
  animation.setDuration(duration);
  animation.setFillAfter(true);
  view.startAnimation(animation);
} else {
  view.setAlpha(alpha);
}
inputs: Given the following code:
Toast.makeText(getBaseContext(), "Amount can not be grater than invoice",
                                                     Toast.LENGTH_SHORT).show();
Describe it:
targets: Android Toast Message is not showing
inputs: Given the following code:
et.setInputType(InputType.TYPE_CLASS_NUMBER 
                         | InputType.TYPE_NUMBER_FLAG_DECIMAL);
Describe it:
targets: how to make edittext field for decimals
inputs: Given the following code:
int flags = textView.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG
            | Paint.ANTI_ALIAS_FLAG;
textView.setPaintFlags(flags);
Describe it:
targets: Android "Roboto Light" pixelation
inputs: Given the following code:
builder.addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET);
builder.addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR);
Describe it:
targets: Send request over Mobile data when WIFI is ON.(Android L)
inputs: Given the following code:
ddbClient.setRegion(Region.getRegion(Regions.EU_WEST_1));  
// Add correct Region. In my case its EU_WEST_1
Describe it:
targets: AWS DynamoDB Requested resource not found
inputs: Given the following code:
@Override
public void onRestart() { 
    super.onRestart();
    //When BACK BUTTON is pressed, the activity on the stack is restarted
    //Do what you want on the refresh procedure here
}
Describe it:
targets: Back button and refreshing previous activity
inputs: Description:
Android volley sending data twice

Implementation:
targets: JsonObjectRequest jsonObjReq = new JsonObjectRequest();
jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(
    0,
    DefaultRetryPolicy.DEFAULT_MAX_RETRIES,
    DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
inputs: Given the following code:
tv.setLayoutParams(new ViewGroup.LayoutParams(
    ViewGroup.LayoutParams.WRAP_CONTENT,
    ViewGroup.LayoutParams.WRAP_CONTENT));
Describe it:
targets: android - setting LayoutParams programmatically
inputs: Description:
Android: Insert text into EditText at current position

Implementation:
targets: int start = Math.max(myEditText.getSelectionStart(), 0);
int end = Math.max(myEditText.getSelectionEnd(), 0);
myEditText.getText().replace(Math.min(start, end), Math.max(start, end),
        textToInsert, 0, textToInsert.length());
inputs: Description:
Unable to create call adapter for io.reactivex.Observable

Implementation:
targets: Retrofit retrofit = new Retrofit.Builder()
    .baseUrl(SERVICE_ENDPOINT)
    .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
    .build();
inputs: Description:
Android Link to Market from inside another app

Implementation:
targets: Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=com.android.example"));
startActivity(intent);