[android-developers] Hero: how to set enable always-on mobile data setting

2009-12-13 Thread Alex Tang
Hi everyone, I want to set enable always-on mobile data setting by code in Hero. Does anyone know how to do it? Thanks. -- 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

[android-developers] How to keep mobile network alive even if screen is off

2009-12-10 Thread Alex Tang
Dear everyone, I want my service keeps network connection alive even if user presses the power button to shutdown the screen. As I have tested, socket will return exceptions and through CONNECTIVITY_ACTION intent, i know EXTRA_NO_CONNECTIVITY is true. So can current Android keep connection

[android-developers] Re: Please Help me find why htt pclient.execute(httppost);always throws IOException

2009-12-10 Thread Alex Tang
how is the header of httppost. is it correct? On Dec 11, 3:29 am, LeeMoon tanmi...@hotmail.com wrote: hi is there someone troubled the same  issue,please try to help me . i am waiting for you , thanks the code in run();//a thread class         reqEntity = new

[android-developers] Re: How to keep mobile network alive even if screen is off

2009-12-10 Thread Alex Tang
, 11:30 am, Alex Tang tangli1987...@gmail.com wrote: Dear everyone,      I want my service keeps network connection alive even if user presses the power button to shutdown the screen. As I have tested, socket will return exceptions and through CONNECTIVITY_ACTION intent, i know

[android-developers] Re: Application developed in 1.5 r 3 not working in Motorola Droid

2009-12-10 Thread Alex Tang
Android sdk changes a lot, so you need to debug and rewrite for some codes. On Dec 11, 1:11 pm, javame_android su...@saltriver.com wrote: Hi, Can someone tell me if there's any reason behind application developed in Android SDK 1.5 r 3 is not working in Motorola Droid which has Android 2.0.

[android-developers] Re: HttpURLConnection - getResponseCode() Hangs

2009-10-11 Thread Alex Tang
What do you mean hangs in step 5? NoResponseException or other cases? On Oct 9, 6:32 am, Iroid irfan.f.k...@gmail.com wrote: Hello Everyone, I am trying one scenario as follows: 1. Make the phone to Airplane mode 2. Remove from the Airplane mode 3. Receive Intent of dataconnection

[android-developers] Service.onDestroy() invalid?

