xiaolongbao/src/main/java/com/tommytao/xiaolongbao/util/GetuiPusher.java
public void start(final int maxNoOfRetries, final OnStartedListener onStartedListener) {

        // startInSingleShoot(onStartedListener);

        // A hack to pass a final primitive which can be *MODIFIED*
        final ArrayList<Integer> retryCounterFinal = new ArrayList<Integer>(1);
        retryCounterFinal.add(0);
        startInSingleShoot(new OnStartedListener() {
            @Override
            public void onStarted(boolean succeed) {

                retryCounterFinal.set(0, retryCounterFinal.get(0) + 1);

                if (succeed) {

                    if (onStartedListener != null)
                        onStartedListener.onStarted(true);

                    return;
                }

                if (retryCounterFinal.get(0) >= maxNoOfRetries) {

                    if (onStartedListener != null)
                        onStartedListener.onStarted(false);

                    return;
                }

                startInSingleShoot(this);

            }
        });


    }
/**
     * Start push service
     * <p/>
     * Warning: delLibsB4Start seems malfunction, it do can delete SDCard/libs
     * but it cannot fix bug (Getui cannot receive push message). Pending to fix
     *
     * @param maxNoOfRetries    Max no. of retries (include the first time of start())
     * @param onStartedListener Listener which will be triggered after push service is started
     */
Start push service

Warning: delLibsB4Start seems malfunction, it do can delete SDCard/libs
but it cannot fix bug (Getui cannot receive push message). Pending to fix

@param maxNoOfRetries    Max no. of retries (include the first time of start())
@param onStartedListener Listener which will be triggered after push service is started
Start push service Warning : delLibsB4Start seems malfunction it do can delete SDCard / libs but it cannot fix bug ( Getui cannot receive push message ) . Pending to fix @param maxNoOfRetries Max no . of retries ( include the first time of start () ) @param onStartedListener Listener which will be triggered after push service is started
public void start(final int maxNoOfRetries, final OnStartedListener onStartedListener) {
        final ArrayList<Integer> retryCounterFinal = new ArrayList<Integer>(1);
        retryCounterFinal.add(0);
        startInSingleShoot(new OnStartedListener() {
            @Override
            public void onStarted(boolean succeed) {
                retryCounterFinal.set(0, retryCounterFinal.get(0) + 1);
                if (succeed) {
                    if (onStartedListener != null)
                        onStartedListener.onStarted(true);
                    return;
                }
                if (retryCounterFinal.get(0) >= maxNoOfRetries) {
                    if (onStartedListener != null)
                        onStartedListener.onStarted(false);
                    return;
                }
                startInSingleShoot(this);
            }
        });
    }
public void start ( final int maxNoOfRetries , final OnStartedListener onStartedListener ) { final ArrayList < Integer > retryCounterFinal = new ArrayList < Integer > ( 1 ) ; retryCounterFinal . add ( 0 ) ; startInSingleShoot ( new OnStartedListener ( ) { @ Override public void onStarted ( boolean succeed ) { retryCounterFinal . set ( 0 , retryCounterFinal . get ( 0 ) + 1 ) ; if ( succeed ) { if ( onStartedListener != null ) onStartedListener . onStarted ( true ) ; return ; } if ( retryCounterFinal . get ( 0 ) >= maxNoOfRetries ) { if ( onStartedListener != null ) onStartedListener . onStarted ( false ) ; return ; } startInSingleShoot ( this ) ; } } ) ; }
Start push service
 <p/>
 Warning: delLibsB4Start seems malfunction, it do can delete SDCard/libs
 but it cannot fix bug (Getui cannot receive push message).
Start push service <p / > Warning : delLibsB4Start seems malfunction it do can delete SDCard / libs but it cannot fix bug ( Getui cannot receive push message ) .
// startInSingleShoot(onStartedListener); // A hack to pass a final primitive which can be *MODIFIED*