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
- Delay in loading Html Page(WebView) from assets folder in real android device
- MPAndroidChart method setWordWrapEnabled() not found
- Designing a 'new post' android activity
- Android :EditText inside ListView always update first item in the listview
- Android: Transferring Data via ContentIntent
- Wrong xml being inflated android
- AsyncTask Class
- Unable to receive extras in Android Intent
- Website zoomed out on Android default browser
- Square FloatingActionButton with Android Design Library
- Google Maps API Re-size
- Push toolbar content below statusbar
- Android FragmentPagerAdapter Circular listview
- Layout not shifting up when keyboard is open
- auDIO_OUTPUT_FLAG_FAST denied by client can't connect to localhost
Related Questions in WIFI
- Android check WIFI status (disconnected or user changed WIFI)
- Can i send data through wifi while on another connection
- Find all/particular SSID
- Async HTTP Request and Arduino
- Using scapy with wifi
- Detecting wirless network status change in .NET
- Wifi ESP8266 between to micros
- Data Transfer between iOS and PC over WiFi
- How can i programatically switch my wifi to wifi Printer for printing in iOS
- What is the easiest way to check the network speed in android on both mobile and wifi connection?
- Accept any Wi-Fi password on OpenWRT (hostap)
- OS X Server kills WiFi connection
- Connect multiple devices in GoPro network
- Transfer Data over wifi in android between server and clients
- SCAPY PYTHON - Get 802.11 DS Status
Related Questions in WAKELOCK
- Wake locks on my service and third party programs not working at all
- Java Android service keep device awake to receive serial port commands
- Android Notification not fired when phone sleeps for a long time
- How to use PowerManager.ACQUIRE_CAUSES_WAKEUP
- is impact of acquiring cpu wake lock increases by no of applications holding it in android?
- How to use getSystemService in widget on android?
- Device not locked after WakeLock
- FLAG_KEEP_SCREEN_ON not undimming the screen
- Should I use acquire_causes_wakeup instead of Partial_Wake_Lock?
- Why does my IntentService not require a WakeLock?
- PowerManager.PARTIAL_WAKE_LOCK android
- Problems with releasing wakelock with flag ON_AFTER_RELEASE
- battery conservation and AlarmManager performance
- Is there any type of partial wake lock mechanism in ios?
- Dim screen while user inactive
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 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.