Cuberite Forum
Android tests - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: Android tests (/thread-530.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24


RE: Android tests - NiLSPACE - 08-19-2012

the app doesn't restart. its just that it cleans the log on screen.


RE: Android tests - Lapayo - 08-19-2012

On my phone the debuglog doesn´t work O.o (Huawei Honor)
There is no output. After killing the process, because I thought it crashed I saw in the log file that the chunk generation was running. (Glorious 1.2 Chunks / SecondBig Grin)


RE: Android tests - xoft - 08-19-2012

It seems we'll need a proper callback mechanism into Java, so that:
1, we don't require the "read sensitive log data" permission
2, logging works even on weird android versions

Well, it seems FakeTruth is catching some sleep after his yesterday's midnight-oil-burning Smile


RE: Android tests - NiLSPACE - 08-20-2012

Faketruth are you also planning on making it easier to configurate in the android version?


RE: Android tests - FakeTruth - 08-20-2012

(08-19-2012, 09:48 PM)xoft Wrote: It seems we'll need a proper callback mechanism into Java, so that:
1, we don't require the "read sensitive log data" permission
2, logging works even on weird android versions

Well, it seems FakeTruth is catching some sleep after his yesterday's midnight-oil-burning Smile
As I stated in a commit log, callling Java functions from C++ is only allowed from a Java thread (not native thread). It's possible to call those functions from other threads, but it's messy. Threads need to be attached and detached to the JVM, confusing stuffs...

Also I was at familyTongue

(08-20-2012, 12:43 AM)STR_Warrior Wrote: Faketruth are you also planning on making it easier to configurate in the android version?
Not specifically for Android. I think the WebAdmin should be used for configuring the server.


RE: Android tests - NiLSPACE - 08-20-2012

(08-20-2012, 02:13 AM)FakeTruth Wrote:
(08-20-2012, 12:43 AM)STR_Warrior Wrote: Faketruth are you also planning on making it easier to configurate in the android version?
Not specifically for Android. I think the WebAdmin should be used for configuring the server.

thats a nice idea to be able to configurate the server with the webadminBig Grin
oh and a question. if you install the server on android does it install all the configuration files? like settings.ini and items.ini and does it install the core plugins + the webadmin's template.html


RE: Android tests - FakeTruth - 08-20-2012

(08-20-2012, 02:18 AM)STR_Warrior Wrote:
(08-20-2012, 02:13 AM)FakeTruth Wrote:
(08-20-2012, 12:43 AM)STR_Warrior Wrote: Faketruth are you also planning on making it easier to configurate in the android version?
Not specifically for Android. I think the WebAdmin should be used for configuring the server.

thats a nice idea to be able to configurate the server with the webadminBig Grin
oh and a question. if you install the server on android does it install all the configuration files? like settings.ini and items.ini and does it install the core plugins + the webadmin's template.html

No it doesn't Sad It only uses default settings, and those settings suck.
It does create a settings.ini file though


RE: Android tests - FakeTruth - 08-20-2012

(08-20-2012, 02:13 AM)FakeTruth Wrote: As I stated in a commit log, callling Java functions from C++ is only allowed from a Java thread (not native thread). It's possible to call those functions from other threads, but it's messy. Threads need to be attached and detached to the JVM, confusing stuffs...

I think the easiest way is to create a message queue in C++. The log (or whatever that needs to communicate with Java) would add messages (instanced classes with a function, like Java's Runnable) to a queue. Then a Java thread will call a C++ function that reads these messages and execute them. This way we can be absolutely sure that these functions are always called from a Java thread (we know it will have enough memory etc.) without messing with attaching and detaching threads to the JVM


RE: Android tests - xoft - 08-20-2012

I think the easiest way is to create a pipe in C++ to which the server would write the log and Java (via C++ JNI) would read it. My Android-educated colleague hinted me at this solution.
There is also a way to call Java stuff from a C++ thread, but it's not so easy (need to call AttachThread(), with a parameter that is received on library load via OnLoad...() ) and I think the pipe solution is much easier and cleaner.


RE: Android tests - FakeTruth - 08-20-2012

(08-20-2012, 06:59 PM)xoft Wrote: I think the easiest way is to create a pipe in C++ to which the server would write the log and Java (via C++ JNI) would read it. My Android-educated colleague hinted me at this solution.
But isn't that severely limited to just the log/messages?

(08-20-2012, 06:59 PM)xoft Wrote: There is also a way to call Java stuff from a C++ thread, but it's not so easy (need to call AttachThread(), with a parameter that is received on library load via OnLoad...() ) and I think the pipe solution is much easier and cleaner.
I know... I've written about that...