Threads calling service. Make bluetooth discoverable

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Threads calling service. Make bluetooth discoverable

Postby Noob » Tue Dec 08, 2009 7:17 pm

Dear all,

I created a service and a few threads separately in different .java files.

In the service, i start all the threads that i created. Within each thread, there is a loop that will allow it to continue running and perform a tasks until i end the service.

When I am actively using the phone for whatever purposes, the threads work properly and the expected outcome is achieved. However, if i leave the phone aside for a short period of time of around 10 min, the threads stop working.
Surprisingly, if i connect my handphone to my laptop and have eclipse run to show the LogCat, the threads function normally even though the screen on my handphones shows that the phone is sleeping.

I understand that service allows infinite usage even in the background. May I know if it also work for the situation mentioned above? If not, is there anyway to achieve my goals?

I posted this question here because one of my threads will set LocalBluetoothDevice.SCAN_MODE_CONNECTABLE_DISCOVERABLE the moment it is not discoverable.
This will allow my phone to be constantly discoverable.
I am using an unofficial bluetooth API for android 1.5 and earlier.

May I know if there are other ways to achieve this objective of being constantly discoverable as well?

Thanks in advance.

Best Regards
Sad Noob
Noob
Freshman
Freshman
 
Posts: 5
Joined: Mon Oct 26, 2009 3:56 am

Top

Postby ralphz » Sat Jan 16, 2010 11:20 pm

Did you solve your problem? I'm trying to to the same thing.

Thanks
ralphz
Freshman
Freshman
 
Posts: 5
Joined: Sat Jan 16, 2010 11:18 pm

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 3 guests