Android :: Avoid Activity Restart At Keyboard Open Or Close?

Jul 28, 2009

I have fixed the activity screen orientation to portrait on AndroidManifest.xml file. When I open or close the keyboard the activity gets restarted. How to avoid this restart?

Android :: avoid activity restart at keyboard open or close?


Android : Avoid Restarting Activity On Keyboard Flip Change

Aug 11, 2009

when i open my keyboard, it restarts the activity. i use only landscape mode and dont want the activity to restart.

View 2 Replies View Related

Android :: Open / Close Soft Keyboard By Code?

Jul 26, 2009

Does anyone knows how to open or close the soft keyboard by code not for application development?

View 7 Replies View Related

Motorola Droid :: 2.1 Install Freezes Every Time I Open Or Close Keyboard

Mar 4, 2010

I am new to the whole rotting thing, I installed the bugless beast on my droid 2 days ago and everything went great and it worked fine, I'm just having an issue with it being really lagy at times and the biggest problem is that it freezes everytime I open or close the keyoard, I have to forse close and wait for it to load everything up again, a message is desplayed and it says:

The application launcher+(process android.process.acore) has stopped unexpectedly. Please try again. Then I hit forse close, it usually only happens when I open or close the keyboard but sometime it will happen at random. Does anyone know why this is happening and how to fix it.

View 3 Replies View Related

Android :: Restart An AsyncTask Or Avoid If RUNNING?

Sep 24, 2010

I am Developing an App that parses data from HTML. One of the data that is parsed is an integer that increases over time and rather than constantly requesting the data I would like to have a task that intervals the integer. Due to the fact that I need the value updated into a TextView I decided to go with an AsyncTask rather than a Timer.

My issue is I want to be able to restart my task once I know that it has finished, or if it is currently RUNNING simply avoid manipulating it.

Here is my AsyncTask:

CODE:.......

My attempt to start or avoid:

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

Am I going about this correctly?

View 1 Replies View Related

Samsung Moment :: Application To Make A Custom Sound - Alert Go Off When SLIDER Keyboard Is Open - Close

Mar 16, 2010

Is there an application (or one in the works) that will allow us to apply a sound effect to the slider opening and closing? Maybe base it off of when the screen rotates + keyboard lights up? I would love to apply 2 seperate notifications. One for open and one for close. Anyone got an application like this in the works or know of one that would work on Samsung Moment? I know there is a notification for when you unplug the power, but I'd love to have 2 seperate from that for JUST the slider. I can't believe we can't modify seperate notification sounds custom without apps.

View 15 Replies View Related

Android :: Avoid Force Close Message Box

Oct 31, 2009

My application used to execute in background by service. But sometimes when it goes in exception it is giving Exception with the Force Close Message Box. I want to avoid that Message box. Is there any way to avoid it?

View 4 Replies View Related

Android :: Force Activity In Landscape Mode Without Activity Restart

Aug 21, 2009

I have a problem to start/create Activity in landscape mode. My Activity need to start in landscape mode and be used in landscape mode by users. So far, I used setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) to force screen orientation of my Activity to landscape mode in onCreate() method.

In addition to this screen mode requirement, my application need to start another background thread in onResume() method, and this thread takes some seconds in order to finish an initialization process, and it is not desirable to to stop/restart this thread's service during the initialization process.

However setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) forces my Activity restart in a very little while (means onCreate->onResume->onPause->onStop are executed twice at the first place). As a result, my background thread be stopped/restarted during the initialization process, and this makes me a mess at this moment.

View 3 Replies View Related

Android :: Avoid History Of Activity?

Oct 13, 2010

I have total 3 activities.
First activity(A) starts second activity(B). From Activity B, 3rd activity(C) is called.

Activity B, shows list with checkbox to select items and single OK button. On clicking OK button Activity C is called with selection.

When user clicks BACK button in Activity C, by default Activity B is displayed (with selected checkbox).

I want to display Activity A when BACK button is clicked in Activity C.

How to achieve that?

I have handled OnKeyDown() in Activity C to startactivity(A). it is working. But when user clicks BACK button on Activity A, again Activity C is displayed. while application should end.

In this direction how to skip Activity B is ever called?

View 1 Replies View Related

Avoid Keyboard To Popup?

Mar 1, 2012

I have a textview where to put a date. I've associated to this field a date picker, the problem is that at the first touch the keyboard pops up and I have to tap a second time the field to show the picker.

How can I avoid the keyboard to pop up?

View 1 Replies View Related

Android :: Avoid Non Static Inner Classes In Activity?

Jun 17, 2010

Since I seem to have caught two activity references in a heapdump, where the Activity is set to singleTask. Romain's advice on avoiding memory leaks includes: "Avoid non-static inner classes in an activity if you don't control their life cycle, use a static inner class and make a weak reference to the activity inside"

What does this mean exactly? I can't find any examples, positive, or negative for this rule. I do have some non static inner classes in my activity. Most of them are anonymous inner classes like this one. I see hundreds of them in the samples:....................

View 24 Replies View Related

Android :: Can I Avoid Sending Notification When Activity Is Currently On Top

Sep 13, 2010

I have a server socket bound to a port and I want to send notifications using NotificationManager when a client connects. This all works well.

What I want to avoid is sending notifications if a specific activity is currently being used by the user. E.g., I'm trying to avoid something like GMail notification if I'm already reading email.

View 2 Replies View Related

Android :: How To Close Fore Ground Activity From Active Activity?

Sep 28, 2009

I created an application which is asynchronously communicating with the server. When the application makes a server request a new dialog (activity) with "loading" notification is created. The main activity implements methods for handling server responses and I would like to close the foreground activity when the main activity receives the answer from the server.

View 1 Replies View Related

Android :: Best Way To Restart Activity?

Aug 17, 2010

I'm building a game which works as some type of a quiz. I ask user the question and when he submits the answer(click or touch correct answer) I need to refresh the page with some other question.

How should i implement this? How to wait for users answer and continue when onClick or OnTouch listener finishes?
Should i use Handler class, intents or something else?

I want next scenario:
On the screen I have a question and 3-4 clickable ImageButtons. I'm building some of the layout dinamically from custom showQA() function. User choose the answer and if he clicked the correct answer i should start some type of animation on the screen. I've done that from the onClickListener. Now, i need to build layout again(show new question and answers) from the showQA() function which must be called after that animation showed to the user. How can i know when the onClickListener() finished its work?

View 3 Replies View Related

Android : Manually Restart An Activity?

Sep 9, 2009

Is there a way to restart an activity? The reason is that need to change the theme dynamically, and the activity needs to be restarted and redraw itself after the change.

View 5 Replies View Related

Android : Restart An Activity Within A Tabhost?

Jan 13, 2010

I've searched and I know it seems some people frown upon using activities within tabs, but moving past that...how would I restart a tabbed activity while still keeping the tabs visible? I have an activity in a tab, I use the menu to create a new activity to update the tab's activity displayed info, when I return from the menu activity I want the new information to be displayed in the tab's activity. I am using startActivityForResult() from the menu choice, but when I return and try to restart the activity...it wipes out the tabs above(I guess as expected, but I want to re-launch the refreshed activity within the tab).

Creating the tabs:

TabHost host = getTabHost();
Intent home_intent = new Intent(constants.HOME_ACTION,
null, this, homeTab.class);
Intent inbox_intent = new Intent(constants.INBOX_ACTION,
null, this, inboxTab.class);
Intent stats_intent = new Intent(constants.STATS_ACTION, null,
this, infoTab.class);

host.addTab(host.newTabSpec(constants.HOME_TAG)
.setIndicator(getText(R.string.home_label),
getResources().getDrawable(R.drawable.icon))
.setContent(home_intent));
host.addTab(host.newTabSpec(constants.INBOX_TAG)
.setIndicator(getText(R.string.inbox_label),
getResources().getDrawable(R.drawable.icon))
.setContent(inbox_intent));
host.addTab(host.newTabSpec(constants.STATS_TAG)
.setIndicator(getText(R.string.stats_label),
getResources().getDrawable(R.drawable.icon)).setContent(
stats_intent));

Return from the menu activity in the tab's activity(updating database info): code...

View 2 Replies View Related

Android :: Avoiding Application Restart - When Hardware Keyboard Opens

Nov 7, 2010

