Upload Google Maps capture to MySQL with PHP

0

I am trying to upload a Google Maps capture that I made from Android Studio , but when sending the capture to the server the image arrives empty and I do not know why.

Code:

public void captureScreen() {
    SnapshotReadyCallback callback = new SnapshotReadyCallback() {
            @Override
            public void onSnapshotReady(Bitmap snapshot) {
                // TODO Auto-generated method stub
                 Bitmap bitmap = snapshot;
            }
        };
        mMap.snapshot(callback);
    }

Obtengo mi captura y me funciona, pero al codificarla y enviarla no me funciona

{
        String imagen;
        ByteArrayOutputStream array = new ByteArrayOutputStream();
        bitmap.compress(Bitmap.CompressFormat.JPEG, 100, array);
        byte[] imageByte = array.toByteArray();
        imagen = Base64.encodeToString(imageByte, Base64.DEFAULT);
        Log.d("imagen",imagen);
        webservice(imagen);
    }

The code PHP is working because I've done, tests with other images.

Thanks for your reply.

    
asked by alejo cuervo 20.10.2018 в 01:23
source

0 answers