Android :: Exclude Activity From Recent Menu By Code

Aug 5, 2009

I need to exclude an activity from appearing in recent launched menu, but i am not able of adding android:excludeFromRecents="true" in AndroidManifest.xml, I have to do it in runtime. Does anyone knows if there is possible to set FLAG_EXCLUDE_FROM_RECENTS to the activity?

Android :: Exclude activity from recent menu by code


Android :: Exclude Activity From Recents Menu By Code

Aug 5, 2009

I need to exclude an activity from appearing in recent launched menu, but i am not able of adding android:excludeFromRecents="true" in AndroidManifest.xml, I have to do it in runtime. Does anyone knows if there is possible to set FLAG_EXCLUDE_FROM_RECENTS to the activity?

View 1 Replies View Related

Android :: How To Exclude Your Own App From Share Menu?

Oct 31, 2010

The app has an intent filter to allow it to appear in the share menu in other applications via ACTION_SEND intents. The app itself also has a share menu using ACTION_SEND and create Chooser(), and my app appears in the list. Since they are already in my app it seems strange to have them be able to share back to itself. Is there a way for my app not to appear in the list if it's being called from my app?

View 1 Replies View Related

Android :: Exclude Own Activity From Activity.startActivity - Intent

Oct 17, 2010

My app works with pictures. It can take multiple pictures as an input, process them, and send them again to another app.

As a consequence, my main Activity has declared an intent filter on ACTION_SEND_MULTIPLE for image/* mimetypes and can result in issuing a new Intent with the same action and data type using Activity.startActivity(Intent).

Is there a way to exclude my own activity from the list of apps that is displayed to the user after the startActivity() call ?

View 1 Replies View Related

Android : How To Get Recent Activity List?

Jul 15, 2010

When I run my app, it works fine but if I switch back to home or another application, I want to go back to my app quickly by using the recent activity list (on my phone this is done by holding down the home button). For whatever reason, I never see my application in this list of apps. All other apps when they are running or have just recently been closed show up ( the menu shows 6 icons for the recent apps). Why doesn't my app show up on this list? Is this something you need to do programmatically?

View 4 Replies View Related

Android :: Recent Apps Change In 2.2 / Brings Main Activity To Foreground

Jul 24, 2010

The recent apps display seems to function quite differently from earlier versions on 2.2. Try the following for instance: 1) Open an app 2) Click on something that takes you to another activity in the same app 3) Press the home button 4) Press and hold the home button to get the recent list of apps - select the app you chose in step 1 5) You'll be taken to whatever activity in that app is specified as the main/launcher Activity, rather than the Activity on top of the stack (as it was previously) It makes it appear to the user that the application has exited when the home screen button was pressed. I don't have my app set to clear history on launch or anything like that, and I can replicate it on the emulator and with any app on my device (Contacts, Gmail, Engadget etc) Anyone else notice this? Anyone know any reason for the changes? I must admit I quite dislike the new method.

View 10 Replies View Related

Android :: Enabling Menu Items By Code

Aug 18, 2010

I need to enable a MenuItem when a previous screen (Activity) returns. I tried this code:

...
((MenuItem)findViewById(R.id.menu_how)).setEnabled(true);
...

but a null pointer exception is launched. BTW, the menu_how is set to false in xml; and the code is part of onActivityResult(int requestCode, int resultCode, Intent data) call.

View 1 Replies View Related

Android :: How To Create A Context Menu From Code

Oct 15, 2010

I'm getting all kinds of errors when using res/menu/menu_home.xml, and my project won't build. That's when I remembered that there was a way to create menus from java code instead of declaring it via xml. Does someone remember how to do that?

View 1 Replies View Related

Android :: Show Context Menu From Code Behind?

Sep 12, 2010

This might be a simple question, but I've been looking around and can't find the answer,
well, as my title said, is there any code to show the context menu on the android from a code, instead press the menu button? eg. when i touch the screen then it'll call the context menu?

View 1 Replies View Related

Android :: Understanding Menu Call Back Code

Jun 13, 2009

I see this example of MenuCallback code, but i don't understand where is the reference 'ImageManager.IImage image' comes from? How is that image get created and passed it to MemuCallback?

View 2 Replies View Related

Android : Add Menu Item To Gallery's Share By Code

Aug 1, 2009

I must to new a thread. I know how to implement this issue by Menuifest.xml, see also: http://groups.google.com/group/android-developers/browse_thread/threa...

But my question is how to add share menu of Gallery by java code not Menuifest.xml. My code is as below:

code:.........

But registerReceiver always return null, and there is no menu added to Gallery's Share.

View 4 Replies View Related

Android : How To Add Share Menu Item To Gallery By Code

Aug 1, 2009

I know how to implement this issue by Menuifest.xml, see also:

Google Android Developer Group related issue

But my question is how to add share menu of Gallery by java code not Menuifest.xml.

My code is as below:

CODE:........

But registerReceiver always return null, and there is no menu added to Gallery's Share.

View 1 Replies View Related

Android :: Want To Share An Options Menu Between Activity / Map

Aug 31, 2010

Sharing an Options Menu between Activity and Map Activity. Is this possible? I have an Options Menu shared between multiple Activities but now I need that menu in a Map Activity.

View 1 Replies View Related

Android :: Suppressing Key Presses In Activity - Especially In Options Menu

Oct 8, 2009

I am writing an activity where the user is supposed to some editing and is critical. In this activity, I dont want pressing of Call key to make it go to Call Log so I handle onKeyDown call back and there if the key pressed is Call, I just return true. That solves my problem. But, if Options menu is opened and then I press Call button, I am not getting control in onKeyDown.

View 8 Replies View Related

Android :: Can One Activity Open Another Activities Options Menu?

Nov 10, 2009

Can Activity "A" open the options menu of a view in Activity "B"? In this case I am building Activity A but Activity B can be any other running activity. I think this is an impossible security violation but I really want someone to prove me wrong.

View 2 Replies View Related

Android :: Theme.Dialog Activity And Context Menu

Jun 22, 2009

i have dialog style activity android:theme="@android:style/Theme.Dialog"The menu appears about 50 px from the bottom of this dialog. So if activity screen is too small - it right in the middle of the screen. Is there any way to anchor menu to the bottom of the screen?

View 5 Replies View Related

Android :: How To Call Activity From A Menu Item In Phone?

Nov 12, 2010

I'm attempting to call start Activity(myIntent) from the click of a menu button but my application crashes at that point. The same start Activity call works fine from a regular button click, so, I assume the menu button is missing information about the context? Or maybe I'm totally off the mark here. So what's the correct way to have a menu item take me to a specific Activity? I've revised my code based on the initial set of advice. Still crashing in the same place. The debugger doesn't enter the exception clause, the app just dies. Code...

View 2 Replies View Related

Android :: How To Display Images In Activity's Context Menu?

Jan 20, 2009

Does someone know how to display images in an activity's context menu? I've tried setIcon(resId) and it doesn't work (although it does work in the Options Menu).

View 2 Replies View Related

Android :: Opening A Context Menu In OnCreate Of An Activity

Aug 9, 2010

I have a need to capture some user input when an activity opens for the first time. I'm hoping to give the user a list of options to select from, which will be pulled in dynamically. I'll then store the selected value locally for future use. I'm not finding a way to do what I'm after and was wondering if anyone has run into this before and how they solved it.

Fantasy Football<http://chriswstewart.com/android-applications/fantasy-football/>- Android app for fantasy football fanatics and MFL owners Social Updater<http://chriswstewart.com/android-applications/social-updater/>- An easy way to send your status blast to multiple social networks

View 9 Replies View Related

Android :: Start A New Activity From A Menu Action - ActivityNotFoundException

Feb 28, 2010

I am trying to start a new activity from a menu action, as follows:

CODE:.............

The class exists, and has the OnCreate method over-ridden, but whenever I try to perform the action in the simulator I get an ActivityNotFoundException raised. I have looked through the documents and as far as I can read, I do not need to create an Intent in the manifest.xml for this to work.

View 3 Replies View Related

Android : Programmically Disable All Menu Item In My Activity?

Dec 16, 2009

In android, I create my menu item like this?

public boolean onCreateOptionsMenu(Menu menu) {

menu.add(0, 0, 0, "Menu1");
menu.add(0, 1, 0, "Menu2");
return true;}
How can I set all the menu item disabled programmically (in another part of the code in my activity, not in onCreateOptionsMenu() method itself)?

View 2 Replies View Related

Android :: Create Static Options Menu For All Activity Screens

Jan 15, 2010

I wanted to create a static options menu for all my activity screens. I dont want to override onCreateOptionsMenu() in each activity. Since Menu class is an interface with a huge number of methods, its difficult to create a static object of the implementing class.

View 3 Replies View Related

Android :: Open An Intent - MapView - From Main Activity With Menu

Jan 13, 2010

I'm trying from main Activity (MainFile.java) to open a Map as a new intent through a menu. Something like this...

CODE:..............

And I already have set up thing on my manifest.xml with access to...

CODE:........

It worked fine with other File.class, but with the Map.class doesn't seem to be working.

View 1 Replies View Related

Android :: Add To Menu Using AddIntent Options Providing For A Single Activity

Oct 7, 2010

I want to use addIntentOptions to drive my menus when ever possible. This seems the cleanest way to provide them. Rather than explicitly detailing activities, simply ask for a menu listing all the activities which are available for my data item.So I'm trying to put together a context menu for a List View. It works great. Only problem is that I have an activity that has two intents that consume my data type, and only the first shows up.The activity in question in Android Manifest.xml
<activity android:name=".ui.MyActivity" android:label="The title">
<intent-filter android:label="First context label">
<action android:name="com.sample.action.FIRST_ACTION" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.ALTERNATIVE" />
<category android:name="android.intent.category.SELECTED_ALTERNATIVE" />
<data android:scheme="myscheme" />
</intent-filter>
<intent-filter android:label="Second context label">
<action android:name="com.sample.action.SECOND_ACTION" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.ALTERNATIVE" />
<category android:name="android.intent.category.SELECTED_ALTERNATIVE" />
<data android:scheme="myscheme" />
</intent-filter>
</activity>

View 1 Replies View Related

Android :: Invoking A Context Menu When An OnClickListener Is Applied To An Activity

Aug 3, 2010

Please find the code sample below:

public class Abc extends Activity implements OnClickListener{
private ListView displayList;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mainlayout);
displayList =(ListView)findViewById(R.id.addressbooklistview);
addressbookAdapter = new CustomListAdapter(this,addressbookList);
displayList.setAdapter(addressbookAdapter);
registerForContextMenu(displayList);}
I am not able to invoke the context menu on long press. Please let me know any solution for the same.

View 2 Replies View Related

Android :: Start Activity From Menu Option Doesn't Work / Fix It

Dec 9, 2009

I am completely exhausted to think logically right now..... I am sure it is pretty easy to implement

I have a menu item which when selected would call another activity class. I am using switch case to select between menu items. I tried creating an Intent to start activity using the Class name but doesn't work.

View 3 Replies View Related

Android :: Start Other Activity By Code

Jun 2, 2009

I want to start the activity owned by other application. I know we could construct the Intent(setAction,setClass), and then call context.startActivity(intent) to start a new activity owned by the same application. When we start the activity not owned by the same application,doest this also work?

For example, I have a activity (com.test.StartTest) and there is a button that used to start some activity Settings owned by the Phone:

CODE:..............

View 3 Replies View Related

Android :: Context Menu In List Activity - When Make Long Press

Oct 18, 2010

I have list activity with custom array adapter and I can't to get context menu when make long press on list item.

<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
Why I do not see context menu? What I do wrong? How to get context menu with array adapter and ListActivity.

View 1 Replies View Related

Android :: Optimal Activity Stack Order For A Main Menu Button?

Jun 2, 2010

I'm developing an app that starts with a main menu, and then continues through three different steps (activities) to a final activity where the task is marked complete. On this last activity, i have several additional options (add note, share, etc..) and i also have a return to main menu button.

My question is.. how do i stack the activities so that calling finish() on the final activity will return back to the first activity launched? i am currently just starting the new activity via an intent, so pressing back on this screen doesn't return me to home as i would like.

View 2 Replies View Related

Android :: Add Entry - Pointing To Activity - To Home Screen - Menu - Add - Shortcuts?

Sep 20, 2009

I'm writing program for Android (SDK 1.5). I would like to know how to add/register one of my program activities in "Home Screen -> Menu -> Add-> Shortcuts" (or on Hero "Home Screen -> Menu -> Add to Home-> Shortcut") so that user will be able to add it to his home screen. Is there an Intent Filter or any other way to achieve that?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved