Android HTTP POST / GET Url Call using Custom Library

Android HTTP POST / GET Url Call using KaushalUtils Call Any HTTP URL With KaushalUtil Custom Library. URL – https://github.com/kaushal2406/KaushalUtils Functionality Available Date Functions, Progress Dialog, AlertDialog, Confirm Dialog, FileUpload, hideKeyboard, Internet connection check, getIMEI webViewSettings generateSpinnerList
Continue reading »

Run php code online for android push notification

Run php code online for android push notification To Test push notification code online run below code with replace of $deviceTocken and $GOOGLE_API_KEY To create API_KEY click here Then copy code from here to http://phpfiddle.org and past code in site and press run button.
Continue reading »

Android Dialog Ready for use For Utility with custom message and text for buttons

Android Dialog Ready for use For Utility with Custom message and text for Yes, No buttons. Create Class ConfirmCustomDialog package com.kp.core; import com.kp.dialogs.IDialogCallback; import android.app.AlertDialog; import android.app.Dialog; import android.app.DialogFragment; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.os.Bundle; public class ConfirmCustomDialog extends DialogFragment { CharSequence title,message; String yesText=””; String noText=””;...
Continue reading »

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 { ConnectivityManager connectivity = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); if (connectivity != null) { NetworkInfo[] info = connectivity.getAllNetworkInfo(); if (info != null) for...
Continue reading »

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); c.add(Calendar.DAY_OF_MONTH, days); return c.getTime(); } Add Hours to Date public static Date addHourstoDate(Date today,int hours) { final Calendar c = Calendar.getInstance();...
Continue reading »

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 = pattern.matcher(inputStr); if (matcher.matches() && !email.contains(” “)) { return true; } else { return false; } }
Continue reading »

Cordova vs PhoneGap

Cordova vs PhoneGap Apache Cordova is a platform for building native mobile applications using HTML, CSS and JavaScript. Apache Cordova is an open-source mobile development framework. It allows you to use standard web technologies such as HTML5, CSS3, and JavaScript for cross-platform development, avoiding each...
Continue reading »