Search Results

Search found 4718 results on 189 pages for 'activity lifecycle'.

Page 5/189 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Android Keep Activity from Dieing

    - by GuyNoir
    The main Activity I use in my Android application uses a fair amount of memory, meaning that on a less powerful phone, it is susceptible to being killed off when not at the front. Normally this is fine, but it also happens when I am still inside my application, but have a different activity at the top of the stack (such as a preference activity). Obviously it's a problem if my application is killed while the user is still running it. Is there any way to disable the OS's ability to kill off the application for low memory problems? Thanks.

    Read the article

  • android activity class does not exists?

    - by user975234
    I have been developing a project in eclipse for an android app. An error which i frequently get is that of- activity class does not exist. But when i just save the manifest file once again the error vanishes and the program runs correctly. Why then do i get the same error again and again. ? Console error: [2011-11-18 15:08:38 - link] Starting activity acb.abc.LinkActivity on device emulator-5554 [2011-11-18 15:08:40 - link] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=acb.abc/.LinkActivity } [2011-11-18 15:08:40 - link] New package not yet registered with the system. Waiting 3 seconds before next attempt. [2011-11-18 15:08:40 - link] ActivityManager: Error: Activity class {acb.abc/acb.abc.LinkActivity} does not exist.

    Read the article

  • PreferenceActivity used as main activity has strange animation

    - by Tobia Loschiavo
    Hi, I have a preference screen (subclass of PreferenceActivity) set as main activity (opened when the application starts). Anyway the animation android uses to open this activity is different from standard activity. It seems that two types of animation run concurrently: the usual fade animation and the right to left one. This is the code of the onCreate() method: getPreferenceManager().setSharedPreferencesName("app"); addPreferencesFromResource(R.xml.preferences); screen = getPreferenceScreen(); How can fix this glitch? Thanks

    Read the article

  • Android: How to make launcher always open the main activity instead of child activity? (or otherwise

    - by yuku
    I have activities A and B. The A is the one with LAUNCHER intent-filter (i.e. the activity that is started when we click the app icon on home screen). A launches B using startActivity(new Intent(A.this, B.class)). When the user has the B activity open, and then put my application into the background, and later my application's process is killed, when the user starts my application again, B is opened instead of A. This caused a force close in my app, because A is the activity that initializes the resources my app needs, and when B tried to access the uninitialized resources, B crashes. Do you have any suggestions what should I do in this situation?

    Read the article

  • AsyncTask and onDestroy...

    - by stormin986
    I have an activity initiate a few AsyncTask downloads. After two of the three finish, it issues an Intent to load the next activity while still finishing up the last download. Obviously in onDestroy() i will call cancel() on all AsyncTask objects. If the OS tries to destroy my activity after the next activity starts, it will call and begin executing onDestroy in the apps UI thread, right? It won't wait for that AsyncTask to complete, correct? In all cases it will ultimately call onDestroy(), in turn canceling all AsyncTasks?

    Read the article

  • IBM sort Rational Engineering Lifecycle Manager et SmartCloud Continuous Delivery pour réduire la complexité des applications

    IBM sort Rational Engineering Lifecycle Manager et SmartCloud Continuous Delivery des nouveaux outils pou réduire la complexité des applications Le portefeuille d'outils de développement d'IBM vient de s'enrichir de Rational Engineering Lifecycle Manager et SmartCloud Continuous Delivery, deux nouvelles solutions pour répondre aux besoins des développeurs. Ces outils ont été conçus pour résoudre des problèmes rencontrés dans les projets d'envergure comme ceux qu'on trouve dans des systèmes pour l'industrie automobile, la robotique ou de petits changements dans le système qui peuvent avoir des effets plus importants que prévu initialement. La solution Rational Engineering L...

    Read the article

  • Multiple listview in single Activity

    - by jay
    Hi i have activity in my project which contatin below xml file But Problem is that when i run my activity it display lsitview only in some part of the screen. i want both listview scrollable and also the whole layout should be scrollable to anyone know how can i do this? Regards jay.

    Read the article

  • updating an activity from an asynchronous service

    - by Dave.B
    I've implemented a service that does an asynchronous sync to between my application and google docs. I want to update the top level activity of my application when the sync is complete. However because of the service it's possible that the app could be be in a unknown state. Is there a way to make the top level activity, whatever that may be, recreate itself from an asynchtask in a service.

    Read the article

  • Make service indepented from activity (Android).

    - by shuwo
    I have an activity with two buttons, start and stop. If the user press the start button a service is created using Context.startService. And the stop button calls Context.stopService. I want the stop button to be the only way to destroy the service. Now, if i end the activity using a task manager, the service is killed as well. Is there any way to avoid this?

    Read the article

  • Android reset activity component state on navigation back

    - by Aure77
    I have 2 activities in my application. In activity1, I set some configuration and I modify the state of some component (ex: set button state disabled). And I navigate to activity2. In activity2 I do some stuff and at end, I finish this activity and come back to activity1. But In activity1, my components state are the same when I leave this activity. How to reset the components state with valuesdeclared in XML file (layout) ?

    Read the article

  • SQL SERVER – Activity Monitor and Performance Issue

    - by pinaldave
    We had wonderful SQLAuthority News – Community Tech Days – December 11, 2010 event yesterday. After the event, we had meeting among Jacob Sebastian, Vinod Kumar, Rushabh Mehta and myself. We all were sharing our experience about performance tuning consultations. During the conversation, Jacob has shared wonderful story of his recent observation. The story is very small but the moral of the story is very important. The story is about a client, who had continuously performance issues. Client used Activity Monitor (Read More: SQL SERVER – 2008 – Location of Activity Monitor – Where is SQL Serve Activity Monitor Located) to check the performance issues. The pattern of the performance issues was very much common all the time. Every time, after a while the computer stopped responding. After doing in-depth performance analysis, Jacob realized that client once opened activity monitor never closed it. The same activity monitor itself is very expensive process. The tool, which helped to debug the performance issues, also helped (negatively) to bring down the server. After closing the activity monitor which was open for long time, the server did not have performance issues. Moral of the story: Activity Monitor is great tool but use it with care and close it when not needed. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Best Practices, Pinal Dave, SQL, SQL Authority, SQL Optimization, SQL Performance, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • Scene or Activity Animation

    - by Siddharth
    My game require an animation when one activity finishes and next started because I have develop game with multiple activity not as multiple scene per game. I have to show animation at the time of activity creation and activity destroy. I have trying to create basic animation that was supported by android. And all that xml file I have to post it into the anim folder but the loading of resource was so much high so any type of animation I provide using android method does not work for me it look weird. If scene class has some functionality for animation that please know me then I try to load different type of animation using scene. I have not create multiple scene because I have no awareness about how to manage multiple scene in andengine though I have a working experience of 8 months in andengine. So this help also provide me a great help. Basically I want to create animation like one activity slide out at the same time the other activity slide in. So at a time user can see the transition of activity. Thanks in advance.

    Read the article

  • How to keep activity on Force Close?

    - by SushiRoll
    I have this piece of code that's really prone to errors so I wrapped it with try{}catch statement. I don't want to go back to the previous activity, I just want it to stay on the current activity so that the user can edit whatever is wrong with them. How do I implement this? try{ orgi.insertOrThrow(tableName, null, values); Toast.makeText(this, "You have successfully created a new profile!", 2).show(); gotoProfileList(); Log.e(getClass().getSimpleName(),"Successfully added to database"); }catch(SQLiteException se){ Log.e(getClass().getSimpleName(), "Database connection failed!" + se); //Stay in this activity... }finally{ if (orgi != null){ orgi.close(); } } Forget it, I was able to solve my own problem by showing up an alertDialog that tells the user about the error. Thanks anyways. :) try{ orgi.insertOrThrow(tableName, null, values); Toast.makeText(this, "You have successfully created a new profile!", 2).show(); gotoProfileList(); Log.e(getClass().getSimpleName(),"Successfully added to database"); }catch(SQLiteException se){ Log.e(getClass().getSimpleName(), "Database connection failed!" + se); displayError(); //stayInThisActivity(); }finally{ if (orgi != null){ orgi.close(); } public void displayError(){ AlertDialog.Builder error = new AlertDialog.Builder(this); error.setMessage("That profile name already exists, try another one.").setCancelable(false).setPositiveButton("Yes",new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }); AlertDialog alert = error.create(); alert.setTitle("Error"); alert.show(); }

    Read the article

  • Pass data from thread into Activity

    - by Laimoncijus
    Hi, I am want to pass data back from a Thread to Activity (which created the thread). So I am doing like described on Android documentation: public class MyActivity extends Activity { [ . . . ] // Need handler for callbacks to the UI thread final Handler mHandler = new Handler(); // Create runnable for posting final Runnable mUpdateResults = new Runnable() { public void run() { updateResultsInUi(); } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); [ . . . ] } protected void startLongRunningOperation() { // Fire off a thread to do some work that we shouldn't do directly in the UI thread Thread t = new Thread() { public void run() { mResults = doSomethingExpensive(); mHandler.post(mUpdateResults); } }; t.start(); } private void updateResultsInUi() { // Back in the UI thread -- update our UI elements based on the data in mResults [ . . . ] } } Only one thing I am missing here - where and how should be defined mResults so I could access it from both Activity and Thread, and also would be able to modify as needed? If I define it as final in MyActivity, I can't change it anymore in Thread - as it is shown in example... Thanks!

    Read the article

  • Glassfish war lifecycle question

    - by Robot
    What is the proper way to redeploy a new version of a running app in glassfish? I have a WAR running, and I've made changes. I thought doing an undeploy + deploy might be the right thing, but glassfish (v3) often crashes when I undeploy. What' the proper way to redeploy a running app in glassfish?

    Read the article

  • Maven Tutorial that Covers a Complete Project Lifecycle

    - by Jonas Laufu
    Can anyone point to a maven tutorial / how-to that covers everything that is normally required during an OSS project: project creation, sources, build, test, integration in SCM, etc, deployment to one's own repository, release creation and upload? I have been able to gather all this information from ten different sources, but it is not easy to get the complete picture because every source expects a different state of existing knowledge.

    Read the article

  • What happens on Activity.finish() with AsyncTask still running in background?

    - by stormin986
    What happens on Activity.finish() with an AsyncTask still running in background? Does it just pop the Activity off the Activity Stack, but wait to destroy the Activity object until the AsyncTask fully completes (since the AsyncTask is an inner class of my Activity)? Also, would it act any differently if the AsyncTask were a public, non-inner class that held no references to the instance of the Activity?

    Read the article

  • How to add a dynamically resolved activity name to the back stack (without using PARENT_ACTIVITY)?

    - by user3214249
    The goal is 1) Start activity A from AppWidgetProvider or any other background task (it is simple). 2) From activity A go to activity B after clicking Back button. The problem is that I can't set PARENT_ACTIVITY in AndroidManifest.xml, because the activity B class name gets determined at run time. So in one case I need to go to activity B, in other case it is another activity. Seems like I can't use TaskStackBuilder without PARENT_ACTIVITY. I could handle this in the finish() method of activity A, but it should be a simpler way to add activity B to the "back stack" when I run startActivity(intent). Any ideas?

    Read the article

  • How to do comments in Activity Stream? (like Facebook)

    - by fesja
    Hi, I'm starting to develop an activity stream. I've read both How to implement the activity stream in a social network and What’s the best manner of implementing a social activity stream?. What I haven't found is the best way to add comments to the activities. As in facebook, each comment can be commented by another person. If each activity comment is saved as another activity, then I would not be able to get the activity of that comment without doing a query. So the solution I'm thinking is to save the comments inside the serialize data field of each activity. If the user wants to delete his comment, I would have to update that activity. Is this the correct solution? Is there a better approach? Thanks!

    Read the article

  • How to launch activity from android home screen widget

    - by Brian515
    Hi all, I am desperately trying to get my head wrapped around how to implement home screen widgets. Right now, I (finally) was able to get a button on my widget respond to a button press setting up an intent filter in the manifest. However, I cannot for the life of me figure out how to launch an activity when the button is pressed. Basically, here's the code i have: @Override public void onReceive(Context context, Intent intent) { super.onReceive(context, intent); if(intent.getAction().equals("com.bic.search.searchWidget.CLICK")) { Toast.makeText(context, "It works!!", Toast.LENGTH_SHORT).show(); } } What I really want to do, though, is start a new activity, not display a toast message. I know it has something to do with pending intents, but I can't figure out how to get that to work. Any help and sample code would be appreciated. Thanks a ton to whoever answers this!

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >