Under Android Runtime NDEF tags with 10.3.1 write error

I'm trying to get an app Android our company wrote working under Blackberry using the NFC support newly added to 10.3.

I use a Q10 to test 10.3.1 running, and I'm able to get the installed application and reading our NDEF labels without problem. Attempt to erase or write tags but seems to fail, while this works very well on our test Android devices. I get the following in the logcat when debugging:

18968818-11/com.app.apptest D/BBNfcConnector? FC polling result: 1
18968818-11/com.app.apptest D/BBNfcConnector? Changes detected from index(0) FD(37)
18968818-11/com.app.apptest D/BBNfcConnector? connection ID available for target
18968818-11/com.app.apptest D/BBNfcConnector? Msg count 1, rc=0
18968818-11/com.app.apptest I/BBNfcConnector? Notify subscriber with NFC event, type=2
18968818-11/com.app.apptest I/BBNfcAdapter? NFC Event received, type=2
18968818-11/com.app.apptest D/NfcTarget? Content of target:
18968818-11/com.app.apptest D/NfcTarget? NDEF_TYPE : 2
18968818-11/com.app.apptest D/NfcTarget? NDEF_LOCKED : FALSE
18968818-11/com.app.apptest D/NfcTarget? NDEF_LOCKABLE : TRUE
18968818-11/com.app.apptest D/NfcTarget? NDEF_FREE_SPACE : 134
18968818-11/com.app.apptest D/NfcTarget? NDEF_CAPABLE_TYPE :
18968818-11/com.app.apptest I/NfcDispatcher? DispatchInfo URI:null MIME:null
18968818-11/com.app.apptest D/BBNfcConnector? Polling NFC FD(37)
18968818-1/com.app.apptest I/BBNfcTag? BBNfcTag_ReaderWriter_nfcUnregister: done
18968818-1/com.app.apptest E/BBNfcTag? BBNfcTag_nfcNdefWrite: Error 7, target=0x11bd7020
18968818-1/com.app.apptest W/System.err? java.io.IOException
18968818-1/com.app.apptest W/System.err? at android.nfc.tech.Ndef.writeNdefMessage(Ndef.java:319)

The calling code is something like the below:

/**Writes out a URI Ndef record along with a text record in one go*/

private void writeNdef(String text, Tag tag) throws IOException, FormatException {
    //First record is a weblink, then our ID data so that unanticipated tag scans respond gracefully
    NdefRecord[] records = {NdefRecord.createUri("http://www.google.com"), createRecord(text) };
    NdefMessage message = new NdefMessage(records);
    issueNdef(message, tag);
}

/**Performs the actual connection to the NFC tag and writes out the given message to it*/
private void issueNdef(NdefMessage message, Tag tag) throws IOException, FormatException {
    Ndef ndef = Ndef.get(tag);
    ndef.connect();
    ndef.writeNdefMessage(message);
    ndef.close();
}

