android
Topic Author
Posts: 4
Joined: 05 Jun 2013, 10:10

Android support

11 Jun 2013, 14:47

Hello,
How i can bind between .xaml and android (eclipse)?
Is there some simple explanation or examples may be video tutorial?
Thank you.
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Android support

11 Jun 2013, 15:00

hi,

What do you mean by "bind between .xaml and eclipse"? Could you elaborate please.

Did you read the integration tutorial? With that document and the integration sample we provided for Android you should be able to render any .xaml that is included in the SDK.

Yes, we know that the integration sample for mobile platforms (ios, android) should come with more examples...
 
android
Topic Author
Posts: 4
Joined: 05 Jun 2013, 10:10

Re: Android support

11 Jun 2013, 17:09

Yes i read all tutorial and i saw the example.
When i trying to change file name from UIgl.xaml in example to UI.xaml i receiving crash.
The same story if i'm trying to add my .xaml file.
In tutorial there explanation hot to compile it with Visual Studio 2005/2008.
But how i compile it with eclipse?
 
User avatar
sfernandez
Site Admin
Posts: 1912
Joined: 22 Dec 2011, 19:20

Re: Android support

12 Jun 2013, 10:58

Hi,

As explained in tutorials (take a look at "Building an Application", section "Building Data Resources"), all xaml files must be built using BuildTool (found in $NoesisSDK/Bin/) before you can use them in your application. You have to add "--platform ANDROID" to the command line to generate resources for the correct platform.
BuildTool.exe scan --platform ANDROID
BuildTool.exe build --platform ANDROID
Built resources are placed in $NoesisSDK/Bin/Data/ organized per platform. So you have to copy all the contents of $NoesisSDK/Bin/Data/ANDROID directory to the assets directory of your Eclipse project. This way resources get packed inside the .apk file.

Any time you make a change to any of your xaml files, you have to build them, copy the Bin/Data/ resources to the assets directory and generate .apk again.
But how i compile it with eclipse?
To compile code with eclipse, you should add to the Android.mk a prebuilt shared library (assuming you have NoesisGUI-android runtime unzipped in the root directory of your eclipse project, and Android.mk inside jni directory):
include $(CLEAR_VARS)
LOCAL_MODULE := Noesis
LOCAL_SRC_FILES := ../NoesisGUI-android/Bin/libNoesis.so
LOCAL_EXPORT_C_INCLUDES := NoesisGUI-android/Include
include $(PREBUILT_SHARED_LIBRARY)
Don't hesitate to ask if you have any other question.
 
android
Topic Author
Posts: 4
Joined: 05 Jun 2013, 10:10

Re: Android support

13 Jun 2013, 14:49

