Code example for ServiceState

Methods: getState

0
     */ 
    public void registerForNetworkAttached(Handler h, int what, Object obj) {
        Registrant r = new Registrant(h, what, obj);
 
        mNetworkAttachedRegistrants.add(r);
        if (ss.getState() == ServiceState.STATE_IN_SERVICE) {
            r.notifyRegistrant();
        } 
    } 
    public void unregisterForNetworkAttached(Handler h) {
        mNetworkAttachedRegistrants.remove(h);
    } 
 
    /** 
     * Registration point for transition into packet service restricted zone. 
     * @param h handler to notify 
     * @param what what code of message when delivered 
     * @param obj placed in Message.obj 
     */ 
    public void registerForPsRestrictedEnabled(Handler h, int what, Object obj) {
Connect your IDE to all the code out there  Get Codota for Java