¡@

Home 

2014/10/16 ¤W¤È 08:14:03

android Programming Glossary: get

Saving Activity state in Android

http://stackoverflow.com/questions/151777/saving-activity-state-in-android

import android.os.Bundle import android.widget.TextView public class HelloAndroid extends Activity Called when.. a way of storing a NVP Name Value Pair map and it will get passed in to onCreate and also onRestoreInstanceState where.. passed to onCreate. boolean myBoolean savedInstanceState.getBoolean MyBoolean double myDouble savedInstanceState.getDouble..

Libraries do not get added to APK anymore after upgrade to ADT 22

http://stackoverflow.com/questions/16596969/libraries-do-not-get-added-to-apk-anymore-after-upgrade-to-adt-22

do not get added to APK anymore after upgrade to ADT 22 I have a rather.. in eclipse but when i run the project on the phone i get a NoClassDefFoundError. java.lang.NoClassDefFoundError org.acra.ACRA.. SDK download a fresh ADT bundle delete all my code an get it again from git copy the library in question to the app project..

Quitting an application - is that frowned upon?

http://stackoverflow.com/questions/2033914/quitting-an-application-is-that-frowned-upon

share improve this question This will eventually get to your question but I first want to address a number of issues.. Our users log in and cant be doing that everytime they get a phonecall and Android decides to kill the app. There are many.. see trends in environments as new ones arise and others get buried. For example there is a growing movement to try to eliminate..

Download a file with Android, and showing the progress in a ProgressDialog

http://stackoverflow.com/questions/3028306/download-a-file-with-android-and-showing-the-progress-in-a-progressdialog

I am trying to write a simple application that gets updated. For this I need a simple function that can download.. during download PowerManager pm PowerManager context.getSystemService Context.POWER_SERVICE PowerManager.WakeLock wl.. wl pm.newWakeLock PowerManager.PARTIAL_WAKE_LOCK getClass .getName wl.acquire try InputStream input null OutputStream..

What is the simplest and most robust way to get the user's current location in Android?

http://stackoverflow.com/questions/3145089/what-is-the-simplest-and-most-robust-way-to-get-the-users-current-location-in-a

is the simplest and most robust way to get the user's current location in Android The LocationManager.. on isn't really a location app per se but it does need to get the user's location in order to display a list of nearby businesses... in multiple activities to satisfy #2. I've tried using getBestProvider in the past to cut the solution down to just using..

Strange out of memory issue while loading an image to a Bitmap object

http://stackoverflow.com/questions/477572/strange-out-of-memory-issue-while-loading-an-image-to-a-bitmap-object

of an issue with the camera layout. The activity that gets launched for result is a map. If I click on my button to launch.. my new activity which is nothing more than an image widget. The image preview on the list view is being done with the cursor.. image that came off the phone camera. The issue is that I get an out of memory error when it tries to go back and re launch..

How do I do a lazy load of images in ListView

http://stackoverflow.com/questions/541966/how-do-i-do-a-lazy-load-of-images-in-listview

images and captions associated with those images. I am getting the images from the Internet. Is there a way to lazy load.. if drawableMap.containsKey urlString return drawableMap.get urlString Log.d this.getClass .getSimpleName image url urlString.. urlString return drawableMap.get urlString Log.d this.getClass .getSimpleName image url urlString try InputStream is fetch..

Android - basic gesture detection

http://stackoverflow.com/questions/937313/android-basic-gesture-detection

basic gesture detection I've been battling to get 'fling' gesture detection working on my Android application.. e2 float velocityX float velocityY int dx int e2.getX e1.getX don't accept the fling if it's too short as it may.. e2 float velocityX float velocityY int dx int e2.getX e1.getX don't accept the fling if it's too short as it may conflict..

Why retrieving Google Directions for Android using KML data is not working anymore? [duplicate]

http://stackoverflow.com/questions/11745314/why-retrieving-google-directions-for-android-using-kml-data-is-not-working-anymo

setInstruction final String turn this.instruction turn Get the turn instruction to reach next segment. @return a String.. public void setPoint final GeoPoint point start point Get the starting point of this segment. @return a GeoPoint public.. json object final JSONObject json new JSONObject result Get the route object final JSONObject jsonRoute json.getJSONArray..

Application Skeleton to support multiple screen

http://stackoverflow.com/questions/12242111/application-skeleton-to-support-multiple-screen

