android-lib/src/main/java/io/v/android/impl/google/services/gcm/Util.java
/**
     * Returns {@code true} iff the provided service is "wakeable", i.e., if it has the
     * {@code "wakeup"} metadata attached to it.
     *
     * @param context     Android context representing the service
     * @return            {@code true} iff the provided service is "wakeable"
     * @throws VException if there was an error figuring out if a service is wakeable
     */
Returns  true iff the provided service is "wakeable", i.e., if it has the
"wakeup" metadata attached to it.

@param context     Android context representing the service
@return             true iff the provided service is "wakeable"
@throws VException if there was an error figuring out if a service is wakeable
Returns true iff the provided service is " wakeable " i . e . if it has the " wakeup " metadata attached to it . @param context Android context representing the service @return true iff the provided service is " wakeable " @throws VException if there was an error figuring out if a service is wakeable
public static boolean isServiceWakeable(Context context) throws VException {
        if (!(context instanceof Service)) {
            return false;
        }
        Service service = (Service) context;
        try {
            ServiceInfo info = service.getPackageManager().getServiceInfo(
                    new ComponentName(service, service.getClass()), PackageManager.GET_META_DATA);
            if (info.metaData == null) {
                return false;
            }
            return info.metaData.getBoolean("wakeup", false);
        } catch (PackageManager.NameNotFoundException e) {
            throw new VException(e.getMessage());
        }
    }
public static boolean isServiceWakeable ( Context context ) throws VException { if ( ! ( context instanceof Service ) ) { return false ; } Service service = ( Service ) context ; try { ServiceInfo info = service . getPackageManager ( ) . getServiceInfo ( new ComponentName ( service , service . getClass ( ) ) , PackageManager . GET_META_DATA ) ; if ( info . metaData == null ) { return false ; } return info . metaData . getBoolean ( "wakeup" , false ) ; } catch ( PackageManager . NameNotFoundException e ) { throw new VException ( e . getMessage ( ) ) ; } }
Returns {@code true} iff the provided service is "wakeable", i.e., if it has the
 {@code "wakeup"} metadata attached to it.
Returns { @code true } iff the provided service is " wakeable " i . e . if it has the { @code " wakeup " } metadata attached to it .