Android :: Can I Access A Member Variable Of Current Running Activity In Droid
Jul 29, 2010
I have an Android activity running with a custom view in it. When something happens within that custom view, I want to tell the currently running activity by changing one of the Activity member variables. Is there a way to access the current running activity member variables from within a custom view class besides passing the activity into the view class though a function arg?
View 1 Replies
Jul 16, 2010
I used Toast to make notification, but it seems it will appear even its activity is not in the current screen and some other activity has been started.I want to check this situation, when the activity is not the current one, I'd not send the Toast notification. But how to do ?
View 1 Replies
View Related
Jun 18, 2009
When I extend a View, I cannot access the protected member variables from my code. Eclipse just says that there exists no variable with that name (for instance mScrollX). Why is that?
View 2 Replies
View Related
Aug 4, 2009
I have been looking for this for a while but I can't find any way of doing it. A contrived example would be a service that simply displays the name of the current running activity as an Ongoing Notification. For instance, when the user is reading a particular email, the name of the activity (hopefully the email title!) would appear in the notifications window and when the user switches to read a text message, the notification would change to show the name of the new activity. Is there a way to do this in Android?
View 2 Replies
View Related
May 13, 2010
The default behavior of an activity when BACK softkey is pressed is, GO BACK TO PREVIOUS ACTIVITY. If some the same activity is waiting for some response from server or some data updation is going on and then press BACK, I want to wait on the same screen till the current task is completely processed and then move out to the previous activity.
You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options
View 12 Replies
View Related
Jul 10, 2010
How can i access an Adroid drawable by a variable?
View 1 Replies
View Related
Mar 27, 2009
I wish to get the environment variable which is set by a daemon in native but failed. Some details: in the daemon, which is started by root setenv("MY_NAME", name, 1); in java code, which is started by system String name = System.getenv("MY_NAME);
View 3 Replies
View Related
Feb 2, 2010
Can any one guide me how to achieve this?
View 4 Replies
View Related
Mar 2, 2010
It's very annoying to wait 3 days before seeing messages hit the group. What are the criteria for getting by moderation? Is it some number of posts? Begging?
View 2 Replies
View Related
Aug 26, 2010
I want to clear variable value when will i close activity.
View 1 Replies
View Related
Jun 22, 2009
I have tried to understand for the past 2 days what is the best approach to making the value from a variable sitting in activity A (in my case, the int position used in OnListItemClick / OnItemSelectedListener) available in another activity B (which of course sits in another class). There may be the option to write the result of the OnListItemClick int position into a small SQLite DB - but that seems to be total overkill.
Anybody could pls share the best approach with me?
View 6 Replies
View Related
Aug 27, 2010
My app is comprised of a set of reusable Activities that other apps can reuse. For various reasons, I would like my Activities to be launched in context of the invoking Activity's process, instead of always being launched in my Activity's process (default behavior on Android). How can I achieve this?
View 1 Replies
View Related
Apr 27, 2010
How to finish any previous activity in application stack (at any level , I mean not immediate parent) , from current activity like on some particular event I want to invalidate this previous activity?
View 1 Replies
View Related
Nov 5, 2010
The default behavior from my observation is if current activity force closes Android tries to go to previous activity on stack How can I control this behavior? I want force close to close all activities
View 2 Replies
View Related
May 1, 2010
I have following problem with my application: From my main activity ("activity 1"), there is a menu from which user can launch an action. This action will result in an Intent being received by a BroadcastReceiver, defined in my application. Finally, this BroadcastReceiver will start an activity ("activity 2") to deal with this intent.
The problem is that I have a "quit application" entry in my menu, and I can only finish() currently active activity. ie I am not able to finish "activity 1" from the menu of "activity 2". And I can't use startActivityForResult() as "activity 2" can't be started from "activity 1". Any suggestion would be much appreciated Thank you very much guys, regards.
View 4 Replies
View Related
Sep 26, 2010
How do I close a whole hierarchy of activities and show a new activity not present in the current task?
Context
Consider a FTP browser that resumes the previous session on launch. Each folder is displayed in its own activity. When I click on a folder, a new activity is started for the folder. If I press the back button, the app returns to the previous activity, which corresponds to the the parent folder.
I can logoff from the menu at any time. Logging off should bring me to the login activity (not present the current task when the app has resumed the session), and close all the other activities. How can I do this?
From what I've read, if the activity were in the current task I could use FLAG_ACTIVITY_CLEAR_TOP in the intent, but this is not my case.
View 1 Replies
View Related
Oct 2, 2009
startActivity() displays the new Activity on top of the current one. But how to display it underneath instead? BTW, I'm starting an Activity from another application, if that makes a difference.
View 5 Replies
View Related
Sep 26, 2010
Is copying the reference to the object and not the value of the object. Meaning, when I modify pos.top or pos.bottom, the original object gets modified. I'm guessing I am missing a concept of pass object by reference vs value here which I thought I understood. What is the fix here? Is it a problem with how I defined my custom class?
View 2 Replies
View Related
Nov 3, 2010
these is how to give a string as argument String link ="http://www.adobe.com /devnet/acrobat/pdfs /pdf_open_ parameters.pdf"; webview.loadUrl(link);But how to give an "URL" variable to load its content to webview.
View 1 Replies
View Related
Mar 12, 2010
I get the following stack trace when running my Android tests on the Emulator code...
I run my tests from an extra project. And it seems there are some problems with loading the classes from the other project. I have run the tests before but now they are failing. The project under tests runs without problems.
Line 14 of the Helper Class is:
this.httpHelper = new HttpHelper(userProfile);
I start a HttpHelper class that is responsible for executing httpqueries. I think somehow this helper class is not available anymore, but I have no clue why.
View 1 Replies
View Related
Jul 13, 2010
I have a situation where i want to show a dialog. However, the code that calls the method to show the dialog can be running either in the ui thread or not. How can i find if the current thread is running in the ui thread or not?
View 12 Replies
View Related
Jul 19, 2010
i want to check current running applications in android programmatically same like it shows 6 applications if we press and hold HOME button. actually i want to check application names.
View 1 Replies
View Related
Jul 29, 2010
Is it possible to add an activity on top of the current activity.
For example lets say i click a button, and then it adds a second activity to the current activity. And the second activity only covers a small place at the bottom of my current activity.
View 3 Replies
View Related
Aug 31, 2010
I m doing some task with following code,
I want to access inner class variable from outer class method.
class Outer extends Activity
{private Handler mHandler = new Handler();
StopTheThread()
{mHandler.removeCallbacks(mUpdateTimeTask);//
This is the what I want to do:
} class Inner
{ final Runnable mUpdateTask = new = new Runnable() {
public void run() {
//Some Code Goes Here
} };
InnerClassMethod()
{ mHandler.removeCallbacks(mUpdateTimeTask);//
This statement working fine here. Here mUpdateTask is inner class variable which is not accessible from outer class.
View 2 Replies
View Related
Jan 10, 2010
I created an application which enables the user to set whether he wants to receive notification while the application runs in background mode. If the notifications are enabled an activity should be started (the dialog should appear on the screen).
I tried to enabled it the following way:
CODE:...........
This is the method from main activity. When onPause() is executed isRunningInBackground is set true.
When I tried to debug it when the main application was running in the background the line
startActivity(intent) had no effect (the activity didn't appear).
Does anyone know how to midify the logic in order to start an activity from the main activity when the main activity is running in the background (after onPause() is called)?
View 1 Replies
View Related
Aug 11, 2010
I have Serviceļ¼Sometimes current run Activity work in background I don't want to know. I want to know current work interface Activity name?
View 3 Replies
View Related
Jul 28, 2010
I'm trying to figure out the correct way to create an AsyncTask to retrieve some data from the internet and then to take that data and bundle it up in an Intent and pass it to a new activity(A list display). So in the first activity I just have an EditText and Button. In the event of an OnClick the task should be called and when it is finished the data should be bundled inside an Intent and passed to the next Activity. The problem is when I take the results from onPostExecute and set them to an instance variable of the main activity, that instance variable is still null when the task is complete. Here is the barebones version of the code:
CODE:...........
When I debug the application I see onPostExecute does contain a valid PlacesList full of results, so why is the instance variable places set to null after the task is executed? I am going about "returning data" from an AsyncTask incorrectly?
View 1 Replies
View Related
Sep 26, 2010
There are a ton of activity stack related questions on StackOverflow, but I didn't really see any that answered the question I have. I'm working on an online game that (for now) has 3 different activities Login/Register Menu (seen when logged in, includes "new game", "my stats", and a few other things...I'm just worried about the "new game" option for now.
View 1 Replies
View Related
Oct 19, 2010
How can I know what Activity has started the current Activity? Is there any specific method like, i.e. getIntent().getCallerActivity() or the only way is saving some information within the Intent using putExtra()?
View 1 Replies
View Related
Apr 9, 2009
Is it possible to get the currently running activity through Service..?
i.e. I have a service started by an Activity A, and now I want to stop the service by another activty say Activity B.
Since Activity B doesnt know about the service, i want to capture the events in OnKeyDown() of the Activity B in my service...
Is this possible.. How can i get the Activity B's object..?
View 6 Replies
View Related