Tabnine Logo
VNotificationManager.get
Code IndexAdd Tabnine to your IDE (free)

How to use
get
method
in
com.lody.virtual.client.ipc.VNotificationManager

Best Java code snippets using com.lody.virtual.client.ipc.VNotificationManager.get (Showing top 20 results out of 315)

origin: android-hacker/VirtualXposed

  private void postNotification(int userId, int id, String pkg, Notification notification) {
    id = VNotificationManager.get().dealNotificationId(id, pkg, null, userId);
    String tag = VNotificationManager.get().dealNotificationTag(id, pkg, null, userId);
//        VNotificationManager.get().dealNotification(id, notification, pkg);
    VNotificationManager.get().addNotification(id, tag, pkg, userId);
    try {
      nm.notify(tag, id, notification);
    } catch (Throwable e) {
      e.printStackTrace();
    }
  }

origin: android-hacker/VirtualXposed

private void cancelNotification(int userId, int id, String pkg) {
  id = VNotificationManager.get().dealNotificationId(id, pkg, null, userId);
  String tag = VNotificationManager.get().dealNotificationTag(id, pkg, null, userId);
  nm.cancel(tag, id);
}
origin: android-hacker/VirtualXposed

  @Override
  public Object call(Object who, Method method, Object... args) throws Throwable {
    String pkg = (String) args[0];
    if (getHostPkg().equals(pkg)) {
      return method.invoke(who, args);
    }
    return VNotificationManager.get().areNotificationsEnabledForPackage(pkg, getAppUserId());
  }
}
origin: android-hacker/VirtualXposed

  @Override
  public Object call(Object who, Method method, Object... args) throws Throwable {
    String pkg = MethodParameterUtils.replaceFirstAppPkg(args);
    if (getHostPkg().equals(pkg)) {
      return method.invoke(who, args);
    }
    String tag = (String) args[1];
    int id = (int) args[2];
    id = VNotificationManager.get().dealNotificationId(id, pkg, tag, getAppUserId());
    tag = VNotificationManager.get().dealNotificationTag(id, pkg, tag, getAppUserId());
    args[1] = tag;
    args[2] = id;
    return method.invoke(who, args);
  }
}
origin: android-hacker/VirtualXposed

  @Override
  public Object call(Object who, Method method, Object... args) throws Throwable {
    String pkg = (String) args[0];
    if (getHostPkg().equals(pkg)) {
      return method.invoke(who, args);
    }
    int enableIndex = ArrayUtils.indexOfFirst(args, Boolean.class);
    boolean enable = (boolean) args[enableIndex];
    VNotificationManager.get().setNotificationsEnabledForPackage(pkg, enable, getAppUserId());
    return 0;
  }
}
origin: android-hacker/VirtualXposed

  @Override
  public Object call(Object who, Method method, Object... args) throws Throwable {
    String pkg = (String) args[0];
    if (getHostPkg().equals(pkg)) {
      return method.invoke(who, args);
    }
    int notificationIndex = ArrayUtils.indexOfFirst(args, Notification.class);
    int idIndex = ArrayUtils.indexOfFirst(args, Integer.class);
    int id = (int) args[idIndex];
    id = VNotificationManager.get().dealNotificationId(id, pkg, null, getAppUserId());
    args[idIndex] = id;
    Notification notification = (Notification) args[notificationIndex];
    if (!VNotificationManager.get().dealNotification(id, notification, pkg)) {
      return 0;
    }
    VNotificationManager.get().addNotification(id, null, pkg, getAppUserId());
    args[0] = getHostPkg();
    return method.invoke(who, args);
  }
}
origin: android-hacker/VirtualXposed

  @Override
  public Object call(Object who, Method method, Object... args) throws Throwable {
    String pkg = MethodParameterUtils.replaceFirstAppPkg(args);
    if (VirtualCore.get().isAppInstalled(pkg)) {
      VNotificationManager.get().cancelAllNotification(pkg, getAppUserId());
      return 0;
    }
    return method.invoke(who, args);
  }
}
origin: android-hacker/VirtualXposed

  @Override
  public Object call(Object who, Method method, Object... args) throws Throwable {
    String pkg = (String) args[0];
    if (getHostPkg().equals(pkg)) {
      return method.invoke(who, args);
    }
    int notificationIndex = ArrayUtils.indexOfFirst(args, Notification.class);
    int idIndex = ArrayUtils.indexOfFirst(args, Integer.class);
    int tagIndex = (Build.VERSION.SDK_INT >= 18 ? 2 : 1);
    int id = (int) args[idIndex];
    String tag = (String) args[tagIndex];
    id = VNotificationManager.get().dealNotificationId(id, pkg, tag, getAppUserId());
    tag = VNotificationManager.get().dealNotificationTag(id, pkg, tag, getAppUserId());
    args[idIndex] = id;
    args[tagIndex] = tag;
    //key(tag,id)
    Notification notification = (Notification) args[notificationIndex];
    if (!VNotificationManager.get().dealNotification(id, notification, pkg)) {
      return 0;
    }
    VNotificationManager.get().addNotification(id, tag, pkg, getAppUserId());
    args[0] = getHostPkg();
    if (Build.VERSION.SDK_INT >= 18 && args[1] instanceof String) {
      args[1] = getHostPkg();
    }
    return method.invoke(who, args);
  }
}
origin: android-hacker/VirtualXposed

  VLog.e(getClass().getSimpleName(), "Unknown flag : " + args[4]);
VNotificationManager.get().dealNotification(id, notification, getAppPkg());
origin: darkskygit/VirtualApp

private void cancelNotification(int userId, int id, String pkg) {
  id = VNotificationManager.get().dealNotificationId(id, pkg, null, userId);
  String tag = VNotificationManager.get().dealNotificationTag(id, pkg, null, userId);
  nm.cancel(tag, id);
}
origin: darkskygit/VirtualApp

  private void postNotification(int userId, int id, String pkg, Notification notification) {
    id = VNotificationManager.get().dealNotificationId(id, pkg, null, userId);
    String tag = VNotificationManager.get().dealNotificationTag(id, pkg, null, userId);
//        VNotificationManager.get().dealNotification(id, notification, pkg);
    VNotificationManager.get().addNotification(id, tag, pkg, userId);
    try {
      nm.notify(tag, id, notification);
    } catch (Throwable e) {
      e.printStackTrace();
    }
  }

origin: bzsome/VirtualApp-x326

  private void postNotification(int userId, int id, String pkg, Notification notification) {
    id = VNotificationManager.get().dealNotificationId(id, pkg, null, userId);
    String tag = VNotificationManager.get().dealNotificationTag(id, pkg, null, userId);
//        VNotificationManager.get().dealNotification(id, notification, pkg);
    VNotificationManager.get().addNotification(id, tag, pkg, userId);
    try {
      nm.notify(tag, id, notification);
    } catch (Throwable e) {
      e.printStackTrace();
    }
  }

origin: bzsome/VirtualApp-x326

private void cancelNotification(int userId, int id, String pkg) {
  id = VNotificationManager.get().dealNotificationId(id, pkg, null, userId);
  String tag = VNotificationManager.get().dealNotificationTag(id, pkg, null, userId);
  nm.cancel(tag, id);
}
origin: bzsome/VirtualApp-x326

  @Override
  public Object call(Object who, Method method, Object... args) throws Throwable {
    String pkg = (String) args[0];
    if (getHostPkg().equals(pkg)) {
      return method.invoke(who, args);
    }
    return VNotificationManager.get().areNotificationsEnabledForPackage(pkg, getAppUserId());
  }
}
origin: darkskygit/VirtualApp

  @Override
  public Object call(Object who, Method method, Object... args) throws Throwable {
    String pkg = (String) args[0];
    if (getHostPkg().equals(pkg)) {
      return method.invoke(who, args);
    }
    return VNotificationManager.get().areNotificationsEnabledForPackage(pkg, getAppUserId());
  }
}
origin: bzsome/VirtualApp-x326

  @Override
  public Object call(Object who, Method method, Object... args) throws Throwable {
    String pkg = (String) args[0];
    if (getHostPkg().equals(pkg)) {
      return method.invoke(who, args);
    }
    int enableIndex = ArrayUtils.indexOfFirst(args, Boolean.class);
    boolean enable = (boolean) args[enableIndex];
    VNotificationManager.get().setNotificationsEnabledForPackage(pkg, enable, getAppUserId());
    return 0;
  }
}
origin: bzsome/VirtualApp-x326

  @Override
  public Object call(Object who, Method method, Object... args) throws Throwable {
    String pkg = MethodParameterUtils.replaceFirstAppPkg(args);
    if (getHostPkg().equals(pkg)) {
      return method.invoke(who, args);
    }
    String tag = (String) args[1];
    int id = (int) args[2];
    id = VNotificationManager.get().dealNotificationId(id, pkg, tag, getAppUserId());
    tag = VNotificationManager.get().dealNotificationTag(id, pkg, tag, getAppUserId());
    args[1] = tag;
    args[2] = id;
    return method.invoke(who, args);
  }
}
origin: darkskygit/VirtualApp

  @Override
  public Object call(Object who, Method method, Object... args) throws Throwable {
    String pkg = (String) args[0];
    if (getHostPkg().equals(pkg)) {
      return method.invoke(who, args);
    }
    int enableIndex = ArrayUtils.indexOfFirst(args, Boolean.class);
    boolean enable = (boolean) args[enableIndex];
    VNotificationManager.get().setNotificationsEnabledForPackage(pkg, enable, getAppUserId());
    return 0;
  }
}
origin: bzsome/VirtualApp-x326

  @Override
  public Object call(Object who, Method method, Object... args) throws Throwable {
    String pkg = MethodParameterUtils.replaceFirstAppPkg(args);
    if (VirtualCore.get().isAppInstalled(pkg)) {
      VNotificationManager.get().cancelAllNotification(pkg, getAppUserId());
      return 0;
    }
    return method.invoke(who, args);
  }
}
origin: darkskygit/VirtualApp

  @Override
  public Object call(Object who, Method method, Object... args) throws Throwable {
    String pkg = MethodParameterUtils.replaceFirstAppPkg(args);
    if (VirtualCore.get().isAppInstalled(pkg)) {
      VNotificationManager.get().cancelAllNotification(pkg, getAppUserId());
      return 0;
    }
    return method.invoke(who, args);
  }
}
com.lody.virtual.client.ipcVNotificationManagerget

Popular methods of VNotificationManager

  • addNotification
  • areNotificationsEnabledForPackage
  • cancelAllNotification
  • dealNotification
  • dealNotificationId
  • dealNotificationTag
  • getService
  • setNotificationsEnabledForPackage

Popular in Java

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (Timer)
  • setScale (BigDecimal)
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JButton (javax.swing)
  • JList (javax.swing)
  • JOptionPane (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now