maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   ApkEnv support module development (https://talk.maemo.org/showthread.php?t=88250)

Art-O 2012-12-13 20:59

ApkEnv support module development
 
2 Attachment(s)
Hello all devs (and non devs).

I started this ApkEnv support module development thread so that maybe we get more devs working on this.

Original thread: http://talk.maemo.org/showthread.php?t=87496
Web page: http://thp.io/2012/apkenv/

This is what I have learned from studying ApkEnv sources, please correct me if I am wrong.

First little about ApkEnv and these support modules, what are they and why are they needed.

ApkEnv is not Java VM so it can't run programs that are made completely with Java JDK.

Some programs however are made with NDK that allows programmers to develop programs with C language but even these programs need small java code that handles all Android related stuff for example OpenGL, touch screen, network and audio related code.

ApkEnv can run this native C code but it can't run this small Java program what handles all important stuff. This is where support modules come into play.

APKs are basically zip files and Java code that needs to be ported to these modules is inside classes.dex file.
Here is pretty good info how to read this file:
http://stackoverflow.com/questions/1...ava-sourcecode

I have written modules for Angry Birds Space and Fruit Ninja (attached) which both lack sound support and I hope somebody could help with these].

I would like to remind people before they start spamming "[insert APK here] doesn't work" that if there is no support module for APK file it probably doesn't work.

PS. If you want to find out if APK is made with NDK then check if it contains lib/armeabi folder. If folder exists then there is hope that it can be run under ApkEnv and proper module.

Edit: Both Angry Birds and Fruit Ninja got sound support now! (attachments updated) Thanks to thp for support.

From now on I upload my modules to https://github.com/Art-O/apkenv and make pull request to thp git when I think they are ready :)

Next I start working on my favourite Android & desktop game World of Goo (that one seems much more challenging than AB or FN) :D


Art-O

xvan 2012-12-14 04:22

Re: ApkEnv support module development
 
mmm... let me get this stright...

The modules work the same as the dead "iced-robot" project, on top of the jvm?
Or the modules reimplement small Dalvik pices?

Could you explain how this modules work?

Art-O 2012-12-14 15:05

Re: ApkEnv support module development
 
Quote:

Originally Posted by xvan (Post 1304343)
The modules work the same as the dead "iced-robot" project, on top of the jvm?
Or the modules reimplement small Dalvik pices?

Modules reimplement Dalvik (java) code.

One thing that I should point out is that we don't have to implement every function inside classes.dex file. Only basic functions like Init, input, file access and OpenGL update methods.

For example Angry Birds Space input function is declared inside classes.dex file:
Code:

public native void nativeInput(int paramInt1, float paramFloat1, float paramFloat2, int paramInt2);
This translates to C module (JNIEnv and jobject needs to be there every time):
Code:

typedef void (*angrybirds_input_t)(JNIEnv *env, jobject obj, jint paramInt1, jfloat paramFloat1, jfloat paramFloat2, jint paramInt2) SOFTFP;

self->priv->native_input = (angrybirds_input_t)LOOKUP_M("MyRenderer_nativeInput");

That "MyRenderer_nativeInput" is what apkenv reports as "Not supported yet, but found JNI methods: [something]_MyRenderer_nativeInput"

ApkEnv handles Harmattan/Fremantle screen input but it needs modules to pass this information correctly to native APK.
Code in module:
Code:

static void
angrybirds_input(struct SupportModule *self, int event, int x, int y, int finger)
{
    self->priv->native_input(ENV_M, GLOBAL_M, event, x, y, finger);
}

I also like to point out that this is first time I have ever developed anything in C (I really think that I should have started with Hello World examples instead of this) so there might be lots of errors in my code.
This is also why I need help to develop sound support for AB and Fruit Ninja.


Art-O

evujumenuk 2012-12-14 15:51

Re: ApkEnv support module development
 
Does that mean that apkenv isn't a compatibility layer, but a framework that doesn't completely obviate the need for porting, even if it does, like, 90% of it?

