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 128 results

  1. Hi all, A generic question. I'm deploying my apps with an embedded SQLite DB. Each time I compile/deploy, that existing on device DB file is overwritten by the default one. It's fine for development. But how do you actually proceed if you want to deploy an update? If a user has the app already with personal data, I don't want her/him to lose that data. Testing whether the DB already exists is not possible since it's deployed each time within the new binary. One way would be to have all the code to check whether the DB exists. If not, programmatically create it and fill it with sample data. If it does, just check its version and apply possible structure upgrades? But it feels like this would embark a lot of code that may not really be useful. How do you guys deploy news versions of your apps without overwriting exists DBs? I especially think about iOS and Android devices. Thanks for any light. Steve
  2. Hi all, I'm looking to distribute my android app on play store using Delphi 10.3. I know I should upgrade to Delphi 11, but trying to compile the app in the new version I'm stuck in a number of memory or compilation issues. When on Delphi 10.3 I try to start the project deployment I always get the same error "[PAClient Error] Error: E0002 Missing profile name; use paclient -? For Help". I tried to use various versions of the SDK: I tried 26, 28, 29 and even 30 but nothing. When I compile it in development mode both in debug and in release I can load it on my smartphone with Android 10, while compiling it in Release and Application Store mode I get the error mentioned. Some idea? Thanks in advance
  3. Michael Collier

    How to: Phone camera frame(s) to server

    Hello, I'm evaluating latest version of Delphi RAD for possible iOS/android phone application. I'd like to be able to use a phone camera (iOS and Android) to take photos (maybe 1 per second) and upload to my server. So.. 1). I found sample project "accessCameraApp" - my first question is.. would this be the component to use for my photo capture? - or should I be using something different? 2) I found internet references to indy components (I have used this in the past), but they are not installed on my component palette (no problem though I guess I can install later), but I did find TNetHTTPClient and TNetHTTPRequest, I was wondering which I should use (indy/TNetHTTPClient or maybe synapse if it is available?) for posting photo frames to my server? (i.e. a php page that saves photo(s) in database BLOB field). Any help to point me in the right direction would be great, it's more about the selection of components that I would need, I have plenty of Object Pascal experience, and I do a lot of camera work using javascript. It's just that the latest set of Delphi tools are new to me. Thanks in advance, Mike
  4. We have a few users that experience freezing and very slow response in our Android App. In Google Play Console, we get these ANR messages: The app works on 99% of the devices, so it is not a general problem, and we cannot reproduce it on our devices. What can be the reason for these problems? Another user has posted a StackOverflow question about this a year ago - but no answers: https://stackoverflow.com/questions/66657413/how-to-solve-anr-on-android-firemonkey PS. Could it be related to this warning ("Non-SDK API: Landroid/view/MotionEvent") that we also have? https://stackoverflow.com/questions/70350726/delphi-11-app-in-android-play-store-shows-warning-non-sdk-api
  5. Vanar

    Delphi 11: Google SignIn

    Hi All! Does anyone have a Goolge account login implementation for Delphi 11? Examples like GoogleSignin tweaked for Delphi <11 don't work!
  6. Hi, i have a multi platform app that i'm maintaining from a few time I'm getting used to debug problems, but when the app is stuck into the splashscreen and Delphi cannot even start the debug mode the problem begins. I used logcat but cannot really get any useful information. The last time i had this problem it was caused from some .so files in a wrong path and the code put into the initialization section to load those .so files was crashing my app. But this time i already fixed that and i already tried to comment out all the code into the initialization section. What can i try to understand why my app is stuck? Ide shows no errors, and this is my logcat The only error shown is "isHeavy hint type 1 for app" but i have no variable called isHeavy in my code so i really have no idea what is referring to 12-16 09:39:47.578: D/Launcher.CellLayout(3938): touch item:ShortcutInfo, id=99, itemType=0, user=UserHandle{0}, mIconType=0, pkgName=<my package name>, className=com.embarcadero.firemonkey.FMXNativeActivity, screenId=2, container=-100, cellX=3, cellY=3, spanX=1, spanY=1, isLandscapePos=false 12-16 09:39:47.598: D/Launcher_dispatchTouchEvent_View(3938): 39:47.597 View= mHCells=4 mVCells=6 mTotalCells=24 mCellXY[0]=3 mCellXY[1]=5 childCount=16 EmptyCellsNum=8 [ tag 0 =com.miui.home.launcher.FolderIcon{f02e59 VFE...CL. ........ 795,84-1049,383}| childWidth 0 =254| childHeight 0 =299| childTranslationX 0 =0.0| childTranslationY 0 =0.0| childX 0 =795.0| childY 0 =84.0| childAlpha 0 =1.0] [ tag 1 =com.miui.home.launcher.ShortcutIcon{cb4f70e VFE...CL. ........ 33,84-287,383}(Impostazioni)| childWidth 1 =254| childHeight 1 =299| childTranslationX 1 =0.0| childTranslationY 1 =0.0| childX 1 =33.0| childY 1 =84.0| childAlpha 1 =1.0] [ tag 2 =com.miui.home.launcher.ShortcutIcon{85f4ea3 VFE...CL. ........ 33,389-287,688}(Note)| childWidth 2 =254| childHeight 2 =299| childTranslationX 2 =0.0| childTranslationY 2 =0.0| childX 2 =33.0| childY 2 =389.0| childAlpha 2 =1.0] [ tag 3 =com.miui.home.launcher.ShortcutIcon{a32dacd VFE...CL. ........ 287,84-541,383}(Mi Video)| childWidth 3 =254| childHeight 3 =299| childTranslationX 3 =0.0| childTranslationY 3 =0.0| childX 3 =287.0| childY 3 =84.0| childAlpha 3 =1.0] [ tag 4 =com.miui.home.launcher.ShortcutIcon{579b6e7 VFE...CL. ........ 541,84-795,383}(Meteo)| childWidth 4 =254| childHeight 4 =299| childTranslationX 4 =0.0| childTranslationY 4 =0.0| childX 4 =541.0| childY 4 =84.0| childAlpha 4 =1.0] [ tag 5 =com.miui.home.launcher.ShortcutIcon{603d248 VFE...CL. ........ 33,694-287,993}(AnyDesk)| childWidth 5 =254| childHeight 5 =299| childTranslationX 5 =0.0| childTranslationY 5 =0.0| childX 5 =33.0| childY 5 =694.0| childAlpha 5 =1.0] [ tag 6 =com.miui.home.launcher.ShortcutIcon{8e5aedb VFE...CL. ........ 541,389-795,688}(Mi Browser)| childWidth 6 =254| childHeight 6 =299| childTranslationX 6 =0.0| childTranslationY 6 =0.0| childX 6 =541.0| childY 6 =389.0| childAlpha 6 =1.0] [ tag 7 =com.miui.home.launcher.ShortcutIcon{d6128bc VFE...CL. ........ 541,694-795,993}(Pilot)| childWidth 7 =254| childHeight 7 =299| childTranslationX 7 =0.0| childTranslationY 7 =0.0| childX 7 =541.0| childY 7 =694.0| childAlpha 7 =1.0] [ tag 8 =com.miui.home.launcher.ShortcutIcon{d3e54b5 VFE...CL. ........ 287,389-541,688}(Assistente)| childWidth 8 =254| childHeight 8 =299| childTranslationX 8 =0.0| childTranslationY 8 =0.0| childX 8 =287.0| childY 8 =389.0| childAlpha 8 =1.0] [ tag 9 =com.miui.home.launcher.ShortcutIcon{b8369ee VFE...CL. ........ 287,694-541,993}(Iotar)| childWidth 9 =254| childHeight 9 =299| childTranslationX 9 =0.0| childTranslationY 9 =0.0| childX 9 =287.0| childY 9 =694.0| childAlpha 9 =1.0] [ tag 10 =com.miui.home.launcher.ShortcutIcon{6bed613 VFE...CL. ........ 795,389-1049,688}(NordVPN)| childWidth 10 =254| childHeight 10 =299| childTranslationX 10 =0.0| childTranslationY 10 =0.0| childX 10 =795.0| childY 10 =389.0| childAlpha 10 =1.0] [ tag 11 =com.miui.home.launcher.ShortcutIcon{30d4ffe VFE...CL. ........ 541,999-795,1298}(<my app name> Mobile Assist)| childWidth 11 =254| childHeight 11 =299| childTranslationX 11 =0.0| childTranslationY 11 =0.0| childX 11 =541.0| childY 11 =999.0| childAlpha 11 =1.0] [ tag 12 =com.miui.home.launcher.ShortcutIcon{d4fa929 VFE...CL. ........ 33,999-287,1298}(AIDA64)| childWidth 12 =254| childHeight 12 =299| childTranslationX 12 =0.0| childTranslationY 12 =0.0| childX 12 =33.0| childY 12 =999.0| childAlpha 12 =1.0] [ tag 13 =com.miui.home.launcher.ShortcutIcon{194fa12 VFE...CL. ........ 287,999-541,1298}(QuickSupport)| childWidth 13 =254| childHeight 13 =299| childTranslationX 13 =0.0| childTranslationY 13 =0.0| childX 13 =287.0| childY 13 =999.0| childAlpha 13 =1.0] [ tag 14 =com.miui.home.launcher.ShortcutIcon{bd39537 VFE...CL. ........ 795,694-1049,993}(App Info)| childWidth 14 =254| childHeight 14 =299| childTranslationX 14 =0.0| childTranslationY 14 =0.0| childX 14 =795.0| childY 14 =694.0| childAlpha 14 =1.0] [ tag 15 =com.miui.home.launcher.ShortcutIcon{6d564e6 VFE...CL. ...P.... 795,999-1049,1298}(<my app name>)| childWidth 15 =254| childHeight 15 =299| childTranslationX 15 =0.0| childTr 12-16 09:39:47.598: D/Launcher_dispatchTouchEvent_View(3938): 39:47.597 View=com.miui.home.launcher.ShortcutIcon{6d564e6 VFE...CL. ...P.... 795,999-1049,1298}(<my app name>) 12-16 09:39:47.666: I/ActivityTaskManager(1757): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=<my package name>/com.embarcadero.firemonkey.FMXNativeActivity bnds=[840,1098][1008,1266] (has extras)} from uid 10078 12-16 09:39:47.670: E/ANDR-PERF-LM(988): GAMEOPT: getData() 1035: isHeavy hint type 1 for app <my package name> 12-16 09:39:47.678: V/ActivityTaskManager(1757): Starting new activity ActivityRecord{f754cfb u0 <my package name>/com.embarcadero.firemonkey.FMXNativeActivity t140} in new task Task{304e060 #140 visible=true type=standard mode=fullscreen translucent=true A=10291:<my package name> U=0 StackId=140 sz=1} 12-16 09:39:47.732: D/Boost(1757): hostingType=pre-top-activity, hostingName={<my package name>/com.embarcadero.firemonkey.FMXNativeActivity}, callerPackage=com.miui.home, isSystem=true, isBoostNeeded=false. 12-16 09:39:47.733: I/ActivityManager(1757): Start proc 28622:<my package name>/u0a291 for pre-top-activity {<my package name>/com.embarcadero.firemonkey.FMXNativeActivity} caller=com.miui.home 12-16 09:39:47.742: V/WindowManager(1757): Orientation start waiting for draw, mDrawState=DRAW_PENDING in Window{13c228d mode=0 rootTaskId=140 u0 Splash Screen <my package name>}, surfaceController Surface(name=Splash Screen <my package name>)/@0xa3ec6bc 12-16 09:39:47.794: I/GST(6103): forePkg: <my package name>, preForePkg: com.miui.home 12-16 09:39:47.794: D/PerfEngineController(6093): ForegroundInfo{mForegroundPackageName='<my package name>', mForegroundUid=10291, mForegroundPid=28622, mLastForegroundPackageName='com.miui.home', mLastForegroundUid=10078, mLastForegroundPid=3938, mMultiWindowForegroundPackageName='null', mMultiWindowForegroundUid=-1, mFlags=1} 12-16 09:39:47.795: I/ProcessMonitor(5408): onForegroundInfoChanged: ForegroundInfo{mForegroundPackageName='<my package name>', mForegroundUid=10291, mForegroundPid=28622, mLastForegroundPackageName='com.miui.home', mLastForegroundUid=10078, mLastForegroundPid=3938, mMultiWindowForegroundPackageName='null', mMultiWindowForegroundUid=-1, mFlags=1} 12-16 09:39:47.795: D/AutoInstallService(11010): onForegroundInfoChanged: <my package name> 12-16 09:39:47.795: I/GameBoosterService(5408): onForegroundInfoChanged: Cur=<my package name> last=com.miui.home 12-16 09:39:47.801: D/GameBoosterService(5408): onGameStatusChange foreground:ForegroundInfo{mForegroundPackageName='<my package name>', mForegroundUid=10291, mForegroundPid=28622, mLastForegroundPackageName='com.miui.home', mLastForegroundUid=10078, mLastForegroundPid=3938, mMultiWindowForegroundPackageName='null', mMultiWindowForegroundUid=-1, mFlags=1} 12-16 09:39:47.881: D/View(28622): <my package name> initForcedUseForceDark: 1 12-16 09:39:47.909: W/linker(28622): Warning: "/data/app/~~wyLwJiilp-W6tb-ch2CPmA==/<my package name>-jZXsqAEEsEtrsmvpmPdF4Q==/lib/arm64/lib<my app name>.so" unused DT entry: DT_RPATH (type 0xf arg 0x2f4c4) (ignoring) 12-16 09:39:48.405: I/ActivityManager(1757): Process <my package name> (pid 28622) has died: fg TOP 12-16 09:39:48.550: W/WindowManager(1757): Failed to schedule DisplayAdjustmentsItem to ProcessRecord{d1d4bbf 28622:<my package name>/u0a291} 12-16 09:39:48.555: D/CommandQueue(3690): setStatus: setStatus: what = 0, action = upate_specail_mode, ext = Bundle[mParcelledData.dataSize=112][pkg = <my package name>[enable_config = false 12-16 09:39:48.657: D/Boost(1757): hostingType=top-activity, hostingName={<my package name>/com.embarcadero.firemonkey.FMXNativeActivity}, callerPackage=com.miui.home, isSystem=true, isBoostNeeded=false. 12-16 09:39:48.657: I/ActivityManager(1757): Start proc 28653:<my package name>/u0a291 for top-activity {<my package name>/com.embarcadero.firemonkey.FMXNativeActivity} caller=com.miui.home 12-16 09:39:48.805: D/View(28653): <my package name> initForcedUseForceDark: 1 12-16 09:39:48.829: W/linker(28653): Warning: "/data/app/~~wyLwJiilp-W6tb-ch2CPmA==/<my package name>-jZXsqAEEsEtrsmvpmPdF4Q==/lib/arm64/lib<my app name>.so" unused DT entry: DT_RPATH (type 0xf arg 0x2f4c4) (ignoring) 12-16 09:39:49.325: I/ActivityManager(1757): Process <my package name> (pid 28653) has died: fg TOP 12-16 09:39:49.356: D/Boost(1757): hostingType=top-activity, hostingName={<my package name>/com.embarcadero.firemonkey.FMXNativeActivity}, callerPackage=com.miui.home, isSystem=true, isBoostNeeded=false. 12-16 09:39:49.356: I/ActivityManager(1757): Start proc 28696:<my package name>/u0a291 for top-activity {<my package name>/com.embarcadero.firemonkey.FMXNativeActivity} caller=com.miui.home 12-16 09:39:49.473: D/View(28696): <my package name> initForcedUseForceDark: 1
  7. corneliusdavid

    Android project deployment messed up

    I have two different, very simple, cross-platform projects I'm using for development testing, one works fine, the other used to but is now getting a strange error when I try to deploy it to my Android device: The project that deploys fine has the same base project filename as the folder in which it resides. The second project (the one with the problem), DelphiVersions, is one of several projects in a folder, each project's name is appended with the type of platform it's for. The folder name is V:\DelphiVersions and I have DelphiVersionsConsole, DelphiVersionsVCL, and DelphiVersionsMobile in that folder. The last one, of course, uses FireMonkey, and is deployed to Android and iOS. I'm using Delphi 10.4 and had this working a few months ago but since Android 11 and API 30 was released I wanted to have more direct control over where and which SDK was installed and found this excellent blog that helped me get there. This also meant I switched to using OpenJDK and changed the location of the SDK and tools. Should still be good, right? As I examined the project trying to figure this out, I deleted temporary files, even removed Android support from the project and re-added it, and checked a few other things. The only thing I can think of that is different where deployment is concerned, is that the DelphiVersions one has "Mobile" appended to the end of the project name and one of the build tools must assume the project name is the same as the folder name. The obvious thing to try is rename the project to just DelphiVersions to match the folder name--I did that but it gave a similar error, this time with the path "V:\DelphiVersions\bin\DelphiVersions.apk" not found. So mismatched project name is not the source of the problem. Another thing to note is that I have projects for several versions of Delphi in sub folders and for Delphi 10.4 it's in a "104Sydney" folder and it actually generates "V:\DelphiVersions\104Sydney\DelphiVersionsMobile\bin\DelphiVersionsMobile.apk" (the file is actually where it should be!). I also looked at the deployment file list and the manifest file--still no clue. Why is the deployment process removing the first two sub-levels of folders in the filename?
  8. ertank

    Simple app for Android 5.0.2

    Hello, I am using Delphi 10.4.2. There is a very simple app (needs internet and network status permissions, 3 pages total) that I need to run on Android 5.0.2. I compiled it with stock SDK 25.2.5 targeting Android32. When package tried to be loaded on Android 5.0.2 it says Compiler error There is a problem with the packet parsing. Docwiki says Delphi 10.4.2 supports Android 6 minimum. Even Delphi 10.3.3 supports Android 5.2 mimimum. I wonder if there is some "workaround" that I can use without installing an older version. Thanks & Regards, Ertan
  9. It can be stupid but I decided to ask. In an android application just a Delphi form and its dependencies add 30MB in the file .so of the application. Is it possible to have it as an external library and being loaded when needed? Is that possible in android and how can be done? Thank you in advance
  10. dkounal

    Notifications in android

    Hi, I want to create a Notification in an android application that shows the progress in uploading an image. I have seen many styled, multiline with icons notifications in existing applications, having also controls like a progress bar. Tried to do the same in Delphi, and I have not managed to find documentation, nor an example how to do that, without writing it in java. I found that even Flutter can now show a notification with controls inside. Can Delphi show such a notification and update its contents? Thank you in advance
  11. Delphi 10.4.2 Latest Android update has killed using S pen on edit field to bring up the virtual keyboard. Using finger or other type stylus is Ok. S pen does bring up the keyboard on other apps but not on the app compiled by Delphi. Have tried different settings on the tablet (Tab 6 Lite) but to no avail. Has anybody had the same problem and is this an Android thing or do I need to add something to my program code? Any advice would be greatly appreciated. Bill Zwirs
  12. Fabian1648

    [Android]How to make an event listener?

    Hello, Is there a solution with FMX to have an events listener that detects all the events that are triggered in an app? Thanks for all
  13. Haai5

    Wake up!

    Hi, I am looking for Delphi examples on waking up an application when an Android device is in sleep mode. Setting an alarm with the AlarmManager TAndroidHelper.AlarmManager.&set(TJAlarmManager.JavaClass.RTC_WAKEUP,...) fires MyAppEvent on time, it writes a message in the Memo, but the app does NOT wake up. function TfrMain.MyAppEvent(aAppEvent: TApplicationEvent; AContext: TObject): Boolean; begin result := False; case aAppEvent of TApplicationEvent.BecameActive: memo1.Lines.Add('BecameActive'); ... Only when I manually wake up the device, I see the app appear on screen. How can wake up the device when MyAppEvent notifies the event of becoming active? Even more, the app should become on the front of other running applications in the case the device is not asleep. I've searched already on the possibilities of the AlarmManager and the PowerManager, but found nothing to wake up while being asleep. Any example would be appreciated!
  14. bzwirs

    Android Scroll Issue

    Delphi 10.4.2 Have used sample code provided by to send email with attachment from Android app and works fine. After I actually send email and have been returned to app I click a button to return me to the app's main menu screen (tab control) with this code TabControl1.SetActiveTabWithTransition(TabItem1,TTabTransition.Slide,TTabTransitionDirection.Reversed); but instead of returning back to main menu screen the current screen scrolls upwards and have to click button again to return to main menu screen. After this every tab control screen behaves the same way and this only happens after the send email with attachment is used. I am using the sample code from Delphi Scrollable Form Demo provided by Delphi and believe this has something to do with my problem but don't understand how. Can someone please help me with this. Thanks in advance Bill
  15. Delphi 10.4.2 Have debug parameter set to -cleaninstall in project options yet when I install to an Android device the database file (assets/internal) is not being replaced on the device. Actually, was initially but suddenly not anymore. Can anybody PLEASE point me in the right direction to solve this. Any help would be greatly appreciated Bill
  16. Delphi 10.4.2 I want to use assets/external when deploying a database file to an Android device. The device doesn't actually have any external storage (sd card) so the installation auto creates a ./external directory in the internal app directory. What is the correct way to set the database path. Documentation says to use 'TPath.Combine(TPath.GetSharedDocumentsPath,'database.db') when using assets/external yet when I use this the app cannot find the database file. Can someone please advise me as to where I am going wrong with this. Thanks in advance Bill
  17. It is a small bug but it annoys us every day: https://quality.embarcadero.com/browse/RSP-25667?jql=text ~ "versioncode" Please vote for it so it gets solved!
  18. Delphi 10.4.2 Have developed a custom app for use on Android tablet for a business. There will be approx 10 users of this app. The plan is to notify users of any update through Google Drive allowing the user to receive a link and update there tablet with latest version of the app. Especially in the early stages this may mean an updated database file (SQLite) in which case -cleaninstall is used. On testing this, if I copy .apk file direct to tablet's download directory and then navigate to that directory and double click to install......all works and db file is replaced. When testing this using Goole drive (same apk file) the app is updated but the db file is not replaced. Should I be doing something else other than '-cleaninstall' Any advice would be appreciated. Bill Zwirs
  19. This issue shows up when writing a Characteristic from the Andorid app to the BT device. Here is the sequence using these TBluetoothGattCharactertistics methods SetValueAsUint32, then 4 bytes are transmitted. SetValueAsUint64, then 8 bytes are transmitted SetValueAsUint32, then 8 bytes are transmitted, the first four bytes contain the new 32 bits and the remaining 4 bytes contain the previous 64 bit value ************************************************************************************************************* In System.Bluetooth we find this method @line 2717(10.4.2), which all of the above methods call procedure TBluetoothGattCharacteristic.SetValueAs<T>(AValue: T; Offset: Integer); var LBytes: TBytes; begin LBytes := Value; if (Length(LBytes) < Offset + SizeOf(AValue)) then SetLength(LBytes, Offset + SizeOf(AValue)); Move(AValue, LBytes[Offset], SizeOf(AValue)); SetValue(LBytes); end; LBytes is always the last value sent (64 bits or 8bytes in the above example). As long as offset is zero (0), following a 64bit value with a 32bit or less value, will always result in SetLength not being called. And as long as offset is zero, this procedure can never reduce the size of LBytes, it can only increase the size of LBytes. ***************************************************************************************************************** my work around was to create a method in my BT wrapper that creates a variable ClrValue of type TBytes set length to 1 call the method SetValue(ClrValue) This resets the TBluetoothGattCharactertistics property Value to be length 1 and thus the SetLength in the above code will always be called and the correct number of bytes will be transmitted. ***************************************************************************************************************** I went back and checked 10.1 Update2 and the same code as above is there. This may be expected behavior, I dont know, Other than my little work around, I found no intrinsic way to change the array length and thus the bytes transmitted. If you call SetValueAsUint32, I would expect 4 bytes to be transmitted, regardless of what was transmitted before.
  20. My app pop up "Access violation at address 000000001BB022128, accessing address 000030312E353820" error in iPhone. Android works perfectly without this error. This error pops up when 1. Run the app 2. Press the home button (my app still running in background) 3. Run other apps 4. Go back to my app 5. Error popup. It is quite strange that my development device iPhone 6S never shows this error. All my other testing devices, from iPhone 7 ~ iPhone X, pop this error! This error exists since XCode 11. I updated it to XCode 12.4 hope that this error can be solved, but no luck! My development environment is 1. Delphi 10.4.1 2. iOS 13.7 3. XCode 12.4 4. macOS Big Sur 5. My app uses a location sensor component and timer components to activate the location sensor when loading up the App. (I want to try it in iOS 14.4 but cannot successfully get the iOS 14 SDK add to the SDK manager. Files in Z:\Documents\Embarcadero\Studio\SDKs\iPhoneOS14.4.sdk\usr\lib are in 0 byte. I tried it from XCode 12.0 to 12.3. All failed. I think it should be a bug in Delphi IDE. Only my old iOS 13.7 SDK is still working.) Does anyone know what causes this access violation error? Please help! BR. Leo
  21. Turan Can

    full screen view capture

    Hello everyone, Full screenshot. How do I capture the entire screen? In this example, I can take a screenshot of the open form. Sample; function MakeScaleScreenshot(Sender: TObject): TBitmap; var fScreenScale: Single; function GetScreenScale: Single; var ScreenService: IFMXScreenService; begin Result := 1; if TPlatformServices.Current.SupportsPlatformService(IFMXScreenService, IInterface(ScreenService)) then begin Result := ScreenService.GetScreenScale; end; end; begin fScreenScale := GetScreenScale; Result := TBitmap.Create(Round(TfmText1(Sender).Width * fScreenScale), Round(TfmText1(Sender).Height * fScreenScale)); Result.Clear(0); if Result.Canvas.BeginScene then try TfmText1(Sender).PaintTo(Result.Canvas); // Sender.PaintTo( Result.Canvas); //, RectF(0, 0, Result.Width, Result.Height)); finally Result.Canvas.EndScene; end; end; procedure TfmText1.btnScreenClick(Sender: TObject); var B: TBitmap; begin B := MakeScaleScreenshot(Self); // MakeScreenshot(Image1); Image1.Bitmap.Assign(B); B.DisposeOf; end;
  22. Hi there, I had some time to check out the great OpenSsl library from Grijjy / @Allen@Grijjy, and I found that its working even without binding any libraries to it. The original FMX sample showed some issues, so I just created a brand new Rx10.4.1 project and moved the main unit to it. Beside the Grijjy Foundation, I've put no static linked files yet in the deployment, to check this library out step-by step. Of coarse for Win32 I need the enclosed DLL's in the EXE folder, that's no surprise. It puzzled me that for Android and iOS, as well as for Macos, I don't need to add any library at all to the library tree/deployment Even in Allens post, there is the note, I've misinterpreted that it should be added directly to the projects library tree, or by deployment manager or some other hacky means: Also Embarcadero has notes about OpenSsl, Which leads to the conclusion at least iOS would need some external download of static libraries. In the libraries const section, I can spot the different static/dynamic names, but where and do they bind to ? const {$IF Defined(WIN32)} LIB_CRYPTO = 'libcrypto-1_1.dll'; LIB_SSL = 'libssl-1_1.dll'; _PU = ''; {$ELSEIF Defined(WIN64)} LIB_CRYPTO = 'libcrypto-1_1-x64.dll'; LIB_SSL = 'libssl-1_1-x64.dll'; _PU = ''; {$ELSEIF Defined(ANDROID64)} LIB_CRYPTO = 'libcrypto-android64.a'; LIB_SSL = 'libssl-android64.a'; _PU = ''; {$ELSEIF Defined(ANDROID32)} LIB_CRYPTO = 'libcrypto-android32.a'; LIB_SSL = 'libssl-android32.a'; _PU = ''; {$ELSEIF Defined(IOS)} LIB_CRYPTO = 'libcrypto-ios.a'; LIB_SSL = 'libssl-ios.a'; _PU = ''; {$ELSEIF Defined(MACOS32)} LIB_CRYPTO = 'libssl-merged-osx32.dylib'; { We unify LibSsl and LibCrypto into a common shared library on macOS } LIB_SSL = 'libssl-merged-osx32.dylib'; _PU = '_'; {$ELSEIF Defined(MACOS64)} LIB_CRYPTO = 'libcrypto-osx64.a'; LIB_SSL = 'libssl-osx64.a'; _PU = ''; {$ELSEIF Defined(LINUX)} LIB_CRYPTO = 'libcrypto.so'; LIB_SSL = 'libssl.so'; _PU = ''; {$ELSE} {$MESSAGE Error 'Unsupported platform'} {$ENDIF} I've put my test code as a wrapper around the original code, basically just adding the new project files. It seems the magic happens, because the libraries were sitting all side-by-side to the calling unit. The OpenSSL_Api unit find these local files in the same folder, and is able to bind them correctly. I didn't know that this is possible, I thought they have to be in the same project folder, and at least cross-platform make another hazzle to bind depending on the OS. Good to know that its enough to provide library+unit together, that gives much more room to cleanup libraries. I've put my wrapper code enclosed for testing, while the originally library files from Grijjy should be placed in the Src folder. The missing files you can get from here. I hope Allen don't mind. T381_GrijjySsl.zip
  23. toufik

    The location of sqllite database ?

    good morning every one ^^ how is every one doing )) 1- i have fmx android app that s create sqllite db on create ,what's the location of db on the phone and is it const location ? (does not change for every other phones) 2- what's the proper way to copy it from that location to sd card (backup) ? thanks and take care
  24. TurboMagic

    Android JInputStream wrapper?

    Hello, since Android 10 we've got this nasty problem of no longer having direct file access to such folders like TPath.GetSharedDownloadsDir. Now I have managed via some intent call to either ACTION_OPEN_DOCUMENT or ACTION_GET_CONTENT to display some file chooser and when the user selects one I get the Uri of the selected file. With that I can get at an JInputStream and could read out the individual bytes of that stream. But: how to get at the file size properly to know when to stop reading? The Available method should, as per Android's documentation https://developer.android.com/reference/java/io/InputStream#available() rather not be used. Is there any "wraper" available which properly/nicely wrapt this in a TFileStream or something similar? A quick search didn't turn up anything yet. TurboMagic
  25. I'm currently storing binary files generated by my app or uploaded to the device by the user (e.g. via Windows Explorer) in the public downloads path returned by TPath.GetSharedDownloadsPath. Using such a path which is not within the installed app itself is only possible in Android 10 when requestLegavyExternalStorage is being declared in the AndroidManifest.template.xml. But that is a solution only viable when targeting Android 10, but not when targeting Android 11, which will be a requirement somewhere in 2021. Now I'm looking for possible alternatives which come as close to what I currently have as possible. I have written a dialog listing all the files of my file type and when the user taps one he gets options to open it, display file meta data in a popup or share it via share sheet. I'm a bit lost about which route to go. I don't think MediaFramework would be the right approach as my file type is no media file. I've seen this one: https://developer.android.com/training/data-storage/use-cases#handle-non-media-files startActivityForResult( Intent(Intent.ACTION_OPEN_DOCUMENT).apply { addCategory(Intent.CATEGORY_OPENABLE) type = "*/*" putExtra(Intent.EXTRA_MIME_TYPES, arrayOf( "application/pdf", // .pdf "application/vnd.oasis.opendocument.text", // .odt "text/plain" // .txt )) }, REQUEST_CODE ) But I'm not really sure what it does. Ok, it calls some activity to select a file, but since my file type is binary with some specific suffix I'd like to list only files with that suffix and the other thing is: what do I get back? How do I get at my file's contents? And the other issue is, that the same dialog s used for saving files as well. They might be saved in some app package specific directory if share sheet can work for that, but it still would be more cumbersome for users having the device directly connected via Windows Explorer. They most likely couldn't get at the file anymore. Any ideas?
×