Tabnine Logo
ApnsService.getInactiveDevices
Code IndexAdd Tabnine to your IDE (free)

How to use
getInactiveDevices
method
in
com.notnoop.apns.ApnsService

Best Java code snippets using com.notnoop.apns.ApnsService.getInactiveDevices (Showing top 3 results out of 315)

origin: com.notnoop.apns/apns

@Override
public Map<String, Date> getInactiveDevices() throws NetworkIOException {
  return service.getInactiveDevices();
}
origin: signalapp/PushServer

 @Override
 public void run() {
  Map<String, Date> inactiveDevices = pushApnService.getInactiveDevices();
  inactiveDevices.putAll(voipApnService.getInactiveDevices());
  for (String registrationId : inactiveDevices.keySet()) {
   Optional<String> device = redisGet(registrationId);
   if (device.isPresent()) {
    logger.warn("Got APN unregistered notice!");
    String[] parts    = device.get().split(".", 2);
    if (parts.length == 2) {
     String number    = parts[0];
     int    deviceId  = Integer.parseInt(parts[1]);
     long   timestamp = inactiveDevices.get(registrationId).getTime();
     unregisteredQueue.put(new UnregisteredEvent(registrationId, null, number, deviceId, timestamp));
    } else {
     logger.warn("APN unregister event for device with no parts: " + device.get());
    }
   } else {
    logger.warn("APN unregister event received for uncached ID: " + registrationId);
   }
  }
 }
}
origin: org.apache.camel/camel-apns

private List<InactiveDevice> getInactiveDevices() {
  ApnsEndpoint ae = getEndpoint();
  Map<String, Date> inactiveDeviceMap = ae.getApnsService().getInactiveDevices();
  List<InactiveDevice> inactiveDeviceList = new ArrayList<>();
  for (Entry<String, Date> inactiveDeviceEntry : inactiveDeviceMap.entrySet()) {
    String deviceToken = inactiveDeviceEntry.getKey();
    Date date = inactiveDeviceEntry.getValue();
    InactiveDevice inactiveDevice = new InactiveDevice(deviceToken, date);
    inactiveDeviceList.add(inactiveDevice);
  }
  return inactiveDeviceList;
}
com.notnoop.apnsApnsServicegetInactiveDevices

Javadoc

Returns the list of devices that reported failed-delivery attempts to the Apple Feedback services. The result is map, mapping the device tokens as Hex Strings mapped to the timestamp when APNs determined that the application no longer exists on the device.

Popular methods of ApnsService

  • push
  • start
    Starts the service. The underlying implementation may prepare its connections or datastructures to b
  • stop
    Stops the service and frees any allocated resources it created for this service. The underlying impl
  • testConnection
    Test that the service is setup properly and the Apple servers are reachable.

Popular in Java

  • Making http post requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • setContentView (Activity)
  • getSystemService (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • JCheckBox (javax.swing)
  • Join (org.hibernate.mapping)
  • Top 12 Jupyter Notebook extensions
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