Android Wifi

To manage the wifi connectivity, such as to add network, disable the network, scan for access points, disconnect the network, etc., the android.net.wifi.WifiManager class can be used in Android. Example: To enable and disable wifi: In the below example, we are using the Android WifiManager to enable and disable the wifi service. activity_main.xml: <?xml version="1.0" … Read more

Android Bluetooth List Paired Devices

To return a set of paired or bonded BluetoothDevice objects, the getBoundedDevices() method of BluetoothAdapter class is used. Example: In the below example, we are demonstrating the use of the BluetoothAdapter class to check if the bluetooth is turned off. Here, we are turning the bluetooth on, if it is off and then we are … Read more

Android Bluetooth

To exchange data with other devices wirelessly, Bluetooth is used. The Bluetooth framework supported by the Android platform allows a device to send or receive data between two different devices. The Bluetooth API of Android is used to perform these tasks and many more: To scan Bluetooth devices To connect and transfer data from and … Read more

Send email in android

In Android, the Intent is used to send Email. Code: Send Email in android: Intent email = new Intent(Intent.ACTION_SEND); email.putExtra(Intent.EXTRA_EMAIL, new String[]{ to}); email.putExtra(Intent.EXTRA_SUBJECT, subject); email.putExtra(Intent.EXTRA_TEXT, message);   //need this to prompts email client only email.setType("message/rfc822");   startActivity(Intent.createChooser(email, "Choose an Email client :"));Intent email = new Intent(Intent.ACTION_SEND); email.putExtra(Intent.EXTRA_EMAIL, new String[]{ to}); email.putExtra(Intent.EXTRA_SUBJECT, subject); email.putExtra(Intent.EXTRA_TEXT, message); … Read more

Send SMS in android

To send SMS in Android, either the SmsManager API or devices Built-in SMS application can be used, i.e., in Android, the Intent can be used to send SMS. Syntax: SmsManager API: SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage("phoneNo", null, "sms message", null, null);SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage("phoneNo", null, "sms message", null, null); Syntax: Built-in SMS application: Intent … Read more

Make phone call android

To make a phone call, the intent is used in Android. Code: To make a phone call: Intent callIntent = new Intent(Intent.ACTION_CALL); callIntent.setData(Uri.parse("tel:"+123456789));//change the number startActivity(callIntent);Intent callIntent = new Intent(Intent.ACTION_CALL); callIntent.setData(Uri.parse("tel:"+123456789));//change the number startActivity(callIntent); Example: activity_main.xml: In the activity_main.xml file, we will drag the EditText and Button from the palette. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" … Read more

Android Simple Caller Talker

We can know the incoming number in Android, while the phone is in the ringing mode. The Android Speech API and telephony manager are used to speak the incoming number. Example of Android Simple Caller Talker: In the below example, we are using the Android Speech API and telephony manager to develop an app that … Read more

Android Call State

The info about the telephony services, including the subscriber id, sim serial number, phone network type, phone state, etc., are facilitated by the android.telephony.TelephonyManager class. The TelephonyManager class of Android can also be used to get the information of the call state. The listen method of the TelephonyManager class is used to serve this purpose, … Read more

TelephonyManager Android

The info about the telephony services, including the subscriber id, sim serial number, phone network type, phone state, etc., are facilitated by the android.telephony.TelephonyManager class. The TelephonyManager class of Android can also be used to get the information of the call state. The listen method of the TelephonyManager class is used to serve this purpose, … Read more

TextToSpeech Android

The TextToSpeech class in Android is used to convert a text into speech. We can also playback the speech and can create a sound file, once the text is converted to speech. The constructor of the TextToSpeech class: TextToSpeech(Context context, TextToSpeech.OnInitListener) Methods of TextToSpeech class: The Android TextToSpeech class contains various methods. The popular methods … Read more