Closed amatus closed 10 years ago
Right, I have not thought of that...
That is not intent abuse, of course, application should be able to be started from any point. Previously neko was initialized from Application.onCreate, which required Clojure to be loaded instantly as application started. I had to move that into SplashActivity to delay Clojure loading.
You could have gone easier way by calling neko.application/init-application
at the beginning of your activity. Although you'd have to make sure that it is called only once (since it also starts nrepl, and it would throw an exception if started twice).
I have to think how to deal with this problem sensibly. Meanwhile, thank you for reporting it.
So I've just pushed neko 3.0.0-beta6
to be used together with lein-droid 0.2.0-beta3
which should fix your issue. What I changed is I force init-application
at onCreate of every activity (defined with defactivity
) but make sure that initialization only happens once.
Can you please try it out and say if it works for you?
Hey @amatus , have you tried the newest version yet? I hope now it must be fine!
I haven't tried it yet, thanks for reminding me.
This seems to be always starting the package.MAIN activity instead of the activity I was trying to start.
My mistake, stand by...
Confirmed!
Thank you, David!
I'm starting a neko activity from an android.accounts.AbstractAccountAuthenticator which fails if I haven't already run the main activity because neko hasn't been initialized. My solution was to modify the SplashActivity to start any activity I pass to it and start my authenticator_activity that way. See https://github.com/amatus/CardDAV-Sync.