maoruibin / maoruibin/maoruibin.github.com
应用回到桌面
Open
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 22
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
public static void backToLauncher(Activity context){
try {
Intent i = new Intent(Intent.ACTION_MAIN);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须加入new task标识
i.addCategory(Intent.CATEGORY_HOME);
context.startActivity(i);
} catch (ActivityNotFoundException e) {
context.moveTaskToBack(true);
} catch (SecurityException e) {
context.moveTaskToBack(true);
}
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue body contains a Java Activity method for returning to the launcher, but it names no repository file, test, or requested change. Start by determining whether this snippet belongs in the blog content, then clarify the intended documentation outcome before editing; done should be a clearly specified and published explanation or example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- documentation, mobile
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100