cancel
Showing results for 
Search instead for 
Did you mean: 

Extending Agentry Client via OpenUI for Android.

Former Member
0 Kudos

Hi All

I want to extend Agentry Client via OpenUI for Android.

I imported SMPAgentryClientFramework-Android-70.9.0.zip

from C:\SAP\MobileSDK3\AgentryToolkit\OpenUISDK\Android

into Eclipse.

It imported it with warnings but not errors.

I can run AgentryAndroidClientSolution project on my Mobile Device without problem.

Now I want to extend the project to allow it to work read RFID using NFC protocol.

I use next instruction "Agentry OpenUI for Android NFC.docx" to extent the project.

I can't attach the file so I inserted a cut from it.

When I perform first step of instruction:

> First create a new Blank activity that will receive NFC event. Lets name it “ZNFC”.

the Eclipse shows next error

-----

Description Resource Path Location Type

The container 'Android Dependencies' references non existing library 'C:\Backup\Мобильное ТОРО\EclipseWorkSpaces\Agentry-OpenUI\Workspace\appcompat_v7\bin\appcompat_v7.jar' AgentryAndroidClientSolution Build path Build Path Problem

The project cannot be built until build path errors are resolved AgentryAndroidClientSolution Unknown Java Problem

error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'. styles_base.xml /appcompat_v7/res/values-v21 line 75 Android AAPT Problem

-----

Now it doesn't allow to launch AgentryAndroidClientSolution.

I performed all steps of the "Agentry OpenUI for Android NFC.docx" instruction.

But it doesn't help.

Same error prevent me to launch AgentryAndroidClientSolution.

----- Cut From File

Android code

We will follow the branding procedure described in the note 1932043 (Additional blog might be needed for step by step procedure).

We will work further only in the project AgentryAndroidClientSolution.

First create a new Blank activity that will receive NFC event. Lets name it “ZNFC”.

Do some beauty (optional as activity screen will pop-up just for some milliseconds)

--

See also InfoFile.Txt for Console lines from Eclipse.

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Konstantin,

Is the doc (Agentry OpenUI for Android NFC.docx) you are working from the same as this post?

--Bill

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Using the link referenced in my last reply I was able to create the Open UI extension to display the Open UI Button that when pushed will invoke the NFC reader and return the tag id via the external value.

I have successfully tested this using my Samsung Galaxy S4 device and some NFC tags I had lying around.

While the document doesn't provide full source code it does give you basically all the code you need to add in just without the method definitions and the utility classes.  In particular I had to implement code for converting the byte array to a hex string as well as the ShowDialog method.

--Bill

Former Member
0 Kudos

Hi Bill

Thank you for SMP 3.0: Custom Agentry Android client supporting native NFC (RFID) scanning capabilities.

Description is more detailed than in my file.

But I think I have a problem with source OpenUI projects or related components.

May be Java, may be Android SDK, May be addons, may be Eclipse.

I can not begin to change the AgentryAndroidClientSolution project.

When I start make any changes in the project and try to launch it the Eclipse create new folder appcompat_v7 in the Workspace folder and shows errors which I wrote above.

If I import SMPAgentryClientFramework-Android-70.9.0.zip

from C:\SAP\MobileSDK3\AgentryToolkit\OpenUISDK\Android

into Eclipse and launch it without any changes, it works.

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Instead of launching from Eclipse, have you tried creating the .apk and then installing it to the device?

I just right-click the AgentryAndroidClientSolution project and export the Android App to create my .apk. 

--Bill

Former Member
0 Kudos

For the changed project it doesn't want ot export

It says - Project has compilation error(s)

I will check for the source unchanged project.

Former Member
0 Kudos

What about keystore

Do I need to use existring keystore or create new?

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Have you tried the SDK SP10 version?  That is what I used for my testing.

--Bill

Former Member
0 Kudos

I can't install SDK as my OS is Win7 Home Edition.

But I downloaded new SDK and took SMPAgentryClientFramework-Android-70.10.0 from there.

The problem is the same.

When I try to add new Blank activity in the AgentryAndroidClientSolution

Eclipse add new project - appcompat_v7 and show error in the appcompat_v7 as described above.


Is it correct that Eclipse automatically add new project - appcompat_v7?

Former Member
0 Kudos

I managed to create new apk file.

It looks Ok.

When I copyed it on my Android device and try to install it falied with error

--

Agentry Client

x Apllication not installed

--

How to understand the reason? Why does the installation failed?

When I start application on the Device directly from Eclipse it is launched without problems.

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Are you running Andorid 5.x?

Do you have the generic client already installed on the device?

--Bill

Answers (1)

Answers (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

That was originally created when Open UI first came out.  Since then the Engineering team has introduced the Open Scan interface.  This allows you to interface with the Agentry scanning events so you can filter lists, trigger match / no match actions, utilize the built in scanning on controls (barcode field) etc. 

If you are interested in adding NFC capabilities that would be the better interface to build upon.  If you are just looking to learn about building an Open UI control then continue on this path. 

I am out this week for holiday but can try to review next week when I am back if you are still having trouble.

--Bill