2009-09-30 Thread Alex Tang
I use AlarmManager to restart my service, code is: AlarmManager aman = (AlarmManager)getSystemService (Context.ALARM_SERVICE); PendingIntent pi = PendingIntent.getBroadcast(this,0, new Intent (this,BootCompleteReceiver.class), 0); aman.set(AlarmManager.RTC_WAKEUP,

[android-developers] Re: Is it possible to upgrade HTC Magic G2 from 1.5-Cupcake to 1.6-Donut ?

2009-09-29 Thread Alex Tang
Of course you can On Sep 29, 8:09 pm, Kasmoori Bindu bindukasmo...@gmail.com wrote: Hi, I am currently using HTC Magic G2 H/W with Android 1.5 Cupcake; I am planning to upgrade it to 1.6 Donut. Is it possible? if so, what is the procedure to upgrade. I need this information urgently. Could

[android-developers] Re: Last modification time for each contact record in People table

2009-09-28 Thread Alex Tang
Now I use compare and search the whole database when onChange() comes On Sep 17, 7:45 pm, Girish girishg...@gmail.com wrote: Please Suggest me that how can we check the updation of each contact in the Contact.People table? On Sep 16, 9:50 am,AlexTangtangli1987...@gmail.com wrote: In

[android-developers] Re: A bug with android 1.5 when deleting a phone using delete()

2009-09-20 Thread Alex Tang
Does anyone know the solution? On Sep 19, 6:04 pm, Alex Tang tangli1987...@gmail.com wrote: Test on HTC GPhone, android sdk version is 1.5 Uri uri = Uri.withAppendedPath(Phones.CONTENT_URI, 25);   // 25 is known as id of one phone this.getContentResolver().delete(uri, null, null

[android-developers] A bug with android 1.5 when deleting a phone using delete()

2009-09-19 Thread Alex Tang
Test on HTC GPhone, android sdk version is 1.5 Uri uri = Uri.withAppendedPath(Phones.CONTENT_URI, 25); // 25 is known as id of one phone this.getContentResolver().delete(uri, null, null); with exception: 09-19 17:48:35.543: ERROR/JavaBinder(117): *** Uncaught remote exception! (Exceptions

[android-developers] Re: How to query MMS or SMS message ID based on a phone number

2009-09-18 Thread Alex Tang
sms has a column address mms has a table addr which has a address column On Sep 18, 12:40 pm, hap 497 hap...@gmail.com wrote: Hi, How can I query all the MMS/SMS messages from the same phone number? Thank you. --~--~-~--~~~---~--~~ You received this message

[android-developers] Re: Battery Status and Signal Strength Acheivement

2009-09-17 Thread Alex Tang
at the first time. On Sep 12, 1:14 am, Alex Tang tangli1987...@gmail.com wrote: Emulator can run, i will try it in real device. On Sep 12, 12:53 am, Dianne Hackborn hack...@android.com wrote: On Fri, Sep 11, 2009 at 9:10 AM, Alex Tang tangli1987...@gmail.com wrote: SystemProperties.get

[android-developers] Re: Will beginTransaction() decease file reading times?

2009-09-16 Thread Alex Tang
I have found the result. When adding beginTransaction. insert() delete () and update() will be added to this transaction also, which means putting many sql statements into one transaction will save time. On Sep 16, 12:42 pm, Alex Tang tangli1987...@gmail.com wrote

[android-developers] Re: How are SMS and MMS save on android phone

2009-09-16 Thread Alex Tang
(long)/P          */         public static final String PERSON_ID = person; On Tue, Sep 15, 2009 at 9:46 PM, Alex Tang tangli1987...@gmail.com wrote: sms has its own table, separate with mms. On Sep 16, 9:23 am, hap 497 hap...@gmail.com wrote: Hi, Can you please tell me if SMS

[android-developers] Re: How are SMS and MMS save on android phone

2009-09-16 Thread Alex Tang
?         /**          * The person ID of the sender          * PType: INTEGER (long)/P          */         public static final String PERSON_ID = person; On Tue, Sep 15, 2009 at 9:46 PM, Alex Tang tangli1987...@gmail.com wrote: sms has its own table, separate with mms. On Sep 16, 9:23 am

[android-developers] Re: Can I use android.provider.Telephony?

2009-09-16 Thread Alex Tang
I think you can try in real device and test whether current sdk support the api in your app. On Sep 16, 1:02 pm, Pentiumao pentiu...@gmail.com wrote: Thank you Roman, I will find some other solution. On Sep 15, 11:58 pm, Roman ( T-Mobile USA) roman.baumgaert...@t- mobile.com wrote:

[android-developers] Re: Adding contacts via Intent

2009-09-16 Thread Alex Tang
Do you add permission for adding phones? On Sep 16, 5:19 pm, Dmitry Zelenetskiy www.dzgr...@gmail.com wrote: Hello! I am trying to add new contact using intent: Intent addPersonIntent = new Intent(Intent.ACTION_INSERT_OR_EDIT); addPersonIntent.putExtra(Insert.NAME, John Smith);

[android-developers] Will beginTransaction() decease file reading times?

2009-09-15 Thread Alex Tang
For SQLiteDatabase.beginTransaction(), it starts a new transaction. And SQliteDatabas.insert() delete() update(), does these api starts a new transaction too? That's to say. If I use db.beginTransaction(); try{ db.insert(..): db.delete(); db.update(); db.setTransactionsSuccessful();

[android-developers] Re: How are SMS and MMS save on android phone

2009-09-15 Thread Alex Tang
sms has its own table, separate with mms. On Sep 16, 9:23 am, hap 497 hap...@gmail.com wrote: Hi, Can you please tell me if SMS and MMS are saved in 1 sql tables on android phone? Or each saved in its own table? Thank you. --~--~-~--~~~---~--~~ You received

[android-developers] Re: Last modification time for each contact record in People table

2009-09-15 Thread Alex Tang
In people table there is none column for last modify time. On Sep 15, 8:38 pm, Girish girishg...@gmail.com wrote: Dear All, I would like to the get the last modification time for each Contact in android.provider.Contacts.People table. I have the following queries, a) Is there any column to

[android-developers] Battery Status and Signal Strength Acheivement

2009-09-11 Thread Alex Tang
First I want to acheive battery status and signal strength instantly. For Battery Status, we can use SystemProperties.get (status.battery.level_raw) to get current battery level. This class is not in SDK reference, but we can see this function is used in BatteryService and other fields. I use it

[android-developers] Re: Contact Listener

2009-09-11 Thread Alex Tang
It seems only Observers and onChange() function can work now. On Sep 10, 11:06 am, Stephen Leong stephen.leon...@gmail.com wrote: Is there any API can use to listening to the change of the contact? Such as add/delete/edit the contact it will invoked certain method and I can know which contact

[android-developers] Re: How to listen for any change in the contact database

2009-09-11 Thread Alex Tang
What does your context refer to? It must refer to an correct context, I think On Sep 10, 2:25 am, hap 497 hap...@gmail.com wrote: Hi, I am trying to listen for any change in the contact database. So I create my contentObserver which is a child class of ContentObserver:  private class

[android-developers] Re: Battery Status and Signal Strength Acheivement

2009-09-11 Thread Alex Tang
use:http://developer.android.com/reference/android/telephony/PhoneStateLi...http://developer.android.com/reference/android/telephony/PhoneStateLi...to listen to the signal strength changes, just like the Android notification bar does. On Fri, Sep 11, 2009 at 9:16 PM, Alex Tang tangli1987

[android-developers] Re: Battery Status and Signal Strength Acheivement

2009-09-11 Thread Alex Tang
Attention: SystemProperties.get(status.battery.level_raw) can get battery status instantly! Like typing #getprop status.battery.level_raw in adb shell On Sep 11, 11:46 pm, Alex Tang tangli1987...@gmail.com wrote: First I want to acheive battery status and signal strength instantly

[android-developers] Re: Battery Status and Signal Strength Acheivement

2009-09-11 Thread Alex Tang
Emulator can run, i will try it in real device. On Sep 12, 12:53 am, Dianne Hackborn hack...@android.com wrote: On Fri, Sep 11, 2009 at 9:10 AM, Alex Tang tangli1987...@gmail.com wrote: SystemProperties.get(status.battery.level_raw) can get battery status instantly! Like typing #getprop