Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7729003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:51:34+00:00 2026-06-01T05:51:34+00:00

i want to create a NFC SmartPoster which dial a number with Action Record

  • 0

i want to create a NFC SmartPoster which dial a number with Action Record type “act”.
Can anyone tell how to get Action Record type “act” in android from packet and check whether packet contains Action Record type “act” or not.
Below is packet i have created.

/**
 * Smart Poster containing a Telephone number and Action record type.
 */

public static final byte[] SMART_POSTER_Dial_Number =
    new byte[] {
    // SP type record
    (byte) 0xd1, (byte) 0x02, (byte) 0x26, (byte) 0x53, (byte) 0x70,
 // Call type record
    (byte) 0xd1, (byte) 0x01, (byte) 0x0e, (byte) 0x55, (byte) 0x05, (byte) 0x2b,
    (byte) 0x39, (byte) 0x31, (byte) 0x38, (byte) 0x38, (byte) 0x37, (byte) 0x32,
    (byte) 0x37, (byte) 0x34, (byte) 0x33, (byte) 0x39, (byte) 0x33, (byte) 0x39, 

    // Action type record
    (byte) 0x11, (byte) 0x03, (byte) 0x01, (byte) 0x61, (byte) 0x63, (byte) 0x74,
    (byte) 0x00,
 // Text type record with 'T'
    (byte) 0x91, (byte) 0x01, (byte) 0x09, (byte) 0x54, (byte) 0x02, (byte) 'C',
    (byte) 'a', (byte) 'l', (byte) 'l', (byte) 'i', (byte) 'n', (byte) 'g', (byte) '.'


     };

Please help..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:51:36+00:00Added an answer on June 1, 2026 at 5:51 am

    When you receive an NDEF message in your Activity via an ACTION_NDEF_DISCOVERED intent, you can parse and check the contents for a SmartPoster record with an embedded ‘act’ record as follows:

    Intent intent = getIntent();
    final Parcelable[] rawMsgs = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);
    NdefMessage mesg = (NdefMessage) rawMsgs[0]; // in theory there can be more messages
    
    // let's inspect the first record only
    NdefRecord[] record = mesg.getRecords()[0];
    byte[] type = record.getType();
    
    // check if it is a SmartPoster
    byte[] smartPoster = { 'S', 'p'};
    if (Arrays.equals(smartPoster, type) {
      byte[] payload = record.getPayload();
    
      // try to parse the payload as NDEF message
      NdefMessage n;
      try {
        n = new NdefMessage(payload);
      } catch (FormatException e) {
        return; // not an NDEF message, we're done
      }
    
      // try to find the 'act' record
      NdefRecord[] recs = n.getRecords();
      byte[] act = { 'a', 'c', 't' };
      for (NdefRecord r : recs) {
        if (Arrays.equals(act, r.getType()) {
          ... // found it; do your thing!
          return;
        }
      }
    }
    return; // nothing found 
    

    BTW: You will find that there are a couple of format errors in the example message in your question: the first byte of the Uri record should be 0x81 and the first byte of the Text record should be 0x51.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want create something like link_to which can link to request for permission in
I want create module which update list of usb devices automatically (not only mass
I want create a pdf using iText. The method which does this is a
I want create a generic (general) method which accepts the return types of LINQ
I want create a DataSet class which is basically a list of samples. But
I want create a ruby script that I can run on the command line
I want create timer in my program so that I can cause it to
I want create tab display like safari for iPad. Is there any control which
I want create a site by command line using appcmd. How can I associate
I want create a query that creates a calculated field ANSWER_SCORE which it then

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.