Monday, May 27, 2013
May 27, 2013
Bitmap to Base64 conversion
Wednesday, May 22, 2013
May 22, 2013
Android versus HTML5
Native Apps:
Integrated deep hardware integration
Supports latest hardware innovations
native look and feel.
Broader access to device hardware
Closer integration to system features
Ability to integrate with other apps
faster, smoother and more attractive.
Web Apps:
Universal coverage - mobiles
Advanced UI
Standard based
Mean by Native
Software development kit for Dalvik using java
Native development kit using c++
Renderscript using c99
Much graphics
Page turn, video gallery using renderscript.
Integrated deep hardware integration
Supports latest hardware innovations
native look and feel.
Broader access to device hardware
Closer integration to system features
Ability to integrate with other apps
faster, smoother and more attractive.
Web Apps:
Universal coverage - mobiles
Advanced UI
Standard based
Mean by Native
Software development kit for Dalvik using java
Native development kit using c++
Renderscript using c99
Much graphics
Page turn, video gallery using renderscript.
Thursday, May 2, 2013
May 02, 2013
Get Gps Coordinates in android
package com.example.gps;
import android.location.Location;
import android.location.LocationManager;
import android.location.LocationListener;
import android.os.Bundle;
import android.content.Context;
import android.widget.TextView;
import android.widget.Toast;
import android.app.Activity;
public class MainActivity extends Activity {
private Context context;
double latitude;
double longitude;
Location location;
LocationManager locationManager;
TextView tv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tv = (TextView) findViewById(R.id.textView2);
LocationManager mlocManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
LocationListener mlocListener = new MyLocationListener();
mlocManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
mlocListener);
}
/* Class My Location Listener */
public class MyLocationListener implements LocationListener {
@Override
public void onLocationChanged(Location loc) {
loc.getLatitude();
loc.getLongitude();
String Text = "Latitud = "
+ loc.getLatitude() + "Longitud = " + loc.getLongitude();
tv.setText(Text);
}
@Override
public void onProviderDisabled(String provider) {
}
@Override
public void onProviderEnabled(String provider) {
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
}
}
}
import android.location.Location;
import android.location.LocationManager;
import android.location.LocationListener;
import android.os.Bundle;
import android.content.Context;
import android.widget.TextView;
import android.widget.Toast;
import android.app.Activity;
public class MainActivity extends Activity {
private Context context;
double latitude;
double longitude;
Location location;
LocationManager locationManager;
TextView tv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tv = (TextView) findViewById(R.id.textView2);
LocationManager mlocManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
LocationListener mlocListener = new MyLocationListener();
mlocManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
mlocListener);
}
/* Class My Location Listener */
public class MyLocationListener implements LocationListener {
@Override
public void onLocationChanged(Location loc) {
loc.getLatitude();
loc.getLongitude();
String Text = "Latitud = "
+ loc.getLatitude() + "Longitud = " + loc.getLongitude();
tv.setText(Text);
}
@Override
public void onProviderDisabled(String provider) {
}
@Override
public void onProviderEnabled(String provider) {
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
}
}
}