Art-O 2012-12-14 16:11

Re: ApkEnv support module development
 
Quote:

Originally Posted by evujumenuk (Post 1304520)
Does that mean that apkenv isn't a compatibility layer, but a framework that doesn't completely obviate the need for porting, even if it does, like, 90% of it?

I think this is correct as we need to port custom Java functions of every APK into modules in order to get then working.

One thing I should add is that ApkEnv natively sets up OpenGL viewport(?) for modules and this means that we can only run OpenGL based games with ApkEnv. For this reason Android UI applications that don't use OpenGL cannot be run inside ApkEnv.
I am not sure if it is possible to make fork of ApkEnv that would support UI elements.


Art-O

myname24 2012-12-14 17:39

Re: ApkEnv support module development
 
thanks work as expected . but for newer version it say missing dependencies (same as original apkenv )

B-RUNO 2012-12-14 18:10

Re: ApkEnv support module development
 
Sorry Art-O but doesnt the wrapper-generator extract all the infomation required to build the modules? Sorry if I'm wrong or if I didnt understand the whole point of the thead.

Art-O 2012-12-14 19:31

Re: ApkEnv support module development
 
Quote:

Originally Posted by myname24 (Post 1304583)
thanks work as expected . but for newer version it say missing dependencies (same as original apkenv )

What version of Angry Birds Space are you trying to run and are you using apkenv from git?

Quote:

Originally Posted by B-RUNO (Post 1304602)
Sorry Art-O but doesnt the wrapper-generator extract all the infomation required to build the modules? Sorry if I'm wrong or if I didnt understand the whole point of the thead.

I think that wrapper-generator is only used to make wrappers for
Android built in libraries (libc, gles, pthread etc. check apkenv source/compat directory) and it has nothing to do with modules.

myname24 2012-12-14 19:51

Re: ApkEnv support module development
 
angry birds 3.0 and angry birds seasons 3.1 and yes the new source version from git .

Art-O 2012-12-14 20:09

Re: ApkEnv support module development
 
Quote:

Originally Posted by myname24 (Post 1304626)
angry birds 3.0 and angry birds seasons 3.1 and yes the new source version from git .

I have Angry Birds Space version 1.2.3 so this probably doesn't work with any other versions.

But suprisingly it seems to work with Amazing Alex (i don't remember version)

myname24 2012-12-14 21:20

Re: ApkEnv support module development
 
Quote:

Originally Posted by Art-O (Post 1304634)
I have Angry Birds Space version 1.2.3 so this probably doesn't work with any other versions.

But suprisingly it seems to work with Amazing Alex (i don't remember version)

previous version of angry birds /seasons/space work great . only the new ones and star wars .

B-RUNO 2012-12-14 21:42

Re: ApkEnv support module development
 
2 Attachment(s)
Quote:

Originally Posted by Art-O (Post 1304622)
I think that wrapper-generator is only used to make wrappers for
Android built in libraries (libc, gles, pthread etc. check apkenv source/compat directory) and it has nothing to do with modules.

Thanks Art-O your modules are working here, as you mentioned its missing sound but here follows the screenshot for The Amazing Alex running on the N900.

Art-O may ask how do you compile your modules if is not to much to ask :D.

Thanks for your contribution.
Regards

Art-O 2012-12-15 12:53

Re: ApkEnv support module development
 
Quote:

Originally Posted by B-RUNO (Post 1304652)
Art-O may ask how do you compile your modules if is not to much to ask :D.

Just drop [modulename].c into apkenv sources / modules folder and they get compiled with apkenv.

Quote:

Originally Posted by myname24 (Post 1304647)
previous version of angry birds /seasons/space work great . only the new ones and star wars .

New games use GLES2 so one needs to compile apkenv with:
GLES=2 make

But even when compiled with this they currently doesn't work and just SigFault when native_init is called. Does anyone have any ideas why this happens?

thp 2012-12-15 13:15

Re: ApkEnv support module development
 
Quote:

Originally Posted by Art-O (Post 1304295)
I started this ApkEnv support module development thread so that maybe we get more devs working on this.

Nice work there! :) Glad that somebody finally created a working module ;)

