Tag Archives: getSystemService

Find subscriber id, sim serial number, phone network type etc in Android

By | March 20, 2017

The android.telephony.TelephonyManager class provides information about the telephony services such as subscriber id, sim serial number, phone network type etc.You can also determine the phone state etc. Permission Before Starting, make sure you add the permission in the Android Manifest. Android Source Code Below code gets the information from the Android Telephony Manager and displays… Read More »

How to Check whether is GPS is enabled in your android device?

By | June 3, 2012

This simple code checks whether GPS in enabled in your android device or not. If the GPS is not enabled the user is redirected to the settings page. Turn off the GPS on your device and running it will display this screen. Please test GPS on the device because emulators don’t have GPS. But anyway… Read More »

Send Data when Clicking on a Notification in Android?

By | March 10, 2012

Hello everyone… I have shown in my previous tutorials on how to create notification in android and cancel it. This is the post showing this . Now today I am going to show how to send data when you click on the notification message. Here I am creating two activities. One the main activity that… Read More »

How will you programatically enable or disable WIFI in android?

By | September 30, 2011

Hello all.. This is a simple code snippet to enable WI-FI in android programatically in android. Note : Make sure to add the permissions in the manifest file. These are the permissions. Please leave your valuable comments on this post.

How to set your Android phone in Silent Mode or Vibrate Mode or Normal Mode programatically?

By | July 19, 2011

First create an instance of the AudioManager Class using which you can set the phone in Normal, Silent and Vibration Mode. AudioManager audio_mngr = (AudioManager) getBaseContext().getSystemService(Context.AUDIO_SERVICE); For setting the phone in Silent mode.. audio_mngr .setRingerMode(AudioManager.RINGER_MODE_SILENT); For setting the phone in Normal mode.. audio_mngr .setRingerMode(AudioManager.RINGER_MODE_NORMAL); For setting the phone in Vibrate mode.. audio_mngr .setRingerMode(AudioManager.RINGER_MODE_VIBRATE);

How to check internet connection is available in ANDROID or not?

By | July 7, 2011

Today we will see how to check whether there is any internet connection available to your phone in android.If any of the internet connection is available then the below function returns true otherwise false. Dont forget to add these two permissions in the manifest file. Press the +1 button to share it across the web… Read More »