android-go icon indicating copy to clipboard operation
android-go copied to clipboard

Android Service

Open ohenepee opened this issue 9 years ago • 6 comments

Is there anyway by which one can build and interact with an Android Service or IntentService? So long-running background apps can be built without the Android Runtime killing and restarting at will.

ohenepee avatar Apr 09 '17 14:04 ohenepee

@ohenepee

Sorry, I completely missed this issue. I was working on JNI bindings to the Android SDK, but was burdened with other work.

You can see an example of interacting with Android services using Binder there: https://github.com/xlab/android-go/blob/master/android/jni_util.go#L13

It has all required helpers and methods, but I cannot share additional info as didn't try such thing by myself. There are some SO answers available though http://stackoverflow.com/a/14277133

xlab avatar Apr 30 '17 13:04 xlab

cool.

this is exactly why i also came here. I want to run thing sin golang as a background services, but then have apps (written in golang and QT) communicating over android IPC which is called AIDL.

ghost avatar May 12 '17 20:05 ghost

The example you linked too triggers the virtual keyboard. Exactly what we need for opengl / vulkan based apps :) Nice...

For the iOS project have you found a way also to do it ? A iOS friend told me its the responder interface to make it work btw but have not had a chance to try.

Also whilst on the topic of text we are going to need cut and paste functionality too. Have not looked into how / if we can invoke the native cut and paste GUI controls yet...

Would be happy to help try...

joeblew99 avatar Jul 12 '17 07:07 joeblew99

Unfortunately all the iOS interaction goes through C shims for obj-c logic. I would like to find or make a C API project for some minimal set of iOS features such as clipboard access or keyboard toggling, then generate bindings for it.

xlab avatar Jul 12 '17 08:07 xlab

glad you said that. Thats exactly what i want to do too. I was thinking about it. Its likly that the QT code uses allot of those same IOS API's since they are opengl based too. Might have a look into it.

i really think that this is huge, and love the work your doing..

joeblew99 avatar Jul 13 '17 08:07 joeblew99

virtual keyboard

IOS https://developer.apple.com/library/content/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html#//apple_ref/doc/uid/TP40009542-CH5-SW1

cut and paste

IOS https://developer.apple.com/library/content/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/UsingCopy,Cut,andPasteOperations/UsingCopy,Cut,andPasteOperations.html

joeblew99 avatar Jul 13 '17 11:07 joeblew99