I am currently working on a multi-threaded game application for the Android platform. so far so good. I just got over a bug in my application which caused it to restart on orientation change (fixed by designating a specific orientation depending on the availability of a hardware keyboard or not, which is important 'cuz it is an online game with chat capabilities), and that works. BUT now i am trying to avoid the same problem when the user simply slides open the hardware keyboard. I'm not quite sure how to go about avoiding the restart of my application or the saving of the state of my application. Any solutions/suggestions?

View 1 Replies View Related

Android :: Activity Restart Crash After OS Kills It

Mar 8, 2010

Activity SplashScreen is the launching activity for my app. It sends a request to my server and gets back a user data it then uses to populate a user object which is a static object. Once it has that it calls the MyMapView activity and finishes itself. A force close occurs when I hit the home button and then open up enough other apps so that Android kills MyMapView to get more resources. Now when I open my app again it tries to start MyMapView and bypasses SplashScreen. There is no user object so I get null pointer exceptions. I have tried to Override the onSaveInstanceState and OnRestoreInstanceState but it seems that those are not available when Android kills the activity. I also tried android:finishOnTaskLaunch with the SplashScreen (maybe this should be put on MyMapView but the article I read said different) and that seems to have no effect. What I would like is for the activity to not restart after Android has killed it. What can I do about this?

View 5 Replies View Related

Android :: Force Application To Restart On First Activity

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

Android :: Using FLAG_ACTIVITY_CLEAR_TOP - But Don't Restart Target Activity?

Nov 21, 2009

I'd like to use FLAG_ACTIVITY_CLEAR_TOP to launch an activity in my app. It has one feature I don't want though - it restarts the target intent, instead of just resuming it. Example history stack, with activity D making the call to B with that flag:

A B C D

new stack

A B

But 'B' gets relaunched, its onCreate() method is called. Since B is already in the history stack, is there a way I can use this flag, but have it *not* recreate B, just onResume() it again? The reordering flags are kind of what I need too, but they won't pop C and D, just reshuffle the stack so B comes to the top, but I want C and D to go away.

View 5 Replies View Related

Android :: Changes To Library Doesn't Restart The Activity

Nov 5, 2010

I'm developing an application that uses a library project to store much of the functionality and content. When I edit the code and/or content in the library and then run the app, it doesn't properly restart the activity with the changes, giving the warning:

Warning: Activity not started, its current task has been brought to the front

I understand that this warning comes from the SK not thinking that there were any changes to the app, but there were (to the library, not to the app itself).

The only way that I've found to force the app to recompile with the library changes is to do Project->Clean. While this is effective, it's a bit annoying to have to do this every time a make a change. Does anyone know of a way to force the SDK to recognize that a library change should result in reloading the application?

View 2 Replies View Related

Android :: Conditional Restart On Activity OnConfigurationChanged

Mar 19, 2010

I want to make an activity that allows orientation changes on some condition, but not otherwise. More exactly I want to prevent restarting the activity when a background thread is busy.

I have put the configChanges attribute on the activity manifest, and onConfigurationChanged is called when the orientation changes. However I want to allow the app to change the orientation when allowed.

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

View 1 Replies View Related

Android : Close Activity A That Invoked Activity B?

Jul 15, 2010

Is there any way to close the activity the launched another activity? So if activity A starts activity B can activity B close activity A? I know there is the tag android:finishOnTaskLaunch="true" but i only want it to happen if a button is pressed so im looking for a method to do it.

View 10 Replies View Related

Android :: Keep Task's Activity Stack After Restart From Home

Jan 13, 2010

My application has two activities, that I start in this order: HOME > A > B Now I press HOME and launch "A" again. I would like to see activity "B" on a top of "A", but instead I get "A" - so the activity stack is cleared. Manifest: <activity android:name=".activity.A" android:label="A" android:always Retain Task State = "true">What should I do?

View 2 Replies View Related

Android :: How To Bring Stop Activity To Foreground (restart) By Itself ?

Sep 22, 2010

How to bring stop activity to foreground (restart) by itself?i use Broadreceiver and intent to restart my activity.but always start two activity (include original activity)how to restart my original activity?

View 4 Replies View Related

Android :: Broadcast Receiver / Service Will Only Restart Activity Once

Mar 17, 2010

I have a single Activity application, within it I have a service which creates an AlarmManager and sends a broadcast to a broadcast Receiver.If the activity which starts the services dies, (ie. divide by zero), the broadcast receiver stops the old service which created the AlarmManager.It works the first time. The second time, it does not.It seems like the AlarmManager is still active but the broadcast receiver is no longer receiving. It works great once!

View 2 Replies View Related

Android :: How Can Display Saved Data When Restart Activity

Oct 6, 2010

In my Project I want to play audio files in mediaplayer and displays progressbar. If I exit the application then also player have to play audio file. If I restart The Activity
I have to display progress bar with last activity progress.

Here I tried using onSaveInstanceState() method. But I cant display progress bar with last progress. when I exit the activity player is playing but when I restart activity it stopped and displayed new view without any progress and saved data.

View 1 Replies View Related

Android :: Open Dialogue Activity Without Opening Main Activity Behind It

Jul 19, 2010

Im writing a program that offers a quick reply dialog upon receipt of an SMS.

However, I am getting an unexpected result. When I receieve an SMS, the appropriate dialog activity comes up displaying the correct phone number and message, however there is a second activity behind it that is the 'default' activity in my program (it is what opens when i launch my application)

I do not want this second activity to come up. The quick reply activity should come up by itself over top of whatever the user was doing before.

The 'floating' activity:

CODE:.........

The call to the activity inside an onReceive()

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

The Manifest:

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

View 1 Replies View Related

Android :: How To Close And Re-open Sqlite Database

Jun 23, 2010

In my app, I'm supporting the backup and restoration of the Sqlite db file. I need to close and re-open my database connection after the restore. How can I do this?

View 2 Replies View Related

HTC Hero : Aim App Always Open / How To Close?

Dec 20, 2009

The AOL INSTANT MESSENGER (AIM) app is always open for some reason.. I see the Icon on the notification bar and it never goes away, even when I sign out of aim.. This is keeping my awake time at 50%.. Besides rebooting does anyone have a fix for this.. I dont download 3rd party task managers and apps because they seem to slow down the performance of the hero.. I think partiallly because it skipped the 1.6 and cupcake builds.. However there is an internal task manager (Applications>Manage apps> Menu/filter by running) but a force stop here seems not to fix the problem

View 3 Replies View Related







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