It is very easy to programmatically send email without using default email application in android. We can send email by using gmail, hotmail, yahoo or your domain email like info@wisdomitsol.com
Tag Archives: android advenced
Saving Activity state on Android when change orientation
In Android application when we change the orientation of device then our activity is recreated and some time we face the NullPointerException. To handle NullPointerException or other exceptions we can save current state and retrive the values or tell in AndroidManifest.xml that don’t destroy this activity. Solution 1:
Android AsyncTask Example | Simplest code
AsyncTask is a background process that easily handle UI without handler.You must know that why we use background process. We need background process / multi threading for long processes like communicate with Internet or database. If you handle Multi Threading smartly then your mobile application should perform better.
Android Thread Example : Simplest code
This article will describe Android thread example:- Multi threading, Processes and Threads in Android application development: In Android every programm (application) have a main thread. We can’t do long processing in main thread. Long processes like communicate with Internet, parse long data or communicate with database etc.
android.os.NetworkOnMainThreadException
This exception occurs when you write network code on main thread (UI thread). It will throw following exception android.os.NetworkOnMainThreadException Solution:-
Apply gradient to Android View
Images have loat of memory than using colur. We also need different size images for different resolutions, so in Android we can use gradient that shade the color. We can apply gradient to different Views in Android like EditText, TextView or Button etc. It will be take less memory.
Android SharedPreferences
Introduction Preferences are generly a little storage and typically name value pairs. They can be stored as “Shared Preferences” across various activities in an application. Or it can be something that needs to be stored specific to an activity.Here you will see the useage of SharedPreferences.
Convert any file into byte array or byte array into string in Android
How to convert image or video file into byte[] or byte[] into String in Android: TO upload image, video or any other file on server fro Android app we need to convert that image / video file to string or upload byte by byte. Note: this method is suite able for small files (image, video, …
Continue reading “Convert any file into byte array or byte array into string in Android”
Java / Android Sort ArrayList
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()); } });
Programmatically delete all messages in android, without loop
Delete messages by message id We can delete all sms (messages) from default android application / database without loop.