~eliasnaur/gio

Re: [PATCH 1/2] app: add RegisterDelegate method on *Window for Android

Gregory Pomerantz
Details
Message ID
<d24115cc-3bc4-e375-8dea-20a4fcb0803a@wow.st>
DKIM signature
pass
Download raw message
Note: I retained PlatformHandle but made it Android specific. This is 
for two reasons -- first, some developers might want to simply get 
access to the JNI and the Application context without dealing with 
custom Java classes (doing everything through the JNI). Second, in order 
to properly install a fragment class, you will want a callback method to 
know when it is done installing. You can use the JNI method 
RegisterNatives() to point that to the right place, but you need a Java 
env before you can call RegisterDelegate.

Finally, since the GIoView receives an Activity reference in onStart(), 
we need to wait before we call ReigsterDelegate -- I do this in the 
app's main event loop after receiving a StageEvent for StageRunning. 
WIth these changes and the storage permissions patch I have a fully 
working version of the Gio password manager on Android.