Interface BitwardsService.Notifier

Enclosing class:
BitwardsService

public static interface BitwardsService.Notifier

Notify interface can be optionally used to notify that BitwardsService instance has been initialized. For instance, this typically happens when there NFC based resource is being accessed when application is running. Notifier class has to always be implemented by a real class, it cannot be anonymous class.

Please note that if obfuscation is used, this class should not obfuscated. Easiest way to not obfuscate it, is to add the following rule to Proguard/R8 configuration:

-keep public class * implements fi.bitwards.service.BitwardsService$Notifier

Example Notifier class:


     public class BitwardsServiceNotifier implements BitwardsService.Notifier {

         @Override
         public void notify(Context context, BitwardsService service) {
             // Bitwards instance has been initialized, perform any
             // needed operations on the UI.  For instance, start the
             // application.
         }
     }
 
Setup the Notifier with BitwardsService instance:

     bws.setNotifier(BitwardsServiceNotifier.class);
 

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    notify(android.content.Context context, BitwardsService service)
    This method is called when BitwardsService instance has been setup.
  • Method Details

    • notify

      void notify(android.content.Context context, BitwardsService service)
      This method is called when BitwardsService instance has been setup.
      Parameters:
      context - the application context
      service - the BitwardsService