Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
447 views
in Technique[技术] by (71.8m points)

android - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...