Wednesday, November 5, 2014

Android Listen to Network State Change


Instagram This will help you to detect network changing states in android phone. For get an idea abut the API use for this read Followings.

Following Steps will do it. After setup the code and run the app just change your network status to flight mode and then again revert.


First we need to add required permission to read the changes of network connectivity. Insert following line in you AndroidManifest.xml file to do that.



       <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
       <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
Now you good to go with the creating of your service.
Following is the code for the service that will detect the changes of network. (You can start  this even as BroadcastReceiver) 

Get an idea about Services Vs BroadcastReceivers in android. 

Thursday, May 29, 2014

Javascript default browser alert overide


Instagram  Plugin for override javascript default browser alert. Add to any js and call the function with require arguments.

Code......\|/

Tuesday, May 27, 2014

CodeBlocks Installing and Troubleshooting in UBUNTU

Instagram
Code::Blocks is a cross-platform Integrated Development Environment. Most of its functionality is already provided by plugins.

For Installation use this link.  Or in terminal execute,
             sudo apt-get install codeblocks