wear/src/main/java/androidx/wear/utils/MetadataConstants.java
public static boolean isStandalone(Context context) {
        try {
            ApplicationInfo appInfo = context.getPackageManager().getApplicationInfo(
                    context.getPackageName(), PackageManager.GET_META_DATA);
            if (appInfo.metaData != null) {
                return appInfo.metaData.getBoolean(STANDALONE_METADATA_NAME);
            }
        } catch (PackageManager.NameNotFoundException e) {
            // Do nothing
        }

        return false;
    }
/**
     * Determines whether a given context comes from a standalone app. This can be used as a proxy
     * to check if any given app is compatible with iOS Companion devices.
     *
     * @param context to be evaluated.
     * @return Whether a given context comes from a standalone app.
     */
Determines whether a given context comes from a standalone app. This can be used as a proxy
to check if any given app is compatible with iOS Companion devices.

@param context to be evaluated.
@return Whether a given context comes from a standalone app.
Determines whether a given context comes from a standalone app . This can be used as a proxy to check if any given app is compatible with iOS Companion devices . @param context to be evaluated . @return Whether a given context comes from a standalone app .
public static boolean isStandalone(Context context) {
        try {
            ApplicationInfo appInfo = context.getPackageManager().getApplicationInfo(
                    context.getPackageName(), PackageManager.GET_META_DATA);
            if (appInfo.metaData != null) {
                return appInfo.metaData.getBoolean(STANDALONE_METADATA_NAME);
            }
        } catch (PackageManager.NameNotFoundException e) {
        }
        return false;
    }
public static boolean isStandalone ( Context context ) { try { ApplicationInfo appInfo = context . getPackageManager ( ) . getApplicationInfo ( context . getPackageName ( ) , PackageManager . GET_META_DATA ) ; if ( appInfo . metaData != null ) { return appInfo . metaData . getBoolean ( STANDALONE_METADATA_NAME ) ; } } catch ( PackageManager . NameNotFoundException e ) { } return false ; }
Determines whether a given context comes from a standalone app.
Determines whether a given context comes from a standalone app .
// Do nothing