Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not display images on android #110

Closed
jahn-brito opened this issue Jun 4, 2020 · 3 comments
Closed

Does not display images on android #110

jahn-brito opened this issue Jun 4, 2020 · 3 comments

Comments

@jahn-brito
Copy link

Hello, when I try to select the photos they do not appear on my device. As in the image below:

Screenshot_2020-06-04-09-51-33-198_br com smartbabypais

My code:

var args = {
      'selectMode': 100, //101=picker image and video , 100=image , 102=video
      'maxSelectCount': 10 - state.photos.length, //default 40 (Optional)
      'maxSelectSize': 188743680, //188743680=180M (Optional) 
    };

MediaPicker.getMedias(args, function (medias) {
        for (var i = 0; i < medias.length; i++) {
          medias[i].quality = 50; //when the value is 100,return original image
          MediaPicker.compressImage(medias[i], function (compressData) {
            console.log("openFilePickerActivity -> compressData", compressData)
            //user compressData.path upload compress img
            console.log(compressData.path);
            var imgObj = {
              id: compressData.index,
              co90File: '',
              fileUrl: compressData.uri,
            }
            //Adiciona no array de photos para enviar
            state.photos.push(imgObj);
            state.edited = true;
            var photosCount = state.photos.length;
            refreshCount();

            if (photosCount === 10) {
              verifyLimitOfFiles();
            }
            mountDivImage();
          }, function (e) { console.log(e) });
        }
      }, function (e) { console.log(e) })

My AndroidManifest.xml

<uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-feature android:name="android.hardware.location.gps" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.DELETE_CACHE_FILES" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="com.amazon.device.messaging.permission.RECEIVE" />
    <permission android:name="br.com.smartbabypais.permission.RECEIVE_ADM_MESSAGE" android:protectionLevel="signature" />
    <uses-permission android:name="br.com.smartbabypais.permission.RECEIVE_ADM_MESSAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
@jahn-brito
Copy link
Author

I solved my problem with this change in config.xml

I change:

<preference name="android-targetSdkVersion" value="29" />

to:

<preference name="android-targetSdkVersion" value="28" />

font

@secretmoo35
Copy link

New Google Play Policy
Upload on Google Play Store, Target Sdk version 29 must be set, causing Android X to be unavailable this plugin.

Is there a way to fix it?

@Mr-Anonymous
Copy link

New Google Play Policy
Upload on Google Play Store, Target Sdk version 29 must be set, causing Android X to be unavailable this plugin.

Is there a way to fix it?

Maybe you should create a separate issue for this since this one is closed and can get lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants