-
Content Count
1331 -
Joined
-
Last visited
-
Days Won
29
Posts posted by Dave Nottage
-
-
There's a number of examples if you Google for: custom fonts delphi android
-
6 hours ago, Hans♫ said:Now it links with the FBSDK 4.36 without problems, and after a few hours of work to adapt my code to the new API version, everything works!
Excellent! There's someone in another post here asking about whether there are updated imports for the FB SDK. Perhaps you can help them, or at least give them an idea as to whether everything still works anyway. (using 4.36)
-
1 hour ago, Turan Can said:android.os.SystemProperties
If there's a class called that, it's undocumented.
If you're after a unique id for the device, you're probably better off using something like this:
uses Androidapi.JNI.Provider, Androidapi.Helpers; // **** NOTE: Use this value with care, as it is reset if the device is rooted, or wiped function GetUniqueDeviceID: string; var LName: JString; begin LName := TJSettings_Secure.JavaClass.ANDROID_ID; Result := JStringToString(TJSettings_Secure.JavaClass.getString(TAndroidHelper.ContentResolver, LName)); end;
-
2 hours ago, Vandrovnik said:(But I would not see Idxxx.dcu even in projects where I do use Indy, because there I am using the Indy which came with Delphi, so it is not recompiled with the project.)
You would if you included the Indy source path. If the callstack says it's being used, you're using it.
Does your app use any tethering functionality? That ultimately includes Indy units.
-
1
-
-
1 hour ago, Kryvich said:Have you obtain an Android phone with HDD? )
I'm assuming he means any file-based media that it can access.
9 hours ago, Turan Can said:Is there an example for Android?
This may be of use to you:
uses Androidapi.JNI.JavaTypes, Androidapi.JNIBridge, Androidapi.JNI.Os, Androidapi.JNI.GraphicsContentViewText, Androidapi.Helpers; type JStorageManager = interface; JStorageVolume = interface; JStorageManagerClass = interface(JObjectClass) ['{0F83E5E0-9AE5-41F8-9FA1-E91CABBC6720}'] function _GetACTION_MANAGE_STORAGE: JString; cdecl; function _GetEXTRA_REQUESTED_BYTES: JString; cdecl; function _GetEXTRA_UUID: JString; cdecl; function _GetUUID_DEFAULT: JUUID; cdecl; property ACTION_MANAGE_STORAGE: JString read _GetACTION_MANAGE_STORAGE; property EXTRA_REQUESTED_BYTES: JString read _GetEXTRA_REQUESTED_BYTES; property EXTRA_UUID: JString read _GetEXTRA_UUID; property UUID_DEFAULT: JUUID read _GetUUID_DEFAULT; end; [JavaSignature('android/os/storage/StorageManager')] JStorageManager = interface(JObject) ['{A7190FB5-1DBE-4A4E-8A21-A6215C00243C}'] function getAllocatableBytes(storageUuid: JUUID): Int64; cdecl; function getCacheQuotaBytes(storageUuid: JUUID): Int64; cdecl; function getCacheSizeBytes(storageUuid: JUUID): Int64; cdecl; function getMountedObbPath(rawPath: JString): JString; cdecl; function getPrimaryStorageVolume: JStorageVolume; cdecl; function getStorageVolume(&file: JFile): JStorageVolume; cdecl; function getStorageVolumes: JList; cdecl; function getUuidForPath(path: JFile): JUUID; cdecl; function isAllocationSupported(fd: JFileDescriptor): boolean; cdecl; function isCacheBehaviorGroup(path: JFile): boolean; cdecl; function isCacheBehaviorTombstone(path: JFile): boolean; cdecl; function isEncrypted(&file: JFile): boolean; cdecl; function isObbMounted(rawPath: JString): boolean; cdecl; function mountObb(rawPath: JString; key: JString; listener: JOnObbStateChangeListener): boolean; cdecl; // function openProxyFileDescriptor(mode : Integer; callback : JProxyFileDescriptorCallback; handler : JHandler) : JParcelFileDescriptor; cdecl; function unmountObb(rawPath: JString; force: boolean; listener: JOnObbStateChangeListener): boolean; cdecl; procedure allocateBytes(fd: JFileDescriptor; bytes: Int64); cdecl; overload; procedure allocateBytes(storageUuid: JUUID; bytes: Int64); cdecl; overload; procedure setCacheBehaviorGroup(path: JFile; group: boolean); cdecl; procedure setCacheBehaviorTombstone(path: JFile; tombstone: boolean); cdecl; end; TJStorageManager = class(TJavaGenericImport<JStorageManagerClass, JStorageManager>) end; JStorageVolumeClass = interface(JObjectClass) ['{C11D1D2A-77D0-4D1A-B4B9-5042B60BADB0}'] function _GetCREATOR: JParcelable_Creator; cdecl; function _GetEXTRA_STORAGE_VOLUME: JString; cdecl; property CREATOR: JParcelable_Creator read _GetCREATOR; property EXTRA_STORAGE_VOLUME: JString read _GetEXTRA_STORAGE_VOLUME; end; [JavaSignature('android/os/storage/StorageVolume')] JStorageVolume = interface(JObject) ['{F6555252-D4E1-405B-BAAB-2C8F59A01F41}'] function createAccessIntent(directoryName: JString): JIntent; cdecl; function describeContents: Integer; cdecl; function equals(obj: JObject): boolean; cdecl; function getDescription(context: JContext): JString; cdecl; function getState: JString; cdecl; function getUuid: JString; cdecl; function hashCode: Integer; cdecl; function isEmulated: boolean; cdecl; function isPrimary: boolean; cdecl; function isRemovable: boolean; cdecl; function toString: JString; cdecl; procedure writeToParcel(parcel: JParcel; flags: Integer); cdecl; end; TJStorageVolume = class(TJavaGenericImport<JStorageVolumeClass, JStorageVolume>) end; procedure TForm1.Button1Click(Sender: TObject); var LService: JObject; LStorageManager: JStorageManager; LVolumes: JList; LVolume: JStorageVolume; I: Integer; begin LService := TAndroidHelper.Activity.getSystemService(TJContext.JavaClass.STORAGE_SERVICE); LStorageManager := TJStorageManager.Wrap(TAndroidHelper.JObjectToID(LService)); LVolumes := LStorageManager.getStorageVolumes; for I := 0 to LVolumes.size - 1 do begin LVolume := TJStorageVolume.Wrap(LVolumes.get(I)); Memo1.Lines.Add(Format('%s (%s)', [JStringToString(LVolume.getDescription(TAndroidHelper.Context)), JStringToString(LVolume.getUuid)])); end; end;
-
1
-
1
-
-
10 hours ago, Vandrovnik said:But in my project, I am not using any Indy components.
Yes, you are. Easiest way to track down where is to check the units compiled units (.dcu files)
-
14 hours ago, microtronx said:In my case i lost 2 weeks because of not starting services ... and the reason was the automatic added FireDAC.FMXUI.Wait to my interface-uses.
Change the ClassGroup property on the service (data) module to System.Classes.TPersistent before adding any components
-
2
-
4
-
-
You should consider compiling the text into the app and loading it as a resource. See here:
-
14 hours ago, MikeMon said:3 years old. Is there a newer way of using the Facebook API in Firemonkey (iOS and Android)?
I'm sure there is, since there's been a number of changes in the last 3 years. Check the changelog for v5, for example:
https://github.com/facebook/facebook-ios-sdk/blob/master/CHANGELOG.md
-
15 hours ago, microtronx said:will that tLocation use a lot of energy/battery or will it only be active each x minutes as defined in this line:
That's just the timer. Battery life will be affected by the settings used with the actual location services, as determined by MonitoringDistance and MonitoringInterval. There's some information here about the best strategies to use:
https://developer.android.com/guide/topics/location/strategies
-
1
-
-
The ActiveMobileDevice tag in the .dproj.local file has info about connected devices. Whether it retains "old" devices I don't know.
-
You don't have Read Call Log and Read Phone Numbers permissions set in the Project Options for Android 64-bit.
-
2
-
-
On 11/13/2019 at 6:13 PM, Hans♫ said:No, I still have to use the very old Facebook SDK 4.15
If you're still having trouble, please look at line 175 here:
https://github.com/DelphiWorlds/KastriFree/blob/master/API/DW.iOSapi.Firebase.pas
Basically forces the linker to link to libclang_rt.ios.a, which has the "missing" symbol
-
2
-
-
11 hours ago, Hans♫ said:Our iOS app, EarMaster, made with Delphi is now featured in App Store, in the "Best of the month - New apps we love".
That is awesome! Great news
-
53 minutes ago, microtronx said:Thank you DelphiWorlds! This is helping me more than everything else for debugging my Android-Apps
Glad to hear it's helping you! 🙂
-
1
-
1
-
-
8 hours ago, microtronx said:Will try to create a Demo based on https://github.com/DelphiWorlds/KastriFree/tree/master/Demos/CrossPlatformLocation asap.
I've just checked in changes to this demo that include posting the location updates to a SQLite database. Service starts OK in it, at least for me.
-
1
-
-
5 hours ago, microtronx said:it is crazy but possible it has to do with Android 9?
I doubt it, since my device is Android 10. I'll have a play around tomorrow to see what I can deduce.
-
Nice, thanks!
-
On 1/23/2020 at 10:41 PM, microtronx said:it seems if we use Data.DB
Mine works OK with that unit in it.
-
5 hours ago, Remy Lebeau said:Data was attempted to be read/sent over a socket after the socket was closed
OK, for some reason I was under the impression that it was being raised when the socket was closed without an attempted read/write. I'll have to revisit that, thanks 🙂
-
3 hours ago, Remy Lebeau said:What about it?
It's the most annoying exception, ever. It's a permanent "ignore" in my exception tracking code. It'd be great if it was just removed, permanently.
-
Compiles OK here.
-
1
-
1
-
-
I'm able to use FireDAC with SQLite OK in the demo you refer to. Can you provide a test project for the TDSRestConnection issue?
-
There's an image here with EXIF data: http://orchids.enwphotos.com/2013-1/310.html
Which includes the camera make etc. I use a Chrome plugin to view the data: https://chrome.google.com/webstore/detail/exif-viewer/mmbhfeiddhndihdjeganjggkmjapkffm
20 hours ago, Hans-Wolfgang said:Since my Leica Typ240 equipment is not in this list, I'm assuming that is the cause of the errors I'm encountering when trying to open one of these files
I doubt it, since the camera make and model is in text form, not an index to different models
20 hours ago, Hans-Wolfgang said:Wondering, however, if a descendent of one of the methods within CCR.Exif [or a simple, new one] can easily be written [and at what cost] to extract just the description and title [nothing more at present]
Are you referring to Delphi code? Also, description and title are not known tags - perhaps you're referring to ImageDescription? There's a list here: https://www.exiv2.org/tags.html. Note that not all images will have anything in this tag.
There's an answer on SO that suggests a simpler method of extracting EXIF at least in relation to JPEGs: https://stackoverflow.com/a/18624442/3164070
There's also a couple of alternatives to CCR-EXIF, here: https://torry.net/pages.php?id=104
Custom TrueType font in FMX Android app?
in Cross-platform
Posted
That's the only way of doing it, and it's very trivial to do.
https://quality.embarcadero.com/browse/RSP-16741