Source Code

How can we check GPS of an Android device is enabled or not?
How can we check GPS of an Android device is enabled or not?In android, we can easily check whether GPS is enabled in device or not using LocationManager.Here is a simple program to Check.GPS Enabled or Not :- Add the below user permission line in AndroidManifest.xml to Access Locationpublic class E…[ More ]
Detect Current Location in Android Using GPS/NETWORK Provider
Detect Current Location in Android Using GPS/NETWORK ProviderUsing the Location Manager class, we can obtain periodic updates of the device's geographical locations as well as fire an intent when it enters the proximity of a certain location.1. Obtain a reference to the LocationManager class using t…[ More ]
Android Gallery ImageView
Android Gallery ImageView Now we are going to see a simple gallery example of how to use gallery look like a photo album as like in our phone. That is, when we click the item in gallery, the corresponding image will display below in full size using imageview.Create a attrs.xml file in res/values fol…[ More ]
Get list of files from FTP Server
Get list of files from FTP ServerIn this example we shall show you how to get a list of files from an FTP Server. We are using the org.apache.commons.net.ftp.FTPClient Class that encapsulates all the functionality necessary to store and retrieve files from an FTP server. To get a list of files from …[ More ]
Executing a HTTP GET Request with HttpClient
Executing a HTTP GET Request with HttpClientRetrieve the contents of a stream via a HTTP GET.raw • copyʉۢ downloadpublic static InputStream getInputStreamFromUrl(String url) {  InputStream content = null;  try {  HttpClient httpclient = new DefaultHttpClient();  HttpResponse response = httpclien…[ More ]
ow can we check GPS of an Android device is enabled or not?
ow can we check GPS of an Android device is enabled or not?In android, we can easily check whether GPS is enabled in device or not using LocationManager.Here is a simple program to Check.GPS Enabled or Not :- Add the below user permission line in AndroidManifest.xml to Access Location[ More ]
Detect Current Location in Android Using GPS/NETWORK Provider
Detect Current Location in Android Using GPS/NETWORK ProviderUsing the Location Manager class, we can obtain periodic updates of the device's geographical locations as well as fire an intent when it enters the proximity of a certain location.1. Obtain a reference to the LocationManager class using t…[ More ]
Capture Images and Crop Images using Intent (Android)
Capture Images and Crop Images using Intent (Android) Create new Android ProjectProject Name: Take picture from Camera//tested from 2.3.3 to current android sdk Build Target: Android 2.3.3  //or greater than thatApplication Name: Take_Pic_CameraPackage Name: com.shaikhhamadali.blogspot.take_pic_came…[ More ]
Android: Camera app in android example
  Android: Camera app in android example Before getting started, have a look at  this example that checks whether your Android device has camera.  Camera app in android is quite easy to develop using android camera API. It is just a few lines of code. In the following example, we will simply invoke …[ More ]
MultipartFileUploadApp
MultipartFileUploadApp * $HeadURL$ * $Revision$ * $Date$ * ==================================================================== * *  Licensed to the Apache Software Foundation (ASF) under one or more *  contributor license agreements.  See the NOTICE file distributed with *  this work for additional…[ More ]
How to check if two images are similar or not using openCV in java?
have to check if two images are similar or not in java using OpenCV, I am using OpenCV for that and using ORBHere is my main classSystem.out.println("Welcome to OpenCV "+Core.VERSION);System.loadLibrary(Core.NATIVE_LIBRARY_NAME);());System.out.println(System.getProperty("user.dir"));File f1…[ More ]
Implement image comparison using openCV in android [closed]
Implement image comparison using openCV in android [closed]privateBaseLoaderCallback  mLoaderCallback =newBaseLoaderCallback(this)I have added these codeFeatureDetector detector =FeatureDetector.create(FeatureDetector.ORB);
  DescriptorExtractor descriptor =DescriptorExtractor.…[ More ]
HttpPostExample.java File
HttpPostExample.Java Filepublic class HttpPostExample extends Activity {TextView content;EditText fname, email, login, pass;String Name, Email, Login, Pass;/** Called when the activity is first created. */@Overridepublic void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);se…[ More ]
HttpGetAndroidExample.java File
HttpGetAndroidExample.java File   public class HttpGetAndroidExample extends Activity {                 TextView content;                 EditText fname,email,login,pass;             @Override             protected void onCreate(Bundle savedInstanceState) {                       supe…[ More ]
Use MVC Pattern To Create Very Basic Shopping Cart - Android Example
Use MVC Pattern To Create Very Basic Shopping Cart - Android ExampleSimulator ScreenshotsAndroid Example Screenshot 4Login to download source code. Related ExamplesGlobal_Variable_Or_Application_Context_Variable_-_Android_Example    Global Variable Or Application Context Variable - Android ExampleIn…[ More ]
Android HTTP Client: GET, POST, Download, Upload, Multipart Request
Android HTTP Client: GET, POST, Download, Upload, Multipart RequestHTTP ConnectionPost RequestDownload DataUpload DataMultipart RequestOften Android apps have to exchange information with a remote server. The easiest way is to use the HTTP protocol as base to transfer information. There are several …[ More ]
HTTP Connection with Handler
23.1 HTTP Connection with HandlerIn this example, we download an image and text from the web.Let's preview the whole Java code first, HttpURLConncecitonA.java:package com.bogotobogo.httpconnecta;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader;import java.net.Ht…[ More ]