Month: November 2015

Android Check internet connectivity

Android Check internet connectivity. Below android code to check if mobile is connected to internet or not ? public static boolean isConnectingToInternet(Context context) { try...

Android Date functions

Android most common functions to use for date. Add Days to Date public static Date addDaystoDate(Date today,int days) { final Calendar c = Calendar.getInstance(); c.setTime(today);...

Email Validation function in Android.

Email Validation function in Android.   public static boolean isValidEmailAddress(String email) { String expression=”^[\\w-\\+]+(\\.[\\w]+)*@[\\w-]+(\\.[\\w]+)*(\\.[a-z]{2,})$”; CharSequence inputStr = email; Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE); Matcher matcher...

Drag & drop File Upload event

Drag & drop File Upload And File Picker all in one using same event to write code for both events. Click Here to see Drag &...