Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
8
Erster Beitrag:
vor 5 Monaten, 2 Wochen
Letzter Beitrag:
vor 5 Monaten, 2 Wochen
Beteiligte Autoren:
asterd, popoy, Arie, Ruben Sanchez Peña, ccc2

WM: access bundled images from native code

Startbeitrag von asterd am 28.02.2017 15:35

Hi all,

someone knows how to add bundled images from native objC or java code?
I need to setup custom markers icons inside Map Control but, for other situation, i need to add the markers from native code. Actually, i've created markers with different colours, but i want to set different images, that i can get from the apk/ipa bundle.
Someone can help me on this?

Thank you!

Antworten:

Hi,

I not sure if this what you want.

in WM21 - android.

add images in generate android application (integrating files).

you can access the image using the images filename.

i create constant to store the image filename
CONSTANT
C_IMG_NoImage = "NoImage_64.png"
END

you can display the image on image control

IMG1..Value = C_IMG_NoImage

von ccc2 - am 01.03.2017 12:35
Thanks for your answer, but is not what i need.
I need to access the image from (for example in android) java code. Example.

I have image bundled in apk with name "Image.png"

if i wrote a native java code, how can i refer this image?

public static void nJava_AddMarkerTip() {
// how can i get the image here?
}

same thing in Objective-C for IOS..

von asterd - am 01.03.2017 13:54
Hi. You can use fResourceDir to access to graphics included in the Android or IOS app. It access in only read mode to files you include in app.

Rubén

von Ruben Sanchez Peña - am 01.03.2017 16:09
Look lst 85 Android Appbox

von popoy - am 01.03.2017 18:14
Look Lst 89 Android trace sur carte

von popoy - am 01.03.2017 18:30
fExtractResource() is your friend, see the help for all details

von Arie - am 01.03.2017 19:02
That you very much guys, i'll look at all' your suggestions as soon as possible! Thanks for the supporto!

von asterd - am 01.03.2017 21:03
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.