Related jar packages and documentation for flurry: http://download.csdn.net/detail/baidu_nod/7739881
Add flurry jar package to libs.
You can write a flurry management class:
public class Flurrytypes {public static final string download_book = ' Down load book ';p ublic static final string book_name = "Book_name";p ublic static final String view_author = "View_author";p ublic static final String author_name = "Author_nam E ";p ublic static final String view_book =" View_author ";p ublic static final String download_error =" Down_load_error ";p UBL IC static final String clecik_menu = "Click_menu";p ublic static final String opertion = "Operation";p ublic static final St Ring Author_list = "Author_list";p ublic static final String my_fav = "My_fav";p ublic static final String turn_on_page = "T Urn on page_animation ";p ublic static final String voice_turn_on =" VOICE TURN on ";p ublic static final string change_backgr Ound = "Change Background";p ublic static final string FEEDBACK = "Feed back";p ublic static final String SHARE = "SHARE";p u Blic static final String check_update = "CHECK UPDATE";p ublic static final String delete_favorite = "DELETE favorite book" ;p ublic static Final String delete_author = "DELETE AUTHOR";p ublic static final void Onstartsession (context context) {if (global.enable) {try {Flur Ryagent.setusehttps (FALSE); Flurryagent.setcaptureuncaughtexceptions (TRUE);//This is keyflurryagent.onstartsession (context, " Zjn9mzfdfqnzpfvhnjcx "); Flurryagent.setlogevents (TRUE);} catch (Java.lang.Throwable t) {}}}public static final void Onendsession (context context) {if (global.enable) {try {Flurrya Gent.onendsession (context);} catch (Java.lang.Throwable t) {}}}public static final void OnEvent (String eventId) {if (global.enable) {Long currenttime = Systemclock.elapsedrealtime (); try {map<string, string> params = new hashmap<string, string> (); Flurryagent.onevent (eventid,params);} catch (Java.lang.Throwable t) {}}}public static final void Oneventusemap (String eventId, map<string, string> Map) {i F (global.enable) {try {flurryagent.onevent (eventId, map);} catch (Java.lang.Throwable t) {}}}public static final void one Vent (String eventId, String paramvalue) {if(global.enable) {try {hashmap<string, string> params = new hashmap<string, string> ();p arams.put (EventId, Paramvalue); Flurryagent.onevent (eventId, params);} catch (Java.lang.Throwable t) {}}}public static final void OnEvent (string eventId, String Paramkey, String paramvalue) {if (global.enable) {Long currenttime = Systemclock.elapsedrealtime (); try {map<string, string> params = new HashMap <string, string> ();p arams.put (Paramkey, paramvalue); Flurryagent.onevent (eventId, params);} catch (Java.lang.Throwable t) {}}}}
In each activity:
@Overrideprotected void OnStart () {Super.onstart (); Flurrytypes.onstartsession (this);} @Overrideprotected void OnStop () {super.onstop (); Flurrytypes.onendsession (this);}
The call can be written like this:
Flurrytypes.onevent (Flurrytypes.delete_author, Flurrytypes.author_name, info.name);
or this:
Map map = new hashmap<string,string> (); Map.put (Flurrytypes.book_name, novelinfo.name); Map.put ( Flurrytypes.author_name, Novelinfo.author); Flurrytypes.oneventusemap (Flurrytypes.download_book, map);