Android - Start Intent

2019-09-06 14:45发布

When searching for how to launch Intents some people have listed like below.

Can you launch an Intent with the following lines? How would you do it?

Display Settings

#Intent;component=com.android.settings/.DisplaySettings;end

Sound Settings

#Intent;component=com.android.settings/.SoundSettings;end

Wireless Settings

#Intent;component=com.android.settings/.WirelessSettings;end

Dialer

#Intent;component=com.android.contacts/.DialtactsActivity;end

1条回答
Rolldiameter
2楼-- · 2019-09-06 15:13

For the first line, it will be

Intent i = new Intent();
i.setClassName("com.android.settings", "com.android.settings.DisplaySettings");
startActivity(i);

The rest of them will be similar to this.

查看更多
登录 后发表回答