I'm trying to compile ndk files with noesis,
but i'm receiving errors :
$ /cygdrive/d/android/android-ndk-r8e-windows-x86/android-ndk-r8e/ndk-build
Install : libNoesis.so => libs/armeabi/libNoesis.so
SharedLibrary : libNoesisTest.so
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot open ./obj/local/armeabi/libNoesis.so: Permission denied
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function Noesis::Core::TypeClassCreatorEmpty<Noesis::Core::Interface, Noesis::Core::NullType>::Create(Noesis::Core::TypeInfo const&):../NoesisGUI-android/Include/NsCore/TypeClassCreatorEmpty.inl:34: error: undefined reference to 'Noesis::Core::CreateTypeClass(Noesis::Core::TypeInfo const&, bool)'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function Noesis::Core::TypeClassCreatorEmpty<Noesis::Render::IGLRenderSystem, Noesis::Core::Interface>::Create(Noesis::Core::TypeInfo const&):../NoesisGUI-android/Include/NsCore/TypeClassCreatorEmpty.inl:34: error: undefined reference to 'Noesis::Core::CreateTypeClass(Noesis::Core::TypeInfo const&, bool)'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function Noesis::Core::TypeClassCreatorEmpty<Noesis::Drawing::IVGLSystem, Noesis::Core::Interface>::Create(Noesis::Core::TypeInfo const&):../NoesisGUI-android/Include/NsCore/TypeClassCreatorEmpty.inl:34: error: undefined reference to 'Noesis::Core::CreateTypeClass(Noesis::Core::TypeInfo const&, bool)'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function Noesis::Core::Interface::StaticGetClassType():../NoesisGUI-android/Include/NsCore/Interface.h:61: error: undefined reference to 'Noesis::Core::TypeCreate::Create(Noesis::Core::TypeInfo const&, Noesis::Core::Type* (*)(Noesis::Core::TypeInfo const&), void (*)(Noesis::Core::Type*))'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function Noesis::Core::TypeClassCreatorEmpty<Noesis::Render::IGLRenderSystem, Noesis::Core::Interface>::Fill(Noesis::Core::Type*):../NoesisGUI-android/Include/NsCore/TypeClassCreatorEmpty.inl:58: error: undefined reference to 'Noesis::Core::AddBase(Noesis::Core::TypeClassBuilder*, Noesis::Core::TypeClass const*)'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function Noesis::Core::TypeClassCreatorEmpty<Noesis::Drawing::IVGLSystem, Noesis::Core::Interface>::Fill(Noesis::Core::Type*):../NoesisGUI-android/Include/NsCore/TypeClassCreatorEmpty.inl:58: error: undefined reference to 'Noesis::Core::AddBase(Noesis::Core::TypeClassBuilder*, Noesis::Core::TypeClass const*)'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function Noesis::Render::IGLRenderSystem::StaticGetClassType():../NoesisGUI-android/Include/NsRender/IGLRenderSystem.h:45: error: undefined reference to 'Noesis::Core::TypeCreate::Create(Noesis::Core::TypeInfo const&, Noesis::Core::Type* (*)(Noesis::Core::TypeInfo const&), void (*)(Noesis::Core::Type*))'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function Noesis::Drawing::IVGLSystem::StaticGetClassType():../NoesisGUI-android/Include/NsDrawing/IVGLSystem.h:163: error: undefined reference to 'Noesis::Core::TypeCreate::Create(Noesis::Core::TypeInfo const&, Noesis::Core::Type* (*)(Noesis::Core::TypeInfo const&), void (*)(Noesis::Core::Type*))'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function NoesisRender(UserData*):jni/HelloTriangle.cpp:138: error: undefined reference to 'NsGetKernel()'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function NoesisRender(UserData*):jni/HelloTriangle.cpp:149: error: undefined reference to 'Noesis::Core::HighResTimer::sStartTime'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function NoesisShutdown(UserData*):jni/HelloTriangle.cpp:160: error: undefined reference to 'NsGetKernel()'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function NoesisShutdown(UserData*):jni/HelloTriangle.cpp:162: error: undefined reference to 'Noesis::Core::SetErrorHandler(void (*)(char const*, int, char const*))'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function Noesis::Core::Ptr<Noesis::Gui::UIElement> Noesis::Core::Reflection::InternalDynamicCast<Noesis::Core::Ptr<Noesis::Gui::UIElement>, Noesis::Core::BaseComponent>(Noesis::Core::Ptr<Noesis::Core::BaseComponent> const&, Noesis::Core::Int2Type<1>):../NoesisGUI-android/Include/NsCore/DynamicCastPointer.inl:79: error: undefined reference to 'Noesis::Gui::UIElement::StaticGetClassType()'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function Noesis::Core::Ptr<Noesis::Gui::UIElement> Noesis::Core::Reflection::InternalDynamicCast<Noesis::Core::Ptr<Noesis::Gui::UIElement>, Noesis::Core::BaseComponent>(Noesis::Core::Ptr<Noesis::Core::BaseComponent> const&, Noesis::Core::Int2Type<1>):../NoesisGUI-android/Include/NsCore/DynamicCastPointer.inl:91: error: undefined reference to 'Noesis::Core::TypeClass::IsDescendantOf(Noesis::Core::TypeClass const*, Noesis::Core::TypeClass::AncestorInfo const**) const'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function NoesisInit(UserData*):jni/HelloTriangle.cpp:97: error: undefined reference to 'Noesis::Core::SetErrorHandler(void (*)(char const*, int, char const*))'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function NoesisInit(UserData*):jni/HelloTriangle.cpp:99: error: undefined reference to 'NsGetKernel()'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function NoesisInit(UserData*):jni/HelloTriangle.cpp:102: error: undefined reference to 'Noesis::File::CreateAndroidFileSystem(AAssetManager*, char const*)'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function NoesisInit(UserData*):jni/HelloTriangle.cpp:103: error: undefined reference to 'Noesis::Resource::IResourceSystem::SetFileSystem(Noesis::File::IFileSystem*)'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function NoesisInit(UserData*):jni/HelloTriangle.cpp:105: error: undefined reference to 'NsConfigValue(char const*, char const*, char const*)'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function NoesisInit(UserData*):jni/HelloTriangle.cpp:109: error: undefined reference to 'Noesis::Render::IGLRenderSystem::SetContext(void*, void*)'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function NoesisInit(UserData*):jni/HelloTriangle.cpp:111: error: undefined reference to 'NsGetKernel()'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function NoesisInit(UserData*):../NoesisGUI-android/Include/NsGui/IRenderer.h:244: error: undefined reference to 'Noesis::Gui::LoadXaml(char const*)'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function NoesisInit(UserData*):../NoesisGUI-android/Include/NsCore/Ptr.inl:121: error: undefined reference to 'Noesis::Core::BaseComponent::Release() const'
D:/android/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/NoesisTest/HelloTriangle.o: in function NoesisInit(UserData*):jni/HelloTriangle.cpp:117: error: undefined reference to 'Noesis::Gui::CreateRenderer(Noesis::Gui::UIElement*)'
collect2: ld returned 1 exit status
/cygdrive/d/android/android-ndk-r8e-windows-x86/android-ndk-r8e/build/core/build-binary.mk:450: recipe for target `obj/local/armeabi/libNoesisTest.so' failed
make: *** [obj/local/armeabi/libNoesisTest.so] Error 1

What i'm doing wrong?
 
User avatar
sfernandez
Site Admin
Posts: 1912
Joined: 22 Dec 2011, 19:20

Re: Android support

13 Jun 2013, 18:32

It seems a problem with file permissions.

You can try with:
$ chmod -R 777 /cygdrive/<drive>/<path_to_your_project>
 
android
Topic Author
Posts: 4
Joined: 05 Jun 2013, 10:10

Re: Android support

16 Jun 2013, 14:21

Hello, thank u for your reply.
I wanted to ask how can i implement animated sprite, do u have same examples.
If i want to implement animated sprite only on half of the screen of the device how can i do it?
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Android support

17 Jun 2013, 17:32

Did you see the sample Gui/Sample/ImageAtlas.xaml? There you have an example with animated sprites.

What do you mean with "animated sprite only on half of the screen"? Please, show us images with the intended result you need. It is probably a problem of using the correct container.

Thanks.

Who is online

Users browsing this forum: No registered users and 0 guests