cancel
Showing results for 
Search instead for 
Did you mean: 

Rebranding SMP Agentry Client for Android

lukasz_grochal
Participant
0 Kudos

We need to install 2 Agentry clients on the same Android tablet (Dell Venue 😎 in order to be able to run SAP Work Manager 6.1 and SAP Inventory Manager 4.0 on the same device. The dedicated clients from the Google Play store cannot be used as they cannot be installed on this device as per Google Play message during install and they do not work with multiple apps deployed on the same SMP server, the functionality added in SMP 3.0 SP4 and SDK SP5. This is why we are using the latest Agentry_70.5.3_Client. Following the developer guide we set up ADT and the SMPAgentryClientFramework-Android-70.5.3 within it. Changing the app name or swapping out resources is not an issue. However, in order to install more than just 1 client, the package name must be changed or the generated apk file will fail to install with an "already exist" error. There is no clear procedure documented anywhere on how to do create a new client with a changed package name, at least not the latest OpenUI version. Changing the AndroidManifest.xml in both AgentryAndroidClientResources and AgentryAndroidClientSolution projects/folders has no effect and the INSTALL_FAILED_ALREADY_EXISTS error occurs during apk installation. We have also tried changing the package name in the build-android-common.xml as suggested in the comments within that file:


<!-- Change this value if you want to have multiple installs of the Agentry Android client.  Android installs by unique ID.  That ID is the

  package name.  This is the default name.  Change it for each instance of the client you want to install and build each one. -->

<property name="package.name" value="com.test.im.client.android" />

With this change, the app can be successfully installed on the device alongside another (standard) client. Unfortunately, the app fails to start. There is a series of errors in the ADT LogCat but the first one says:


11-17 21:52:31.094: E/AndroidRuntime(8308): java.lang.NoClassDefFoundError: com.syclo.agentry.client.android.R$raw

So it seems that it is looking for the original source and classes but cannot find them anymore after the package name has been changed. This is where we're stuck.

Please help us get over that hump by sharing the correct and proven procedure to carry out the above-mentioned task.

Your help will be greatly appreciated.

Cheers,

Lukasz

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

If you follow the OpenUI steps for building the Android client you should be able to build a client using the default application id.  The process for renaming is to either modify the build-android-common.xml to set the package.name and build using the ant release command or changing the package name using Android Tools | Rename Application Package and exporting.

I would not recommend hand editing the AndroidMainfest.xml to attempt to change package names.

--Bill

lukasz_grochal
Participant
0 Kudos

Thanks for your reply. Using ant worked. We changed the app name in manifest_strings.xml in the AgentryAndroidClientResources folder and the package name in build-android-common.xml in the AgentryAndroidClientSolution folder. After that we ran "ant clean" and "ant release" commands from within the AgentryAndroidClientResources folder and finally the same commands from within the AgentryAndroidClientSolution folder. The last thing to do was to sign AgentryAndroidClient-release-unsigned.apk from the AgentryAndroidClientResources/bin folder.

The new client installed successfully on the device and opened without any issues.

Thanks for your help.

Lukasz

Answers (0)