Also bei mir geht sowas immer so
Delphi-Quellcode:
function GetConnectivityManager: JConnectivityManager;
var
ConnectivityServiceNative: JObject;
begin
ConnectivityServiceNative := SharedActivityContext.getSystemService( TJContext.JavaClass.CONNECTIVITY_SERVICE );
if not Assigned( ConnectivityServiceNative )
then
raise Exception.Create( '
Could not locate Connectivity Service' );
Result := TJConnectivityManager.Wrap( ( ConnectivityServiceNative
as ILocalObject ).GetObjectID );
if not Assigned( Result )
then
raise Exception.Create( '
Could not access Connectivity Manager' );
end;
Kaum macht man's richtig - schon funktioniert's
Zertifikat: Sir Rufo (Fingerprint: ea 0a 4c 14 0d b6 3a a4 c1 c5 b9
dc 90 9d f0 e9 de 13 da 60)