/**
* To disable back button(when click back button nothing happen)
*/
@Override
public void onBackPressed() {
return;
}
Place for latest technology news, technology articles, technology reviews, Gadget News, and Gadget Update.
<activity android:name=".Application2/Activity2">
<intent-filter>
<action android:name="Application2.intent.action.Launch" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Now you can create an Intent to launch Activity2 from the Activity1 with this line of code:
Intent intent = new Intent("Application2.intent.action.Launch");
startActivity(intent);