android - Lazy initialization of Fabric kits? -


is possible lazily initialize fabric kits? example, right do:

fabric.with(this, crashlytics, twittercore, tweetui); // 500ms 

i initialize crashlytics (no twitter stuff), below, because 10x faster, , don't need twitter stuff right away

fabric.with(this, crashlytics); // 50ms 

later on, when user visits activity need twittercore & tweetui, i'd add them fabric on fly before using them.

is possible ?

edit: i managed reflection, not ideal, works time being. i'm still looking proper solution this. here's how did it:

    try {         final fabric newfabric = (new fabric.builder(context)).kits(crashlytics, twittercore, tweetui).build();         final method method = fabric.class.getdeclaredmethod("setfabric", fabric.class);         method.setaccessible(true);         method.invoke(null, newfabric);     } catch (exception e) {         timber.e(e, e.getmessage());     } 

mike fabric here. currently, respect first initialization of fabric. 1 option initialize front or if you're ok missing crashes, not initialize twitter , crashlytics until later in app's code.


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -