I am getting app launcher dialog when i do tap on Home button with two options to set as home app - first, default phone app and second mine app, using this:
Activity:
public class DefaultLaunchActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_launcher);
}
}
manifest.xml
<activity
android:name="com.def.launc.DefaultLaunchActivity"
android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
android:launchMode="singleTask"
android:stateNotNeeded="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
But what, if i have to show Application Launcher Dialog whenever user do tap on button
btn.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// what to put here to show app launcher dialog
}
});
0 comments:
Post a Comment