Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Jason jiang
Added: Nov 4, 2020 12:52 PM
Views: 11
Tags: no tags
  1. Intent intent = new Intent();
  2. // 为Intent设置Action、Category属性
  3. intent.setAction(Intent.ACTION_MAIN);// "android.intent.action.MAIN"
  4. intent.addCategory(Intent.CATEGORY_HOME); //"android.intent.category.HOME"
  5. startActivity(intent);