Jump to content

Dave Nottage

Members
  • Content Count

    1331
  • Joined

  • Last visited

  • Days Won

    29

Posts posted by Dave Nottage


  1. 4 hours ago, gioma said:

    The problem is that on Android it works, while on iOS it doesn't.

    Changing CFBundleDisplayName works OK for me. Here's my steps:

     

    1. Create a blank FMX project

    2. Save it as: Fred

    3. Compile/Deploy to iOS device - it appears as "Fred"

    4. Change CFBundleDisplayName from $(ModuleName) to: Bob

    5. Compile/Deploy to iOS device - name changes to "Bob"


  2. 6 hours ago, Stefan Glienke said:

    TestInsight client listen to

    Not entirely obvious from the FAQ etc: does TestInsight have some method of running tests on the device (or Mac machine) that are reported back to TestInsight in the IDE?

     

    Sorry if that's a stupid question 🙂 It may also be what Darian is interested in.


  3. On Android, TPath.GetDocumentsPath is, and has always been, the sandboxed (i.e. app specific) documents folder. If you wish to access the shared documents folder, it is TPath.GetSharedDocumentsPath.

     

    Prior to Delphi 10.3, the targetSdkVersion being used in the manifest was 19. In Delphi 10.3 the targetSdkVersion is now 28.

     

    From API level 21, applications that need permission for external storage (which is what TPath.GetSharedDocumentsPath points to), need to request permission at runtime. For an example of how to do this, take a look at this demo:

     

    https://github.com/Embarcadero/RADStudio10.3Demos/tree/master/Object Pascal/Mobile Snippets/ShareSheet

     

    Specifically in the TShareSheetForm.btnTakePhotoClick method in uMain.pas where permissions for external storage are requested.

     

    You don't need to request permission for TPath.GetDocumentsPath, so I have no idea why that folder is not working for you. Are you attempting to access files that are being deployed there (i.e. they have entries in Deployment Manager)?


  4. As long as it's just the background processes of the application you're interested in, you could use:

     

    https://developer.android.com/reference/android/app/ActivityManager#killBackgroundProcesses(java.lang.String)

     

    Since Android 2.2, you cannot close the entire application.

     

    You would probably do something like this (untested):

     

    uses
      Androidapi.JNI.JavaTypes, Androidapi.JNI.GraphicsContentViewText, Androidapi.JNI.App, Androidapi.Helpers;
    
    procedure Kill;
    var
      LService: JObject;
    begin
      LService := TAndroidHelper.Context.getSystemService(TJContext.JavaClass.ACTIVITY_SERVICE);
      if LService <> nil then
        TJActivityManager.Wrap(JObjectToID(LService)).killBackgroundProcesses(StringToJString('com.whateverpackagename.itis'));
    end;

     


  5. 17 minutes ago, Francisco said:

    android.content.ActivityNotFoundException: No activity found to handle Intent {act=android.intent.action.SEND

    You need to call Intent.setType with an appropriate type for email, e.g.

     

    plain/text

    message/rfc822
    application/octet-stream

     

    If that still does not work, then there's probably no email client installed.


  6. You have not added the MessageUI framework correctly, since it is appearing in "Other Paths", rather than "Frameworks". Please remove that entry and:

     

    1. Select an existing framework listed in the "Frameworks" section - this will ensure that none of the radio buttons are selected when the Add Remote Path item dialog shows
    2. Click the Add button
    3. In the Path on remote machine combo, enter:  $(SDKROOT)/System/Library/Frameworks
    4. In Framework name, enter: MessageUI
    5. Click OK
    6. Click Update Local File Cache
    7. Click Save

     

     

×