Android Port
Re: Android Port
Does anyone have any advice on integrating Java code within an Irrlicht app? Specifically, I'd like to, for example, hide the navigation bar *before* starting Irrlicht, so that I get the whole screen for rendering. Perhaps I could inherit from the android.app.NativeActivity class and override the needed methods (but always remember to call the original implementation) - would this not break the callbacks the Irrlicht Android device has in place?
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Re: Android Port
You can do that without problems, callbacks will work properly eg:
You can hide a status bar via AndroidManifest.xml.
Code: Select all
package com.yourcompany.yourapp;
import android.app.Activity;
import android.app.NativeActivity;
import android.os.Bundle;
import android.view.WindowManager;
public class YourApp extends NativeActivity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
static
{
try
{
System.loadLibrary("YourAppLib");
// other libs
}
catch (UnsatisfiedLinkError err)
{
System.err.println("Library failed to load.\n" + err);
}
}
}
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Android Port
Neat, thanks for the sample code
Edit: it looks like the static block for loading libs is unnecessary if you're only loading 1 lib, as the android.app.NativeAcitivy's onCreate method will take care of this for you - just don't forget to specify in AndroidManifest.xml, otherwise the onCreate method tries to load a lib called "main" which fails, unless that's what you called your "YourAppLib".
Edit: it looks like the static block for loading libs is unnecessary if you're only loading 1 lib, as the android.app.NativeAcitivy's onCreate method will take care of this for you - just don't forget to specify
Code: Select all
<meta-data android:name="android.app.lib_name" android:value="YourAppLib" />
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Re: Android Port
Hi when i run the hello world example in my phone or in the emulator i get a lot of:
In API LEVEL 10:
In API LEVEL 19:
And nothing more than a completly black screen is displayed in both cases.
In API LEVEL 10:
Code: Select all
325-333/com.irrlicht.example E/libEGL﹕ call to OpenGL ES API with no current context
Code: Select all
1566-1579/com.irrlicht.example E/libEGL﹕ eglSwapBuffers:1051 error 300d (EGL_BAD_SURFACE)
Re: Android Port
@feelthat
Please use separate threads for report bugs, proposals etc, this thread is related only to pure Android stuff in Irrlicht. I already moved your posts to dedicated topics.
Please use separate threads for report bugs, proposals etc, this thread is related only to pure Android stuff in Irrlicht. I already moved your posts to dedicated topics.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Android Port
sure ok
but where is dedicated topics board
could u paste it for me
but where is dedicated topics board
could u paste it for me
Nadro wrote:@feelthat
Please use separate threads for report bugs, proposals etc, this thread is related only to pure Android stuff in Irrlicht. I already moved your posts to dedicated topics.
Re: Android Port
@feelthat: It's here: http://irrlicht.sourceforge.net/forum/v ... =2&t=50586
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Android Port
I am developing an AR project with Vuforia on Android, and want to use irrlicht together. But I do not want to use native activity like the irrlicht android example, Cloud I call irrlicht function (written on android native side using c++) from a normal activity via JNI, and how?
Re: Android Port
If you don't want to use native activity you have to rewrite Irrlicht to use GLViewSurface (GLViewSurface will handle all events), however maybe can you use native activity and handle Vuforia via JNI? Second solution is more friendly from Irrlicht perspective, however I'm not sure if Vuforia will allow you to choose this solution (OpenGL stuff built-in Vuforia).
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes