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

Bug with receiver #3

Open
daimonkor opened this issue Feb 2, 2016 · 8 comments
Open

Bug with receiver #3

daimonkor opened this issue Feb 2, 2016 · 8 comments

Comments

@daimonkor
Copy link
Contributor

    @Override
    protected void onCreate(){
              mBLEController = BluetoothLEController.getInstance().build(this);
              mBLEController.setBluetoothListener(bluetoothLEListener);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();

        try {
            mBLEController.release();
        }catch (Exception e){
            LogManager.LogEA(e);
        }
    }

     @Override
    protected void onPause() {
        super.onPause();
       /*my custom key, use when scanLe*/
        if(getCurrentState() == START_SCAN_STATE) {
            mBLEController.cancelScan();
        }
    }

image

Please fix, thank you for support.
I am using BLE Simulator (Battery Service).

@daimonkor daimonkor changed the title Bug wirh receiver Bug with receiver Feb 2, 2016
@daimonkor
Copy link
Contributor Author

Please look up (my example code), sometimes my listener did not register
You can see well scan, but not call your callback function
image
Please fix, thanks.

@whilu
Copy link
Owner

whilu commented Feb 4, 2016

Thanks! I will fix the bug as soon as possible.

@andrew-boyarshin
Copy link

Encountered the bug too. Easy to reproduce by rotating the screen.

@daimonkor
Copy link
Contributor Author

Hi, have you news about bug?

@whilu
Copy link
Owner

whilu commented Mar 14, 2016

Sorry, late to reply. @STALKER2010 When u rotate the screen, have u released the instance? @daimonkor I can't reappear the bug u mentioned, can u show me more detail? Now I have removed the registerReceiver() method in BluetoothLEController, it's no use. If u have any problem, u can mail to me, I will reply you soon! Thank very much!

@daimonkor
Copy link
Contributor Author

@whilu Did you create new release for gradle version?

@whilu
Copy link
Owner

whilu commented Mar 15, 2016

@daimonkor If there is no any other issues, I will create a new release soon.

@andrew-boyarshin
Copy link

@whilu yes, I release instance. I tried it many ways, now I just implemented most Activity lifecycle callbacks (onDestroy, onPause etc) and I call super implementation in try {...} catch (e) {...} block. It doesn't crash, but it certainly doesn't seem to be working correctly.

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

No branches or pull requests

3 participants