Android :: How To Arrange Long (time Consuming) Actions?

Feb 10, 2010

For instance, we are in SomeActivity and the activity has a button that invokes moving files from one dir to another (let's call it job).On Android things change. I know there's the AsyncTask that is probably provided to solve my case. There's even a good example of how it should be used. But since there's no guarantee of how long an Activity instance will live the AsyncTask should be cancelled on onSaveInstanceState (and restarted on onRestoreInstanceState). This means using AsyncTask there's no guarantee we are able to fully fulfill the job once started. In some cases as sending an http post request for creating a user I would not want to get in "user already exists for this login" trouble on reruning the AsyncTask. This is possible since the AsyncTask can be interrupted while the request is already sent (and the server actually is doing its job - creating a new user), but the AsyncTask is canceled before we got the response.

Android :: How to arrange long (time consuming) actions?


ADVERTISEMENT

Android :: Emulator Is Very Slow And Consuming CPU Time?

Oct 10, 2009

few weeks ago I encountered a problem. My Android SDK 1.5 emulator became very slow and CPU consuming. This happened earlier, but was irregular just removing AVDs usually helped. Few weeks ago I installed Android SDK 1.6, tried to move my dev environment there and noticed that emulator runs very slowly. I rolled back to 1.5 and noticed that the same problem is there. What's going on: - emulator startup is pretty slow; - sometimes emulator hangs on startup; - sometimes after startup is complete I see Force close/Wait dialog for some Android applications/services (Alarm clock, messaging) - applications inside the emulator run MUCH slower than they ran before, I see delays in response even in launcher, when I just switching between icons with arrow keys (at this time CPU usage according to the task manager is from 35 to 50%, i.e. one core is completely busy). - now, when I'm typing this message, emulator (clean, newly created AVD, I haven't installed nothing there, just out of the box) occupied 50% of my CPU (and 140MB of RAM). Hardware: Intel Core2Duo T7500 (2.2GHz) + 2GB RAM. OS: Vista I don't have any problems with 1.6 on Linux (Kubuntu 7.10), emulator starts quickly, responds in a flash, and seldom consumes more than 20% of CPU time (usually in case my application is working with DB).

View 2 Replies View Related

Android :: Way To Control Actions On Digital Time To Check For Certain Time?

Nov 11, 2010

So I wanted some DigitalClock help. I have set up a digitalclock, and here's what I want to do. Once the clock hit's a certain time, perform an action. How can I control the actions on the digital time to check for a certain time?

View 2 Replies View Related

Android :: How To Implement JNI Which Calls A Time Consuming Native Method

May 9, 2009

I need to implement a JNI which render image with 3-party native function. This function call is time consuming, it cost about 1s to return. I found during that time, even if I call the JNI within another Java thread, the whole Dalvik VM is blocked. UI is frozen. I guess that's because Dalvik doesn't implement Java thread with a native thread, so any time consuming native function call will block the whole VM. I wonder how to solve this problem. My best guess is I should create a pthread in JNI to call that 3-party native function. But I don't know how to implement this kind of JNI.

View 2 Replies View Related

Motorola CLIQ :: Arrange / Re-arrange Shortcuts In Application Tab?

Nov 16, 2009

Arrange/re-arrange the shortcuts in the application tab? I know how to manage them on the home screen, but I want to move the lesser-used applications to the bottom of the app tab and the more frequently-used apps to the top. (btw...this question pertains to a Droid.

View 3 Replies View Related

Android :: Spinner - How To Do Distinguish User's Actions From Computer's Actions In OnItemSelectedListener

Nov 17, 2010

I'm in a trouble managing a spinner. I have a spinner with its adapter. I initialize the spinner with a list of values when starting my activity. Then I force the selected value to be the one used in the object that I manage.

Once the screen is initialized :
When the user selects a value in the spinner, according to the selected value, I may continue (or not) to another activity for let the user choose a complementary and necessary value.

If the user "cancels" this second activity, I want to rollback the spinner to its previous selected value, and cancel some actions made in the meantime.

If the user goes to the end of the second activity, everything is fine and I want juste to refresh the spinner display with the datas selected in the second activity (I overload the getView method in the adapter to do this).

Overall, I can easily do all of this, however, when I force the selected value in the spinner at the begining of my activity, or whene returning back from the second activity by "Cancel", the change value event is catched and the second activity is triggered (the user did not click anything at all).

How would you allow the second activity to be lauched only if the change of the selected value in the spinner is due to a manual action from the user, and prevent that same second activity to be launched when the value of spinner is changed "in the code "?

I tried many solutions, as setting a boolean into the adapter that tells if the next event will be raised because of an "in the code" action.

Or also putting a boolean in the adapter that tells if the adapter has initialised itself, and I force that boolean to true on the forst change catched event.

View 1 Replies View Related

Android :: ADT Plugin Installation Taking Long Time

Feb 9, 2010

I'm following the guide at the following link.
http://developer.android.com/sdk/eclipse-adt.html#InstallingADT

I'm using the offline installer by using the guide at the following link. http://developer.android.com/sdk/eclipse-adt.html#troubleshooting

I'm using Eclipse IDE for Java EE Developers 3.5 (Galileo) on Windows XP. The installation was stuck at 5% install phase.

View 2 Replies View Related

Android :: How To Raise An Alert After A Long Time - A Month Or More

Sep 27, 2010

What is the best way to set an long-term alert/reminder from an Android application? I'd like to display notification in a few weeks after current date. I believe there is no need to write a service for such task. Will AlarmManager do the trick? Or should application be started daily and performing check? After countdown was started, upcoming alert should survive upgrading application from Android Market.

View 1 Replies View Related

Android : Swype Getting Slower For Use Long Periods Of Time

Mar 20, 2010

So after using swype (beta) for a few weeks, I notice it getting slower, and less efficient. Not sure if odd words added by tapping out words did this. Also losing steam with certain words like our vs or. Now trying HTC IME keyboard, quite nice.

View 17 Replies View Related

Android :: Current Or Zone Time From Address Or Long / Lat Pair?

Jun 20, 2009

Does anyone know any tricks for getting the current local time or time zone from an "Address" object in the location package?

View 2 Replies View Related

Android :: Message - Saying Loading Data Please Wait - Taking Long Time

Nov 25, 2009

I have a message -- saying Loading Data, please wait -- but it's been a long time. What does this mean? How can I make it stop?

View 8 Replies View Related

HTC Desire :: Taking Long Time On Shutting Down

Aug 19, 2010

i try and shut down my htc desire it takes hours anybody any ideas i end up taking the battery out

View 5 Replies View Related

HTC Hero :: Takes A Long Time For Calls To Come Through

Apr 26, 2010

For quite a while now, people have been saying how long it takes for me to answer my phone, even though it's usually on my desk and I get there after a couple of rings.

So today I tested it out. I rang my mobile number from my landline, it connected and started ringing, but it got to about six rings before the LED on my mobile started flashing and a further two rings until it started ringing!

I'm on T-Mobile, but it seems to connect OK, just take a while to register on my phone. Obviously this isn't the end of the world, but I use my mobile for business and it doesn't make me look very good!

View 9 Replies View Related

HTC EVO 4G :: Keyboard Take Long Time To Dial A Number

Jul 2, 2010

My Evo takes about 30 seconds to dial a number. i select a contact in my contact list, the contact highlights but does not dial for about 30 seconds. While I was typing this my phone was turned sideways for the big keyboard, I would select a letter, the letter bubble appears but the letter does not show on screen. In vertical mode the keyboard is fine.

View 2 Replies View Related

Motorola Droid :: How Long Should I Charge First Time?

Jan 9, 2010

i just got my Droid today so I decided to join this forum to keep up on the news on it. I was just wondering how long I'm supposed to charge it the first time before using it.

View 6 Replies View Related

HTC EVO 4G :: Phone App Management Take A Long Time To Load?

Jun 19, 2010

Just wondering if it is suppose to take a little while for the app management to display apps

I have a nexus one also and did a quick comparison... both have relatively the same apps ( i keep them as synced as possible)

Now its not really an Apples to Apples Comparison as I have Froyo running on nexus but what made me raise an eyebrow was when the little Loading Indicator doesn't smoothly move while its loading.
http://www.youtube.com/watch?v=4pNBkEuN4Q8

View 1 Replies View Related

Samsung Fascinate :: 3G Connectivity For Long Time To Stream

Oct 10, 2010

I just made the switch from Moto Droid to Samsung fascinate and can't say that I'm all that happy with my decision, No froyo, horrible artifact and color hue, 3 hour charge times, a worse benchmark than my old phone. And on top of that it appears to have terrible reception! While using this phone in the same locations that I had zero problems on the droid, I can't stay connected to 3G to save my life. Youtube and Pandora are useless because I'm not able to keep connection long enough to stream. It has also caused the browser to time out pretty regularly.

View 28 Replies View Related

HTC EVO 4G :: YouTube Videos Takes Long Time To Load

Jul 10, 2010

YouTube videos takes longer to load. My browser sometimes doesn't load web pages completely and the speeds are way slower then 3g... Well atleast on my end... I'm in Baltimore and 4g is very much up and running. Not ranting, its just that 4g was one of sprints selling points, jus think it could be a bit better.

View 10 Replies View Related

HTC Incredible :: Youtube Takes A Very Long Time To Buffer

May 12, 2010

When I view videos it takes a very long time to buffer and when it does it gets about 5 seconds worth then has to buffer more. Is there away for it to download it better instead of stopping every few seconds to buffer more. This way it can be smoother. There has to be some way to do it my storm that didnt have no where near as much memory played them better.

View 8 Replies View Related

Nexus :: Sdcard Taking Long Time To Mount / What To Fix?

Aug 30, 2010

My sdcard has been taking awfully long to mount to USB. It used to be almost instantaneous like your average USB thumbdrive or external hard disk. Im on a non-rooted nexus one running froyo. Any suggestions?

View 6 Replies View Related

Android :: Droid Sqllite Taking Long Time To Complete / Options For Moving To Start Of Result Set?

Nov 2, 2010

I am working on building an android app but I'm nothing that my SQL operations are taking forever to complete

I have profiled the app to narrow it down to the act of moving the Cursor to the first row of the result set for a simple select query (only returning 1 row where I'm testing it to eliminate the size of the result set as a problem.

Are there any better options for moving to the start of the result set?

edit:

some code...

this runs 3 times and i have time it to approximately 2 secs for all the rest of the code or over a minute with this in.

i have also run just the rawQuery statement with out the move to first and its takes bout 18 secs so im looking at the worst part of the code first.

View 1 Replies View Related

HTC Eris :: SU Takes Long Time - Different Rom Install - Wifi Tether

Jul 19, 2010

Trying to run WIFI TETHERING, but SU just sits there and doesn't seem to do anything, but maybe force close. Running Smash rom. Honestly, I would probably switch roms, but I don't know how to do that. Someone else rooted my phone. Also, I'd love to get rid of stock apps.

View 9 Replies View Related

Sprint HTC Hero :: Phone Takes Long Time To Charge?

Jun 10, 2010

I posted a thread about my battery life earlier this week, and I thank all the for the help! Here is another issue I am having that may be related. My phone takes forever to charge. Example: used my phone heavily this morning from 5:30 am till around 9am. Came home, battery was down to 15% or so. Plugged it into the AC charger around 10am, went outside and mowed the yard, etc. Finally checked the phone around 4pm, and it was still charging. Battery was showing 90% or so. Shouldn't it fully charge in around 2 hours or less? I did some research and found some people having charging issues after they upgraded to 2.1, which I did right after I got the phone. I did check with my local RS where I got the phone, and the guy I spoke with has a Hero, and his does not do this. He suggested I go to a Sprint store and have them look at it.

View 8 Replies View Related

Samsung Fascinate :: App Take Insanely Long To Load Every Single Time?

Sep 10, 2010

With a largely white image on screen, if you tilt the phone to the left, does it take on a pinkish hue? Also, does adding a Shortcut -> Application take insanely long to load every single time? I just want to make sure I'm not the only one experiencing this.

View 4 Replies View Related

Motorola Droid :: Getting Long Time To Charge The Phone To 100% Battery?

Nov 7, 2009

Have any of you found that it takes a really long time to charge the phone to 100% battery? Maybe i'm coming from a sidekick and it was short to charge fully but is this true for you guys too or am i just not used to needing this long to charge a phone up?

View 2 Replies View Related

Sony Ericsson Xperia X10 Mini/pro :: How Long Should Keep Phone Charge For First Time?

Oct 20, 2010

My question is how long should I keep my new x10 mini charging for the first time? Is it OK to disconnect it when fully charge or should I leave it for some hours in charging?

View 2 Replies View Related

Motorola Droid :: Sending Picture Messages Takes Long Time

Jan 5, 2010

I've noticed today that sending a picture messages takes a loong time on my Droid--considerably longer than on my old feature phone. Usually, it takes around 3-4 minutes. One picture took around 10 minutes to send. My apartment has bad reception, but when I sent these messages I had 3g and 3 reception bars. Is this normal?

View 2 Replies View Related

HTC Droid Eris :: Phone Feels Hot / Battery Take Long Time To Charge

Jun 3, 2010

My Droid Eris will charge from about 20% to 100% in a matter of 1-3 hours- it's always quite fast! Last night, my phone was at 20% when I went to sleep at about 12am and when I woke up at 6am it was only at 40%. The phone felt very hot. I took it off the charger and put it in another plug. It is now 4pm and the phone is only at 80% and at times feels hot. I checked out the cord and there are no lesions or breaks or any visible problems w/ the cord. I'm not sure what's going on- any thoughts? I'm going to take it to the VZW store to obtain an understanding. It's only been 3-4 months that I obtained the phone.

View 2 Replies View Related

Motorola Droid X :: Voice Commands Takes A Long Time To Open

Jul 22, 2010

This has been an issue since the first day after I installed all my apps via appbrain (roughly 300). It takes ~36 seconds for it to open. I am starting to think I am the only one experiencing this. Does anyone have any ideas?

View 2 Replies View Related

General :: Phone Is Suddenly Taking Long Time To Switch On But Not Boot Up

Oct 23, 2013

I recently bought a used, but in good condition Optimus V. Not a great phone, but it does what I need. However, in the past couple days I've found that when the phone does its auto-timeout, it takes up to ten seconds for it to switch back on. By that I mean that when I press the power button just to get to the passcode screen (not to turn the whole thing on), it takes much longer than it did when I first got it.

I've uninstalled recent apps, but it's done nothing. What to do?

View 1 Replies View Related







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