dp 720 320 160 dp 360. so drawable sw360dp will do the job Get you Device configuaration from GsmArena Sameway you can also..

Is it possible to have multiple styles inside a TextView?

http://stackoverflow.com/questions/1529068/is-it-possible-to-have-multiple-styles-inside-a-textview

Selecting Highlighting or Styling Portions of Text Get our EditText object. EditText vw EditText findViewById R.id.text.. can be attached. Or we could specify that in the XML. Get the EditText's internal text storage Spannable str vw.getText..

Get/pick an image from Android's built-in Gallery app programmatically

http://stackoverflow.com/questions/2169649/get-pick-an-image-from-androids-built-in-gallery-app-programmatically

pick an image from Android's built in Gallery app programmatically..

Open another application from your own (intent)

http://stackoverflow.com/questions/2780102/open-another-application-from-your-own-intent

Create an intent with action MAIN and category LAUNCHER Get the PackageManager from the current context using context.getPackageManager.. intent 0 to get the first activity with main launcher Get the ActivityInfo you're interested in From the ActivityInfo..

How to draw a path on a map using kml file?

http://stackoverflow.com/questions/3109158/how-to-draw-a-path-on-a-map-using-kml-file

navigationDataSet new NavigationDataSet Getter Setter public NavigationDataSet getParsedData navigationDataSet.getCurrentPlacemark.. public void endDocument throws SAXException Nothing to do Gets be called on opening tags like tag Can provide attribute s.. buffer new StringBuffer this.in_coordinatestag true Gets be called on closing tags like tag @Override public void endElement..

Auto Scale TextView Text to Fit within Bounds

http://stackoverflow.com/questions/5033012/auto-scale-textview-text-to-fit-within-bounds

null text.length 0 height 0 width 0 mTextSize 0 return Get the text view's paint object TextPaint textPaint getPaint Store.. mMaxTextSize 0 Math.min mTextSize mMaxTextSize mTextSize Get the required text height int textHeight getTextHeight text textPaint..

upload video to facebook in android

http://stackoverflow.com/questions/10151708/upload-video-to-facebook-in-android

from params params.remove filename if method.equals GET url url encodeUrl params Util.logd Facebook Util method URL.. getProperty http.agent FacebookAndroidSDK if method.equals GET Bundle dataparams new Bundle for String key params.keySet..

J2ME/Android/BlackBerry - driving directions, route between two locations

http://stackoverflow.com/questions/2023669/j2me-android-blackberry-driving-directions-route-between-two-locations

Connector.open url urlConnection.setRequestMethod GET is urlConnection.openInputStream catch IOException e e.printStackTrace..

Secure HTTP Post in Android

http://stackoverflow.com/questions/2253061/secure-http-post-in-android

a helper class for my own applications and I am able to GET POST to HTTPS without a problem. I will post the code here and.. true httpConn.setRequestMethod GET httpConn.connect response httpConn.getResponseCode if response..

How to get the html-source of a page from a html link in android?

http://stackoverflow.com/questions/2423498/how-to-get-the-html-source-of-a-page-from-a-html-link-in-android

this question You can use HttpClient to perform an HTTP GET and retrieve the HTML response something like this HttpClient..

How to add parameters to a HTTP GET request in Android?

http://stackoverflow.com/questions/2959316/how-to-add-parameters-to-a-http-get-request-in-android

to add parameters to a HTTP GET request in Android I have a HTTP GET request that I am attempting.. parameters to a HTTP GET request in Android I have a HTTP GET request that I am attempting to send. I tried adding the parameters..

How to send HTTP POST request and receive response?

http://stackoverflow.com/questions/3038409/how-to-send-http-post-request-and-receive-response

CGP Server S conversation and get XIMSS.nonce node value C GET ximsslogin HTTP 1.1 Host myserver.com Content Type text xml..

Android write to sd card folder

http://stackoverflow.com/questions/3551821/android-write-to-sd-card-folder

c HttpURLConnection u.openConnection c.setRequestMethod GET c.setDoOutput true c.connect FileOutputStream f new FileOutputStream..

Android draw route on a Mapview with twoo POI-s

http://stackoverflow.com/questions/4408671/android-draw-route-on-a-mapview-with-twoo-poi-s

url.openConnection urlConnection.setRequestMethod GET urlConnection.setDoOutput true urlConnection.setDoInput true..

creating a system overlay (always on top) button in android

http://stackoverflow.com/questions/4481226/creating-a-system-overlay-always-on-top-button-in-android