Quote:

Originally Posted by Art-O (Post 1304295)
which both lack sound support and I hope somebody could help with these.

Have a look at the nativeMixData function - all JNI methods take an JNIEnv * as their first method, the second one is the object on which the function is called (for our purposes, this is mostly "any" object - I usually pass a pointer to the global object there, but any random pointer should work). The third parameter is a long that you can use to pass an application-specific pointer. The fourth is a pointer to the buffer which is filled with audio data, and the fifth is the length of that buffer.

SDL has audio output built-in: SDL_OpenAudio() with the right parameters. At some point each game might open an AudioOutput and request a specific format (sample rate, channels, bitrate, buffer size, etc..). The SDL_AudioSpec "callback" then is a simple callback function that will be called by SDL and that should probably call some "native (audio) mixing data" function to fill the buffer.

Would be great if you could submit your modules as pull request to apkenv on Github :)

Art-O 2012-12-19 20:46

Re: ApkEnv support module development
 
Quote:

Originally Posted by thp (Post 1304800)
Have a look at the nativeMixData function - all JNI methods take an JNIEnv * as their first method, the second one is the object on which the function is called (for our purposes, this is mostly "any" object - I usually pass a pointer to the global object there, but any random pointer should work). The third parameter is a long that you can use to pass an application-specific pointer. The fourth is a pointer to the buffer which is filled with audio data, and the fifth is the length of that buffer.

Would be great if you could submit your modules as pull request to apkenv on Github :)

Hi, and thanks again for providing apkenv for us.

I have tryed to study this sound output for angry birds but I can't seem to figure out how to get it working. Thus far my code is this:

Typedef for nativeMixData:
Code:

typedef void (*angrybirds_mixdata_t)(JNIEnv *env, jobject obj, jlong paramLong, jbyteArray paramArrayOfByte, jint paramInt) SOFTFP;
Start audio output when CallVoidMethodV(startOutput) calls:
Code:

        /* Open the audio device */
        SDL_AudioSpec *desired, *obtained;

        desired = malloc(sizeof(SDL_AudioSpec));
        obtained = malloc(sizeof(SDL_AudioSpec));
        desired->freq=44100;
        desired->format=AUDIO_S16SYS;
        desired->channels=2;
        desired->samples=8192;
        desired->callback=my_audio_callback;
        desired->userdata=p0;

        if( SDL_InitSubSystem(SDL_INIT_AUDIO) < 0 )
            exit(-1);

        if ( SDL_OpenAudio(desired, obtained) < 0 )
            exit(-1);
       
        free(desired);
        SDL_PauseAudio(0);

I can see that this works as my_audio_callback function calls for more data:
Code:

void my_audio_callback(void *ud, Uint8 *stream, int len)
{
    printf("call mixdata (%i)\n",len);
    jlong tmplong = 0;
    jbyte* buffer = calloc(len,1);
    angrybirds_priv.native_mixdata(ENV(global), VM(global), (jlong)&tmplong, buffer, len);
    memcpy(stream,buffer,len);
    free(buffer);
}

But buffer seems to be completely empty (no audio data returned). Is that application-specific pointer important and is audio format correct or is problem with something else here?

PS. I do that pull request if I ever get this audio stuff working :)

thp 2012-12-20 11:12

Re: ApkEnv support module development
 
Quote:

Originally Posted by Art-O (Post 1306175)
But buffer seems to be completely empty (no audio data returned). Is that application-specific pointer important and is audio format correct or is problem with something else here?

When the AudioOutput gets created (NewObjectV), it gives you a long handle, the sample rate int, the number of channels int, the bitrate int and the buffer size int in the variable argument list. You need to use these, and especially pass the handle that you get as first parameter to the mixing function as third parameter. Also, there's no need to calloc/memcpy/free the buffer, you can directly provide the stream pointer to the mixing function.

