Search code examples
androidwear-oswakelockandroid-wake-lockhuawei-mobile-services

sendMessage doesn't work properly (Wearable)


If I'm sending some bytes using sendMessage from Huawei p9 (Android 6.0) into Android Wear (Sony) the messages are not delivered if the screen of handheld device is turned off. The notifications inside wearable are not updated until the screen in the phone is turned on (in 1 minute)! Will setUrgent help? I already added the application in "list of granded applications" that can work while the screen is off. The application already works in WAKELOCK state.

Is it a feature for all Android 6.0 and newer devices?

IS IT POSSIBLE TO AVOID THIS? ANY CLUES?


Solution

  • I've waste 3 days to find the solution To fix this problem just enable for ALL applications in the preferences:

    protect application with battery saver

    Detailed:

    To access this power profiles section

    Go to the System settings. (which you can either find in the quick toggles portion of the notification shade by pulling down the status bar on the top portion of the screen) Scroll down to Advanced Settings and head on over into Battery Manager. Go to Protected Apps selection. (This is what you’re looking for here. and this will control what’s allowed to run when the screen is off and what isn’t.)

    http://itechify.com/2016/02/01/how-to-fix-missing-push-notifications-on-huawei-smartphones/