Android :: Too Many Activities Being Started When Launching An Android Application

Dec 24, 2009

You can see property action android:name= property is "android.intent.action.MAIN" and categoryandroid:name= is "android.intent.category.LAUNCHER" for all activities.When application starts up, it calls First Activity. Then calls useless Activity such as ThirdActivity or Second Activity.In this case, is my manifest.xml correct?Or, do I need to set another property to Second and Third activity? If so, what is that?I wonder manifest.xml file is right for my case.

Android :: Too many Activities being started when launching an Android Application


Android :: Launching Unknown Activities From An Android Application

Apr 5, 2010

I want to make an android application that shows a listing of applications (downloaded from the android market) and launches the one that the user selects. From what I've read, I'd have to use intents like this:

Intent intent = new Intent();
intent.setClassName(packageName, className);
startActivity(intent);

I just want to be able to launch the applications, not a specific activity that they could have.

My question is: How could I launch these applications if I don't know their packageName or className? or maybe, how could I get to know their className and packageName, if it's a closed source application that I didn't develop.

View 2 Replies View Related

Android :: Launching Activities Within Tab

Aug 20, 2009

I have an application with three tabs. Through various interactions with the items in the tabs I end up launching other activities. The client has reviewed this and would like the activities launched "within" the tabs, so the tabs remain visible and if the user clicks the tab it goes back to the original activity defined in the setContent function. Is this possible and how would I go about this from other activities? (ie the child activities, not the one that defines the TabHost and has access to call setContent)?

View 4 Replies View Related

Android :: Launching Different Activities Under TabWidget

Jan 25, 2010

I am trying to launch activities under each tab.

I hav tried with following code:....................

I m getting exception as::::::

code:................

View 3 Replies View Related

Android :: Should StartActivity Always Run Started Activities OnCreate?

Aug 10, 2010

I have a main activity and a sub activity.The main activity starts the sub activity using startActivity, and passes an object in the intent.The sub activity reads the object out of the intent in its onCreate action.The sub activity updates the object, then returns to the main activity using startActivity, again passing the updated object back.However, the main activities onCreate function is not called, so the code it contains to read the passed object does not run.Further investigation indicated that the main activity onPause event is firing, i.e. it is only paused when the sub activity runs, so when the sub activity starts the main activity again, it just on Resumes.Does anyone know if there would be any disadvantages if I moved my data restore/store activities to the onResume and onPause events?I'm not using the onCreate saved Instance State, should I be?

View 4 Replies View Related

Android :: What Intent Flags Are Recommended For Activities Started By Notifications

Nov 8, 2010

I am running into a peculiar issue with an app which has multiple Activities.I have a screen manager class that is bound to a service.The service polls a server for data.The screen manager starts Activity A, B, or C, based on the data.It will also allow the user to select to display the other Activities or it may swap out an Activity automatically based on new data from the service.Currently all the navigation works great and if the user presses Home, the applicable Activity comes back to the foreground when the user presses the apps icon from the Android home screen or the recently run apps list.I then had to implement a new feature to display an icon and notification.I first implemented this by only displaying the notification when the Activities were no longer visible by setting it in each Activities on Pause.Worked like a charm and gave the user a third option to redisplay the app after Home button press.However if the data from the server (when the app is not displayed) causes the screen manager to update the Activity to be displayed I have issues. I think my Activity stack is getting screwed up.I have since tried a little different model where the screen Manager handles the notifications and always displays the notification, updating it with a new Intent whenever an Activity is updated, but its still not cutting it.

When the app is minimized and the data changes I can see the screen manager call the startActivityForResult on the new Activity and it seems like Android knows we are minimized and does not display the Activity. I can then also the screen Manager call to finish on the old top Activity.Each Activity currently has the flag set to singleTop in the manifest and FLAG_ACTIVITY_SINGLE_TOP in the code. When the data hasn't changed on the server, I pull the app back up using any of the above I get what I expect and the Activity's onNewIntent is called. However when the data has changed and the user calls up the app via the notification it calls the Activities onCreate. The Activity does come up and runs, but then pressing back takes me to what seems like another instance of the same Activity instead of exiting. I just took a closer look at my logcat and I see 2 calls to the Activity's onResume, but then no doubles after that.

View 1 Replies View Related

Android :: Launching Another Application Through The Current Application

Jan 6, 2010

I want to launch another application through the current application.

In RIM there is a "ApplicationManager.getApplicationManager().launch("String path")" method that launches directly RIM application mentioned in "String path".

Is there any method like this in android or any other way to solve this problem ?

View 2 Replies View Related

Android :: Launching One Application From Another

Jun 1, 2009

Say I have developed 4 applications. Is it possible to group these applications, so that I can access and launch these from one location?

Can the below flow work? Start an Application|Display launchers(icons) for 4 different applications|On click of the icon start the respective application.

View 6 Replies View Related

Android :: Application Not Re-launching

Mar 29, 2010

I have written an application which calls native methods through JNI. In the native library 4 threads are started. On USB removal, the application is to be closed including the native threads. Upon receiving the USB removal event, we are trying to kill the threads (pthread_kill() ) and then finish (using finish()) the activity. After reconnecting the USB, the application is not launching due to memory corruption. In DDMS, it shows the threads are still attached to bionic. As the threads are not closed, I feel the resources were not released properly. If I reconnect again then application launches and works fine and the same repeats on every launch.

To solve this problem Can I use System.gc() ? Can I use pthread_exit() 1st and then pthread_join instead of pthread_kill ? Whats the procedure in Android to kill the native threads and also the application ? After the application is closed, will it not be listed in DDMS ?

View 2 Replies View Related

Android :: Droid App To Know When Another Application Has Been Started?

Aug 14, 2010

I would like my app to do something when another application is opened.

The current approach I have taken is to create a broadcast receiver that monitors all

android.intent.action.MAIN
events, but either I am not doing it correctly or the way I am going about it is incorrect. The section of the manifest looks like this code...

I included the launcher category just as a test. GetApp currently is only set to make a log entry when called.

View 1 Replies View Related

Android :: Launching Application In Market

Sep 30, 2010

I want to launch my application in market. I ahd go to http://market.android.com/publish/signup but there they are asking for Website URL. But i don't have any website then what should I enter there? or is it necessary to have our own website to launch application in market?

View 6 Replies View Related

Android :: How The Use Same Instances When Launching Application Twice

Apr 14, 2009

My app has 4 activities on the stack A->B->C->D (top)

If you press home and re-enter the application, another instance of A is started, so the stack is A->B->C->D->A (top). I know this because when I press BACK, A is popped off and I now see D (instead of going to the Home screen).

What I want is that when the user re-enters the app, they re-enter on the same activity they were in before (D).

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

View 2 Replies View Related

Android :: How To Use Same Instances When Launching Application Twice

Mar 17, 2009

Is it possible to re-use all the instances of Activities and Services when an application is launched twice. For instance: 1/ I start my application APP1. Some activities are launched and a service is started. 2/ I click "Home" device button 3/ I can see the icon the launch again my application APP1 4/ I click on it and the APP1 is launched twice

I would like to re-use the existing the instances of Activities and Services from the first launch. I guess it is related to "SingleTop" or "SingleTask" but it doesn't seem to work.

View 11 Replies View Related

Android :: Launching Appwidget From Another Application

Nov 9, 2009

Is it possible to launch an app widget from another application.

For example, I have a button in an application. When I click on that button, an appwidget must be launched.

View 7 Replies View Related

Android :: Launching External Application From App

Dec 29, 2009

I would like to launch an app the user selects from within my application. However, I'm not sure how I'd go about doing this. I've tried this:

Intent intent = new Intent();
intent.setAction(Contacts.Intents.SHOW_OR_CREATE_CONTACT);
startActivity(intent);

But this seems to throw an error and force close my application. I also tried adding:

