Airplane mode charge lvl

by Akapoor » Wed, 17 Dec 2008 02:34:50 GMT


Sponsored Links
 After leaving the phone on charge (airplane mode) the maximum charge
displayed is 57%.

After a machine reboot, charge is redisplayed as 99%.

Regards,

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Invalidate()

Why is forcing a view to draw called Invalidate()?


- JuanT.


--~--~---------~--~----~------------~-------~--~----~

2. Question of displaying a ProgressDialog in a joined thread

Hello, i have a question of displaying a ProgressDialog by joining the
threads. In my application, i will synchronize data with the server,
and remove the synchronized data from database. The synchronization
takes long time, so i decide to display a progressdialog during this
process. Of course i use a new thread to deal the synchronization,
here is what i use for the first time:

syncProgressDialog = ProgressDialog.show(Function.getContext(),
"Please wait...", "Synchronizing application's data...", true, false);

new Thread(new Runnable() {
        public void run() {
                synchronize();
                syncProgressDialog.dismiss();
        }
}).start();

removeData();

The problem i met with this solution is the main thread didn't launch
this thread immediately, it called the removeData before the new
Thread. Apparently the main thread don't wait the new Thread finishes
before execute the following method. So i changed this solution to :

syncProgressDialog = ProgressDialog.show(Function.getContext(),
"Please wait...", "Synchronizing application's data...", true, false);

Thread thread = new Thread(new Runnable() {
        public void run() {
                synchronize();
                syncProgressDialog.dismiss();
        }
});
thread.start();
try {
        thread.join();
}
catch (InterruptedException e) {
        e.printStackTrace();
}

removeData();

I used the join method to wait the end of synchronize thread before
removeData, there is another problem comes, the ProgressDialog didn't
display on the screen. I tried use handler:

Thread thread = new Thread(new Runnable() {
        public void run() {
                synchronize();
                handler.post(new Runnable() {
                        public void run() {
                                removeDialog();
                        }
                });
        }
});

private void removeDialog() {
        syncProgressDialog.dismiss();
}

Nothing changed, could anyone show me a sample code to display the
ProgressDialog in a joined thread or tell me which part i didn't
implemented correctly.


--~--~---------~--~----~------------~-------~--~----~

3. Error when run "helloandroid"

4. Need Android consultants - Los Angeles - 3-6 months

5. Need Android consultant with Java - Los Angeles - 3 months

6. ERROR No resource identifier found for attribute 'textAlign' in package 'android'

7. EditText box of emulator cannot type in these characters