Auto update not working for Beta version app
- Android Development
- 2 Replies
I have released an app in Beta, I enabled auto update in Google play of my device, but it is not updating automatically.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
private void launchcamera() {
Intent intent = new Intent( MediaStore.ACTION_IMAGE_CAPTURE );
startActivityForResult( intent, REQUEST_IMAGE_CAPTURE );
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
//open camera
if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == Activity.RESULT_OK) {
Bundle extras = data.getExtras();
Bitmap imageBitmap = (Bitmap) extras.get( "data" );
performcrop();
long height = imageBitmap.getHeight();
long width = imageBitmap.getWidth();
long filesizeinBytes1 = imageBitmap.getByteCount();
long fileSizeInKB1 = filesizeinBytes1 / 1024;
Log.d( TAG, "Textview message :"+ height + " , " + width + " , " + fileSizeInKB1 );
System.out.print( fileSizeInKB1 );
if (fileSizeInKB1 >= 500) {
Bitmap convertedimage = getResizedBitmap( imageBitmap, 400 );
savefile( convertedimage );
} else {
savefile( imageBitmap );
}
Intent intent = new Intent( ScancodeActivity.this, Display.class );
startActivity( intent );
}
}
private void performcrop(){
try {
Intent cropintent = new Intent( "com.android.camera.action.CROP" );
cropintent.setDataAndType( picuri, "image/*" );
cropintent.putExtra( "crop", "true" );
cropintent.putExtra( "aspectX", 1 );
cropintent.putExtra( "aspectY", 1 );
cropintent.putExtra( "outputX", 256 );
cropintent.putExtra( "outputY", 256 );
cropintent.putExtra( "returndata", true );
startActivityForResult( cropintent, PIC_CROP );
}catch(ActivityNotFoundException anfe){
String errormessage="Sorry your device doesn't support the crop action";
Toast toast= Toast.makeText( this,errormessage,Toast.LENGTH_LONG );
toast.show();
}
}
private void savefile(Bitmap image) {
File destination = new File( Environment.getExternalStorageDirectory(), "capture_01.bmp" );
picuri= Uri.fromFile( destination );
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
image.compress( Bitmap.CompressFormat.JPEG, 100, bytes );
long filesizeinBytes = image.getByteCount();
long fileSizeInKB = filesizeinBytes / 1024;
FileOutputStream fo;
try {
fo = new FileOutputStream( destination );
fo.write( bytes.toByteArray() );
fo.close();
} catch (IOException e) {
e.printStackTrace();
}
}
public class Common {
public static Location currentLocation;
}
private void BuildLocationCallBack() {
locationCallback = new LocationCallback(){
@Override
public void onLocationResult(LocationResult locationResult) {
super.onLocationResult(locationResult);
//Common.currentLocation = locationResult.getLastLocation();
Common.currentLocation = new Location(locationResult.getLastLocation());
Log.d("Location", Common.currentLocation.getLatitude()+"/"+Common.currentLocation.getLongitude());
}
};
}
Log.d("Location",
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_today, container, false);
Log.d("Location",Common.currentLocation.getLatitude()+"/"+Common.currentLocation.getLongitude()));
return view;
}
public class Common {
public static Location currentLocation;
}
private void BuildLocationCallBack() {
locationCallback = new LocationCallback(){
@Override
public void onLocationResult(LocationResult locationResult) {
super.onLocationResult(locationResult);
//Common.currentLocation = locationResult.getLastLocation();
Common.currentLocation = new Location(locationResult.getLastLocation());
Log.d("Location", Common.currentLocation.getLatitude()+"/"+Common.currentLocation.getLongitude());
}
};
}
Log.d("Location",
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_today, container, false);
Log.d("Location",Common.currentLocation.getLatitude()+"/"+Common.currentLocation.getLongitude()));
return view;
}