Let’s say the html file is called as index.html and is located in the asset folder of the app. The following Activity shows how to load it and display the html in the webview.
Read More »How to get memory used by an Android App?
Getting the free, used and total run time memory as consumed by an App is very useful for debugging Out of Memory situations (leads to app crash).
Read More »How to acquire and release the wakeup lock in Android?
Example Use case: Let’s say an Android phone is in sleep mode and upon receiving a push notifications we want the phone to wake up (come out of sleep mode) and act upon (display etc.) the notification. In this case on receiving the notification which invokes the notification handler, we …
Read More »How to check if an Android device can connect to Internet?
The following code snippet shows how to check if an Android device can connect to Internet.
Read More »How to get a list of Calendars names in Android?
Get a list of installed calendar in an Android device is relatively easy. This involves using the ContentResolver to query the installed calendars and get a handle to the Cursor for the same. Loop through the cursor to get the id and name for the Calendars. [pb_builder]
Read More »