Jump to content

Search the Community

Showing results for tags 'android'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 167 results

  1. My application, written for iOS, creates caf files and uploads them to the server. My other application, written for Android, would like to play these files, but cannot. Apparently different formats. Android application that creates caf files, successfully plays them The problem is not new: https://stackoverflow.com/questions/34546248/how-to-play-caf-audio-file-on-android-platform-firemonkey But 8 years have passed. I think there are solutions. I wish my Android app could play caf files from iOS.
  2. I have used Delphi 12 for developing Android application and I'm trying to Service which needs to runs in the background to receive the frequent messages from Server using TCP sockets to displays the notifications. But, the service is deactivated / closed after the main process application is closed. Below, the code is mentioned the code to start the service : procedure TForm1.ButtonServiceStartClick(Sender: TObject); var ServiceIntent: JIntent; begin ServiceIntent := TJIntent.Create; ServiceIntent.setClassName(TAndroidHelper.Context, StringToJString('com.embarcadero.services.MyService')); TAndroidHelper.Context.startService(ServiceIntent); end; and also, I have added the following service information in AndroidManifest.template.xml : <service android:enabled="true" android:exported="false" android:label="MyService" android:process=":remote" android:name="com.embarcadero.services.MyService"> </service> Code in Service: function TDM.AndroidServiceStartCommand(const Sender: TObject; const Intent: JIntent; Flags, StartId: Integer): Integer; begin Result := TJService.JavaClass.START_STICKY; end; I have tried to use this Solution, but not able to compile. And tried to implement the Sleep in Android Start command / run the thread, still the android service is getting closed. Do, I need to mentioned the different flag for starting the service or do I need to add additional code to run the service all the time or can we restart the service once it's destroyed and how to handle the code in Destroy event?
  3. Using Delphi 12, Woll2Woll Firepower Data Grid, Firedac Query, SQLite DB Have an app that has been used for couple of years without any significant issues until recent compile with Delphi 12. The issue is with editing an integer field in a Firepower data grid. For the field keyboard type I have selected the numberpad type. Previously users have always been able to select the minus sign to input a negative number but this no longer works since the last compile for Android. Can anybody please help with advice on how to fix this issue. Bill Zwirs
  4. Hi, I take many photos with my Android phone. And now I need a way to Add some search text to the image so that I can find the photos. With a custom image viewer app I will create in conjunction with the metadata reader/writer, my search method would be to open the phone's Gallary (I don't know how to do this yet) and then enter a search word and only photos that match will show, like the way they do when you are in the Gallary app. I searched around and see references for ccr-exif but it is for Delphi VCL, not FMX/Android. Is there a Delphi unit that provides this or someplace where I can download a working project to accomplish this ? TIA.
  5. HI there i just made a try, i started there! To work on the Android platform using compile directives, i needed to make some modifications to the code in several files. Lets focus on 'svn.overbyte.be/svn/icsv9/Source/OverbyteIcsUtils.pas'.The classTIcsIntegerList is essentially a wrapper around the TList class, since this code was designed for use in a Windows platform target, on a different platform, i needed to make some adjustments. type TIcsIntegerList = class(TObject) private FList : TList<Integer>; // Use TList<Integer> instead of TList function GetCount: Integer; function GetFirst: Integer; function GetLast: Integer; function GetItem(Index: Integer): Integer; procedure SetItem(Index: Integer; const Value: Integer); public constructor Create; virtual; destructor Destroy; override; function IndexOf(Item: Integer): Integer; function Add(Item: Integer): Integer; virtual; procedure Assign(Source: TIcsIntegerList); virtual; procedure Clear; virtual; procedure Delete(Index: Integer); virtual; property Count: Integer read GetCount; property First: Integer read GetFirst; property Last : Integer read GetLast; property Items[Index: Integer] : Integer read GetItem write SetItem; default; end; // ... other codes { TIcsIntegerList } function TIcsIntegerList.Add(Item: Integer): Integer; begin Result := FList.Add(Item); // No need to typecast Item to Pointer end; procedure TIcsIntegerList.Clear; begin FList.Clear; end; constructor TIcsIntegerList.Create; begin FList := TList<Integer>.Create; // Use TList<Integer> instead of TList end; procedure TIcsIntegerList.Delete(Index: Integer); begin FList.Delete(Index); end; destructor TIcsIntegerList.Destroy; begin FList.Free; inherited; end; function TIcsIntegerList.GetCount: Integer; begin Result := FList.Count; end; function TIcsIntegerList.GetFirst: Integer; begin Result := FList.First; // No need to typecast FList.First to Integer end; function TIcsIntegerList.GetLast: Integer; begin Result := FList.Last; // No need to typecast FList.Last to Integer end; // ... other codes but i faced a lot of errors when i target android platform and compiled, it gives me errors like: [DCC Error] OverbyteIcsUtils.pas(5931): E2023 Function needs result type [DCC Error] OverbyteIcsUtils.pas(5933): E2003 Undeclared identifier: 'FList' [DCC Error] OverbyteIcsUtils.pas(5933): E2003 Undeclared identifier: 'Item' [DCC Error] OverbyteIcsUtils.pas(5938): E2004 Identifier redeclared: 'TIcsIntegerList' [DCC Error] OverbyteIcsUtils.pas(5940): E2003 Undeclared identifier: 'FList' [DCC Error] OverbyteIcsUtils.pas(5945): E2037 Declaration of 'TIcsIntegerList' differs from previous declaration ...: So how to fix it? Or can anyone point me to the right direction?
  6. Hi there, I've got suspicious log messages, with an Android App under Rx11.3. I am not using any 3rd Party frameworks, nor can I imagine what could cause this warning. When I check, these fieds seems to be deprecated since Android 10, related to accessing screen contents. https://developer.android.com/about/versions/10/privacy/changes#screen-contents In the sources under FMX.Platform.Screen.Android, there seems to be a possible relation to DisplayManager, maybe this is doing something with the display. https://developer.android.com/reference/kotlin/android/hardware/display/DisplayManager#virtual_display_flag_auto_mirror https://developer.android.com/reference/kotlin/android/hardware/display/DisplayManager#virtual_display_flag_secure or maybe RestrictedScreenReading has to do with it ... https://source.android.com/docs/core/permissions/restricted-screen-reading?hl=en FMX.Platform.Screen.Android: TAndroidScreenServices = class(TInterfacedObject, IFMXMultiDisplayService, IFMXScreenService, IFMXDeviceMetricsService, IFMXFullScreenWindowService) ... public property DisplayManager: JDisplayManager read FDisplayManager; property IsPrimaryDisplayDefined: Boolean read FIsPrimaryDisplayDefined; property PrimaryDisplay: TDisplay read FPrimaryDisplay; end; But that is a rough guess. The app seems to behave normally, but I wonder if that might cause probems in the future. I'm testing under Android 14 now. If anyone knows how to get rid of these warnings, or at least a hint where this could be related to, please let me know.
  7. I'm writing a FMX app (lets call it appD) for Android in Delphi 11.3 that has to be called/started - and receive some data - from an Android app (let's call it appF) developed by another team (they use Flutter). AppF uses an intent like this for calling my app: AndroidIntent( action: "android.intent.action.launch.from.appF", package: "com.test.appd", arguments: { "userId": "User01”, "token": "SomeToken" }, flags: [0123456], ) My app, appD, starts when called by tappF, but I'm unable to receive the data I need (userID, token and flags). I have made some experiments with the following code from the sample project ReceiveIntent.dproj, but without success: function TForm1.HandleIntentAction(const Data: JIntent): Boolean; var Extras: JBundle; jsonMsg: string; begin Result := False; if Data <> nil then begin Memo1.ClearContent; Extras := Data.getExtras; if Extras <> nil then begin jsonMsg := JStringToString(Extras.getString(TJIntent.JavaClass.EXTRA_TEXT)); Memo1.Text := jsonMsg; end; Invalidate; end; end; This function is called and I get no errors, but jsonMsg is always empty. I'm a noob as per Android development... can someone show me the right way to retrieve the arguments passed by the appF? I'm really lost... Thanks for your time!
  8. Hi there, I wanted to create an new keystore file, still under RadStudio 11.3, which works. But I haven't used that quite some time, and I must find out that the "Alias Password" is no more available or possible to set. In the dialog, there is still the option, but that seems not really get activated and longer. The first step looks quite normal but the 2nd step, never shows the Alias password It is possible to create a keystore still but of course without the alias password, also here The Alias Info looks OK, but missing password Commandline After some evaluation on commandline, it seems that the former keytool parameters seems to be changed. 1.) From something before, with -genkey keytool -genkey -v -keystore %ks_file% -alias %ks_alias% -keyalg RSA -sigalg SHA1withRSA -keysize 2048 -validity 9132 2.) to something new, with -genkeypair keytool -genkeypair -v -keypass "%ks_pass%" -keystore %ks_file% -alias %ks_alias% -keyalg RSA -keysize 2048 -validity 9132 This works quite similar and looks like the proper replacement, unfortunately I cannot find since when this might have changed. I am working on the pre-installed JDK from the D11.3 IDE, which should be untouched and OK: Possible changes, with maybe sideeffects in the PlayStore, GCM or elsewhere: 1.) old method : This used the -sigalg SHA1withRSA, while 2,) new method: This used the -sigalg SHA256withRSA Yes, that make perfectly sense, since SHA1 is quite banned everywhere. Though, my questions are still: - Is this change officially documented anywhere? (probably not really for Delphi, but for Android, GCM or Firebase would be great) for example https://stackoverflow.com/questions/65920211/warning-sha1-algorithm-and-sha1withrsa-algorithm-specified-will-be-disabled-in https://www.ibm.com/docs/en/semeru-runtime-ce-z/17?topic=jcecca-sha1withrsa https://stackoverflow.com/questions/70419377/how-to-update-the-android-keystore-signature-algorithm-name-sha1withrsa-weak https://github.com/italia/cie-ideaapp/issues/4 But not much really related directly to Android Apps, PlayStore and Google Cloud Services. - Are there any further known requirements, or known sideeffects, for that alias password or SHA1withRSA algorithm? ( I can remember darkly, that I have read about such requirement somewhere, some years ago, but probably those procedures have changed meanwhile ). - What would be the right way to create Keystore in 2023 then, the usual IDE way, without alias password, or probably using a commandline option, either similar or different as 2.) ? I assume that the new D12.0 might also clarify about that process, but I still have to use my beloved D11.3 for a short while 🙂
  9. Hi! Android app. seems working fine in debug or release (Development) mode on my Android device. But if I upload the AAB file to Google Play Store and install it from there it exits on startup. Not sure if it's a crash I have very little experience with Android. The project is from the XE5 era. Tried: - Deleted the manifest file, so it was re-created by Delphi - Did a "Revert system files to default" - Did a "Revert to default" in Deployment Google Play Store page: https://play.google.com/store/apps/details?id=com.embarcadero.MP4StreamEditorClient As I wrote it seems working fine if I start it through Delphi+USB and also if I start it after it has been installed by Delphi, just the Install and start from Play Store does not work. Any ideas? Thank you! 3delite
  10. SPECS: Delphi 11.2, Galaxy S10+ phone (Android 12) (screen size is 6.4 inches) Issue: I want to change the view in the IDE to match my phone but the closest one is the 'Android 5" phone', and when I add componets on the form in that view, after compiling, the controls don't fit the screen and/or are sometimes off the view of the screen. In Delphi XE7, in the View's drop-down list, there is a custom setting option. I think I only used it once for a tablet years ago, but could not figure it all out and gave up. However, in 11.2, there is no listing for custom. So, I was wondering if there are downloadable views, or does the developer has to figure it out manually by eye/try. I've been searching around but cannot find any answers. TIA.
  11. specs: window 7 64bit, delphi 11.2, phone s10+ with android 12 I've been wanting to ask this question for some time and an opportunity came to me and I'm now asking... I would like to send text from my galaxy s10+ phone to my laptop over wifi, and back, from my laptop to Android over wifi. I want to type some text, a word, or a whole paragraph, and send it. Are there any demos or how-tos for this? I searched my sample folders but did not find anything. Also, I do not want to use a USB cable, nor do I want to join/use any outside services from other sources. I don't want to download any apps, register, and all that. I want this to be strictly private and only from my two devices. TIA
  12. Hi there, recently I've got some insights, about the internal TBitmap magic in FMX, for the following code snippet, under Android: procedure TTestForm.SaveImageToTemporaryStore( const AImage : TBitmap; const AArrayList : JArrayList; const AIndex : Integer ); var LImageFile : JFile; LImageUri : Jnet_Uri; LOutputDir : JFile; LPath : String; begin // Retrieves the apps cache, temporary file storage folder LOutputDir := TAndroidHelper.Context.getExternalCacheDir(); // Creates a temporary file in that cache folder LImageFile := TJFile.JavaClass.createTempFile( StringToJString( 'attachment' + AIndex.ToString ), StringToJString( '.png' ), //<== This is the only palce where png comes into play LOutputDir ); // Get that file as URI LImageUri := TAndroidHelper.JFileToJURI( LImageFile ); // Retrieve that path, for testing purposes, it looks like this: // '/storage/emulated/0/Android/data/com.embarcadero.APPNAMEHERE/cache/attachment05833119307942135994.png' LPath := JStringToString( LImageFile.getAbsolutePath ); // Save the TBitmap to that IRI file Path, works pretty well AImage.SaveToFile( LPath ); That works well and all as expected. When I send that file via sharesheet then after, also that works fine. // If we use ACTION_SEND_MULTIPLE action of Intent, we should put image throught Parcelable Array List. // Because in this case other application read EXTRA_STREAM like a ArrayList<Uri> // Created externally by LArrayList := TJArrayList.Create; AArrayList.add( LImageUri ); end; Then finally this is added to an Intent, to share to other apps. That works well, put it as below into the Intent as EXTRA_STREAM, it sends the .png file via different apps: LIntent.putParcelableArrayListExtra( TJIntent.JavaClass.EXTRA_STREAM, LArrayList ); So all works well and I should not complain. But it struck my, when I asked myself: Why does the source TBitmap converts to a *.png file in the first place ? Why didn't I had to fumble around with TBitmapCodecManager or something else, to get this conversion coded ? After some investigation, looking into the TBitmap.SaveToFile( LPath ); I found that the trick, by hidden conversion, depending on the file extension: procedure TBitmap.SaveToFile(const AFileName: string; const SaveParams: PBitmapCodecSaveParams = nil); var Surf: TBitmapSurface; begin TMonitor.Enter(Self); try Surf := TBitmapSurface.Create; try Surf.Assign(Self); if not TBitmapCodecManager.SaveToFile(AFileName, Surf, SaveParams) then raise EBitmapSavingFailed.CreateFMT(SBitmapSavingFailedNamed, [AFileName]); finally Surf.Free; end; finally TMonitor.Exit(Self); end; end; Sometimes, I'm still surprised by the hidden convenience that Firemonkey provides for us. Under VCL I would have to convert this image the hard way by myself, for example with TPNGImage, like PeterBelow pointer out here. I'm always happy when FMX made me forget such nasty details
  13. We've been having a strange issue using the TRESTRequest component with some of our users. When we call the request.execute on those devices, it always raises an exception with the message of "External Exception 0". Weirdly it only seems to happen on Samsung devices, particularly newer models such as the S22 Ultra (but not exclusively that device). It happens for every API call we make, but only affects our app. The user reports that all their other apps can talk to the internet fine, so not sure what this could be. We have a number of newer Samsung test devices but can't reproduce this issue. The error seems to be coming from the OS rather than Delphi, but I can't see any reason for it. We've been exploring device config-specific factors such as firewall apps, disabling data access to the app etc but there doesn't seem to be anything special. Most affected users keep their devices as factory default for these settings. I've extract a logcat from those devices (I don't have physical access to the device though), and it doesn't show any errors, warnings or messages related to network access, security or things I would expect if the OS was the cause. We're running out of ideas, and the users are becoming frustrated as they can't use the cloud features of our app. I'd really appreciate any thoughts, suggestions or even just troubleshooting theories that could help to figure this out. Thanks!
  14. helste7023

    App for Android 11 with Delphi 10.1

    Hello, I still am on Delphi 10.1, because it does all what need and I hat spending 2 days installing all my third party components after upgrading to a new Delphi version. And of course it is not that cheap any more as it used to be, when I started with Delphi a long time ago. Unfortunately an Android app I made with Delphi 10.1. does not start on a new device with Android 11. Is there a way to get an app, that is made with Delphi 10.1 working on Android 11 or do I have to upgrade to Delphi 11.x? Any help would be highly appreciated.
  15. hackbrew

    App persistence and restoring state

    Currently, I'm working on an Android 13 FireMonkey mobile app (Delphi 11.3) with a TabControl with about four tabs. The app is grabbing JSON data from a URL and manually parses and loads the data into a FDMemTable. The app has very small data requirements (ie., single user, single table, and the JSON file would exchange only about 25 records per day containing about a dozen or so key/value pairs). Besides the memory table, I'm using an embedded database (SQLite) to store the data on device using LocalSQL features to implement database CRUD operations. My concern is persistence and restoring state if the app were to say crash/lose focus/device reset. Right now each time the app gains focus it starts from the beginning. For example, when running the app and then a call comes in on the device, my app loses its focus. When you return back to the app it starts as in the first time. I would like it if when the app restarts to remain in the same state it was before going to the background. I played around with the OnSaveState event on my main form, but it didn't behave the way I expected. For example, I send a mapping intent from my app to the default mapping app on the device for navigation. In this instance, the user temporarily leaves my app when the mapping app opens, and when closed, the user should return to my app. When I implement the OnSaveState event into my app (to read/write data to a stream) the user never returns to my app after closing the mapping app. But, if I remove the OnSaveState event, it does return back to my app, which is the desired behavior. How should persistence and restoring state be handled in an Android app?
  16. i have this code here: fTask: ITask; fTask := TTask.Create( procedure begin while not True do Application.ProcessMessages; TThread.Synchronize(TThread.Current, procedure begin // update ui end); end); fTask.ExecuteWork; // this will stop here.. until [fTask] finish work !! In android didn't wait untill Task Complete !!
  17. Hello all, We've just deployed an update to our FMX app on the Play Store, but we're seeing a worrying number of ANRs reported in the Play Store vitals area. We've changed a lot in this latest update including much heavier use of styles from style books. We also can't reproduce the ANRs on any of our 10 Android test devices as it's only impacting < 1% of our user case (around 600 instances from 200,000 installs). I have a clear call stack (below) which is showing that the ANR is a block on a monitor when trying to apply the styles to my UI elements, loading the resource specifically. Does anyone have any ideas of how this could theoretically be caused? We do use a lot of threads so my first thing to check was that we weren't trying to update the UI from a thread without Synchronize or Queue but I can't find any case where we aren't. Any suggestions for what I could look for would be very welcome! Thanks Call stack: (System::Sysutils::WaitForSyncWaitObj(void*, unsigned int)+100) (System::Sysutils::WaitOrSignalObj(void*, void*, unsigned int)+96) (System::TMonitor::Enter(unsigned int)+528) (System::Rtti::TPoolToken::TPoolToken()+120) (System::Rtti::EnsurePoolToken(System::DelphiInterface<System::IInterface>*)::DoCreate(void*)+52) (System::Rtti::EnsurePoolToken(System::DelphiInterface<System::IInterface>*)+32) (System::Rtti::TRttiContext::KeepContext()+104) (System::Classes::BeginGlobalLoading()+20) (Fmx::Controls::TStyleContainer::LoadStyleResource(System::Classes::TStream*)+40) (Fmx::Controls::TStyleContainer::CreateStyleResource(System::UnicodeString)+92) (Fmx::Controls::TStyleContainer::FindStyleResource(System::UnicodeString, bool)+36) (Fmx::Controls::TStyledControl::LookupStyleObject(...)::LookupStyleInObject(void*, Fmx::Types::TFmxObject*, System::UnicodeString)+88) (Fmx::Controls::TStyledControl::LookupStyleObject(...)::LookupStyle(void*, Fmx::Types::TFmxObject*)+84) (Fmx::Controls::TStyledControl::LookupStyleObject(...)+336) (Fmx::Controls::TStyledControl::GetStyleObject(bool)+236) (Fmx::Controls::TStyledControl::GetStyleObject()+28) (Fmx::Controls::TStyledControl::ApplyStyleLookup()+124) (Fmx::Controls::Presentation::TPresentedControl::ApplyStyleLookup()+52) (Fmx::Controls::TStyledControl::PrepareForPaint()+32) (Fmx::Controls::TControl::PrepareForPaint()+656) (Fmx::Forms::TCustomForm::PrepareForPaint()+504) (Fmx::Forms::TCustomForm::PaintRects(System::Types::TRectF const*, int)+76) (Fmx::Platform::Ui::Android::TFormRender::Render()+124) (Fmx::Platform::Ui::Android::TAndroidWindowHandle::TSurfaceViewListener::surfaceChanged(...)+56) (System::Rtti::Invoke(void*, System::DynamicArray<System::Rtti::TValue>, System::Typinfo::TCallConv, System::Typinfo::TTypeInfo*, bool, bool)+556) (System::Rtti::TRttiInstanceMethodEx::DispatchInvoke(System::Rtti::TValue const&, System::Rtti::TValue const*, int)+1328) (System::Rtti::TRttiMethod::Invoke(System::TObject*, System::Rtti::TValue const*, int)+84) (Androidapi::Jnibridge::dispatchToNative2(...)+692) at com.embarcadero.rtl.ProxyInterface.dispatchToNative2 (Native method)
  18. I'm having difficulties getting HTML into the body of an email message when I send using intents, which opens the email app on the device to send the message. My application is able to put the html code into the body via this method but the message just shows the html code, not the browser type view of the code. What am I doing wrong? Code follows: procedure TfrmMain.SendMailViaIntent(const AText: string); var Intent: JIntent; sMessageBody:string; Recipients: TJavaObjectArray<JString>; begin sMessageBody:=Body.Lines.Text; //Intent := TJIntent.Create; Intent := TJIntent.JavaClass.init(TJIntent.JavaClass.ACTION_SEND); Recipients := TJavaObjectArray<JString>.Create(1); Recipients.Items[0] := StringToJString(AText); //Intent.setType(StringToJString('message/rfc822')); Intent.setType(StringToJString('text/html'));//not showing as html Intent.putExtra(TJIntent.JavaClass.EXTRA_EMAIL,Recipients); Intent.putExtra(TJIntent.JavaClass.EXTRA_SUBJECT, StringToJString(edOutSubject.Text)); //Intent.putExtra(TJIntent.JavaClass.EXTRA_STREAM, StringToJString(sMessageBody)); Intent.putExtra(TJIntent.JavaClass.EXTRA_TEXT, StringToJString(sMessageBody)); Intent.putExtra(TJIntent.JavaClass.EXTRA_HTML_TEXT, StringToJString(sMessageBody)); TAndroidHelper.Activity.startActivity(TJIntent.JavaClass.createChooser(Intent, StrToJCharSequence('Which email app?'))); end;
  19. Hi everyone, i need to ask the permissions to read the notifications on the device, but i can't find the correct way to do it, in the project options i selected the "Bind notification listner service" permission. The code I use is this: uses ... Androidapi.JNI.GraphicsContentViewText, Androidapi.JNI.Provider, Androidapi.Helpers, Androidapi.JNI.JavaTypes, System.StrUtils ... procedure TFormTestPerm.Button1Click(Sender: TObject); //to show the permissions dialog VAR LIntent : JIntent; begin LIntent := TJIntent.Create; LIntent.setAction(TJSettings.JavaClass.ACTION_NOTIFICATION_LISTENER_SETTINGS); TAndroidHelper.Context.startActivity(LIntent); end; procedure TFormTestPerm.Button2Click(Sender: TObject); //to take the test VAR SecureS : JString; NomeAppS : String; begin NomeAppS := JStringToString(TAndroidHelper.Context.getPackageName); SecureS := TJSettings_Secure.JavaClass.getString(SharedActivityContext.getContentResolver, StringToJString('enabled_notification_listeners')); If AnsiContainsText(JStringToString(SecureS),NomeAppS) Then Label1.Text := 'SERVICE FOUND!' Else Label1.Text := 'NO SERVICE FOUND'+sLineBreak+'"'+NomeAppS+'"'; end; but my application does not appear in the list. I've found a few solutions on the net that I still can't get to work. Does anyone know the proper way to ask for this type of permission?
  20. Hi. As the title says, I cannot debug any Delphi FMX application on my Android phone. I'm using the latest Delphi version (Alexandria, Update 1), and my phone is Samsung A52s. When I try to run in debug mode, the app installs, a black screen shows up on the phone, and RAD studio layout transforms to Debug layout. Two outcomes may happen after that: I get the exception Stop(17), which leads me to CPU view and a call stack containing only "clone" and "bionic_clone", The app stays entirely black, and either nothing happens or RAD studio disconnects after a minute of being in the debug mode. On further investigation, I realized that if I set a breakpoint on Application.Initialize, it is never triggered. Also, if I set a breakpoint while the debugger is attached, RAD studio freezes for ~10 seconds, and after it unfreezes the debugger disconnects (while the app is still running on the phone, still as a black screen). Useful info: The app runs completely normal when opened without the debugger. I am able to debug blank apps with Android Studio. I tried using a different SDK version. I have another phone, Samsung A5 (2017) that can be used with the debugger (but it randomly restarts when debugging, hence unusable). A52s uses Android 12, while A5 is Android 8 (Oreo). I also attached logs from logcat, that are filtered for anything that matches with the app name 'com.embarcadero.BetterProgress'. I don't know what other information may be of use, so if I missed something feel free to write it in the comments. Any idea is appreciated! android-log.txt
  21. Hi. I am making Android app, and i add Android Service to project, guided by this video: Code in the Android Service: unction TDM.AndroidServiceStartCommand(const Sender: TObject; const Intent: JIntent; Flags, StartId: Integer): Integer; begin Result := TJService.JavaClass.START_STICKY; end; Calling from main project: FService : TLocalServiceConnection; FService := TLocalServiceConnection.Create; FService.StartService('F'); But when i lainch my application, it is crashing at once at start. When i launch my app under debugging, Delphi writing me: Full text on the attachment. Also, debugger get this code: I am using Delphi 10.4 CE.
  22. Hi All! I have a joystick that is connected to my phone. When my application is running a can see than joysticks buttons are pressing. But when the phone screen is locked, I don't see notifications about it in my app. What can I do to receive joystick button press in my application when the screen is locked? Receivers code procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState); begin inc(i); Memo1.Lines.Add('i=' + IntToStr(i) + '; Key=' + IntToStr(Key)); end; The result of the application, photos of joysticks and the source code are in the attachment. KeyCodeReceiver.7z
  23. I have old app in Android. I have used uniDac to connect to sqlite database. The database is encrypted using leAES256 method. FD cannot connect to it. I need to convert database for FD. But when I use both of these in the app, Delphi gives an error : sqlite3.c:(.text+0xb5e8): multiple definition of `sqlite3_aggregate_context' (And many other errors) I know the reason for the error but how to convert the database when I can't use both of them?
  24. I use delphi 11.2 in my ANDROID app, i must handling a javascript function's result, it's convert javasciprt to pascal is very hard to me. my way: run javascript in TWebrowser and get result, js result is OK, but, how can i get return value from TWebrowser? My thoughts: 1,execute js throught some library eg: ScriptGate? ScriptGate run javascript Error in delphi 11 . 2,modify TWebrowserm, add javascript callback feature? test_javascript.zip
  25. Issue/Problem: when deploying an app to android that has the: (camera, json, or barcode components on a form) the app starts up with a black screen flame and hangs and closes down. Has anyone tried the trial version of TMS FNC WX Pack Android? -- link: https://www.tmssoftware.com/site/tmsfncwxpack.asp I have been having a difficult time with the trial version v1.5.1.0 (via Getit) working on my smartphone with Android 10, using Delphi 11.2 Alexandria Professional under Windows 7 and also Windows 10 laptops. The trial version states to set it in release mode (For mobile device deployment, the trial version supports deploying in release mode only) which I have done, but after the app is deployed I still have a black screen with the Delphi flame and it eventually closes whenever click out of the screen. I am hoping that someone with similar experience knows how to resolve this issue. I would really appreciate the help. Thank you.
×