Art-O 2012-12-20 18:42

Re: ApkEnv support module development
 
Quote:

Originally Posted by thp (Post 1306313)
When the AudioOutput gets created (NewObjectV), it gives you a long handle, the sample rate int, the number of channels int, the bitrate int and the buffer size int in the variable argument list. You need to use these, and especially pass the handle that you get as first parameter to the mixing function as third parameter. Also, there's no need to calloc/memcpy/free the buffer, you can directly provide the stream pointer to the mixing function.

Thanks for help, I finally got it working :D

I started new fork at https://github.com/Art-O/apkenv and made that pull request for this one.

Also updated attachment on front page.

Next stop Fruit Ninja audio ;)

B-RUNO 2012-12-20 20:43

Re: ApkEnv support module development
 
Quote:

Originally Posted by Art-O (Post 1306435)
Thanks for help, I finally got it working :D

I started new fork at https://github.com/Art-O/apkenv and made that pull request for this one.

Also updated attachment on front page.

Next stop Fruit Ninja audio ;)

Cheers Art-O you rock my friend the latest module work perfectly.
Appreciate regards

B-RUNO 2012-12-21 21:38

Re: ApkEnv support module development
 
1 Attachment(s)
Hey Art-O how do you locate the Init input and the OpenGL update methods on the decompiled apk.
Here is the screenshot of my decompiled apk.

Art-O 2012-12-21 23:52

Re: ApkEnv support module development
 
Quote:

Originally Posted by B-RUNO (Post 1306707)
Hey Art-O how do you locate the Init input and the OpenGL update methods on the decompiled apk.

When you start apkenv without proper module it reports needed methods for example angry birds:
Code:

Not supported yet, but found JNI methods:
    Java_com_rovio_ka3d_MyRenderer_nativeGetPossibleOrientations
    Java_com_rovio_ka3d_MyRenderer_nativePause
    Java_com_rovio_ka3d_MyRenderer_nativeResume
    JNI_OnLoad
    Java_com_rovio_ka3d_MyRenderer_nativeResize
    Java_com_rovio_ka3d_MyRenderer_nativeKeyInput
    Java_com_rovio_ka3d_MyRenderer_nativeInput
    Java_com_rovio_ka3d_MyRenderer_nativeUpdate
    ...

So just browse that treeview to com/rovio/ka3d/MyRenderer and there you can find all needed code written in java. Look for functions that start with "public native ..."

coderus 2012-12-22 15:47

Re: ApkEnv support module development
 
compiled, copied but still printing Not supported yet and exited.
what can be wrong?

coderus 2012-12-22 16:12

Re: ApkEnv support module development
 
Code:

Not supported yet, but found JNI methods:
    Java_com_rovio_ka3d_MyRenderer_nativePause
    Java_com_rovio_ka3d_MyRenderer_nativeResume
    Java_com_rovio_ka3d_MyRenderer_nativeKeyInput
    Java_com_rovio_ka3d_MyRenderer_nativeInput
    Java_com_rovio_ka3d_MyRenderer_nativeResize
    Java_com_rovio_ka3d_MyRenderer_nativeUpdate
    Java_com_rovio_ka3d_MyRenderer_nativeDeinit
    Java_com_rovio_ka3d_MyRenderer_nativeInit
    Java_com_rovio_angrybirds_ExpandableAdWrapper_onExpandableAdWasHidden
    Java_com_rovio_angrybirds_ExpandableAdWrapper_onExpandableAdWillExpand
    Java_com_rovio_angrybirds_ExpandableAdWrapper_onExpandableAdRequestFailed
    Java_com_rovio_angrybirds_ExpandableAdWrapper_onExpandableAdReady
    Java_com_rovio_angrybirds_InterstitialAdWrapper_onInterstitialAdRequestCompleted
    Java_com_rovio_angrybirds_BannerAdWrapper_onBannerAdRequestCompleted
    Java_com_rovio_angrybirds_BannerAdWrapper_onBannerAdWasHidden
    Java_com_rovio_ka3d_AudioOutput_nativeMixData
    Java_com_rovio_ka3d_BokuPaymentProviderHandler_initFinished
    Java_com_rovio_ka3d_FortumoPaymentProviderHandler_initFinished
    Java_com_rovio_ka3d_BokuPaymentWrapper_paymentFinished
    Java_com_rovio_ka3d_FortumoPaymentWrapper_paymentFinished
    Java_com_rovio_ka3d_WebViewWrapper_urlLoadedCallback
    Java_com_rovio_ka3d_WebViewWrapper_callLuaFunction
    Java_com_rovio_ka3d_WebViewWrapper_linkClickedCallback


