Draw primitive shapes such as rectangle, circle etc in ANDROID, A simple example.
The following example shows how to draw a rectangle using the Paint Class in ANDROID. Just copy and paste the following code to your file and you are done.
The following example shows how to draw a rectangle using the Paint Class in ANDROID. Just copy and paste the following code to your file and you are done.
In ANDROID all resource has a unique resource ID which we get by passing the song name to the function below playSong(). The function getAllResourceIDs() will convert this String which is the name of the song to the unique resource ID which can then be used to play the song. setOnCompletionListener() will be executed when… Read More »
The following java code helps you to show a webpage in ANDROID and enable javascript.
For working on the localhost use 10.0.2.2 and for remote use the IP or domain name of the server. The following code does this.
This is the main Java file that extends activity. Create a file named ScreenON_OFF_ACTIVITY.java and place the below code in it. This is the class that extends the Broadcast receiver class that receives the notifications. create a java file and name it ScreenReceiver.java and place the following code in it. This the class that updates… Read More »
This snippet starts an Application automatically after the android-os booted up. in AndroidManifest.xml (application-part):