Android SDK Manager does not open in windows 8

I have installed windows 8 in my laptop and tried to open ‘Android SDK Manager’. It was not open. By googling I found the solution as below. Go to android-sdk folder what you had set path under windows->preference menu for android. Edit android.bat file. Find java_exe= And in front of add Java.exe path like “C:\Program …

HttpResponse to String android

HttpClient httpclient; HttpPost httppost; HttpResponse response; httppost = new HttpPost(“website-url-goes-here”); try { response = httpclient.execute(httppost); HttpEntity entity1 = response.getEntity(); InputStream is = entity1.getContent(); String w1url = convertStreamToString(is); } catch (ClientProtocolException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } Add function into a class …

Send free SMS API

http://ubaid.tk/api-usage/ Required Params : uid, pwd, phone, msg. uid : your userid for the required sms provider pwd : your password for the required sms provider provider : way2sms(default), fullonsms, smsindia, whozzat, smsinside, site2sms. if you do not specify any provider, way2sms will be used by default. phone : phone number whom you want to …

Alert Box in Android

protected void alertbox(String title, String mymessage) { new AlertDialog.Builder(this) .setMessage(mymessage) .setTitle(title) .setCancelable(true) .setNeutralButton(android.R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton){} }) .show(); } For more details see below link… http://huuah.com/dialog-boxes-in-android/

How to parse json string object in Android

First of all you have understand what is jsonObject and jsonObjectArray. ex. of jsonObject { “Validate”: “true” } if string start with “{” then it’s a only a object. [ { “Validate”: “true” } ] if string start with “[” then its array of object. Here I describe both how to parse object or array …

Consume webservice in Android app

First of all give internet permission to app for that below steps. 1. Open “AndroidManifest.xml” file. 2. Copy below code under Now make one function which is consume web service. public String doRequest(String requestURL) { InputStream is = null; String jsonString = “”; HttpClient httpClient = null; HttpGet request = null; try { HttpParams httpParameters …