Jump to content

KMarb

Members
  • Content Count

    77
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by KMarb

  1. A few years ago I wrote 3 android apps for my company using Delphi Berlin. They've worked well enough for us, but more and more we're having trouble finding android devices that will work with these older apps. I've found I can run on as late as android 10 on some phones (Blackview bv5900), but not on any android 11 phones. My app uses basic permissions like network, location, camera, but it also writes to external storage (probably don't need to do that... just have an ini file so the 3 apps can share some info, written once and then only ever read when apps start up). I'm looking for suggestions. Is it possible I can change permissions or android SDK/NDK and continue to use Berlin to get these working for current android versions? If I need to use a new version of Delphi, what would be best for android development? And is there a document to walk me through changes from Berlin to the new version? What SDK/NDK version should I use? Once before (prior to Delphi 11) I tried recompiling my FMX apps on a new Delphi (10.4 I believe) and there were many error messages. It was a bit overwhelming since my mindset was I could simply recompile and have new apk's to distribute. So, I haven't invested a lot of time in to how to get my apps updated, but the urgency is greater now so I need to spend whatever time is needed. Thanks in advance for any suggestions. Oh, last thing - I read posts for 30 minutes on this site and was impressed by the level of knowledge. Looking forward to getting involved here. Keith Marbach
  2. Wow! Thank you both so much! I now have apk that i've been able to install on android 11, and it runs, but I get an error "cannot access local data" I'm assuming that's because i have not added code for permissions, which I will work on next. My app uses location, camera, and writes to storage. It also invokes a bar code scanner, I believe made by ZXing. I will look at the camera and location examples to learn. The only reason I write/read from storage is because i have 3 apps, and I wanted a way to share info between the 3. When one gets registered with my server, the ini file is written with some information. The other 2 apps can then read that info. Info like device name (as registered in my back end database) and one or two other things. I'm showing my code below in case you think I should throw it away and try another approach: procedure checkIniFile; begin iniPath := ExtractFilePath (ExcludeTrailingPathDelimiter (TPath.GetSharedDownloadsPath)); iniPath := TPath.Combine (iniPath, 'MyFolderName'); ForceDirectories (iniPath); iniFileName := TPath.Combine(iniPath, 'MyFileName.ini'); exportDBFileName := TPath.Combine (iniPath, DMConn.DBFileName); IniFileExists := FileExists (iniFileName); end; I am indebted to you for your time already spent, but if something jumps out at you about my approach to access a shard ini file across multiple apps, I'd appreciate being set on a better path. Also if you have any warnings about access a bar code scanner. here is that code; procedure TfrmMain.activateBarcodeScanner; begin FMessageSubscriptionID := TMessageManager.DefaultManager.SubscribeToMessage (TMessageResultNotification, HandleActivityMessage); ignoreWillBecomeForeground := true; ignoreBecameActive := true; inBarCodeScanner := true; LaunchQRScanner (ScanRequestCode); end; function LaunchQRScanner; var Intent: JIntent; begin Intent := TJIntent.JavaClass.init(StringToJString('com.google.zxing.client.android.SCAN')); Intent.setPackage(StringToJString('com.google.zxing.client.android')); result := LaunchActivityForResult(Intent, RequestCode); end; I'm very rusty on android, and I learned by doing, nothing formal, so I might need to back up and learn or re-learn some basics. Thanks again. You've given me a huge head start. Keith
×