UdhayaBalaji / androidannotations

Automatically exported from code.google.com/p/androidannotations
0 stars 0 forks source link

Integration with Capptain through @Capptain #110

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Capptain is a great "analytics / monitor / reach" product. It has an 
AndroidLibrary that does great, but the usual way to use it is to extend 
specific activities, which doesn't integrate well with other frameworks.

However, it's quite easy to create your own custom capptain activities, you 
just have two calls to do :

    @Override
    protected void onResume() {
        super.onResume();
        CapptainAgent.getInstance(this).startActivity(this, "ActivityName", null);
    }

    @Override
    protected void onPause() {
        super.onPause();
        CapptainAgent.getInstance(this).endActivity();
    }

The usual behavior for "ActivityName" is to take the classname of the activity, 
and remove any trailing "Activity" string.

We could have a @Capptain annotation which would let the user integrate with 
Capptain without having to write such a code :

@Capptain("OptionalName")
public MyActivity extends Activity {

}

Please also notice that Capptain is not a free tool.

Any comment ?

Original issue reported on code.google.com by py.ricau on 25 Sep 2011 at 3:01

GoogleCodeExporter commented 8 years ago
Hi!
>Please also notice that Capptain is not a free tool.
Just a comment: There's a Capptain Plan ("DEV") which is free for apps in 
developemnt (i.e. small number of unique users/devices). See 
http://app.capptain.com/#pricing
Best,
Laurent.

Original comment by llathie...@ubikod.com on 25 Sep 2011 at 5:17

GoogleCodeExporter commented 8 years ago
Adding this annotation on a class that does not extend CapptainActivity is not 
enough: you still have to call startActivity and endActivity in the onResume 
and onPause callbacks.
Maybe using roboguice would help monitoring onResume and onPause on any 
Activity object but Capptain is designed to be dependency free.

Original comment by gper...@ubikod.com on 26 Sep 2011 at 12:47

GoogleCodeExporter commented 8 years ago
Well, I don't know if we are talking about the same annotation.

This idea here is to create a new annotation, called "@Capptain", that would 
automatically implement this stuff in onResume and onPause. AndroidAnnotations 
can actually do this kind of things (and w already have a lot of RoboGuice 
features, we just do it at compile time instead of runtime).

Original comment by py.ricau on 26 Sep 2011 at 5:58

GoogleCodeExporter commented 8 years ago

Original comment by py.ricau on 20 Oct 2011 at 7:34

GoogleCodeExporter commented 8 years ago
Issue 119 could provide an alternative solution for this.

Original comment by py.ricau on 1 Nov 2011 at 5:30

GoogleCodeExporter commented 8 years ago
Issue 119 could indeed provide a nice solution.

Original comment by gper...@ubikod.com on 2 Nov 2011 at 2:38

GoogleCodeExporter commented 8 years ago
https://github.com/excilys/androidannotations/issues/19

Original comment by py.ricau on 6 Jan 2012 at 11:00