Get Activity Name From Application
Feb 28, 2012
I am trying to launch Google Voice when I double tap home.
I need to get the activity name to launch Google Voice. How can I get this?
To launch it, I need the full application name, which I have, com.google.android.apps.googlevoice but I also need the activity to start it up.
I have tried several guesses, but nothing has worked so far.
I just want it to start and open the main inbox ui
View 6 Replies
Jul 27, 2009
Is it possible to attach Menu to an application rather than each activity in the application? I have 20-23 activities in my application and it doesn't make sense me to add same menu to all the activities.
View 5 Replies
View Related
Oct 14, 2010
I have 3 activity in my application. My first activity (Main) has 2 button that starts other activities (One & Two). The One Activity starts a countdown timer on UI. When I click back button Android closes this activity and when I re-open activity, my timer is resetted.
I try also overriding:
CODE:.....
And it's works correctly but when I re-open the Main Activity, Android shows me my timer activity. How can I resolve this problem?
View 1 Replies
View Related
Jan 23, 2010
I have an application with several Activities. My A Activity has the Manifest Intent filter parameters: action.MAIN and category.LAUNCHER. after its being loaded I call Activity B and finish() A since I don't use it anymore.
After I run my application, go from Activity A to B and press the Home button, when I relaunch it from the applications menu or from the Market app for ex.(not by a long press on the Home button), it starts from the A Activity and do not save its last Activity B.
I definitely know that this is possible to relaunch an application from its last Activity (some application from the Market do support it) and I think that this can be determined by the Manifest parameters but I don't know which one.
How to implement it so my application can relaunch from its last Activity B?
View 2 Replies
View Related
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
May 27, 2010
I understand how to use intents and startActivity() when opening another activity within my own app, but how do you start a different app? specifically:
- How do you determine if the user has the needed app installed on their device?
- How do you start that app?
- How do you pass parameters to that app?
- How do you find all this info out for a specific app (say Adobe reader, or google maps)?
View 2 Replies
View Related
Oct 5, 2010
Is there a way to manage application activities by hand, like this: user activating an application from menu, it does some initialization, then creates some activity (is it necessar y to declare all activities in the application manifest?), and listens to it's events. On some event application decides to close one activity and open another - so it contains all the application logic. Didn't found anything like this in examples, they all have all the logic in the activity classes. Maybe I need to user Services? (Maybe I don't understand right, what an activity represents. For me it's like window in windows, or Displayable in j2me) I'm very new to android development, trying to understand the basics.
View 4 Replies
View Related
Feb 21, 2010
I want to know if there is any way to start another application from within my application. Specifically i am trying to a have a shortcut (button) to Google Maps Application within my application. Also is there any way to start another process from within my android appplication?
View 4 Replies
View Related
Apr 26, 2009
When start the activity i will set the activity object to the Application, and i will registry it in the Appication app = MyApplication.getApplication(this);
1. Start Activity A store A id 0x12345678
2. Activity A -> Activity B
3. Store B id 0x87654321
4. Finish B activity
5. but the Activity B object not null in the Application
View 7 Replies
View Related
Feb 5, 2010
I have application A defined as below:
CODE:.................
Now in application B, how can I write the code to start the activity in application A?
View 2 Replies
View Related
Sep 2, 2010
I have a list activity in my application. i have tried to make it so that when a list item is selected to show the selection the background of the view should change. but now when i select one item, the item does get selected but the back ground of random listitems changes at the same time, but the selection is still correct
CODE:...........................
View 1 Replies
View Related
Mar 11, 2010
I've got an Android app which has a periodic background Service. I want this Service to react differently depending on whether any Activities in my application are open. The issue is that the Service just keeps itself running via the AlarmManager making it on kind of on a separate "track" from the Activities, so I don't know whether the application is open when it runs.
The best solution I can think of is to flip a boolean on/off whenever onResume() or onPause() is called in all my Activities, but this seems like a lot of footwork. Is there a simpler, more elegant solution?
View 1 Replies
View Related
Mar 18, 2010
For an unknown reason, I can't get my application leaving properly so that when I push the home button and the app icon again I resume where I was in the app....But I would like to force the application to restart at the first activity...I suppose this has something to do with onDestroy() or maybe onPause() but I don't know what to do..
View 4 Replies
View Related
Apr 10, 2009
In my Android application, I have two activity classes. I have a button on the first one and I want to show the second when it is clicked, but I get an error.
Here are the classes:
CODE:...........
The second class that should show when the button is clicked, but never does:
CODE:........
How do I create a button that will show the second activity?
View 3 Replies
View Related
Nov 8, 2010
This has me stumped, I was using this in Android 2.1-r8 SDK: Code...
View 1 Replies
View Related
Jul 1, 2010
Is there any fundamental difference in binding a service to an android.app.Activity vs binding it to an android.app.Application. I want to bind the service to an Application because I want to keep some global state/data in the Application instead of duplicating it in all my activities.
View 1 Replies
View Related
Oct 6, 2010
I want to write a service for Android platform that is notified when the current foreground activity changes. Basically the service should do some tasks only when the top activity changes. Is there any way to subscribe and to be notified when this kind of event occurs? Or there is no possibility and the service should poll from time to time the list of running activities and to check what is the foreground activity ?Not preferable solution...
View 1 Replies
View Related
Aug 28, 2010
I started to develope an application. When I wanted to close the application I clicked on the home screen, but the app is still playing in the background. Than I tried to click on the "back" key, but nothing happend, so I've created a key event listener for the 'back" key, and inside that method I wrote finish(); Now my app is closing but I think it's still running in the background, because when I go to "manage applications" I can still see it in the "running" tab, and if I press it, I see I can click on the "force close" to actually close the app. What do I need to do in order to really close the app without leaving it open (one way or another)?
View 9 Replies
View Related
Mar 14, 2010
I think i'm getting senile because I was convinced that to give a name to your application, you had to fill this part of the manifest: <application android:icon="@drawable/icon" android:label="MyApplicationName"> However for a reason I don't understand, my application gets the name of my first activity, in which I load data, henceforce, It is called "Loading"...(defined as follows in the manifest) <activity android:name="AccueilSplash" android:label="Loading">
View 2 Replies
View Related
Feb 22, 2009
In case there is anybody out there who would like to create a support- application to an activity that is already used by everybody on the Internet, the moment has come! I'm particularly interested in developers with deep knowledge of Linux services and/or the Android GUI. Note: this is not yet another password vault or similar, this is about *eventually getting rid* of passwords!
View 2 Replies
View Related
Mar 1, 2010
I have a problem with my application, and it's about a Virtual memory error: ERROR/AndroidRuntime(19790): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
The story is like this: I have an activity (let's call it A), the user click on a button from this activity, then i will make an api call somewhere in the internet, and after the result is back i start a subactivity (let's call it B).
In the activity B i have to dinamicaly load some images from the resources folder. I load the images into bitmaps -> drawables -> imageviews. After the user click's on some buttons i have to setResult(..), finish(), and get back to activity A.
The thing is that, goes from activity A to B, then B -> A, then A -> B for a few times, my app crashes with the message above: it doesn't have enough memory to load the interface.
I can not maintain the activity B on the stack because i don't want the user to go to this activity without going through activity A first.
View 2 Replies
View Related
Sep 2, 2010
I have created the meat and guts of my application but I want to add a different activity that will be the starting point (sort of a log-in screen).
Couple questions:
1) I have a fairly decent handle on how to switch between activities (based on this article: http://www.linux-mag.com/id/7498) but I'm not sure how to go about creating a new one (with eclipse).
2) once I have a new activity created, how can I set it as the default activity of my application? I presume I could just change the name of the classes...but is there a more elegant way to handle that (maybe within the AndroidManifest.xml)?
View 1 Replies
View Related
Dec 28, 2009
Differently from most application, the state of my application is not controlled by its stack of activities but by the state of a background service.
Here is my problem. Suppose I have a task running with a non empty stack of activities. The top activity is paused on background and not visible.Then for some reason the process that host both the service and top activity is killed. When I somehow return to my app application ( by pressing back key, resuming from recent apps menu),the framework launches the application again with the activity that was on the top of the activity stack before process got killed.
Okay, you would say that it is the expected behavior. But because my service is no longer alive , the top activity is no longer valid ( as the other activities which remain on stack) . I would like to clear the whole activity stack and launch another activity to explain the current situation to user.
I could put the follow code on every activity "if(not valid state) finish() and launch a new activity with clear top flag enabled " but I don't think it is clever. Is there a better way to control which activity will be launched after application is killed ?
View 4 Replies
View Related
Dec 16, 2009
Can anyone please tell me that how to move from one activity to another using the class intent. i have followed the code...
View 1 Replies
View Related
Jul 22, 2009
I have requirement that needs to save data to a file. During multiple Activitiy screens, I add different data to a list and finally when user is not using the app (means if user exits app by pressing "home" button or "call" button), just before exiting that app, i want to save that data of the list to a file.
coding before exiting activity screen is simple - by calling onDestory () method, but here I want not one activity but the application exit.
So my question is How do I write a code that will be executed just before application exits ? I tried created one class extends Application, and then I override onTerminate() method, but it's not get called when I exit ( pressing home button on device)
View 2 Replies
View Related
Apr 28, 2014
How to check in android when application (not Activity) going to closed?
View 2 Replies
View Related
Oct 15, 2012
I'm interested about some application that can provide information about other application activity - like monitor the battery usage, data trafic, cpu time and so on.
Do you know such an application? Can you give me some examples of application that does that?ROOT/Un-ROOT doesn't matter - I need an in-depth information about this subject.Doing reports, and generating logs about different things that are monitored is a plus.
View 1 Replies
View Related
Jun 9, 2010
Applications can have any number of launchable activities. I know how to get the list of these activities via PackageManager.
Is there a way to determine which activities can be launched via startActivity?
For example, the Documents To Go app has different activities that will start Word, Excel, Powerpoint, PDF, etc... I am able to launch all o these just fine.
However, it also contains some activities that I am not able to launch with startActivity... If I attempt to do this I get a SecurityException.
I want to be able to determine which activities I can safely launch and which I cannot so I only present the user with a list of activities that I can safely launch from within my application...
View 1 Replies
View Related
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
Aug 24, 2010
Can we show the dialog when our application/activity startup?
View 4 Replies
View Related