Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: Human readable error message if BLE is not supported on the platform (Emulator or version < 4.4KitKat) #36

Closed
allbdeveloper opened this issue May 7, 2016 · 15 comments
Milestone

Comments

@allbdeveloper
Copy link

Hi, Very Thanks for this package.

Are you planning to support for KitKat or Jelly Bean.
It's crash on those version.

@smstuebe
Copy link
Collaborator

smstuebe commented May 7, 2016

  • Where does it crash?
  • Do you have a crash log and the code that causes the crash log?
  • On which device are you testing?

"It's crash" is not very helpful. 😒

@smstuebe
Copy link
Collaborator

More than one month no answer -> close

@allbdeveloper
Copy link
Author

allbdeveloper commented Jun 16, 2016

Hi, I’m so sorry that I reply so late.
I know you have put big effort to make library.

So sorry again.

BLE Adapter crash on Jellybean and Kitkat. (Both are tested on Xamarin Android Player - not actual device)

  • JellyBean
  • kitkat

Thanks.

On Jun 15, 2016, at 6:43 AM, Sven-Michael Stübe notifications@github.com wrote:

More than one month no answer -> close


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #36 (comment), or mute the thread https://github.com/notifications/unsubscribe/AOODlEc_HWs5XujYlZ0MzujL3DjUdvGbks5qLyCAgaJpZM4IZdyu.

@smstuebe smstuebe reopened this Jun 16, 2016
@smstuebe
Copy link
Collaborator

Ok. We have to review that. Have you tested it on physical devices, too?

@allbdeveloper
Copy link
Author

Hi, Thanks for reopening issue.

Not yet.

I will try it asap and send the result to you.

Thanks.

On Jun 16, 2016, at 3:57 PM, Sven-Michael Stübe notifications@github.com wrote:

Ok. We have to review that. Have you tested it on physical devices, too?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #36 (comment), or mute the thread https://github.com/notifications/unsubscribe/AOODlL8iSGbBNMGp1PK9QApgKnVyiY3Rks5qMPP3gaJpZM4IZdyu.

@smstuebe
Copy link
Collaborator

And: You say it's crashing. Please provide the exception messages and the stacktrace.

@allbdeveloper
Copy link
Author

Hi, I attached screenshot with crash log. but it's not shown here. (I attached it using email)
DId you see that screenshot from email box? and you want more information? (exception messages & stacktrace)
If so, I will send it.

Plus, It may take little longer to find actual device (Kitkat and Jellybean)

@allbdeveloper
Copy link
Author

![screen shot 2016-05-12 at 2 20 26 pm](https://cloud.githubusercontent.com/assets/14910356/16128621/632da24c-343c-11e6-8d73-55fe784dd6f7.png) ![screen shot 2016-05-27 at 12 02 51 am](https://cloud.githubusercontent.com/assets/14910356/16128647/7ff0e650-343c-11e6-80cb-60c18e509d8d.png) ![screen shot 2016-05-27 at 12 02 59 am](https://cloud.githubusercontent.com/assets/14910356/16128651/84fd3662-343c-11e6-91cc-4c8ec09363ba.png) ![screen shot 2016-05-27 at 12 04 24 am](https://cloud.githubusercontent.com/assets/14910356/16128659/8ea9a6d2-343c-11e6-86a5-628463b4ab30.png) ![screen shot 2016-05-27 at 12 12 25 am](https://cloud.githubusercontent.com/assets/14910356/16128666/99bfd12c-343c-11e6-9768-cc758fbe7931.png)

@allbdeveloper
Copy link
Author

allbdeveloper commented Jun 17, 2016

I tested it on actual device.

Samsung Galaxy Note 1. (SHV-E160L)
Android 4.1.2 (Jelly Bean)
It crash on this device.

screen shot 2016-06-17 at 11 34 02 pm
screen shot 2016-06-17 at 11 34 13 pm
screen shot 2016-06-17 at 11 33 50 pm
screen shot 2016-06-17 at 11 34 43 pm

@allbdeveloper
Copy link
Author

Hi,

I tested it today on actual device (Galaxy Note 1)
Android 4.1.2 - Jelly Bean.

It crash.

And I uploaded screenshots on github’s issue.

Thanks.

On Jun 16, 2016, at 8:18 PM, Sven-Michael Stübe notifications@github.com wrote:

And: You say it's crashing. Please provide the exception messages and the stacktrace.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #36 (comment), or mute the thread https://github.com/notifications/unsubscribe/AOODlAYfC_uyQ9fdwGx_cuZwQGe8XvQ4ks5qMTD0gaJpZM4IZdyu.

@allbdeveloper
Copy link
Author

Oh, I found it from wikipedia .
https://en.wikipedia.org/wiki/Bluetooth_low_energy#Android

BLE's supported from Android 4.3 JellyBean or above.
So It shouldn't work on 4.1 JellyBean.

@xabre
Copy link
Collaborator

xabre commented Jun 23, 2016

Android - Check BLE availability by:

  • Checking SDK level and notify via log message / custom exception
  • Check if Emulator and notify via log message / custom exception

@xabre xabre added this to the 1.0.0 milestone Jun 23, 2016
@xabre xabre changed the title Only works on Android Lollipop or above. Android: Human readable error message if BLE is not supported on the platform (Emulator or version < 4.4KitKat) Jun 23, 2016
@smstuebe
Copy link
Collaborator

We should try do not check if it's a simulator/emulator. Instead we should just check if ble is available.

@xabre
Copy link
Collaborator

xabre commented Aug 5, 2016

You should not instantiate the Adapter by calling new.

  • If you use the vanilla version (non mvvmcross) of the plugin please resolve IAdapter by calling CrossBluetoothLE.Current.Adapter
  • For MvvmCross use Mvx.Resolve

For both cases, if** BLE it's not available on your device** you will get a fake adapter which will not crash and print out error messages.

You can always check availability by callingCrossBluetoothLE.Current.IsAvailable

For more info see our readme.

@xabre xabre closed this as completed Aug 5, 2016
@allbdeveloper
Copy link
Author

Thanks for your answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants