Class ShadowWifiAwareManager


  • @Implements(value=android.net.wifi.aware.WifiAwareManager.class,
                minSdk=26)
    public class ShadowWifiAwareManager
    extends java.lang.Object
    Shadow Implementation of WifiAwareManager
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void attach​(android.net.wifi.aware.AttachCallback callback, android.os.Handler handler)  
      protected boolean isAvailable()  
      static android.net.wifi.aware.PublishDiscoverySession newPublishDiscoverySession​(android.net.wifi.aware.WifiAwareManager manager, int clientId, int sessionId)
      Returns a new instance of PublishDiscoverySession.
      static android.net.wifi.aware.SubscribeDiscoverySession newSubscribeDiscoverySession​(android.net.wifi.aware.WifiAwareManager manager, int clientId, int sessionId)
      Returns a new instance of SubscribeDiscoverySession.
      static android.net.wifi.aware.WifiAwareSession newWifiAwareSession​(android.net.wifi.aware.WifiAwareManager manager, android.os.Binder binder, int clientId)
      Returns a new instance of WifiAwareSession.
      protected void publish​(int clientId, android.os.Looper looper, android.net.wifi.aware.PublishConfig publishConfig, android.net.wifi.aware.DiscoverySessionCallback callback)  
      void setAvailable​(boolean available)
      Sets the availability of the wifiAwareManager.
      void setDiscoverySessionToPublish​(android.net.wifi.aware.PublishDiscoverySession publishDiscoverySession)
      Sets parameter to pass to DiscoverySessionCallback#onPublishStarted(PublishDiscoverySession)
      void setDiscoverySessionToSubscribe​(android.net.wifi.aware.SubscribeDiscoverySession subscribeDiscoverySession)
      Sets param to pass to DiscoverySessionCallback#onSubscribeStarted(SubscribeDiscoverySession)
      void setSessionDetached​(boolean sessionDetached)
      Sets the boolean value indicating if a wifiAwareSession has been detached.
      void setWifiAwareSession​(android.net.wifi.aware.WifiAwareSession session)
      Sets parameter to pass to AttachCallback#onAttach(WifiAwareSession session)
      protected void subscribe​(int clientId, android.os.Looper looper, android.net.wifi.aware.SubscribeConfig subscribeConfig, android.net.wifi.aware.DiscoverySessionCallback callback)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShadowWifiAwareManager

        public ShadowWifiAwareManager()
    • Method Detail

      • isAvailable

        @Implementation
        protected boolean isAvailable()
      • attach

        @Implementation
        protected void attach​(android.net.wifi.aware.AttachCallback callback,
                              android.os.Handler handler)
      • publish

        @Implementation
        protected void publish​(int clientId,
                               android.os.Looper looper,
                               android.net.wifi.aware.PublishConfig publishConfig,
                               android.net.wifi.aware.DiscoverySessionCallback callback)
      • subscribe

        @Implementation
        protected void subscribe​(int clientId,
                                 android.os.Looper looper,
                                 android.net.wifi.aware.SubscribeConfig subscribeConfig,
                                 android.net.wifi.aware.DiscoverySessionCallback callback)
      • newPublishDiscoverySession

        public static android.net.wifi.aware.PublishDiscoverySession newPublishDiscoverySession​(android.net.wifi.aware.WifiAwareManager manager,
                                                                                                int clientId,
                                                                                                int sessionId)
        Returns a new instance of PublishDiscoverySession.
      • newSubscribeDiscoverySession

        public static android.net.wifi.aware.SubscribeDiscoverySession newSubscribeDiscoverySession​(android.net.wifi.aware.WifiAwareManager manager,
                                                                                                    int clientId,
                                                                                                    int sessionId)
        Returns a new instance of SubscribeDiscoverySession.
      • newWifiAwareSession

        public static android.net.wifi.aware.WifiAwareSession newWifiAwareSession​(android.net.wifi.aware.WifiAwareManager manager,
                                                                                  android.os.Binder binder,
                                                                                  int clientId)
        Returns a new instance of WifiAwareSession.
      • setAvailable

        public void setAvailable​(boolean available)
        Sets the availability of the wifiAwareManager.
      • setWifiAwareSession

        public void setWifiAwareSession​(android.net.wifi.aware.WifiAwareSession session)
        Sets parameter to pass to AttachCallback#onAttach(WifiAwareSession session)
      • setSessionDetached

        public void setSessionDetached​(boolean sessionDetached)
        Sets the boolean value indicating if a wifiAwareSession has been detached.
      • setDiscoverySessionToPublish

        public void setDiscoverySessionToPublish​(android.net.wifi.aware.PublishDiscoverySession publishDiscoverySession)
        Sets parameter to pass to DiscoverySessionCallback#onPublishStarted(PublishDiscoverySession)
      • setDiscoverySessionToSubscribe

        public void setDiscoverySessionToSubscribe​(android.net.wifi.aware.SubscribeDiscoverySession subscribeDiscoverySession)
        Sets param to pass to DiscoverySessionCallback#onSubscribeStarted(SubscribeDiscoverySession)