Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
418 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 Reply

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/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...