Art-O 2012-12-22 17:12

Re: ApkEnv support module development
 
Quote:

Originally Posted by coderus (Post 1306868)
compiled, copied but still printing Not supported yet and exited.
what can be wrong?

Hmm, you seem to have slightly diffrent version that I have. Try removing couple of lines from module source:

Code:

static int
angrybirds_try_init(struct SupportModule *self)
{
    self->priv->JNI_OnLoad = (jni_onload_t)LOOKUP_M("JNI_OnLoad");
    self->priv->native_init = (angrybirds_init_t)LOOKUP_M("ka3d_MyRenderer_nativeInit");
    self->priv->native_resize = (angrybirds_resize_t)LOOKUP_M("ka3d_MyRenderer_nativeResize");
    self->priv->native_input = (angrybirds_input_t)LOOKUP_M("ka3d_MyRenderer_nativeInput");
    self->priv->native_update = (angrybirds_update_t)LOOKUP_M("ka3d_MyRenderer_nativeUpdate");
    self->priv->native_pause = (angrybirds_pause_t)LOOKUP_M("ka3d_MyRenderer_nativePause");
    self->priv->native_resume = (angrybirds_resume_t)LOOKUP_M("ka3d_MyRenderer_nativeResume");
    self->priv->native_gpo = (angrybirds_gpo_t)LOOKUP_M("ka3d_MyRenderer_nativeGetPossibleOrientations");
    self->priv->native_loadfromurl = (angrybirds_loadfromurl_t)LOOKUP_M("ka3d_MyRenderer_nativeLoadFromUrl");
    self->priv->native_mixdata = (angrybirds_mixdata_t)LOOKUP_M("ka3d_AudioOutput_nativeMixData");
    self->priv->native_deinit = (angrybirds_deinit_t)LOOKUP_M("ka3d_MyRenderer_nativeDeinit");

    /* Overrides for JNIEnv_ */
    self->override_env.CallObjectMethodV = JNIEnv_CallObjectMethodV;
    self->override_env.DeleteLocalRef = JNIEnv_DeleteLocalRef;
    self->override_env.CallVoidMethodV = JNIEnv_CallVoidMethodV;
    self->override_env.NewObjectV = JNIEnv_NewObjectV;

    return (self->priv->JNI_OnLoad != NULL &&
            self->priv->native_init != NULL &&
            self->priv->native_resize != NULL &&
            self->priv->native_input != NULL &&
            self->priv->native_update != NULL &&
            self->priv->native_pause != NULL &&
            self->priv->native_resume != NULL &&
            self->priv->native_gpo != NULL &&
            self->priv->native_loadfromurl != NULL &&
            self->priv->native_mixdata != NULL &&
            self->priv->native_deinit != NULL);
}

static void
angrybirds_init(struct SupportModule *self, int width, int height, const char *home)
{
    MODULE_DEBUG_PRINTF("Module: Init(%i,%i,%s)\n",width,height,home);

    self->priv->myHome = strdup(home);
    global = GLOBAL_M;
    self->priv->JNI_OnLoad(VM_M, NULL);
    self->priv->native_init(ENV_M, GLOBAL_M, width, height, GLOBAL_M->env->NewStringUTF(ENV_M, home));
}


coderus 2012-12-22 17:38

Re: ApkEnv support module development
 
okay. almost same:
Code:

[shlib] Found symbol: Java_com_rovio_ka3d_MyRenderer_nativeInit
[shlib] Found symbol: Java_com_rovio_ka3d_MyRenderer_nativeResize
[shlib] Found symbol: Java_com_rovio_ka3d_MyRenderer_nativeInput
[shlib] Found symbol: Java_com_rovio_ka3d_MyRenderer_nativeUpdate
[shlib] Found symbol: Java_com_rovio_ka3d_MyRenderer_nativePause
[shlib] Found symbol: Java_com_rovio_ka3d_MyRenderer_nativeResume
[shlib] Found symbol: Java_com_rovio_ka3d_AudioOutput_nativeMixData
[shlib] Found symbol: Java_com_rovio_ka3d_MyRenderer_nativeDeinit
[shlib] Found symbol: Java_com_rovio_ka3d_MyRenderer_nativeInit
[shlib] Found symbol: Java_com_rovio_ka3d_MyRenderer_nativeResize
Not supported yet, but found JNI methods:
    Java_com_rovio_ka3d_MyRenderer_nativePause
    Java_com_rovio_ka3d_MyRenderer_nativeResume
    Java_com_rovio_ka3d_MyRenderer_nativeKeyInput
    Java_com_rovio_ka3d_MyRenderer_nativeInput
    Java_com_rovio_ka3d_MyRenderer_nativeResize
    Java_com_rovio_ka3d_MyRenderer_nativeUpdate
    Java_com_rovio_ka3d_MyRenderer_nativeDeinit
    Java_com_rovio_ka3d_MyRenderer_nativeInit
    Java_com_rovio_angrybirds_ExpandableAdWrapper_onExpandableAdWasHidden
    Java_com_rovio_angrybirds_ExpandableAdWrapper_onExpandableAdWillExpand
    Java_com_rovio_angrybirds_ExpandableAdWrapper_onExpandableAdRequestFailed
    Java_com_rovio_angrybirds_ExpandableAdWrapper_onExpandableAdReady
    Java_com_rovio_angrybirds_InterstitialAdWrapper_onInterstitialAdRequestCompleted
    Java_com_rovio_angrybirds_BannerAdWrapper_onBannerAdRequestCompleted
    Java_com_rovio_angrybirds_BannerAdWrapper_onBannerAdWasHidden
    Java_com_rovio_ka3d_AudioOutput_nativeMixData
    Java_com_rovio_ka3d_BokuPaymentProviderHandler_initFinished
    Java_com_rovio_ka3d_FortumoPaymentProviderHandler_initFinished
    Java_com_rovio_ka3d_BokuPaymentWrapper_paymentFinished
    Java_com_rovio_ka3d_FortumoPaymentWrapper_paymentFinished
    Java_com_rovio_ka3d_WebViewWrapper_urlLoadedCallback
    Java_com_rovio_ka3d_WebViewWrapper_callLuaFunction
    Java_com_rovio_ka3d_WebViewWrapper_linkClickedCallback


Art-O 2012-12-22 17:59

Re: ApkEnv support module development
 
Quote:

Originally Posted by coderus (Post 1306889)
okay. almost same:

I just noticed that your version doesn't have that nativeGetPossibleOrientations method either. Olso remove lines:
Code:

self->priv->native_gpo = (angrybirds_gpo_t)LOOKUP_M("ka3d_MyRenderer_nativeGetPossibleOrientations");

self->priv->native_gpo != NULL &&

Edit and also:
Code:

self->priv->native_loadfromurl = (angrybirds_loadfromurl_t)LOOKUP_M("ka3d_MyRenderer_nativeLoadFromUrl");

self->priv->native_loadfromurl != NULL &&


coderus 2012-12-22 18:05

Re: ApkEnv support module development
 
Working now, thanks :)

coderus 2012-12-22 18:20

Re: ApkEnv support module development
 
can i place this module as second? will them work both for diffferent versions?

Art-O 2012-12-22 18:26

Re: ApkEnv support module development
 