public boolean onTouchEvent MotionEvent event ATTENTION GET THE X Y OF EVENT FROM THE PARAMETER THEN CHECK IF THAT IS INSIDE..

Connecting 2 Emulator instances In Android

http://stackoverflow.com/questions/4683854/connecting-2-emulator-instances-in-android

AND THAT'S MY DEV'T MACHINE WHERE PACKETS TO PORT 5000 GET REDIRECTED TO THE SERVER EMULATOR'S PORT 6000 private static..

Android: install .apk programmatically [duplicate]

http://stackoverflow.com/questions/4967669/android-install-apk-programmatically

c HttpURLConnection url.openConnection c.setRequestMethod GET c.setDoOutput true c.connect String PATH Environment.getExternalStorageDirectory..

Android download binary file problems

http://stackoverflow.com/questions/576513/android-download-binary-file-problems

c HttpURLConnection u.openConnection c.setRequestMethod GET c.setDoOutput true c.connect FileOutputStream f new FileOutputStream..

How to Consume WCF Service with Android

http://stackoverflow.com/questions/669764/how-to-consume-wcf-service-with-android

just use the default SOAP format and HTTP POST rather than GET for the web service bindings. The easiest HTTP binding to get.. or possibly using WCF REST to allow for logins with a GET rather than SOAP POST. Here is an example of what the HTTP POST..

Code for download video from Youtube on Java, Android

http://stackoverflow.com/questions/7203047/code-for-download-video-from-youtube-on-java-android

HttpURLConnection url.openConnection con.setRequestMethod GET InputStream stream con.getInputStream InputStreamReader reader.. c HttpURLConnection u.openConnection c.setRequestMethod GET c.setRequestProperty Youtubedl no compression True c.setRequestProperty..

Saving Activity state in Android

http://stackoverflow.com/questions/151777/saving-activity-state-in-android

Android' example package com.android.hello import android.app.Activity import android.os.Bundle import android.widget.TextView public class HelloAndroid extends Activity Called when the activity is first created. @Override public void onCreate.. MyString Welcome back to Android etc. The Bundle is essentially a way of storing a NVP Name Value Pair map and it will get passed in to onCreate and also onRestoreInstanceState where you'd extract the values like this @Override public void onRestoreInstanceState.. state from the savedInstanceState. This bundle has also been passed to onCreate. boolean myBoolean savedInstanceState.getBoolean MyBoolean double myDouble savedInstanceState.getDouble myDouble int myInt savedInstanceState.getInt MyInt String..

Libraries do not get added to APK anymore after upgrade to ADT 22

http://stackoverflow.com/questions/16596969/libraries-do-not-get-added-to-apk-anymore-after-upgrade-to-adt-22

do not get added to APK anymore after upgrade to ADT 22 I have a rather big Android App project that is referencing several library.. also upgraded the SDK of course. I do not see any compile errors in eclipse but when i run the project on the phone i get a NoClassDefFoundError. java.lang.NoClassDefFoundError org.acra.ACRA .... The arca library is included in one of the referenced.. of stuff including but not limited to re install the android SDK download a fresh ADT bundle delete all my code an get it again from git copy the library in question to the app project comment out the code that uses this library i just get..

Quitting an application - is that frowned upon?

http://stackoverflow.com/questions/2033914/quitting-an-application-is-that-frowned-upon

now Is there a way for me to really quit the application android share improve this question This will eventually get to your question but I first want to address a number of issues you raise in your various comments to the various answers.. via AlarmManager to update your data for maximum reliability. Our users log in and cant be doing that everytime they get a phonecall and Android decides to kill the app. There are many iPhone and Android applications that deal with this. Usually.. are the same by definition. This means that you can see trends in environments as new ones arise and others get buried. For example there is a growing movement to try to eliminate the notion of the file . Most Web apps don't force users..

Download a file with Android, and showing the progress in a ProgressDialog

http://stackoverflow.com/questions/3028306/download-a-file-with-android-and-showing-the-progress-in-a-progressdialog

a file with Android and showing the progress in a ProgressDialog I am trying to write a simple application that gets updated. For this I need a simple function that can download a file and show the current progress in a ProgressDialog... prevent CPU from going off if the user presses the power button during download PowerManager pm PowerManager context.getSystemService Context.POWER_SERVICE PowerManager.WakeLock wl pm.newWakeLock PowerManager.PARTIAL_WAKE_LOCK getClass .getName.. context.getSystemService Context.POWER_SERVICE PowerManager.WakeLock wl pm.newWakeLock PowerManager.PARTIAL_WAKE_LOCK getClass .getName wl.acquire try InputStream input null OutputStream output null HttpURLConnection connection null try URL..