<action android:name="Contacts.Intents.SHOW_OR_CREATE_CONTACT"/>

in the AndroidManifest file, but to no avail.

A look at Logcat shows that it's an "IOexception - no such file or directory". A couple of questions arise from this. I read through the Android docs and noticed that the Contact.Intents class is deprecated. However, it's successor, ContactContracts is aimed at API level 5 whereas I'm targeting API level 3. Could this be the problem? Also, I've hardcoded this application into the code. Is there a way to retrieve the intents of any application the user selects so that they can be launched?

View 4 Replies View Related

Android :: Launching An Application Using Browser

Oct 13, 2010

I want to launch an application in the phone by clicking its link in the browser..

View 2 Replies View Related

Android :: Launching Another Activity From Application

May 22, 2010

I am trying to launch another application from my Activity. Something weird happens when I am running this code :
Intent myIntent = new Intent( Intent.ACTION_MAIN, null );
myIntent.addCategory( Intent.CATEGORY_LAUNCHER );
myIntent.setFlags( Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED );
ComponentName compName=new ComponentName(myArray[i][0], myArray[i] [1] );
// String[][] myArray myIntent.setComponent( compName ); startActivity( myIntent );

I have this error :
android.content.ActivityNotFoundException: Unable to find explicit activity class { com.android.settings/com.android.settings.Settings};
Have you declared this activity in your AndroidManifest.xml?
But when I replace this line
// myArray[i][0] = "com.android.settings" // myArray[i][1] = "com.android.settings.Settings" ComponentName compName=new ComponentName(myArray[i][0], myArray[i] [1] );
with ComponentName compName=new ComponentName("com.android.settings","com.android.settings.Settings");
And without any modification in my manifest, it works!

View 2 Replies View Related

Android :: Get Informed Whenever An Application Is Started / Created?

Nov 16, 2009

I'd like to write sthg like a logger for my Android phone where I log whenever an application/activity is started respectively created. So it's not only about my own stuff but about all the stuff that gets started on the phone. Is there sthg like an intent flying around or any kind of stuff that I could catch?

View 6 Replies View Related

Android :: Launching Application From Settings Menu

Oct 3, 2010

I am looking for a way to launch my application(few Activities, Services, Receivers) from the Setting menu.

In other words I am interested to know:

1. I this a trivial task ?

2. Did someone has done such task before ?

3. What APIs and application's code should I learn

View 3 Replies View Related

Android :: Get Event On Launching The Native Application

Aug 6, 2010

1 . can we get any event when user tap/touch native application(i.e. messaging,contacts).

2 . i know that any application launch by intent in android, there is any way to know which application launch with launch of application.

View 2 Replies View Related

Android :: Launching Google Map Application - Unable To Get URL

May 4, 2010

I am launching Google map application from my application, using
Uri.parse("geo:" + "13.042206" + "," + "80.17000?z=10");
and its working fine. But I want to show direction between two latitudes and longitudes, for that I tried using this uri,
Uri.parse("geo:" + "13.042206" + "," + "80.17000" + "geo:" + "9.580000" + "," + "78.100000?z=10");
But I am getting a Toast telling "Unable to load the url".

View 5 Replies View Related

Android :: Launching Home Replacement Application

Jun 4, 2009

Is it possible to launch other apps from my app like the application launcher or home screen do? I don't want to try a home replacement app. At least would a widget on home screen be able to launch other applications? Also can a widget on the (default) home screen receive swipe events (before a touch event)?

View 7 Replies View Related

Android :: Phone Application Not Launching On Emulator

Nov 16, 2010

I'm testing a simple hello app and it's not launching on the emulator. There's no errors and the console is this:

[2010-11-16 21:26:06 - Hello World] ------------------------------
[2010-11-16 21:26:06 - Hello World] Android Launch!
[2010-11-16 21:26:06 - Hello World] adb is running normally.
[2010-11-16 21:26:06 - Hello World] Performing com.hello.HelloWorld.HelloWorld activity launch
[2010-11-16 21:26:09 - Hello World] Launching a new emulator with Virtual Device 'VirtualDevice2.2'

