Re: [android-developers] Problem with Android 6.0 and Bluetooth

2016-09-26 Thread Sébastien Schutz
Thank for your answer !

Like that ? 

 For Manifest file :


 
 

In code :
if (!getPackageManager().hasSystemFeature(PackageManager.
FEATURE_BLUETOOTH_LE)) {
MyToast.makeText(this, R.string.ble_not_supported, MyToast.LENGTH_LONG,
Gravity.CENTER,0,0).show();
MainActivity.this.finish();
 }
// Initializes Bluetooth adapter.
final BluetoothManager bluetoothManager = (BluetoothManager) 
getSystemService(Context.BLUETOOTH_SERVICE);
mBAdapter = bluetoothManager.getAdapter();
if(mBAdapter!=null)
if(!mBAdapter.isEnabled())
bluetoothEnable();




Le lundi 26 septembre 2016 12:09:06 UTC+2, Sathya Sri a écrit :
>
> Hey,
>
> Did you added support for Android 6.0 . That means did you added 
> permissions for bluetooth from manifest file as well as from code also?
>
> On Sep 26, 2016 3:32 PM, "Sébastien Schutz"  > wrote:
>
>> Hi,
>>
>> I'm currently developping an application which uses Bluetooth.
>>
>> I connect to two Bluetooth devices with the smartphone. I use one 
>> BluetoothGatt instance per BluetoothDevice.
>>
>> I was testing the application with my Samsung Galaxy A5 which is under 
>> Android 5.0.2, and it was working without any problem.
>>
>> A friend tests the application on his smartphone which is a Blackview 
>> BV6000s which is under Android 6., and it's not working.
>>
>> As I was trying to debug, I found that the discover of services of the 
>> second gatt instance didn't work.
>>
>> Could you help me ? Do you think it is about the version of Android or 
>> more about the smartphone and its stack ? (The same problem with a Samsung 
>> Galaxy Note under Android 6).
>>
>> Thank you !
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Android Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to android-developers+unsubscr...@googlegroups.com .
>> To post to this group, send email to android-d...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/android-developers.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/android-developers/5ee06610-f12a-4766-876a-55614b5c0724%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/209ac442-95fd-4857-8f83-016957dd5264%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Problem with Android 6.0 and Bluetooth

2016-09-26 Thread Sathya Sri
Hey,

Did you added support for Android 6.0 . That means did you added
permissions for bluetooth from manifest file as well as from code also?

On Sep 26, 2016 3:32 PM, "Sébastien Schutz"  wrote:

> Hi,
>
> I'm currently developping an application which uses Bluetooth.
>
> I connect to two Bluetooth devices with the smartphone. I use one
> BluetoothGatt instance per BluetoothDevice.
>
> I was testing the application with my Samsung Galaxy A5 which is under
> Android 5.0.2, and it was working without any problem.
>
> A friend tests the application on his smartphone which is a Blackview
> BV6000s which is under Android 6., and it's not working.
>
> As I was trying to debug, I found that the discover of services of the
> second gatt instance didn't work.
>
> Could you help me ? Do you think it is about the version of Android or
> more about the smartphone and its stack ? (The same problem with a Samsung
> Galaxy Note under Android 6).
>
> Thank you !
>
> --
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to android-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/android-developers.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/android-developers/5ee06610-f12a-4766-876a-
> 55614b5c0724%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CAFo7hwbZRf2FTDR_sKoD2YZtJBXh6c1aegj_68WacTnUcMdn-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Problem with Android 6.0 and Bluetooth

2016-09-26 Thread Sébastien Schutz
Hi,

I'm currently developping an application which uses Bluetooth.

I connect to two Bluetooth devices with the smartphone. I use one 
BluetoothGatt instance per BluetoothDevice.

I was testing the application with my Samsung Galaxy A5 which is under 
Android 5.0.2, and it was working without any problem.

A friend tests the application on his smartphone which is a Blackview 
BV6000s which is under Android 6., and it's not working.

As I was trying to debug, I found that the discover of services of the 
second gatt instance didn't work.

Could you help me ? Do you think it is about the version of Android or more 
about the smartphone and its stack ? (The same problem with a Samsung 
Galaxy Note under Android 6).

Thank you !

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/5ee06610-f12a-4766-876a-55614b5c0724%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.