What is the simplest and most robust way to get the user's current location in Android?

http://stackoverflow.com/questions/3145089/what-is-the-simplest-and-most-robust-way-to-get-the-users-current-location-in-a

is the simplest and most robust way to get the user's current location in Android The LocationManager API in android seems like it's a bit of a pain to use for an.. approximation of the user's location. The app I'm working on isn't really a location app per se but it does need to get the user's location in order to display a list of nearby businesses. It doesn't need to worry about if the user is moving.. lifecycle. Not only that but I have to duplicate the same code in multiple activities to satisfy #2. I've tried using getBestProvider in the past to cut the solution down to just using one location provider but that seems to only give you the..

Strange out of memory issue while loading an image to a Bitmap object

http://stackoverflow.com/questions/477572/strange-out-of-memory-issue-while-loading-an-image-to-a-bitmap-object

launches a new activity. I have had to build my own tabs because of an issue with the camera layout. The activity that gets launched for result is a map. If I click on my button to launch the image preview load an image off the SD card the application.. back to the listview activity to the result handler to relaunch my new activity which is nothing more than an image widget. The image preview on the list view is being done with the cursor and ListAdapter . This makes it pretty simple but I am.. src for the image button on the fly. So I just resized the image that came off the phone camera. The issue is that I get an out of memory error when it tries to go back and re launch the 2nd activity. Is there a way I can build the list adapter..

How do I do a lazy load of images in ListView

http://stackoverflow.com/questions/541966/how-do-i-do-a-lazy-load-of-images-in-listview

of images in ListView I am using a ListView to display some images and captions associated with those images. I am getting the images from the Internet. Is there a way to lazy load the images so while the text displays the UI is not locked.. Drawable public Drawable fetchDrawable String urlString if drawableMap.containsKey urlString return drawableMap.get urlString Log.d this.getClass .getSimpleName image url urlString try InputStream is fetch urlString Drawable drawable Drawable.createFromStream.. fetchDrawable String urlString if drawableMap.containsKey urlString return drawableMap.get urlString Log.d this.getClass .getSimpleName image url urlString try InputStream is fetch urlString Drawable drawable Drawable.createFromStream is..

Android - basic gesture detection

http://stackoverflow.com/questions/937313/android-basic-gesture-detection

basic gesture detection I've been battling to get 'fling' gesture detection working on my Android application today. I've been looking at these sources Detect Gestures Tutorial.. public boolean onFling MotionEvent e1 MotionEvent e2 float velocityX float velocityY int dx int e2.getX e1.getX don't accept the fling if it's too short as it may conflict with a button push if Math.abs dx MAJOR_MOVE Math.abs.. public boolean onFling MotionEvent e1 MotionEvent e2 float velocityX float velocityY int dx int e2.getX e1.getX don't accept the fling if it's too short as it may conflict with a button push if Math.abs dx MAJOR_MOVE Math.abs velocityX..

Why retrieving Google Directions for Android using KML data is not working anymore? [duplicate]

http://stackoverflow.com/questions/11745314/why-retrieving-google-directions-for-android-using-kml-data-is-not-working-anymo

@param turn Turn instruction string. public void setInstruction final String turn this.instruction turn Get the turn instruction to reach next segment. @return a String of the turn instruction. public String getInstruction return.. Add a point to this segment. @param point GeoPoint to add. public void setPoint final GeoPoint point start point Get the starting point of this segment. @return a GeoPoint public GeoPoint startPoint return start Creates a segment which.. Segment segment new Segment try Tranform the string into a json object final JSONObject json new JSONObject result Get the route object final JSONObject jsonRoute json.getJSONArray routes .getJSONObject 0 Get the leg only one leg as we don't..

Application Skeleton to support multiple screen

http://stackoverflow.com/questions/12242111/application-skeleton-to-support-multiple-screen

because we have px's value dp px dpi 160 now putting value dp 720 320 160 dp 360. so drawable sw360dp will do the job Get you Device configuaration from GsmArena Sameway you can also create folder according to Device's Android API version i.e...

Is it possible to have multiple styles inside a TextView?

