Code example for ComponentName

Methods: flattenToString

0
        @Override 
        public String getValue(Intent intent, ApplicationInfo callerApp, String resolvedType, 
                ApplicationInfo resolvedApp) { 
            ComponentName cn = intent.getComponent(); 
            if (cn != null) { 
                return cn.flattenToString(); 
            } 
            return null; 
        } 
    }; 
 
    public static final ValueProvider COMPONENT_NAME = new ValueProvider("component-name") {
        @Override 
        public String getValue(Intent intent, ApplicationInfo callerApp, String resolvedType, 
                ApplicationInfo resolvedApp) { 
            ComponentName cn = intent.getComponent(); 
            if (cn != null) { 
                return cn.getClassName(); 
            } 
            return null; 
        }