Page 1 of 1

Noesis android native

Posted: 23 Jul 2022, 21:49
by Coded
Hello! I'm testing noesis and I used this integration as an example: https://github.com/Noesis/Tutorials/blo ... c/Main.cpp

I'm using android native, everything ran perfectly but there was a "blue" screen, Hellow World or things like that didn't appear, I'm using Opengl ES 3, do I need to do something specific for noesis to work on native Android c++?

Re: Noesis android native

Posted: 25 Jul 2022, 12:08
by sfernandez
If you build and install the samples included in our Native SDK, do they render as expected?

Re: Noesis android native

Posted: 26 Jul 2022, 23:17
by Coded
I put an example called "Hellow World" extension .apk and it worked, maybe my problem is where to put the Theme folder? I put it in the assets folder of android studio, maybe I need to do a different configuration?

Image

Re: Noesis android native

Posted: 27 Jul 2022, 09:33
by jsantos
You need to install a provider to get resources like the default theme. I recommend studying Integration and IntegrationGLUT examples. They are part of the SDK. All our examples comes with source code, you can also debug and analyze what we are doing.

By default, we use embedded resources, but you can install your own provider to get resources for the apk.

Re: Noesis android native

Posted: 27 Jul 2022, 22:40
by Coded
I'll try to make this "provider" as soon as I can if it works I'll let you know, thanks for your attention!

Re: Noesis android native

Posted: 28 Jul 2022, 14:19
by jsantos
Thank you, please let us know

Re: Noesis android native

Posted: 02 Aug 2022, 02:52
by Coded
well unfortunately I didn't have success, it's 100% functional on windows but on native android I'm having a crash in this "CreateTexture" function

Image

I'm using my own provider:

Noesis::Ptr<Noesis::XamlProvider> xamlProvider = *new MyXamlProvider("noesis/UI/");
Noesis::Ptr<Noesis::FontProvider> fontProvider = *new MyLocalFontProvider("noesis/UI/");
Noesis::Ptr<Noesis::TextureProvider> textureProvider = *new MyTextureProvider("noesis/UI/");

NoesisApp::SetThemeProviders(xamlProvider, fontProvider, textureProvider);

unfortunately I don't know what it could be because it seems that "CreateTexture" belongs to noesis.so and it doesn't seem to be in debug so I can see the function

Note: Works perfectly on Windows

Re: Noesis android native

Posted: 02 Aug 2022, 10:38
by jsantos
CreateTexture is part of NoesisApp. We provide source code for that library. For Android, that function is implemented in GLRenderDevice.cpp. Make sure you compile it in Debug.

Re: Noesis android native

Posted: 03 Aug 2022, 01:57
by Coded
I managed to make it work, I compiled the lib through a linux and everything worked, before I was compiling with windows, thanks!

Re: Noesis android native

Posted: 03 Aug 2022, 16:03
by jsantos
Great news! Thank you