You are here

isHomeNetwork

public String isHomeNetwork() - returns true if the network is the current user's home network.

Parameters

void

Returns

Returns a boolean, true if the network is the current user's home network, false otherwise.

Example

    ...
    try {
    
        CloudSession session = CloudSession.connect(emailAddress, password, apiKey, parameters);
    
        if (session) {
        
            CloudNetwork cn = session.getNetwork();
    
            Log.d(TAG, "identifier: " + cn.getIdentifier());        
            Log.d(TAG, "subscriptionLevel: " + cn.getSubscriptionLevel());
            Log.d(TAG, "isPaidNetwork: " + cn.isPaidNetwork());
            Log.d(TAG, "isHomeNetwork: " + cn.isHomeNetwork());
            Log.d(TAG, "creationTime: " + cn.getCreationTime().getTime().toString());
        
        } else {
    
            Log.d(TAG, "No Session available!");
    
        }
    
    
    } catch (AlfrescoSessionException e) {
        Log.e(TAG, "Failed to connect: " + e.toString());
    }