I want to know if my app was executed by another app
I tried several methods but I could not find a solution
I tried this but returns the same value please help me! Code:
public class MainActivity extends Activity {
public static boolean isinint ;
@Override
protected void onResume() {
super.onResume();
Intent intent = getIntent();
if (intent!=null && intent.getType()!=null) //check if any application has executed your app
{ isinint=true;
Toast.makeText(getApplicationContext(), "is:" +isinint, Toast.LENGTH_LONG) .show();
}else {
isinint=false;
Toast.makeText(getApplicationContext(), "is:" +isinint, Toast.LENGTH_LONG) .show();
}
}
}
Aucun commentaire:
Enregistrer un commentaire