Code example for AppWidgetHost

Methods: stopListening

0
        } 
    } 
 
    private void hideAppWidgetHost() { 
        if(mHasNetMgr){
            mAppWidgetHost.stopListening();
            //add by zhangxianjia to protect mTimer null pointer 
            if(mTimer != null) {
                mTimer.cancel();
                mTimer = null;
            } 
            if(mShowNetUsage && mDataUsageLayout != null)
                mDataUsageLayout.setVisibility(View.GONE);
        } 
        if(mShowNetSpeed && mConnectivity){
            mNetSpeed.setVisibility(View.VISIBLE);
        } 
    } 
    public static void showNetUsage(){ 
        sHelper.showAppWidgetHost();
    }