I searched and was not able to find the answer to this question. I am working on app that will run all the time. I am using wifi and everything works fine until the device sleeps. One device sends out multicast packets and the other one should get them and wake up but it is not. Right now the network thread is started from a service thread started by StartService() from my main class. IN the service I get a wifi lock and a wifi multicast lock so that wifi and multicast "should" stay on when the device sleeps. I also tried adding a partial wake lock to the mix but still nothing works. Any ideas? I am devleoping on two nexus ones running android 2.3.3 right now.
Allow wifi data while sleeping and wake device
1.3k Views Asked by Mlove At
1
There are 1 best solutions below
Related Questions in ANDROID
- Creating global Class holder
- Flutter + Dart: Editing name of a tab shows up a black screen
- android-pdf-viewer Received status code 401 from server: Unauthorized
- Sdk 34 WRITE_EXTERNAL_STORAGE not working
- ussd reader in Recket Native module
- Incorrect display of LinearGradientBrush in IOS
- The Binary Version Of its metadata is 1.8.0, expected Version is 1.6.0 build error
- I can't make TextInput to auto expand properly in Android
- Creating multiple instances of a class with different initializing values in Flutter
- How to create a lottie animation
- making android analyze with coverity sast tool
- Flutter plugin development android src not opening after opening example
- I initialize my ViewModel in the Activity with several fragments as tabs, but the fragments(tabs) return null for the updated livedata
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- How I can use the shared preferences class?
Related Questions in WIFI
- expression 'net.sniff.http.response' did not match any filter
- WiFiNINA with Raspberry Pi Pico SDK
- How to use WiFi and Ethernet at same time?
- how to tell If Device on WLAN are using internet?
- Connect wifi service with dbus-native
- Questions about having emulated Wifi EXACTLY match host wifi in android studio
- Is there a way to gather the SSIDs of the connected networks in the background?
- Pyrad client wifi connection failure
- Is there any way to get the WiFi contention window (CW) min and max value in Linux 80211 subsystem?
- Is that possible to send a file to a zebra printer to print it by a web application on a phone using just WI-FI?
- Fetching Wifi-Scanning location system setting on Android without deprecated functions
- ESP32 (ESP IDF) Fails to change to other STA config (generated by user) at runtime
- OSError: [Errno 1] EPERM connecting to WLAN on Raspberry Pi Pico W
- How to implement DPP (wifi easy connect) with out of band credentials
- Does ESP32 support WiFi Direct?
Related Questions in WAKELOCK
- Another Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher
- How to turn on android screen when received FCM push notification?
- Is there any mechanism to sleep exact 1 min precision?
- Android receive onKeyDown event even if screen is off
- How to Prevent An App From Sleeping or Waking The App For Delivery of Message?
- How to disable webview sleep in ionicframework
- Keep the screen on in Trusted Web Activity
- Display alert dialog after specific time
- A problem occurred configuring project ':wakelock' in Flutter
- How to use wakelock / make an app run when the device is locked
- Using Wakelock with Audio Service in flutter
- With SCREEN_BRIGHT_WAKE_LOCK deprecated, how can I keep the screen on in Wear OS?
- How to keep Android screen on after an action
- setExactAndAllowWhileIdle with Wakelock in Doze mode
- Wakeup lock is not working in android mobile app
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You need to set the PowerManager.ACQUIRE_CAUSES_WAKEUP flag in your WakeLock, however PowerManager.ACQUIRE_CAUSES_WAKEUP flag doesn't work with PowerManager.PARTIAL_WAKE_LOCK, but it should work with PowerManager.SCREEN_DIM_WAKE_LOCK. Below code should wake the display and CPU of your device, when you call acquire() on the WakeLock. The 5 second sleep should give your WiFi enough time to wake.