in my application I want that when a user click a button the application closes itself and automatically opens the add new widget context Menu. I'm making this:
if (viewId == R.id.bt_homeScreen) {
finish();
try {
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
startActivity(intent);
} catch (ActivityNotFoundException e) {
Toast.makeText(this.getApplicationContext(), getResources().getString(R.string.homeClientAlert), Toast.LENGTH_SHORT).show();
}
}
The problem whith this code is that I only go to the phone Home screen:
(source: androidtapp.com)
I want that when I launch the Intent it goes to the Home screen and open the widget context menu:
(source: taosoftware.co.jp)