Skip to Content
avatar image
Former Member

Enable RFID Scanning Capabilities - Android Agentry Client.

Dear Team, Good Day!

Customer wants to enable the RFID Scanning capabilities for the Android Agentry Client to filter the list tile row records.

Tried to customise the Agentry Client to enable the RFID Scanning by following the SCN Technote : http://scn.sap.com/docs/DOC-60390

Followed the below steps :

Install Eclipse Juno 4.2.2.

1. Add Android Eclipse plugin (https://dl-ssl.google.com/android/eclipse/)

2. Import the OpenUI toolkit of the SMP 3.0 SDK (preferably the newest version - SDK used : SP08 PL2) - resolve reference errors.

3. Create a class that extends the Agentry class ButtonDisplayAdapter. This class will give us control over the behavior of an Agentry push button.

4. Override method onClick and implement actions to perform when user clicks button.

5. Override method getExtensionString() to pass the scanned value back to Agentry.

6. Create a class that extends the Android Activity class. This will represent the overlay screen.

Display a text for the user.

7. Enable foreground dispatch of NFC events (intents) from Android to this Activity.When an NFC event (intent) is caught, save its value and close the Activity.

Upon Import the OpenUI toolkit getting following error :

Error occur during the build.

Error Runing builder ' Android Resource Manager' on project 'AgentryAndroidClientSolution'. java.lang.NullPointerException.

And other Refernced Imported Package/Class Error in the custom Agentry Action Button class.

Ex. import com.sap.mobile.platform.client.openui.models.ButtonDisplayModel; Package Cannot  be resolved.

Sharing the Screen Shot & Logs for the Error Message.

Environment Details :

We are using SMP3.0 SP08 PL 02 OpenUI SDK.

SMP3.0

Android Agentry Client 8.

Kindly Suggests.

Thanks,

Regards,

Tirupati

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Aug 31, 2015 at 01:49 PM

    Tirupati,

    In order to filter a tile list records you will need to implement this as a scanning interface not as an OpenUI control.  The scan event needs to be sent to Agentry as an alternate input in order for Agentry to kickoff the

    There are examples in the SMPAgentryClientFramework-Android-70.9.4\Sample\com\sap\mobile\platform\client\openui\altinput directory to use as a starting point.

    Also, when you import the framework into Eclipse you should not have to make any adjustments to the projects.  I select the root directory to import and wait for the workspace to rebuild and I don't have any errors or adjustments to make.  I am ready to start adding in my code.

    --Bill

    Add comment
    10|10000 characters needed characters exceeded

    • It looks like the AgentryAndroidClientResources project isn't correctly linked in.

      As I mentioned in my earlier post.  You should not have ANY errors to correct after importing the Framework project into your workspace.

      These are the steps I follow to get started

      1. Create a new directory for my project and within this directory do the following steps
      2. Create a new subdirectory Workspace
      3. Create a new subdirectory SMPAgentryClientFramework
      4. Unzip the SMPAgentryClientFramework-Android-x.x.x.x zip to a directory
      5. Confirm the folders within your SMPAgentryClientFramework
        • Sample
        • SAP
        • vendor
      6. Launch Eclipse with ADT tools and required SDK versions already downloaded
      7. Point Eclipse at my new Workspace folder
      8. Import -> General -> Existing Projects into Workspace -> Select root directory
        • Browse to your SMPAgentryClientFramework directory
      9. Wait for the workspace to rebuild.  Will take time as there are many project inner-dependancies
      10. You should have all projects loaded without any red exclamation points or red x marks.
      directory.png (19.3 kB)
      eclipse-import.png (48.6 kB)
      eclispe-final.png (48.7 kB)