How create *.etd files on Mac

+1 vote
asked Jan 3, 2022 by wayikdev (200 points)

Hello,

just started with EasyAR and so far integrated well in my app, shows the camera and the Watermark, still on personal edition, but will get Profesional Edition as it works well for me.

I have no Windows PC, but need to create a *.etd from my own *.png. How can I do this, so far I have only seen reference to Windows. 

I have tried 

ImageTarget image = ImageTarget.createFromImageFile(.... and then image.save(...

but getting an error: java.lang.UnsatisfiedLinkError: No implementation found for cn.easyar.ImageTarget 

Hope that someone here can help me, that would be very great

Greetings

Dietmar

1 Answer

0 votes
answered Jan 3, 2022 by kenn (18,750 points)
What gets you a java error on Mac? Are you trying to write Java application on Mac and... Why?
commented Jan 3, 2022 by wayikdev (200 points)

Working with Android Studio. I try to read a image from Android internal storage into ImageTarget and than save it as .etd file. 

As seen in the documentation this should work:

Uri uri_path = Uri.parse("file:///android_asset/etiquetados.png");
ImageTarget img_target = ImageTarget.createFromImageFile(uri_path.toString(), StorageType.Assets, "", "", "", 1.0f);
File f=new File(path, "etiqueta.etd");
img_target.save(f.toString());

uri_path points to the png image in the asset folder, StorageType is asset, other params are empty, as suggested in documentation

But createFromImageFile produce the error: java.lang.UnsatisfiedLinkError: No implementation found for cn.easyar.ImageTarget 

Would be nice if it works with Android Studio, if not, I will maybe use ParallelsDesktop on Mac to run Windows and VisualStudio and use the Windows Sample, as suggested

Thanks for your reply

Dietmar

commented Jan 3, 2022 by kenn (18,750 points)
So the problem has nothing to do with Mac, it is an issue related to Android app distribution. Does EasyAR sample work on your Android device? If yes, changing a few lines of code there will generally not generate an UnsatisfiedLinkError.
commented Jan 3, 2022 by wayikdev (200 points)
yes, EasyAR sample works, but it is using an existing .etd file.

I will try Windows and see if I can create the .etd file from my image, as explained in the documentation.
commented Jan 3, 2022 by kenn (18,750 points)
If the sample works, and changing a few lines in the sample will trigger the error, please provide full logs, we/you need call stacks to analyze the error.

But there is still some mystery part in your usage. What is the purpose of generate .etd file on mobile device?
Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...