http://stackoverflow.com/questions/1529068/is-it-possible-to-have-multiple-styles-inside-a-textview

guide's Common Tasks and How to Do Them in Android includes Selecting Highlighting or Styling Portions of Text Get our EditText object. EditText vw EditText findViewById R.id.text Set the EditText's text. vw.setText Italic highlighted.. to force it to use Spannable storage so styles can be attached. Or we could specify that in the XML. Get the EditText's internal text storage Spannable str vw.getText Create our span sections and assign a format to each. str.setSpan..

Get/pick an image from Android's built-in Gallery app programmatically

http://stackoverflow.com/questions/2169649/get-pick-an-image-from-androids-built-in-gallery-app-programmatically

pick an image from Android's built in Gallery app programmatically I am trying to open an image picture in the Gallery..

Open another application from your own (intent)

http://stackoverflow.com/questions/2780102/open-another-application-from-your-own-intent

to start the application . Ok... here's what you can try out Create an intent with action MAIN and category LAUNCHER Get the PackageManager from the current context using context.getPackageManager packageManager.queryIntentActivity intent 0.. category LAUNCHER action MAIN or packageManager.resolveActivity intent 0 to get the first activity with main launcher Get the ActivityInfo you're interested in From the ActivityInfo get the packageName and name Finally create another intent with..

How to draw a path on a map using kml file?

http://stackoverflow.com/questions/3109158/how-to-draw-a-path-on-a-map-using-kml-file

false private StringBuffer buffer private NavigationDataSet navigationDataSet new NavigationDataSet Getter Setter public NavigationDataSet getParsedData navigationDataSet.getCurrentPlacemark .setCoordinates buffer.toString.. this.navigationDataSet new NavigationDataSet @Override public void endDocument throws SAXException Nothing to do Gets be called on opening tags like tag Can provide attribute s when xml was like tag attribute attributeValue @Override public.. this.in_pointtag true else if localName.equals coordinates buffer new StringBuffer this.in_coordinatestag true Gets be called on closing tags like tag @Override public void endElement String namespaceURI String localName String qName throws..

Auto Scale TextView Text to Fit within Bounds

http://stackoverflow.com/questions/5033012/auto-scale-textview-text-to-fit-within-bounds

the view does not have dimensions or there is no text if text null text.length 0 height 0 width 0 mTextSize 0 return Get the text view's paint object TextPaint textPaint getPaint Store the current text size float oldTextSize textPaint.getTextSize.. lesser of that and the default text size float targetTextSize mMaxTextSize 0 Math.min mTextSize mMaxTextSize mTextSize Get the required text height int textHeight getTextHeight text textPaint width targetTextSize Until we either fit within our..

upload video to facebook in android

http://stackoverflow.com/questions/10151708/upload-video-to-facebook-in-android

params.getString filename If found if filename null Remove from params params.remove filename if method.equals GET url url encodeUrl params Util.logd Facebook Util method URL url HttpURLConnection conn HttpURLConnection new URL url.. conn.setRequestProperty User Agent System.getProperties . getProperty http.agent FacebookAndroidSDK if method.equals GET Bundle dataparams new Bundle for String key params.keySet Object parameter params.get key if parameter instanceof byte..

J2ME/Android/BlackBerry - driving directions, route between two locations

http://stackoverflow.com/questions/2023669/j2me-android-blackberry-driving-directions-route-between-two-locations

null InputStream is null try urlConnection HttpConnection Connector.open url urlConnection.setRequestMethod GET is urlConnection.openInputStream catch IOException e e.printStackTrace return is See full code on J2MEMapRouteBlackBerryEx..

Secure HTTP Post in Android

http://stackoverflow.com/questions/2253061/secure-http-post-in-android

question I'm not sure why you can't handle HTTPS. I wrote a helper class for my own applications and I am able to GET POST to HTTPS without a problem. I will post the code here and perhaps you can see if there are differences between my code.. conn httpConn.setAllowUserInteraction false httpConn.setInstanceFollowRedirects true httpConn.setRequestMethod GET httpConn.connect response httpConn.getResponseCode if response HttpURLConnection.HTTP_OK in httpConn.getInputStream..

How to get the html-source of a page from a html link in android?

http://stackoverflow.com/questions/2423498/how-to-get-the-html-source-of-a-page-from-a-html-link-in-android

such an app html android android emulator share improve this question You can use HttpClient to perform an HTTP GET and retrieve the HTML response something like this HttpClient client new DefaultHttpClient HttpGet request new HttpGet url..

