cancel
Showing results for 
Search instead for 
Did you mean: 

ImageHandling Online ODataV2

ayhamz
Explorer
0 Kudos

Hello Bill , bill.froelich

I'm trying to mock the process in ShowCaseApps->ImageHandling but every time i'm trying to create a product with an image the app crashes , and doesn't add the product , is it a bug ?


Can you also explain how are you handling this process please ? is the CreateMedia Action uploads the picture to the offline store or how is it ? what

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Are you trying to run the showcase app or create a new app that mimics the process?

CreateMedia will add an entry to a media entity in the odata service (online or offline) based on what the service is setup as. If you are using the online v2 sample service then you will not be able to create new products. However, if you are using that service offline then you will be able to create it locally but if you attempt to sync it will fail.

ayhamz
Explorer
0 Kudos

Hi Bill ,
Thank you for your reply ,
I made a new app and it's the same problem as the original app , it crashes when it wants to send the "Media" Param to (Create Media Action) and yes i'm using V2 sample oData , and i'm making it offline .

I'm new to MDK but i've been a mobile developer and as i know , when i need to create a new product with a picture i need to store this picture at the server and refer to it with a URL at the DB , in this case , i need to store the picture locally to the disk and refer to it with a URL at the oData service , but i can't see this in the showcase app , you're storing the picture immediately with a Create Media Action , so how's that working ?

best regards .

bill_froelich
Product and Topic Expert
Product and Topic Expert

OData V2 has what is known as Media Entity types where the purpose of the entity is to store the media (and associated properties). So rather than storing the image externally and referencing via a URL the media is stored in the OData entity via the CreateMedia action.

When you say you made a new app are you able to run the Showcase app as is? I just tested the Showcase app again and I am still able to create a product locally as expected. Can you provide more details about what version of MDK you are using and on what device / OS?

ayhamz
Explorer
0 Kudos

Hi Bill , Thank you for your answer and clarifying how the process works ,

The version of the MDK is 5.1.7 and the device is Xiaomi Redmi 9 / "Android 10" OS

could this problem be because of the version of MDK ?

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

I would definitely recommend upgrading your MDK version to a newer version. MDK 6.3.6 is the latest version currently available.

I am still a little unclear if you are trying to run the Showcase application as is or are using your own application. Can you please clarify?

ayhamz
Explorer
0 Kudos

I'm trying to handle the images in my application like the way you handle the images in the showcase app but the both apps crash when i try to do it , i ran my application first but it crashes when it handles the image , so i ran the showcase app as it is to see if it's that same , so they have the same issue .

But the problem is i can't upgrade my MDK Version because my application just works at this old version .

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Have you tried migrating your metadata in BAS to the latest version? What in your current app doesn't work in the newer MDK version?

Answers (0)