I'm having a lot of fun playing with the Transfuse framework for Android, but I can't figure out how an Activity can return values through Intent.
Normally in an Android app, you'd call startActivityForResult
to start an Activity
and then onActivityResult
will be called back when the started activity finishes and you are given an Intent
, which contains returned data. I don't see how Transfuse handles this without totally breaking out of the framework and go legacy all the way. There's no event annotation for onActivityResult
and IntentFactory
doesn't seem to be able to start Activity
with startActivityForResult
So far this is a deal breaker for me.
While on this subject, another related question I'd like to raise is that, in Android, you could use the following code to rewind the Activity stack to a destination Activity.
Intent i = new Intent(this, DestActivity.class);
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
i.putExtra("key", "val");
startActivity(i);
Then the destination Activity would get its onNewIntent
callsed, which would get the Intent
passed to it. Javadoc I don't see how this can be done with Transfuse. IntentFactory
almost got this, except it can't set flags to Intent
, and there's no event annotation for onNewIntent
. I'd also like to verify that let's say I have the following.
@Inject @Extra("key") String key;
Will it be updated when onNewIntent
is called?
Thanks in advance. I'd like to specially thank johncarl for his amazing work. I had a lot of fun.