buetooth_admin permission in serialexample

Beja

Expert
Licensed User
Longtime User
Hello friends,
Today I tried out the first serialexample project AS IS (without any modification

I got the following error message:

Error in: main_activity_resume(java line: 264)
java.lang.securityexception: need buetooth_admin permission:
neither user 10172 nor current process has android permission.
BLUETOOTH)ADMIN continue?

How and where can I get those permissions?

I am using my laptop with blutetooth enabled and my phone with Android 4.0
the phone can see the laptop.

Thanks in advance and please pardon my less-than-perfect knowledge.
 

Beja

Expert
Licensed User
Longtime User
Thanks Erel, and sorry but the same message pops up!
tried to do some testing and turned the bluetooth off then ran the app; it
detected it and asked me to first enable bluetooth, so the app is working fine
but the issue is with this permission..
Note: I appended the line you gave me at the end of the manifest file.. should I
put it on top of all?
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
Yes Erel, Went to Project and then all the way down to Manifest Editor and
pasted the xtml line.
Now from Project - Manifest Editor, it is reading:
AddPermission(android.permission.BLUETOOTH_ADMIN)

but from Objects folder it is reading:
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
Erel,
The device I am using LePhone DM006. 5.3" With Android 4.04
ODM - Lephone Chinese Official Website

But today I installed the modified version of the bluetooth example.. this time
an error jumped out in the emulator (see attached screenshot), but after installing
the APK file in my phone, there was no error -and no discovery of bluetooth devices either.
I was working from Berger King (oops!) and at least my laptop's bluetooth was
enabled.

Note: my laptop is Lenovo T61
 

Attachments

  • bt-error.JPG
    bt-error.JPG
    69.4 KB · Views: 239
Last edited:
Upvote 0

Beja

Expert
Licensed User
Longtime User
Thanks Erel,
the app is runnung fine in the phone.. could search and find nearby devices but
I am not able to talk to any of them.. I think I need to do some homework on
this because I am new to bluetooth and must be missing something.
thanks again.
 
Upvote 0
Top