111
Views
6
Comments
[Image Resizer Plugin] The received resized Image is 0 bytes through using Android devices
Question
image-resizer-plugin
Mobile icon
Forge asset by Esa Saarinen

Hello,

I really appreciate this component and you who produced it.
I have a problem on our Mobile App, so could you confirm this component at using Android devices, please?

On our Mobile App, I want to resize the uploaded image file on device side, and save the resized image to database.
When using iOS device, this implementation have no problem, however Android device have some problems.

1. When I generated our Mobile App for Android devices, I got a cordova compilation error.
Like as the follows:
Error: Error compiling Cordova plugin: info/protonet/imageresizer/ImageResizer.java:16: error: package org.apache.cordova.camera does not exist.

2. I found the following discussion:
https://github.com/JoschkaSchulz/cordova-plugin-image-resizer/issues/33

3. I tried to solve a issue of the cordove reference.
As result I succeeded to generate our Mobile App by modifying the extensibility configurations of ImageResizerPlugin.

-----------------------------------------

{
    "resource" : "cordova-plugin-image-resizer-master.zip",
    "plugin": [{
        "resource": "cordova-plugin-image-resizer-master"
    },
    {
        "url": "https://github.com/apache/cordova-plugin-camera.git"
    }]
}

-----------------------------------------

4. I tried to upload and confirmed the resized image as expected, however the resized image size is 0 bytes.
The reason of this issue is that the Android device is getting false value of CheckImageResizerPlugin.IsAvailable.
So I suppose the ImageResizePlugin is not called correctly.

I feel strange that why the No.1 issue occurred.
If you know the reason, could you tell me please?
Or is there any idea as the cause?

As your refer, the condition of our implementation is the following:
 - The version of ImageResizerPlugin component is version 2.0.0
 - The version of OutSystems Platform is 10.0.904.0
 - The Android OS version is 4.4, 5.1 and 8.
 - The iOS version is 11.3.

Best regards,
Hisako Ito

2017-06-19 07-56-23
Esa Saarinen

Initially version 1.0 was validated at least with Android 7.0,  iOS10 and 11 with Outsystems 10.

 I am sorry, but I don't know about v2.0 test status.

2019-12-12 04-42-41
Hisako

Hi Esa-san,

Thank you for your quick reply.
I see, so I would like to try to confirm the behavior when using the version 2.0 of this component.
However since I suppose the modification point is only IF logic swapping between v1.0 and v2.0, I am thinking whether is there possibility that the standard cordova plugin of OutSystems or the cordova imageresizer plugin have some causes.
In any case, if I would got any new information, I will ask you again.
Thank you.

Best regards,
Hisako

2018-10-17 09-23-33
Lambok Sianturi

I run to the same problem also. Already tried several different plugin url which enable APK generation successfully but that makes the iOS version became error too. Both CheckImageResizerPlugin.IsAvailable return fase.

Anybody have a solution for image resize using OS 10 already, please.


Best regards,

Lambok Sianturi

2018-10-17 09-23-33
Lambok Sianturi

Toto wrote:

Have you try this ? https://www.outsystems.com/forge/component-overview/5546/resize-image-mobile

Unfortunately it only available for OS 11.

But a good news, I just found out how to generate without error. Instead adding the plugin url to the Image Resizer module (and recompile) I add the cordova camera plugin url to my app configuration.

And the result both in Android and iOS the resizer is working successfully.


Hope it can help who have the same problem.

My configuration: OS 10, MABS 5.0 for both iOS and Android


Best regards,

Lambok

2021-01-04 08-13-48
Toto
 
MVP

Lambok Sianturi wrote:

Toto wrote:

Have you try this ? https://www.outsystems.com/forge/component-overview/5546/resize-image-mobile

Unfortunately it only available for OS 11.

But a good news, I just found out how to generate without error. Instead adding the plugin url to the Image Resizer module (and recompile) I add the cordova camera plugin url to my app configuration.

And the result both in Android and iOS the resizer is working successfully.


Hope it can help who have the same problem.

My configuration: OS 10, MABS 5.0 for both iOS and Android


Best regards,

Lambok

Nice *thumb-up*


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.