The emulator launches and the screen appears with the lock and my app doesn't start. Tried to unlock and go to launcher to look for my app and it's not there. Anyone can help me on this one?.......

View 1 Replies View Related

Android :: Launching Twitter Homepage In Application Using API?

Nov 8, 2010

I want to launch Twitter in my application. I want to know that, Is it possible to launch twitter in my app using any API? If it's possible, please post the code snippet. I should be able to see the real twitter homepage (not directly invoking the "url").

View 11 Replies View Related

Android :: Detect Another Application Started Playing Audio

Aug 26, 2010

My music application constantly plays music in the background, however I'd like to be able to detect when another application starts playing audio (such as the YouTube app) so I can pause/mute/stop the audio in my application. This will allow a user to continue browsing the web whilst listening to music, but then if they wish to watch a video at any point, they can do so without audio conflict.

One solution might be to listen for a broadcast which states when an application begins using the AudioManager. Does such an Intent Action exist? Edit: As in the answer provided below, there appears to be a method of detecting the loss of audio focus in 2.2 with AudioManager.OnAudioFocusChangeListener.

View 1 Replies View Related

Android :: Application To Be Started Whenever The Phone Is Turned On Or Restarted

Sep 8, 2010

I want my application to be started whenever the phone is turned on or restarted.

View 1 Replies View Related

Android :: Creating A Service That Survives Application That Started It?

Nov 10, 2010

I'm developing an Android application that consists of:

a lightweight background service that logs events to a DB
a heavier GUI application that summarizes these events and displays graphs.

I'm having trouble creating the service part, though. The graphic application can use quite some RAM, and when it goes to the background, the OS closes it after some time of not being used.

The problem is, when the application gets shut down, so does the service. This is bad because this keeps me from recording further events. I don't care if the application gets terminated, but the service needs to keep on running.

I have tried numerous ways to keep the service alive, like having it use threads or a differently named process than the main app. Nothing has worked, and I have found no help on any of the android developer pages or forums.

View 3 Replies View Related

Android :: Unable To Remove Default Launching Of An Application

May 6, 2009

Example: I have a button which starts an activity with GET_CONTENT audio/* I have a menu with choices: Music Track or Sound Recorder and a checkbox. I check the box, it tells me that I can clear the setting in Application -> Manage Applications. I launch the Music Track with the box checked. I go to the application settings, but the "clear defaults" button is always enabled. It was already the case with 1.1 SDK, 1.5 does not help (tested on emulator 1.5 AND ADP1 with 1.5 recovery image). I also tested the allowClearUserData flag but it seems we cannot clear anything but the cache (for the webview ?)

View 8 Replies View Related

Android :: Application Component Not Instantiated Before Launching Activity

Dec 17, 2009

I got a null pointer exception in an Activity onCreate() while trying to access my Application object (extended from android.app.Application).This exception occurred very rarely and i have no way to reproduce this again.My App starts a service on BOOT_COMPLETED intent and the null pointer exception seems to have occurred during boot up. Can somebody please throw some light on this issue? Application should have been created before creating any activities.

View 2 Replies View Related

Android :: Launching Google Maps And Navigator From Application

Aug 18, 2010

I have an android application which allows the user to open up google maps or navigator to show a certain address. This functionality was working in the past, but now I get the following error and the app crashes:
ERROR/AndroidRuntime(2165):
android.content.ActivityNotFoundException:
No Activity found to handle Intent { act=android.intent.action.VIEW
dat=google.navigation:q=MCNAMARA+TERMINAL+ROMULUS+MI+48174 }

The two intents I'm using are-

1) For Map:
String uri = "geo:0,0?q=MCNAMARA+TERMINAL+ROMULUS+MI+48174";
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(i);

2) For Navigator:
String uri = "google.navigation:q=MCNAMARA+TERMINAL+ROMULUS+MI+48174";
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(i);

View 1 Replies View Related







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