Shows the system to launch a "BBNfcTag_nfcNdefWrite: error 7" when he tries to deliver scripture to the tag in question (the exact IOException occurs at the level of the line "ndef.writeNdefMessage (message);" '). We use fairly standard NTAG203 tags and they are tested as works fine on other devices. Any ideas as to why I have trouble getting these tags to write on the BlackBerry?

Mark,

Thanks for the sample; It was useful to detect the problem (now resolved) by comparison.

For someone else who comes across this thread, the question was how I was manipulating the intent of NFC tag. On my other test devices (android), immediately call my intention of onNewIntent() handler as shown below:

@Override
protected void onNewIntent(Intent intent) {
    intentHandler.Dispatch(intent);
}

works very well. On BlackBerry, an NFC unsubscribe occurs immediately when the triggers of the intention and the context seems to be lost if try to call directly. Instead, I needed to run a setIntent() and then manage OnResume intent, taking care to add a boolean indicator so it tries only to interface with the NFC tag only once and that the curriculum vitae triggered by the intentions of the NFC. See below:

private boolean intentHandled = true;

@Override
protected void onResume() {
    super.onResume();

    //...

    if(intentHandled == false &&
        (NfcAdapter.ACTION_TAG_DISCOVERED.equals(getIntent().getAction()) ||
        NfcAdapter.ACTION_NDEF_DISCOVERED.equals(getIntent().getAction()))) {

        //Decide what to do based on tag type and current program view
        intentHandler.Dispatch(getIntent());
        intentHandled = true;
    }

}

@Override
protected void onNewIntent(Intent intent) {
    intentHandled = false;
    setIntent(intent);
}

With these changes, I am able to get writing reliable tag on my Q10 without negative impact on my ability to write on my other devices Android test.

Tags: BlackBerry Developers

Similar Questions

  • Is Android Runtime WebWorks taken Update supported?

    Hello!

    I think to update an Android Runtime application that is published in the world of the BB with a new web application built with WebWorks.

    Is - it possible/supported?

    Thank you

    Imre

    I'm not familiar with this bug, the best is to keep an eye on this in JIRA, as you did.

    Aside from that, they can link your new keys the former ID App for you, but you will need to contact support via the provider portal. It will be a small amount of work necessary get the configuration of your environment again for WebWorks, but I think that ultimately, it will be long for you.

  • Future of the Android Runtime

    Hello

    I work as a developer of Android apps and my boss received the device BlackBerry 10 Alpha.

    So I played a little with it and successfully port 2 simple Android applications in the BlackBerry 10 Alpha.

    But when I tried to port of our largest app, it fails to run. I can only assume since BB10 is still in alpha, not all APIs are still supported.

    So, I have a few questions.

    1. What is the future of the Android Runtime?

    2. I heard the rumor that you guys plan to abandon the Android Runtime support in the future. Can you guys confirm?

    3. If you guys plan continue Runtime Android, when you guys will add support for Android 4.0 (API 14) and above?

    Thank you very much for your time.

    There is no plan to abandon support for the execution of BlackBerry for Android applications

    We are always evaluating what future features and API that we'll add to the Runtime. Things like the NFC, Bluetooth, etc. It is a matter of priority, time and effort. We have a roadmap for the main features posted here: http://developer.blackberry.com/android/tools/roadmap/ then as new APIs and support is expected, we will not fail to update the roadamp.

    As for the future, we assess now what next Android OS we will provide support to. So don't worry, we do not expect to stay on Ginderbread 2.3.3 forever.

    See you soon

  • Using the Runtime 6.1 with 2009 installed engine

    I have LabVIEW 2009 installed on developer and use it regularly.  I recently got some executables that run only under the runtime of 6.1.  I downloaded the RTE of 6.1, but have not installed.  Don't you think that the RTE of 6.1 installation will have harmful effects on my 2009 installation?  I don't want to install LabVIEW 6.1, just the TEN.

    As long as the program doesn't have other "drivers" as previous DAQ, it should be ok, although usually it's a very good idea to install in the 'original' order i.e. 6.x and 2009. I TEN to several versions installed at the moment, but they were installed progressively in recent years.

  • My Sprint HTC Android mobile phone connects with the supplied USB cable, but the computer says 'No HTC Device Connected'

    My Sprint HTC Android mobile phone connects with the USB cable, but the computer says 'No. HTC Device Connected' so I can't sync...

    Hello

    1. do you have HTC Manager installed on the computer?

    2. have you tried it with different USB ports?

    You need the HTC Sync HTC phone Manager software.

    Method 1: Try again with different USB ports and see if that helps.

     

    Method 2: If HTC Sync is installed, if you get the message "no device connected" in HTC Sync, ensure that your phone USB setting is changed to "Charge Only" to "HTC Sync".

    If the methods above do not help, you can contact HTC for additional help.

    Here is the link: http://www.htc.com/us/support/

  • but my tag with a key number has been deleted

    I have a Compaq presario CQ61 laptop but my hard disk is damaged, I bought a new one, try to install vista but my tag with a key number has been cleared. How can I RECOVER my key for vista

    Contact HP/Compaq and order a set of recovery disc for your computer - you can then install with those who, as they should not ask for a key. No one wants a register key your computer came with, except you.

  • Integration of BBM Android runtime?

    Hi all. Is it possible to connect my BBM BB10 or Playbook OS runtime android app?

    As far as I know for now that there is no support for the integration of BBM in the BB Android Runtime.

  • WiFi Direct in Android runtime

    Hello

    Now that BBOS10.2 supports direct WiFi, are there any plans in direct support of Wifi in the Android runtime? What is the timetable for this?

    ~ M Shea.

    Thanks for the update. I assumed that it is more likely that direct Wifi is added to execution, that Fuji porting the app to BB10.

    If they were to make a non-native port (like Skype) they would have direct access to Wifi?

  • Problem pairing and using Bluetooth THE TI sensor Tag with Z10

    I can't pair and use THE TI Bluetooth sensor Tag with my Z10 on OS version 10.1.0.273.

    I can find out the sensor with bt_disc_retrieve_devices Tag, but when I try to pair with bt_rdev_pair, I get an "Operation not permitted" error (EPERM). If I skip the step of pairing and just the list of services with a bt_rdev_get_services, I get an error "No such file or directory" (ENOENT). Same thing happens in the settings menu bluetooth where I can see the device, but it fails to the pair.

    And then, when I try to connect directly to a service with bt_gatt_connect_service, I get an error 'No such device' (ENODEV), which leads me to believe that I have to be paired first to connect to a service.

    The sensor Tag I pairs and connects very well with an iPhone 4S and on the flipside, my pairs fine Z10 with other devices THE bluetooth so I don't know which side prevents matching. I was actually at the session of JAM62 to BB Live 2013 and devices we were seemed to pair well with the TI sensor tag. Not sure if the version of the OS has nothing to do with it.

    Anyone else having these issues with the TI sensor Tag matching or know of ways to solve this?

    Updated the Tag TI with TI WHEAT SDK 1.3.2 sensor and now it matches successfully. Thank you!

  • BlackBerry 10 Question about email and android runtime

    Greetings,

    Just, I got my new Z10 and have a few questions.

    1. is it possible to email to send in plain text by default? I see that I can select email but don't want to accidentally send a html email or I will never hear the end of it.

    2. I was wondering if it is possible to disable the android runtime, and how do we know if an application in the BlackBerry world runs on it?

    Edit: going to throw one over there:

    3. I see I can transfer files via WiFi and SMB, since I have my device and the SD card, encrypted, if I transfer files (I use smbclient from samba) are my files encrypted on the fly?

    Thanks for any help,

    Brian

    Yes, Built for BlackBerry means it's a native app for BB. Here is some info:

    https://developer.BlackBerry.com/builtforblackberry/documentation/overview.html

    The runtime executes in its own shell protected so he can do no damage to the device, but if you don't use a lot of apps, it should not be a problem. Keep in mind that some apps don't come that android ports so you will be somewhat limited.

  • Push Service on Android Runtime?

    Hi, I thought the SDK went gold and push service listed on there. I would like to ask a few question here:

    1 develops the supported push on android runtime service now?  But I find no example for her...

    2. can I test in the BB Dev Alpha device?

    is there any help here? Thank you...

    Hello

    Yes, PUSH is supported by the Android Runtime. In fact, it has been argued since the Beta 4

    Details can be found here: http://developer.blackberry.com/android/apisupport/creating_push-enabled_android_apps.html

    See you soon,.

  • 802 1 q tagging with PIX 6.3 (1)

    Someone uses VLAN tagging with PIX 6.3 (1)? I could make an ethernet (eth0, for example) as port trunking to carry vlan2, vlan3/vlan4. But the PIX does not define ethernet as an access port 1 belongs to the vlan 2. Or if I try to assign ethernet3 belongs to vlan3, it would be rejected by the PIX also.

    I thought that the concept of PIX to award port trunking and a VLAN access port must be the same happening with catalyst, but it looks like I'm wrong. Anyone can point the right direction?

    Best regards

    Engel

    Engel: Configure the VLAN on the PIX is not the same what to do on the switch. The PIX interfaces are not configured as 'trunk' or 'access' ports ports. With the PIX, you can assign a vlan is a physical interface - or assign a vlan as a logical on a physical interface interface. And vlan is limited to a single PIX - physical or logical interface, here's an example configuration:

    interface ethernet1 100full

    physical interface ethernet1 vlan50

    logical interface ethernet1 vlan60

    logical interface ethernet1 vlan70

    logical interface ethernet1 vlan90

    interface ethernet2 100full

    physical interface ethernet2 vlan20

    interface vlan1 ethernet2 logical

    logical ethernet2 vlan30 interface

    logical interface ethernet2 vlan40

    !

    nameif ethernet1 Win2K security52

    nameif ethernet2 NT4 security90

    nameif vlan60 User60 security53

    nameif vlan70 utilisateur70 security54

    nameif vlan90 User90 security55

    nameif vlan1 management security91

    nameif vlan30 Novell security50

    nameif vlan40 various security51

    !

    address IP Win2K 10.2.50.1 255.255.255.0

    address IP NT4 10.2.20.1 255.255.255.0

    address IP User60 10.2.60.1 255.255.255.0

    IP utilisateur70 10.2.70.1 255.255.255.0

    address IP User90 10.1.90.1 255.255.255.0

    10.2.1.1 management IP address 255.255.255.0

    address IP Novell 10.2.30.1 255.255.255.0

    address IP Misc 10.2.40.1 255.255.255.0

    I hope this helps!

  • How to manage the Tags with PowerCli

    Hello

    I'm trying to find examples how to manage Customs 'Tags' in vSphere 5.1. This new feature is only used in the web client.

    I would like to create, delete, and associate tags with PowerCli objects.

    Is someone can tell me the basic commands?

    Thank you.

    Karl


    Currently, there are no PowerCLI cmdlets to manage the tags.

    But take a look at Create/Set TAGs via PowerCLI

  • How the elements tag with two tags?

    With the following function I can tag with bold and italic tags xml elements. The problem is, I also need '< b > < i >' for example. Now my question is, how is that possible?

    function tagStyles (myXmlElement) {}

    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;

    app.findChangeTextOptions.caseSensitive = false;

    app.findChangeTextOptions.includeFootnotes = app.findChangeGrepOptions.includeFootnotes = false;

    app.findChangeTextOptions.includeHiddenLayers = false;

    app.findChangeTextOptions.includeLockedLayersForFind = false;

    app.findChangeTextOptions.includeLockedStoriesForFind = false;

    app.findChangeTextOptions.includeMasterPages = false;

    app.findChangeTextOptions.wholeWord = false;

    objectToTag = myXmlElement;

    italic conversion

    need to be developed for other styles

    attention to the problems of nested xml tags

    app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;

    app.findGrepPreferences.findWhat = '. '. + » ;

    app.findGrepPreferences.fontStyle = "italic";

    var myFindTexts = myXmlElement.findGrep ();

    If (myFindTexts.length > 0) {}

    for (var j = 0; j < myFindTexts.length; j ++) {}

    var myText = myFindTexts [j];

    var myStartIndex = myText.characters [0] .index;

    var = myText.characters [-1] .index myEndIndex;

    objectToTag = objectToTag.xmlElements.add ({markupTag: "i", xmlContent:myText});})

    myShift += 2;

    }

    }

    conversion "BOLD"

    need to be developed for other styles

    attention to the problems of nested xml tags

    app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;

    app.findGrepPreferences.findWhat = '. '. + » ;

    app.findGrepPreferences.fontStyle = "Bold";

    var myFindTexts = myXmlElement.findGrep ();

    If (myFindTexts.length > 0) {}

    for (var j = 0; j < myFindTexts.length; j ++) {}

    var myText = myFindTexts [j];

    var myStartIndex = myText.characters [0] .index;

    var = myText.characters [-1] .index myEndIndex;

    objectToTag = objectToTag.xmlElements.add ({markupTag: "b", xmlContent:myText});})

    }

    }

    bold italics conversion

    need to be developed for other styles

    attention to the problems of nested xml tags

    app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;

    app.findGrepPreferences.findWhat = '. '. + » ;

    app.findGrepPreferences.fontStyle = "Bold Italic";

    var myFindTexts = myXmlElement.findGrep ();

    If (myFindTexts.length > 0) {}

    for (var j = 0; j < myFindTexts.length; j ++) {}

    var myText = myFindTexts [j];

    var myStartIndex = myText.characters [0] .index;

    var = myText.characters [-1] .index myEndIndex;

    objectToTag = objectToTag.xmlElements.add ({markupTag: "b", xmlContent:myText});})

    }

    objectToTag = myXmlElement;

    for (var j = 0; j < myFindTexts.length; j ++) {}

    var myText = myFindTexts [j];

    var myStartIndex = myText.characters [0] .index;

    var = myText.characters [-1] .index myEndIndex;

    objectToTag = objectToTag.xmlElements.add ({markupTag: "i", xmlContent:myText});})

    }

    }

    }

    When there is an element with the "Bold Italic" style it looks like this: 'my element with < b > < /b > < i > "BOLD" and the italic text < /i > '. There it looks like this: ' my element with < b > < i > bold and italic < /i > < / b > text.

    Does anyone have an idea on this?

    Thanks in advance!

    Dear Stamm,

    Try this...

    objectToTag = objectToTag.xmlElements.add ({markupTag: "b", xmlContent:myText});})

    App.Select (objectToTag.texts);

    App.Selection [0] .associatedXMLElements [0].xmlElements.Add ("i", app.selection [0]);

    Kind regards

    Bala

  • Anyone use the &lt; cfdocument &gt; tag with a &lt; cfloop &gt;

    Anyone use the < cfdocument > tag with a < cfloop >

    I'm generating more documents like this.

    < cfloop query = "myquery" >

    < cfdocument type = pdf >

    < html >... .HTML code here... < html >

    < / cfdocument >

    < / cfloop >

    But only the first document is generated in the browser?



    My requirement that I want to create multiple PDF and publish to folder and zip folder so that the user can able to download the ZIP file


    Thanks in advance

    My requirement that I want to create multiple PDF and publish to folder and zip folder so that the user can able to download the ZIP file

    (1) create a folder named, say, docsDir, in the current directory.

    (2) create PDF files, using suggestion of Eddie Lotter, name each file dynamically and store them in the folder docsDir.

    Insert here the code to generate the content of #filename # .

    (3) zip file, docsDir, store the resulting file, docsDir.zip, in the current directory.

Maybe you are looking for

  • Satellite U400 - error - Bluetooth is not started

    I used my u400 3 months without problem...Then all of a sudden happened several problems with bluetooth... When I tried to use BT for example OBEX, I got the error msg: "Bluetooth has not begun."I tried to reinstall the driver for bt, but I couldn't.

  • How to get the connection to the serial port 9-pin on Satellite A100

    HelloAnyone know if its possible to get a connection Series 9 pins for my satellite a100? Maybe USB to serial or pcmcia card?Thank youGary

  • HP 4500 g510g-m: Scan does not

    Hello I have a hp 4500 g510g-m. It worked fine until about a month. When I want to scan a document, I open HP Solution Center select Scan > Scan document. Open it and then imaging software I press scan and nothing happens, it just goes back to the HP

  • Field multi

    Hello world I am currently working with tiara and I a few beginner questions. Call PicLoad ("Template") Call GraphObjNew ("2D-Axis", "2DAxis1") Call GraphObjOpen ("2DAxis1") Call GraphObjNew("2D-Curve","New_Curve") ' creates a new curve Call GraphObj

  • Creation + FS5 Sony 4 K + Odyssey 7 q + unrecognizable Audio =

    I've recently upgraded to the latest version of Adobe Premiere 2015.3 on my laptop (Mac OS 10.10.5 with Intel Core i7 2.8 GHz, 16 GB RAM and NVIDIA GFORCE GT 650 M 1024Mo) and met with a number of problems with the first and the multitrack MOV which