You are here

getNetwork

public abstract CloudNetwork getNetwork() - returns the current network for the session.

Parameters

None

Returns

Returns a CloudNetwork object.

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());
    }