Hi Ashish,

I can only answer question 1. Yes, that should be possible. I did someone
similar myself. I use all bluetooth functions from a service.

Regards,

Peter


2010/4/6 Ashish Mahamuni <[email protected]>

> Hi
>
> I want to create a service in Android which will initially ask user if
> he/she wants to start blue-tooth and set the blue-tooth discovery.
>
> My questions are
>
> 1) Can i launch in the service following activities ?? if
> (!mBluetoothAdapter.isEnabled()) { Intent enableBtIntent = new
> Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
> startActivityForResult(enableBtIntent, 0); }
>
> // Set Phone Discoverable for 300 seconds. Intent discoverableIntent = new
> Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
> discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION,
> 600); startActivity(discoverableIntent);
>
> 2) I want to set discoverabilty of the phone on for lifetime of
> application. is it possible??
>
> 3) I want to access empty space available on sd card. How should i do it??
>
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to