Giter Club home page Giter Club logo

Comments (4)

betomaluje avatar betomaluje commented on July 19, 2024

Hi Jakub

first of all I'm really really sorry for this late response. I've been really
busy with my new job.

Also I've updated the code to fix some minor bugs:
https://github.com/betomaluje/Mi-Band

Easy use: compile 'com.betomaluje.miband:app:1.0.3'

I'm really grateful you're using this library.

Have a great day!

Cheers!

Sent with inky
"Jakub Krajniak" [email protected] wrote:

Hi,
I've tried very simple application (single button -> on click vibrate) but
unfortunatelly it does not work.
git:
https://github.com/MrTheodor/MiWatch
Here is what I noticed on logcat:
10-07 21:16:16.269 11983-12273/pl.jkrajniak.miwatch W/BluetoothGatt﹕
Unhandled exception in callback

java.lang.IllegalArgumentException: Invalid parameters

at com.betomaluje.miband.model.UserInfo.create(UserInfo.java:74)

at com.betomaluje.miband.model.UserInfo.getSavedUser(UserInfo.java:277)

at com.betomaluje.miband.MiBand$1.onSuccess(MiBand.java:54)

at
com.betomaluje.miband.bluetooth.BTConnectionManager$3.onServicesDiscovered(BTConnectionManager.java:319)

at android.bluetooth.BluetoothGatt$1.onSearchComplete(BluetoothGatt.java:305)

at
android.bluetooth.IBluetoothGattCallback$Stub.onTransact(IBluetoothGattCallback.java:217)

at android.os.Binder.execTransact(Binder.java:446)

Reply to this email directly or [view it on
GitHub](https://github.com/betomaluje/Mi-
Band/issues/3).

from mi-band.

rex1234 avatar rex1234 commented on July 19, 2024

I'm getting the same exception on version 1.0.3

from mi-band.

jkrajniak avatar jkrajniak commented on July 19, 2024

Thanks for update!

I think that the problem comes from line UserInfo.java:74; First I thought that those data like weight or age comes from MiBand :-D but then I realized that it comes from SharedPreferences where there has to be set beforhand. It is a variety of application where you actually do not need to store any user profile apart from btAddress.
My quick solution was to change this line to

if (address == null || address.length() == 0) {

btw, would it be possible to change name of module from app to libsomething, otherwise it is difficult to import it as a module in AS.

from mi-band.

betomaluje avatar betomaluje commented on July 19, 2024

Changed validation as @MrTheodor suggested.

Regarding changing the module's name, just create a new issue and I will get to it asap

from mi-band.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.