android - Actitvity going to freez state -
i launching activity on running android app using adb command (first launch android app using adb command start activity).
activity starts after finish freezes previous running application.
adb command: adb shell start -n com.example.a/com.example.a.mainactivity`enter code here`
java code:
public class mainactivity extends activity { @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); intent = new intent("com.ex.intentdemo.action_myown"); startactivity(i); setcontentview(r.layout.activity_main); finish(); } }
try onpause(); instead of finish();,because finish(); ends activity. see android lifecycle.but still tell mainactivity must running open second activity.
Comments
Post a Comment