Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Corona Cards - Android - is it possible send image from Java to Lua via CoronaEventListener and display it in Corona Card
Started by yury.r Oct 26 2018 12:06 PM

No replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

yury.r

[GLOBAL: userInfoPane.html]
yury.r
  • Observer

  • 3 posts
  • Corona SDK

Hello

On Android CoronaCard-related Lua code, images and audio files reside in android application "assets" directory 

So we can have a few of image files ( .png) or sound files (.wav) there to be used by Corona Card code. But what if we want the CoronaCard to dynamically use other images or sounds? Let's say Android App downloaded updated icon for some element to be shown in CoronaCard. How do we "send" that image to CoronaCard?

 

I know that CoronaView can send event to CoronaCard Lua side. We can probably Base64 encode image string on Android side and send it to Lua, and possibly decode that image on the CoronaCard Lua side.  But is there way to display decoded image data in CoronaCard Lua side?  Corona display.newImageRect() API takes a file path as an argument... and not image data

Any suggestions?

 

Thanks

Yury




[topic_controls]
[/topic_controls]