[Applimulator ;)] apkenv + apkenv.ui


- To call library functions that only exist in Java (getting information about the device perhaps)

 - To call functions from a third party SDK, where said SDK only exists for Java (loads of examples of this, like Scoreloop, Flurry, luckily these two specific examples can mainly be stubbed out)

 - To avoid having to write lots of native code (for example: from Java it is pretty easy to download a file and convert it to a .PNG, it would be a lot more work from C/C++ so a developer may write a 'DownloadAndConvert' Java function, which subsequently would need to be added to an apkenv module)

As it is down to each developer to choose what functions to write in Java, there isn't a simple 'one API fits all' that can be implemented into a module and make all games work. There will probably be a lot of similar things being done on the Java, but even if it is identical, the function name/parameters may well be different, so some amount of work is still required.
I understand what you're saying, but surely if the developer writes their own "DownloadAndConvert" function, that will be compiled within their app, so that's not something you need to implement. However, if that calls Java.Network.Http.Download and Java.Graphics.Bitmaps.Load (Namespaces are made up, as I don't know the libraries), then you'd only have to implement them once, and any other games that download, or load bitmaps will call the same Java functions?
So then, if they use a Java wrapper for SDL for example, well, surely that would require a module for the SDL wrapper, and that would be reusable across multiple applications that use Java/SDL

Or am I still missing something?
 
sorry for answering a bit late. have been on vacation and was just lurking using my mobile... and also was not in the mood of writing ...

Steven Craft has summed it up very well, probably better than i could've done it. going to try to explain it, though ... not from really writing any android stuff but just from what i've learned while working on apkenv.

if a developer writes their own "DownloadAndConvert" function it needs to be in the native library (very likely to be coded in c/c++), so that it is just used automagically. the native library are usually black boxes where "no" intervention can take place. if the "DownloadAndConvert" function uses anything java related, then this part needs to be implemented in the module.

the communication between the native library and the java/dalvik side is done using "JNI" (java native interface). all calls that come from the library into java can be intercepted by loading the native library "by hand" and give the library a stub implementation of the JNI that pretends to be the original JNI instance.

maybe some other example ... image files from the .apk are usually loaded using java. they're in 99% of the cases i've seen .png or .jpeg files. so i've added some methods to load and unpack the files to the apkenv core. now, even that the function for loading a png is there, it doesn't mean it can be used instantly. every game i've tried uses a different name for the function with different arguments. so the first thing is to find out: what function are they using for image loading, what arguments are they using and then what do they expect to be called in the native library again.
 
just saw that master notaz has pushed some little changes to the original apkenv repository. thats cool! and also, someone issued a pull request for a plants versus zombie module! i'll definitely put out an update of apkenv once it's merged.
 
Hey crow_riot any chance you could try to get Gridrunner for Android from the rather fluffy & excellent llamasoft working with apkenv.

Been playing it on my Nexus 7 & it's awesome retro goodness with versions of the Vic20 & C64 gridrunner thrown in for good measure :)

Tried to run it on Pandroid but it failed to work, due to rotation settings, from what I could tell.

The game is released as donationware, you get the full game complete with online leaderboards and no in app purchases required, i.e. you can download it for free and are encouraged to donate whatever you see fit, if it works on your device and you like it.
 
Dungeon Defenders?

Play it on PC and like it pretty much.

Runs slow on Pandora Android and has pretty bad controls, even with Gamepad app.

Maybe with some better controls it would be playable.

Don't know if it's possible.

Would be nice if someone could check this game.
 
Guys, please give crow_riot a break ! If you checked the article about apkenv you'll see it takes significant work to include a SINGLE new game. Let's not flood him with tons of requests. It's not like an emulator or something. 

If he wants to work on new games he already has a significant list of titles to try from everything that was proposed earlier in this thread. 
 
I don't want it now.

Only thing I'd like to now if Dungeon Defenders is likely to work or not :) .

sorry for answering a bit late. have been on vacation and was just lurking using my mobile... and also was not in the mood of writing ...
He had his break ;) .
 
@Mr_Loon: gridrunner contains a native lib, so this could be done.

@Askarus: do you have any demo download or so for dungeon defenders? you know, i only can take a look if i have the .apk :)
 

@ekianjo: notaz has done some great work that will help debugging crashes, which i wasn't able to trace before. so i'll take a look at unity again
 
Last edited by a moderator:
you could just open the .apk (rename it to zip first) and see if there's a lib/armeabi or lib/armeabi-* folder inside. then it could be done if no crashes interfere :)
 
Last edited by a moderator:
Good to know.

EDIT:

That magical folder exists  :) .
 
Last edited by a moderator:
@Mr_Loon: gridrunner contains a native lib, so this could be done.

...
Sounds promising, should work with the DPad 'out of the box' as a USB joystick under Android works fine without any need for further configuration.

The rotation settings for the game are a little unusual, in portrait mode you get the new game, in landscape mode you get the Vic 20 version, rotate 180 degrees (i.e. still in landscape mode) you get the C64 version.

No rush for this from a personal perspective, perfectly happy playing it on the Nexus 7, but it would be a good fit for Pandora in terms of gameplay & licensing model IMHO. :)
 
Hope to see this on Pandora, always enjoyed the games of Jeff Minter, but proper controls for games like Gridrunner would be great!
 
I've sent a pull request with SuperHexagon support, but it conflicts with liar's PvZ one, it's up to thp to deal with that.

Pandora will need latest firmware update (just released) to play it with proper music, as SDL_mixer had a seek bug..

crow_riot: I'll leave doing new .pnd releases to you if you don't mind, there shouldn't be too much work with that. There is also resource parser in my pull request, you might want to merge it into apkenvui to get proper app names to display.
 
thanks notaz, great as usual!

i don't mind creating the pnd. thanks for the resource parser, will definitely be integrated into apkenvui, which was actually on my TODO list. the fix for gdb is awesome, too, that definitely will bring back some energy working on unity as i finally see a trace :)
 
Can you please explain it in words a dumb person understands?

What is it useful for?
 
Last edited by a moderator:
Can you please explain it in words a dumb person understands?

What is it useful for?
gdb is a debugger, so when a crash occurs it usually shows you the callstack - i.e. the functions that were called that lead to the crash. due to the way apkenv works, without notaz' patch, gdb did not show anything useful to be able to fix the crash. but now it does :)
 
Back
Top