I am not sure.. But those removed lines are not needed for my version either. They are basically just left over methods when I started working on this module and they were never needed. I will post updated version to git and front page where these methods are removed.

B-RUNO 2012-12-22 18:47

Re: ApkEnv support module development
 
Quote:

Originally Posted by Art-O (Post 1306906)
I am not sure.. But those removed lines are not needed for my version either. They are basically just left over methods when I started working on this module and they were never needed. I will post updated version to git and front page where these methods are removed.

Hey Art-O i noticed that you updated the fruitninja module, I've tried the new one but there is no sound, sorry if I'm the only one with the problem anyone?

By the way thanks for sharing once again.
Bruno

Art-O 2012-12-22 19:07

Re: ApkEnv support module development
 
I really don't know why sound won't work for you. Perhaps something needs to be coded differently in N900. I don't have one so I can't test that.
Intresting question would be that does sound work for anyone else but me?

disappear 2012-12-22 19:32

Re: ApkEnv support module development
 
Hi Art-O if you have a time could you try to run that file
http://dox.bg/files/dw?a=80af969fc0
regards
edit:
I did't notes this before
Quote:

Orginally posted by Art-0
I don't have one so I can't test that.
sorry for question man

coderus 2012-12-23 04:21

Re: ApkEnv support module development
 
i have fruitninja sound.

also a question to @thp: can you force media volume to be changed when apkenv launched?

coderus 2012-12-23 05:30

Re: ApkEnv support module development
 
also to @thp and @Art-0:
where to get init and try_init? i cant understand java classes yet :)

B-RUNO 2012-12-23 09:38

Re: ApkEnv support module development
 
Quote:

Originally Posted by coderus (Post 1306971)
i have fruitninja sound

Hey coderus just for a matter of fact do you have a N900 or N9?
Regards
Bruno

coderus 2012-12-23 09:48

Re: ApkEnv support module development
 
N9 of course :)

thp 2012-12-23 10:12

Re: ApkEnv support module development
 
Quote:

Originally Posted by coderus (Post 1306971)
can you force media volume to be changed when apkenv launched?

You mean that the +/- buttons are used for volume control? Should be possible by setting a resource application class. Patches welcome.

Quote:

Originally Posted by coderus (Post 1306977)
where to get init and try_init?

try_init in apkenv means "try to see if you can handle this apk", which usually means looking if the library provides the necessary symbols. init is then called when the module has been chosen as the one to use (both are used in apkenv.c). While try_init does not get any additional parameters apart from the module itself (and should not do/allocate anything, as it will be called in all modules in order of priority until a working one is found), init already gets the screen size (width, height) and data directory where to store files.

Art-O 2012-12-23 10:44

Re: ApkEnv support module development
 
Quote:

Originally Posted by B-RUNO (Post 1306909)
Hey Art-O i noticed that you updated the fruitninja module, I've tried the new one but there is no sound, sorry if I'm the only one with the problem anyone?

Fruit Ninja uses ogg files for sound and it seems that N900 offical libsdl-mixer lacks support for these: http://talk.maemo.org/archive/index.php/t-81792.html.

But there seems to be libsdl-mixer1.2 version 1.2.6-5+0m5+ogg+mp3 in extras(?) repository. Can you get this version installed and test fruit ninja with that?

biketool 2012-12-23 11:33

Re: ApkEnv support module development
 
Probably been covered before, why won't the linux android/dalvik dev environemtn compile for Maemo5? Or is it too much a resource hog?

Kozzi 2012-12-23 11:36

Re: ApkEnv support module development
 
Is it possible to have binary file for n9 with added suport for those modules?

coderus 2012-12-23 12:34

Re: ApkEnv support module development
 
@thp, thanks, i understang that.
but where to get functions to put inside init? AB anf FN calling native_init but FN also calling native_initfilemanager and native_setapplicensed. i'm checking World Of Goo and it have no any "init" function inside classes.

i cant find any functions getting args: width, height, apk path.


All times are GMT. The time now is 22:23.

vBulletin® Version 3.8.8