tag:blogger.com,1999:blog-1853768304794693097.post8506183917508148677..comments2024-03-10T08:33:47.120-07:00Comments on It's a blong, blong, blong road...: Delphi and NFC on Androidblonghttp://www.blogger.com/profile/15865043713752235355noreply@blogger.comBlogger33125tag:blogger.com,1999:blog-1853768304794693097.post-37891019168241110942016-04-19T01:40:43.729-07:002016-04-19T01:40:43.729-07:00Hi Carlos, unfortunately I haven't done much o...Hi Carlos, unfortunately I haven't done much on iOS lately, so I don't have any information on surfacing NFC support. It's one of the many things I hope to get onto as and when the current workload dies down, but I am unaware of when this will be.blonghttps://www.blogger.com/profile/15865043713752235355noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-11527227794674122462016-04-09T07:52:10.688-07:002016-04-09T07:52:10.688-07:00I brian, si there some information to implement nf...I brian, si there some information to implement nfc on IOS devices?Anonymoushttps://www.blogger.com/profile/08783383074741243802noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-90215467041091974202015-12-11T09:36:20.323-08:002015-12-11T09:36:20.323-08:00Rather late I know, but I sorted out that issue. P...Rather late I know, but I sorted out that issue. Probably irrelevant for many of you, but the issue turned out to be the way I was using JNI code in the sample, which in later versions of Android started failing, but was fine in earlier versions.<br />I've updated the samples and the snippet of code in the articles. If you pull down the current sample and do a compare with the original version (or just check out OnNewIntentNative in the article) you pulled down, you should see the subtle change in the use of the JNIObject parameter.<br />There's also an additional example that doesn't really use JNI at all - it uses a listener interface, which is a neat way round the problem.<br />Apologies for not getting to this sooner.blonghttps://www.blogger.com/profile/15865043713752235355noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-57755913601389767892015-12-11T09:36:13.732-08:002015-12-11T09:36:13.732-08:00Rather late I know, but I sorted out that issue. P...Rather late I know, but I sorted out that issue. Probably irrelevant for many of you, but the issue turned out to be the way I was using JNI code in the sample, which in later versions of Android started failing, but was fine in earlier versions.<br />I've updated the samples and the snippet of code in the articles. If you pull down the current sample and do a compare with the original version (or just check out OnNewIntentNative in the article) you pulled down, you should see the subtle change in the use of the JNIObject parameter.<br />There's also an additional example that doesn't really use JNI at all - it uses a listener interface, which is a neat way round the problem.<br />Apologies for not getting to this sooner.blonghttps://www.blogger.com/profile/15865043713752235355noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-65471642767465193212015-12-11T09:36:03.949-08:002015-12-11T09:36:03.949-08:00Rather late I know, but I sorted out that issue. P...Rather late I know, but I sorted out that issue. Probably irrelevant for many of you, but the issue turned out to be the way I was using JNI code in the sample, which in later versions of Android started failing, but was fine in earlier versions.<br />I've updated the samples and the snippet of code in the articles. If you pull down the current sample and do a compare with the original version (or just check out OnNewIntentNative in the article) you pulled down, you should see the subtle change in the use of the JNIObject parameter.<br />There's also an additional example that doesn't really use JNI at all - it uses a listener interface, which is a neat way round the problem.<br />Apologies for not getting to this sooner.blonghttps://www.blogger.com/profile/15865043713752235355noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-43503871876616591812015-10-11T17:37:12.268-07:002015-10-11T17:37:12.268-07:00Same problem, android 5 (samsung s5 stock rom)
Same problem, android 5 (samsung s5 stock rom)<br />Anonymoushttps://www.blogger.com/profile/10192863833100548551noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-38613484324157752252015-08-07T05:42:49.936-07:002015-08-07T05:42:49.936-07:00Duly noted, Mary. I'll re-run the sample on my...Duly noted, Mary. I'll re-run the sample on my 5.0.2 device, though I am reasonably confident it was at 5.0.2 the last time I tried.<br />I'll see what happens though.blonghttps://www.blogger.com/profile/15865043713752235355noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-86766390659302726582015-08-06T08:36:44.264-07:002015-08-06T08:36:44.264-07:00Brian, I am fairly certain now that it is a Androi...Brian, I am fairly certain now that it is a Android 5.x issue. I've run the same set of test APKs on both styles 4.4 and 5.X and 5.X has an issue getting the second intent in the same application or getting an intent in an already running app.Maryhttps://www.blogger.com/profile/01926702208237431429noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-86509745632224356212015-08-05T12:31:31.773-07:002015-08-05T12:31:31.773-07:00I have 2 devices running greater than Android 5.X....I have 2 devices running greater than Android 5.X. On the initial read, it works great. but then requires the user to exit the application in order to get any further reads. Somehow every subsequent read (I think) is reloading the application and trying to access NFC. I don't know if that helps.Maryhttps://www.blogger.com/profile/01926702208237431429noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-42636155323349415492015-07-01T15:25:55.222-07:002015-07-01T15:25:55.222-07:00I did hear people saying that on Android 5.x, code...I did hear people saying that on Android 5.x, code that references fully qualified Android classes needs to now use a '/' instead of a '.' to separate the different parts of the class name.<br />Maybe that might help?<br />I haven't seen the issue, so it's tricky for me.<br />From the comments it doesn't look like you've examined the logcat messages in monitor/DDMS. They may be instructive.blonghttps://www.blogger.com/profile/15865043713752235355noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-48700213548074205262015-04-22T09:15:52.173-07:002015-04-22T09:15:52.173-07:00I think it might be related with NFC android Beam ...I think it might be related with NFC android Beam Anonymoushttps://www.blogger.com/profile/15075014194185490030noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-11933971047717502182015-04-22T08:54:48.468-07:002015-04-22T08:54:48.468-07:00If I open the program will crash with NFC sensors
...If I open the program will crash with NFC sensors<br />Touch NFC, The program will close<br /><br />But if I can run directly sensing NFC induction program and will open<br />But only once<br />When the program opens after they dieAnonymoushttps://www.blogger.com/profile/15075014194185490030noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-42523631092246823812015-04-22T08:39:46.287-07:002015-04-22T08:39:46.287-07:00Thank you for your reply.
http://cc.embarcadero.c...Thank you for your reply.<br /><br />http://cc.embarcadero.com/item/30110 I have installed,but Touch NFC, The program will close.<br /><br />My Mobile Sony Z2 Android 5.0.2. XE7 up1<br />Use you Delphi XE7 NFC support <br />I did not modify the program<br />The program will close.<br />I would like to try to identify the problem,but I have insufficient capacity.<br /><br />Anonymoushttps://www.blogger.com/profile/15075014194185490030noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-45807086299041601542015-04-22T00:54:36.780-07:002015-04-22T00:54:36.780-07:00So you're saying with Android 5, as soon as yo...So you're saying with Android 5, as soon as you engage with an NFC tag the app closes unexpectedly? Have you installed Embo's Lollipop fix? http://cc.embarcadero.com/item/30110<br />Definitely try that, If that doesn't help, you'll need to use DDMS or Monitor (from Android SDK) to look at logcat messages to get an inkling as to what the crash relates to, I'd imagine.blonghttps://www.blogger.com/profile/15865043713752235355noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-81752688587743528082015-04-22T00:39:16.778-07:002015-04-22T00:39:16.778-07:00I use XE7 and Mobile Android 5.0.
Use Delphi XE7 ...I use XE7 and Mobile Android 5.0. <br />Use Delphi XE7 NFC support Code<br />Touch NFC, The program will close<br />I would like to ask how to deal with this issue.<br />Thank you!Anonymoushttps://www.blogger.com/profile/15075014194185490030noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-47044617490607703572015-01-28T01:44:36.609-08:002015-01-28T01:44:36.609-08:00Hello. I haven't got Android 5 on any of my de...Hello. I haven't got Android 5 on any of my devices yet, but I know it impacts the JNI bridge stuff notably, hence the (currently beta) fix for FMX and Lollipop (http://cc.embarcadero.com/item/30110).<br />I see this download now has source/headers in so I can potentially see what changes have been made to support Lollipop.<br />In short, I'm *guessing* your crash may be more to do with running code on a Lollipop device than not having followed the steps, and my code doesn't take Lollipop into account.<br />It would be a useful exercise to see if installing that beta fix (on a VM snapshot or something) helped improve the situation.blonghttps://www.blogger.com/profile/15865043713752235355noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-68210980081969680712015-01-27T03:25:07.826-08:002015-01-27T03:25:07.826-08:00Hello Brian, I succesfully installed the example o...Hello Brian, I succesfully installed the example on foreground dispatch on my nexus 7 (2013) with android 5.0.2. Compiled with XE7 Update1.<br />If i scan a tag when the program is active the program crashes.<br />I receive the following message in the debug log: "W/InputEventReceiver(15107): attempted to finish an input event but the input event receiver has already been disposed".Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-42397918594146689252014-12-17T06:34:44.386-08:002014-12-17T06:34:44.386-08:00Hello Arpad, see my reply to Gianluca just aboveHello Arpad, see my reply to Gianluca just aboveblonghttps://www.blogger.com/profile/15865043713752235355noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-44938199736303646102014-12-17T06:34:26.263-08:002014-12-17T06:34:26.263-08:00Hi Gianluca. It's a good question that I hadn&...Hi Gianluca. It's a good question that I hadn't considered. I'd need to look at such a scenario to see *why* it is failing in that manner, but I assume I have a lack of defensive coding somewhere along the line, making too many assumptions. I'm unlikely to be able to check this out in the immediate short-term future, but hopefully that gives you a clue where to look. If I get a handle on the problem, I'll update the blog post.blonghttps://www.blogger.com/profile/15865043713752235355noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-2533919692200408722014-12-16T02:31:46.886-08:002014-12-16T02:31:46.886-08:00Dear Brian,
I use Delphi XE7 and I were bult your ...Dear Brian,<br />I use Delphi XE7 and I were bult your sample NFC project to my porject. Whewn I want to run my project on an NFC phone it wokrs fine. But if I want to run a phone what doesn't has NFC my app has stopped after the splash screen. Anonymoushttps://www.blogger.com/profile/17065075163492818594noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-7228880001732849102014-12-15T05:24:50.564-08:002014-12-15T05:24:50.564-08:00Hello Brian, Your code works fine, but if I try to...Hello Brian, Your code works fine, but if I try to install the app on a device with no NFC support, the Application crashes. I'm using the Nfc as a login so in case of no NFC support, the user could enter something like a password. WHat can I do to prevent the crash in that case?Gianluca Colombohttps://www.blogger.com/profile/09822905809927824904noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-8687625394105123362014-11-20T12:18:11.580-08:002014-11-20T12:18:11.580-08:00Hello Laurence. First thing to do is run the Andro...Hello Laurence. First thing to do is run the Android SDK log utility by running monitor.bat or ddms.bat (they are in the Android SDK directory tree) and see what the log says about the failure to start. It should give a clue.blonghttps://www.blogger.com/profile/15865043713752235355noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-15330891894698975672014-11-20T06:15:50.772-08:002014-11-20T06:15:50.772-08:00Hello Brian, I'm developing a app based on you...Hello Brian, I'm developing a app based on your code, i made some modifications to read and write Mifare Classic cards. When i test in your app everything works and i can read and write the cards, but when i run in my app the app fail to start when i change the AndroidManifest. Can you give me some ligth?!! thanks in advance,Anonymoushttps://www.blogger.com/profile/08524669323027236027noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-43263188922634246372014-11-18T10:44:54.886-08:002014-11-18T10:44:54.886-08:00If I could get onto the web site I'd take a lo...If I could get onto the web site I'd take a look :-/blonghttps://www.blogger.com/profile/15865043713752235355noreply@blogger.comtag:blogger.com,1999:blog-1853768304794693097.post-1859133248182283692014-11-16T01:49:37.664-08:002014-11-16T01:49:37.664-08:00You might be interested in this request of mine:
h...You might be interested in this request of mine:<br />https://quality.embarcadero.com/browse/RSP-9715Anonymousnoreply@blogger.com