Size: a a a

Android NDK (C++) — русскоговорящее сообщество

2020 April 29

I

Ivansuper in Android NDK (C++) — русскоговорящее сообщество
Matthew Good
so that the terminal can survive app crashes
That is not really a wise forethought
источник

MG

Matthew Good in Android NDK (C++) — русскоговорящее сообщество
its main focus is to assist in debugging, mainly with being able to capture a crash log of whatever may cause the application to crash, both natively or java/kotlin, and (assuming the application DOES NOT crash on start up) then display that log
источник

I

Ivansuper in Android NDK (C++) — русскоговорящее сообщество
Do you plan on sharing the service between 3rd party apps?
источник

MG

Matthew Good in Android NDK (C++) — русскоговорящее сообщество
no
источник

I

Ivansuper in Android NDK (C++) — русскоговорящее сообщество
Matthew Good
its main focus is to assist in debugging, mainly with being able to capture a crash log of whatever may cause the application to crash, both natively or java/kotlin, and (assuming the application DOES NOT crash on start up) then display that log
....
источник

I

Ivansuper in Android NDK (C++) — русскоговорящее сообщество
Have you ever heard of crashlytics
источник

MG

Matthew Good in Android NDK (C++) — русскоговорящее сообщество
yes
источник

MG

Matthew Good in Android NDK (C++) — русскоговорящее сообщество
(tho its secondary job is to be able to display the stdout and stderr streams of the app itself)
источник

I

Ivansuper in Android NDK (C++) — русскоговорящее сообщество
You are trying to go with some linux or windows based daemon way
источник

I

Ivansuper in Android NDK (C++) — русскоговорящее сообщество
You will blow your ass off in android trying to accomplish this
источник

I

Ivansuper in Android NDK (C++) — русскоговорящее сообщество
It is might be possible, but looking on how frequently and what you are asking for -- it will be pretty hard
источник

MG

Matthew Good in Android NDK (C++) — русскоговорящее сообщество
ok
источник

MG

Matthew Good in Android NDK (C++) — русскоговорящее сообщество
how can i convert an interface into a class?
источник

I

Ivansuper in Android NDK (C++) — русскоговорящее сообщество
Matthew Good
how can i convert an interface into a class?
Er, by implementing it?...
источник

MG

Matthew Good in Android NDK (C++) — русскоговорящее сообщество
or could i implement it like this?

       //  when server recieves command, do callback associated with command
источник

I

Ivansuper in Android NDK (C++) — русскоговорящее сообщество
Matthew Good
or could i implement it like this?

       //  when server recieves command, do callback associated with command
Yes
источник
2020 April 30

MG

Matthew Good in Android NDK (C++) — русскоговорящее сообщество
ok
источник

MG

Matthew Good in Android NDK (C++) — русскоговорящее сообщество
if i want to send a client multiple id’s in a multi-threaded program how would i do so such that the correct id is recieved, for example, in a normal integrated application i would just do int id = service.createSession(); in which service is a local instance of the server running in the same process as my application

eg where Service service = new Service();

how would i achieve the same with an actual IPC based server

as my current approach is to store the id in a global variable and then access it

eg

sendMessageToServer(TerminalService.MSG_CREATE_SHELL_SESSION, TerminalService.toInt(true));

// SERVER:
// case MSG_CREATE_SHELL_SESSION:
//     sendMessageToAllClients(
//         MSG_SESSION_CREATED,
//         createShellSession(toBoolean(msg.arg1)
//     );

// CLIENT:
// case TerminalService.MSG_SESSION_CREATED: SESSION_ID = msg.arg1;

int session_id = SESSION_ID;

however i do not think this would work in a multi-threaded context as if, say T1 creates a session, and T2 creates a session, both will data race to create the session first and then data race to store the produced session id

eg T1 may get T2's session id and vice versa
источник
2020 May 01

MG

Matthew Good in Android NDK (C++) — русскоговорящее сообщество
are there any differences between stdio (stdin,stdout,stderr) when running in a jni library vs, say a compiled program running in either termux or adb shell
источник

MG

Matthew Good in Android NDK (C++) — русскоговорящее сообщество
why does this happen? this is what i have in my android JNI library, https://ghostbin.co/paste/hf94o , and this is what i have in my C application https://ghostbin.co/paste/gkdgh which works fine when compiled in termux and mac and when ran in adb shell
источник