@ SuppressWarnings ( { "unused" , "WeakerAccess" } ) public void pushInstallReferrer ( Intent intent ) { try { final Bundle extras = intent . getExtras ( ) ; // Preliminary checks if ( extras == null || ! extras . containsKey ( "referrer" ) ) { return ; } final String url ; try { url = URLDecoder . decode ( extras . getString ( "referrer" ) , "UTF-8" ) ; getConfigLogger ( ) . verbose ( getAccountId ( ) , "Referrer received: " + url ) ; } catch ( Throwable e ) { // Could not decode return ; } if ( url == null ) { return ; } int now = ( int ) ( System . currentTimeMillis ( ) / 1000 ) ; if ( installReferrerMap . containsKey ( url ) && now - installReferrerMap . get ( url ) < 10 ) { getConfigLogger ( ) . verbose ( getAccountId ( ) , "Skipping install referrer due to duplicate within 10 seconds" ) ; return ; } installReferrerMap . put ( url , now ) ; Uri uri = Uri . parse ( "wzrk://track?install=true&" + url ) ; pushDeepLink ( uri , true ) ; } catch ( Throwable t ) { // no-op } }
This method is used to push install referrer via Intent