Code example for Service

Methods: startForeground

0
            mNotification = _notification;
        } 
 
        public void startForeground() 
        { 
            mCurrentService.startForeground(id, mNotification);
        } 
 
        public void stopForeground() 
        { 
            mCurrentService.stopForeground(true);
        } 
    } 
     
    private class OldForegroundApi implements IRunForeground 
    { 
        /*  
         * Get the new API through reflection because it's unavailable  
         * in honeycomb 
         */ 
        private Method mSetForeground;