Jump to content

GSan

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

Technical Information

  • Delphi-Version
    Delphi 11 Alexandria
  1. Hi everyone, I'm trying to enable and disable hotspot on android11 device with Delhpi 11 but I don't understand what I'm doing wrong.... this is my code: procedure TForm1.Button2Click(Sender: TObject); var WifiManagerObj: JObject; WifiManager: JWifiManager; Mycallback: JWifiManager_LocalOnlyHotspotCallback; startedres:JWifiManager_LocalOnlyHotspotReservation; handler: JHandler; begin WifiManagerObj := SharedActivityContext.getSystemService(TJContext.JavaClass.WIFI_SERVICE); WifiManager := TJWifiManager.Wrap((WifiManagerObj as ILocalObject).GetObjectID); Mycallback:= TJWifiManager_LocalOnlyHotspotCallback.Create; startedres:=TJWifiManager_LocalOnlyHotspotReservation.Create; WifiManager.startLocalOnlyHotspot(Mycallback,handler); Mycallback.onStarted(startedres); end; some idea... thank you GS
×