How to add parameters to a HTTP GET request in Android?

http://stackoverflow.com/questions/2959316/how-to-add-parameters-to-a-http-get-request-in-android

to add parameters to a HTTP GET request in Android I have a HTTP GET request that I am attempting to send. I tried adding the parameters to this request.. to add parameters to a HTTP GET request in Android I have a HTTP GET request that I am attempting to send. I tried adding the parameters to this request by first creating a BasicHttpParams..

How to send HTTP POST request and receive response?

http://stackoverflow.com/questions/3038409/how-to-send-http-post-request-and-receive-response

For example I need to make the following Android Client C CGP Server S conversation and get XIMSS.nonce node value C GET ximsslogin HTTP 1.1 Host myserver.com Content Type text xml Content Length 42 XIMSS listFeatures id list XIMSS S HTTP 1.1..

Android write to sd card folder

http://stackoverflow.com/questions/3551821/android-write-to-sd-card-folder

URL u new URL fileURL HttpURLConnection c HttpURLConnection u.openConnection c.setRequestMethod GET c.setDoOutput true c.connect FileOutputStream f new FileOutputStream new File root fileName InputStream in c.getInputStream..

Android draw route on a Mapview with twoo POI-s

http://stackoverflow.com/questions/4408671/android-draw-route-on-a-mapview-with-twoo-poi-s

try url new URL urlString.toString urlConnection HttpURLConnection url.openConnection urlConnection.setRequestMethod GET urlConnection.setDoOutput true urlConnection.setDoInput true urlConnection.connect DocumentBuilderFactory dbf DocumentBuilderFactory.newInstance..

creating a system overlay (always on top) button in android

http://stackoverflow.com/questions/4481226/creating-a-system-overlay-always-on-top-button-in-android

in your event handler. In your ViewGroup touch event @Override public boolean onTouchEvent MotionEvent event ATTENTION GET THE X Y OF EVENT FROM THE PARAMETER THEN CHECK IF THAT IS INSIDE YOUR DESIRED AREA Toast.makeText getContext onTouchEvent..

Connecting 2 Emulator instances In Android

http://stackoverflow.com/questions/4683854/connecting-2-emulator-instances-in-android

private Socket socket private String serverIpAddress 10.0.2.2 AND THAT'S MY DEV'T MACHINE WHERE PACKETS TO PORT 5000 GET REDIRECTED TO THE SERVER EMULATOR'S PORT 6000 private static final int REDIRECTED_SERVERPORT 5000 @Override public void..

Android: install .apk programmatically [duplicate]

http://stackoverflow.com/questions/4967669/android-install-apk-programmatically

String apkurl try URL url new URL apkurl HttpURLConnection c HttpURLConnection url.openConnection c.setRequestMethod GET c.setDoOutput true c.connect String PATH Environment.getExternalStorageDirectory download File file new File PATH file.mkdirs..

Android download binary file problems

http://stackoverflow.com/questions/576513/android-download-binary-file-problems

URL u new URL http www.path.to a.mp4 video HttpURLConnection c HttpURLConnection u.openConnection c.setRequestMethod GET c.setDoOutput true c.connect FileOutputStream f new FileOutputStream new File root Video.mp4 InputStream in c.getInputStream..

How to Consume WCF Service with Android

http://stackoverflow.com/questions/669764/how-to-consume-wcf-service-with-android

question To get started with WCF it might be easiest to just use the default SOAP format and HTTP POST rather than GET for the web service bindings. The easiest HTTP binding to get working is basicHttpBinding . Here is an example of what the.. might need to use a different binding to get better security or possibly using WCF REST to allow for logins with a GET rather than SOAP POST. Here is an example of what the HTTP POST should look like from the Java code. There is a tool called..

Code for download video from Youtube on Java, Android

http://stackoverflow.com/questions/7203047/code-for-download-video-from-youtube-on-java-android

watch v y12 1miZHLs nomobile 1 HttpURLConnection con HttpURLConnection url.openConnection con.setRequestMethod GET InputStream stream con.getInputStream InputStreamReader reader new InputStreamReader stream StringBuffer buffer new StringBuffer.. break try URL u new URL result HttpURLConnection c HttpURLConnection u.openConnection c.setRequestMethod GET c.setRequestProperty Youtubedl no compression True c.setRequestProperty User Agent YouTube c.setDoOutput true c.connect..