How to convert Integer into String in Android or Java:
int id=29; String strId=Integer.toString(id);
Leading IT Company
How to convert Integer into String in Android or Java:
int id=29; String strId=Integer.toString(id);
How to convert String into Integer in Android or Java:
String strId="29"; int id = Integer.parseInt(strId);
Note:
Continue reading “Converting a string to an integer on Java / Android”
How to sort an ArrayList in Android:
Following code is describing, how to sort an Android / Java array list of user defined class.
Collections.sort(empList, new Comparator<Employee>(){ public int compare(Employee emp1, Employee emp2) { return emp1.getFirstName().compareToIgnoreCase(emp2.getFirstName()); } });
How to delete all messages from android inbox or sent folders, without loop
Use following simple function to delete sms from default android application / database. Continue reading “Programmatically delete sms / message by sms id in android”
To get notification of received sms we will use BroadcastReceiver.
So create new class with any name like SmsReceiver and extend it with BroadcastReceiver.
Code with description is given following. Continue reading “Receive sms in own android application”
To save sms / message in inbox or sent folder on default android’s messaging application, use following simple function. This code will save text message in all Android versions including above or below versions from Kitkat. Continue reading “How to programmatically save sms to inbox or sent folders in android”
How to read SMS from the inbox or sent folder programmatically in Android:
To read all messages for inbox or sent programmatically in Android use following function. Continue reading “Read SMS from the inbox or sent folder programmatically in Android”
Service: is one of core component of Android.
Service have not any user interface, like dialogboxe or buttons etc. Service runs in background. We use service for long process like fetch long (time consuming) data from network, play sound in background or some process where user interaction is not necessary. Continue reading “Write your own Background Service in Android”
Android DatePicker:
In this session will learn to use DatePicker.
Create new project in eclipse (Android-First-Programm).
In res -> layout open “activity_main.xml” and use button. Continue reading “Android DatePicker Dialog”