I have had unreliable success in using the ForceConnect parameter in the BLE StartDiscovery method. Using 10.2, Android 6.0 on an S5, with this parameter true will always cause a segmentation fault. Trying to trace through it leads to different places in the code, which leads me to believe it is some problem I am causing in the RT during the discovery process. I have been building BLE apps since Delphi XE8 and setting this parameter to TRUE has caused intermittent problems. For now it is not a concern since I need to go through a connect process looking for a specific service and a defined set of characteristics. I pass this along for anyone who might be struggling with this.
I finally figured out to do it. Once you upload the file into the "Responsive File Manager", then click on the files you want to post and they should show up in the post you are editing as link.
TAGS I dont have an answer for.
Updating this topic. At this years Maker Faire, same issue. Though the crashes were far less. The biggest problem was at the peak of the crowds, then it would crash about a 1/3 of the time. Progress has been made, but still not there. Over a year of testing and using the apps and no issues. Have submitted a bug to quality central, RSP-18186.
Using 10.1 and Android 5.0 and 6.0.
This comment applies to 10.2, could not find a separate topic on that so I am putting it here.
I had 10.0 and 10.1 installed on my laptop. Installed 10.2 since Get-it now had Jedi Library like 10.0 and I wanted one installation for both windows and Android. Well that did not go well and I uninstalled 10.2, because I had a deadline coming up and I did not want to corrupt either 10.0 (Windows development) and 10.1(Android development).
Deadline passed and I uninstalled everything, while flirting with Win 10 Creator (did not keep the update). The same thing that happened to me before happened again. So I did the complete manual uninstall (except registry) and then 10.2 install worked. One thing I learned about Jedi install. If you are installing in RAD Studio, you must have at least one C++ compiler installed or the install will fail. If Jedi Install fail , I had to uninstall everything to get it to work correctly.
Using Delphi 10.1 Berlin, Android Program, using a Galaxy S5 (6.0) and LG G2 (5.0) and Galaxy Note 10.1 (5.0)
I have an App that implements the sliding drawer using TLayout. On TLayout is a TListBox and in one of the TListBoxItems is a TComboBox. When you tap on the TListBoxItem or the TComboBox, the Pick List appears as it should. The TListBoxItemTap event calls TComboBox.DropDown method.
Depending on the style selected, the TListBox will disappear when the Pick List appears and will not come back. I can still tap on the TlistBox and the App responds as I expect, just hard to know what item I am tapping on. I can change the drawer and then come back and the TListBox is still gone. I have stepped through looking at the visible property, but it is set to TRUE. I know that DarkBlue and the premium Vapor do not work while the premium Jet and EmeraldDark work. Beyond that I havent tried any.
What is interesting is that I have 4 very similar Apps that I am redoing to use common modules. In two of them, the Vapor custom style works just fine.
Obviously there is something I have done in the non working Apps to cause this, but I cannot find it. Any suggestions would be greatly appreciated.
I have this mostly working, but I dont understand how to change the color of a detail text in code. I have a TListview component named lviewStatus and can change the text as shown below.lviewStatus.Items.Data[TMultiDetailAppearanceNames.Detail2]:
I am working on an Android app that will look for a particular Beacon, launch a program that will connect to the BTLE device(which causes the Beacon to shutdown) and exchange information. I can detect the beacon, I just cannot find enough information on how to launch an app from a service. Maybe I dont want to that, but exchange all the information needed between the two in the service. I was trying to keep the service to a minimum.
I have tried the launch app I found, but when it runs I get 'Activity not found, maybe you are in a service'. There appears to be a know issue that you cannot use that Android helper in a service.
Not looking for a completed code sample, just guidance on how to approach this with Delphi.
Thanks very much for the help
I will add the following. While I have made no progress on my Samsung S4 with 4.4, my Samsung Note 10.1 Tablet with 5.0 runs the same code correctly. So either the S4 or 4.4 cannot handle what I am trying to do.
I am working on an Android app that will look for a particular Beacon, launch a program that will connect to the BTLE device(which causes the Beacon to shutdown) and exchange information. Then when the Android device is out of range, the Beacon starts up again. The BTLE device is a Microchip RN4020 and for now everything on that side is working, (i have used this BTLE device in multiple products with Android apps, just not as a Beacon).
I implemented the Beacon Service project in my app and that works as advertised. I have my main app connecting to the BTLE device and everything works as I it should. (i have another Android app running on a tablet that shows the range to the beacon in a continuous graph, thus I see it shutdown when I connect and then restart when the connection is borken.)
My problem is that when I start the beacon service first and the notification is sent, I can no longer connect to the BTLE device. This leads me to suspect that the service is somehow interfering with the standard call
Also the Android program slows way down and then hangs. I have tried tracing it , but always ends up in the CPU window tracing assembly language.
Just looking for anyone who might have done this and can offer advice on how to get past this. Using a Samsung Galaxy S4 with KitKat.
I had the same problem. the only way to fix it was to follow the manual uninstall and remove all of it. Then the next time I did the install, it all worked. I also only installed the 32 bit versions. Then later installed the 64 bit version. No Apple was installed.
When trying to deploy a simple single button Android App the following message comes up when pressing F9.
[Error Error] Missing profile name. Unable to get a valid profile from environment options file. Process aborted.
The APP will build (Shift + F9) but will not deploy. On the same computer with 10.0 installed, it works fine.
Uninstalled and re-installed twice, no effect.
The Wiki says I done need a profile for Android, but this appears to say I do. Tried installing a profile but that did not seem to work either.
Thanks for the help
I have a simple Android APP that connects to an embedded BTLE device and starts a script. Works great, except last weekend. We were showing this at the Bay Area Maker Faire and the Android app would crash 99% of the time in the expo hall when starting the scan for devices (StartDiscovery method of TBluetoothLEManager). Outside of the hall it would work. A generic BTLE APP I have showed a "huge" list of BTLE devices on scanning. I changed the StartDiscovery method to add a filter only for our service. This helped, but it would still crash over 50% of the time. My assumption is that some buffer overflowed, but I cannot see anyway to limit or increase this buffer in the BLTE manager.
My other concern now is trying to duplicate this problem for future testing.
Using Delphi 8, Android 4.4 and Android 5.0
Thank you for the help