Jump to content

mausmb

Members
  • Content Count

    54
  • Joined

  • Last visited

Everything posted by mausmb

  1. Hi, With Android Studio installed and SDK for API Level 33 .. is not working (for me). Because : 1. I have to manually edit AndroidManifest file ( <uses-sdk android:minSdkVersion="%minSdkVersion%" android:targetSdkVersion="33" />). 2. It's working on Pixel 3 ... but not on Pixel 7 (app just close). 3. if I change same configuration to android:targetSdkVersion="32" ... it's working on Pixel 7. 4. I didn't find and know how to properly install latest NDK (gdbserver....) - so for all unknown's in NDK I left old path/files. Unkonowns : strip.exe is not ther ..llvm-strip.exe NDK API LEVEL LOCATION C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.48361.3236\android-ndk-r21\platforms\android-23 c++ builder NDK library path: C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.48361.3236\android-ndk-r21\platforms\android-23\arch-arm64\usr\lib Delphi ndk library path: C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.48361.3236\android-ndk-r21\sources\cxx-stl\llvm-libc++\libs\arm64-v8a;C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.48361.3236\android-ndk-r21\platforms\android-23\arch-arm64\usr\lib If Anybody have working setup - please let me know where are those files πŸ™‚ Regards, Marjan
  2. Hi, Great .. I'm curious how do you solve Android biometric working on Android with Biometric privilega and activity/intents ? There a "bug" in Androidapi.JNI.Os.pas you can't call TJManifest_permission.JavaClass.USE_BIOMETRIC) (USE_BIOMETRIC is not included). in AndrodiManifgest.xml i have " <uses-permission android:name="android.permission.USE_BIOMETRIC" />" but nothing in Activity section. Regards, Marjan
  3. mausmb

    Delphi Android bluetooth_scan permission missing

    Hi, unit2.pas (C:\Users\Public\Documents\Embarcadero\Studio\22.0\Samples\Object Pascal\Multi-Device Samples\Device Sensors and Services\Bluetooth\Beacons\Beacons Proximity) LOCATION_PERMISSION = 'android.permission.ACCESS_FINE_LOCATION'; BLUETOOTH_SCAN_PERMISSION = 'android.permission.BLUETOOTH_SCAN'; BLUETOOTH_ADVERTISE_PERMISSION = 'android.permission.BLUETOOTH_ADVERTISE'; BLUETOOTH_CONNECT_PERMISSION = 'android.permission.BLUETOOTH_CONNECT'; if TOSVersion.Check(12) then Permissions := [LOCATION_PERMISSION, BLUETOOTH_SCAN_PERMISSION, BLUETOOTH_ADVERTISE_PERMISSION, BLUETOOTH_CONNECT_PERMISSION] else Permissions := [LOCATION_PERMISSION]; regards, mm
  4. mausmb

    using MediaDrm api for getting unique id on adroid

    B3B4BFBF67D02522F059BB610D9FA6A21D3042F2B45640C3E6A79AF2567B1327 with function ByteArrayToHexString(BA: TArray<Byte>; Sep: string = ''): string; var i, k: integer; begin result:=''; if Sep='' then begin for i:=low(BA) to high(BA) do result := result + IntToHex(BA, 2); end else begin k:=high(BA); for i:=low(BA) to k do begin result:= result + IntToHex(BA, 2); if k<>i then result := result + Sep; end; end; end;
  5. Hi, Certificate invalid .. regards, Marjan
  6. It's working πŸ™‚ HowEver result is "certificate invalid" 😞 regards, Marjan
  7. mausmb

    Bug with formatfloat in crossplatform ?

    This solves all scenarios and local settings
  8. mausmb

    Bug with formatfloat in crossplatform ?

    Hi, Use System.SysUtils.FormatSettings.DecimalSeparator one example if FormatSettings.DecimalSeparator = ',' then LText := StringReplace(LText, '.', FormatSettings.DecimalSeparator, [rfReplaceAll]) else LText := StringReplace(LText, ',', FormatSettings.DecimalSeparator, [rfReplaceAll]); br, m
  9. It's configuration... you can choose .. Application store - always generate AAB, develpomnet - APK
  10. Hi, 1. You shouldn't put "targetSdkVersion" version in AndroidManifest file 2. You should upgrade to 10.4.2 (Automatic target version is 29) 3. My apps working with Android 11 (Pixel3, Pixel4,...) " android:requestLegacyExternalStorage="true" " it's only for specific purpose as @Rollo62 pointed out. (Migration storage files) AndroidManifest.template <?xml version="1.0" encoding="utf-8"?> <!-- BEGIN_INCLUDE(manifest) --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="%package%" android:versionCode="%versionCode%" android:versionName="%versionName%" android:installLocation="%installLocation%"> <!-- This is the platform API where NativeActivity was introduced. --> <uses-sdk android:minSdkVersion="%minSdkVersion%" android:targetSdkVersion="%targetSdkVersion%" /> <%uses-permission%> <uses-feature android:glEsVersion="0x00020000" android:required="True"/> <application android:persistent="%persistent%" android:restoreAnyVersion="%restoreAnyVersion%" android:label="%label%" android:debuggable="%debuggable%" android:largeHeap="%largeHeap%" android:requestLegacyExternalStorage="true" android:icon="%icon%" android:theme="%theme%" android:hardwareAccelerated="%hardwareAccelerated%"> <%application-meta-data%> <%services%> <!-- Our activity is a subclass of the built-in NativeActivity framework class. This will take care of integrating with our NDK code. --> <activity android:name="com.embarcadero.firemonkey.FMXNativeActivity" android:label="%activityLabel%" android:configChanges="orientation|keyboard|keyboardHidden|screenSize" android:launchMode="singleTask"> <!-- Tell NativeActivity the name of our .so --> <meta-data android:name="android.app.lib_name" android:value="%libNameValue%" /> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <%activity%> <%receivers%> </application> </manifest> <!-- END_INCLUDE(manifest) --> AndroidManifest.xml generated from AndroidManifest.template <?xml version="1.0" encoding="utf-8"?> <!-- BEGIN_INCLUDE(manifest) --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="si.ros.RosNZ" android:versionCode="28" android:versionName="1.1.0" android:installLocation="auto"> <!-- This is the platform API where NativeActivity was introduced. --> <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="29" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.NFC" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-feature android:glEsVersion="0x00020000" android:required="True"/> <application android:persistent="False" android:restoreAnyVersion="False" android:label="RosNZ" android:debuggable="False" android:largeHeap="False" android:requestLegacyExternalStorage="true" android:icon="@drawable/ic_launcher" android:theme="@style/AppTheme" android:hardwareAccelerated="true"> <!-- Our activity is a subclass of the built-in NativeActivity framework class. This will take care of integrating with our NDK code. --> <activity android:name="com.embarcadero.firemonkey.FMXNativeActivity" android:label="RosNZ" android:configChanges="orientation|keyboard|keyboardHidden|screenSize" android:launchMode="singleTask"> <!-- Tell NativeActivity the name of our .so --> <meta-data android:name="android.app.lib_name" android:value="TESTXXAPP" /> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <receiver android:name="com.embarcadero.rtl.notifications.NotificationAlarm" /> </application> </manifest> <!-- END_INCLUDE(manifest) --> Regards, Marjan
  11. Hi, if you're using storage ... Android 11 have upgraded security in AndroidManifest.xml in section application add line android:requestLegacyExternalStorage="true" regards, M
  12. Uses System.Hash; .... var md5kont:ThashMD5; s1:string ... s1:=md5kont.GetHashString(mystringtohash); br, m
  13. mausmb

    Issue with UsesCleaner..

    Duplicate post
  14. mausmb

    TListView OnChange Event Doesn't Fire

    Hi, my temporary solution is : copiing files from delphi 10.3x to local App directory br, M
  15. mausmb

    TListView OnChange Event Doesn't Fire

    Vote for it ! https://quality.embarcadero.com/browse/RSP-30771 br, M
  16. mausmb

    10.4.1 Released today

    Hi, Problems : 1. with debuger (https://quality.embarcadero.com/browse/RSP-30772?filter=-4) - object inspector not working after first selection. 2. ListView "onchange" not fired/working with mouse and/or navigation keys (https://quality.embarcadero.com/browse/RSP-30771?filter=-4) br, m
  17. mausmb

    FireDAC SQLite error upon table open

    Hi, You didn't specify the path. assests\internal is for deployment TPath.GetDocumentsPath, 'db.s3db' is for PATH br, M
  18. Hi, Obviously "now" on Windows 10 is different .. Maybe you can go via DecodeDateTime(now,myYear,myMonth,myDay, myHour, myMin, mySec, myMilli) and then construct yours datetime formats Regards, m
  19. mausmb

    TStringGrig formatting date

    Hi, TFormatSettings.Create; FormatSettings.ShortDateFormat := 'dd.MM.yyyy'; // FormatSettings.LongDateFormat := 'dd.MM.yyyy'; // FormatSettings.DateSeparator := '.'; FormatSettings.ShortTimeFormat := 'hh:mm:ss'; // FormatSettings.LongTimeFormat := 'hh:mm:ss'; // regards, M
  20. mausmb

    Programmatically Change Properties of a Custom style

    Something in this direction ? procedure ColorLabel(const pColor : TAlphaColor; const pString:String; mylabel:Tlabel); var prect:Trectangle; ptext:TText; begin 1. creation if mylabel.ChildrenCount=1 then begin // creating trrectangle on fly prect:=Trectangle.Create(mylabel); prect.Parent:=mylabel; prect.Align:=TAlignLayout.Client; prect.HitTest:=False; prect.Margins.Left:=-1; prect.Margins.Right:=-1; prect.Margins.Top:=-1; prect.Margins.Bottom:=-1; prect.Sides:=[]; // no borders prect.Fill.Color:=pColor; ptext:=TText.Create(mylabel); ptext.Parent:=prect; ptext.Align:=TAlignLayout.Client; ptext.Text:=pString; ptext.TextSettings:= mylabel.TextSettings; ptext.HitTest:=False; mylabel.Text:=''; end 2. changing color if mylabel.Children[1].ClassName=Trectangle.ClassName then Begin // change color (mylabel.Children[1] as Trectangle).Fill.Color:=pColor; // pCOlor is parameter for custom color if (mylabel.Children[1] as Trectangle).Children[0].classname=TText.classname then Begin // chanhe text ((mylabel.Children[1] as Trectangle).Children[0] as TTExt).Text:=pString; // pString is parameter for TEXT ((mylabel.Children[1] as Trectangle).Children[0] as TTExt).TextSettings.Fontcolor:=mylabel.TextSettings.Fontcolor; End; End; end; br, m
  21. mausmb

    How to Code SQL IN Statement correctly

    Hi, This code "qQuery.Open( 'SELECT * FROM tTableName WHERE Status IN ( :pS, :pR ) ORDER BY EventDate', [ 'S', 'R' ] );" can't work for a single or more than 2 parameters (just in case) Param1:='( 'S','R' )' Param2:='['S','R']' qQuery.Open( 'SELECT * FROM tTableName WHERE Status IN :Param1 ORDER BY EventDate, :Param2 ); I'm using that approach without Param2 (that part you should test it) regards, M
  22. Hi, Fmx.VirtualKeyboard works fine with Android, but with Windows is unstable and slow .... Did Anybody made custom FMX keyboard for Windows ? Regards, marjan
  23. Closed : bug in 10.3.2 (SugarLoaf is working ) Hi, I have a problem with intercepting SOAP packages. I'm using WSDL importer and THTTPRIO OnBeforeExecute and OnAfterExecute event. OnAfterExecute I get Soap response package without problem, but OnBeforeExecute Tstream (as String) is always empty. What I'm doing wrong ? procedure TDummyBeforeEx.Beforexecute(const MethodName: string; SOAPRequest: TStream); var sl : TStringList; // If I'm ussing Array of byte is the same empty result when encoding to string begin sl := TStringList.Create; SOAPRequest.Position := 0; try sl.LoadFromStream(SOAPRequest); if sl.Text='' then // Always empty ! exit; sl.Text := StringReplace(sl.Text, '<soap:Body>', '<soap:Body>XXX', [rfReplaceAll]); sl.SaveToStream(SOAPRequest); finally sl.Free; end; end; function GetKasaSoap(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): KasaSoap; const defSvc = 'Kasa'; defPrt = 'KasaSoap'; var RIO: THTTPRIO; begin Result := nil; if (Addr = '') then begin if UseWSDL then Addr := defWSDL else Addr := defURL; end; if HTTPRIO = nil then RIO := THTTPRIO.Create(nil) else RIO := HTTPRIO; try rio.OnAfterExecute:=TDummyAfterEx.AfterExecute; // working as aspected rio.OnBeforeExecute:=TDummyBeforeEx.Beforexecute; RIO.Converter.Options:=RIO.Converter.Options+[TSOAPConvertOption.soSendMultiRefObj,TSOAPConvertOption.soSendMultiRefArray]; // RIO.HTTPWebNode.ConnectTimeout:=10; // RIO.HTTPWebNode.SendTimeout :=10; // RIO.HTTPWebNode.ReceiveTimeout:=10; Result := (RIO as KasaSoap); if UseWSDL then begin RIO.WSDLLocation := Addr; RIO.Service := defSvc; RIO.Port := defPrt; end else RIO.URL := Addr; finally if (Result = nil) and (HTTPRIO = nil) then RIO.Free; end; end; Regards, M
Γ—