cancel
Showing results for 
Search instead for 
Did you mean: 

Error with App builder and application that use Kapsel plugin

Former Member
0 Kudos

Hi, I have work on my "hello world" application, and I followed all steps to configure environment.

I am working on SMP 3.0 SP04.

If I create an application without to se kapsel plugin, it work fine (I deploy it on my android device):

When I add the kapsel plugin (appupdater in particular, and logon plugin that is required, and I open the cordova project in eclipse, when I run the projcet as Android application, there is this error on eclipse debug:

09-15 09:38:52.509: E/AndroidProtocolHandler(28353): Unable to open asset URL: file:///android_asset/i18n/i18n_it_IT.properties

09-15 09:38:52.659: E/qdutils(28353): FBIOGET_FSCREENINFO failed

09-15 09:38:52.689: E/ClientHub(28353): Properties file not configured.

09-15 09:38:52.759: E/MAFLogonCoreCDVPluginLog(28353): CORECDVPlugin: Could not retrieve secure store policy.

09-15 09:39:07.813: E/ViewRootImpl(28353): sendUserActionEvent() mView == null

09-15 09:39:08.674: E/ViewRootImpl(28353): sendUserActionEvent() mView == null

Isn't clear, for me, why it search i18_it_IT.properties, and where I would place this file.

Thanks and Kind Regards,

Elia.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Virinchy,

thanks for your support, but I still have the same problem 😞

This is the steps that I  followed:

  • install on my PC and on SMP server SDK SP05 and PL01;
  • Chek if installation was fine, by log. files.
  • Create cordova project from App Builder, with appupdate and logon Kapsel plugin added. (Logon is added automatically when I add appupdate plugin);
  • edit createProject.bat to add plugin authproxy and i18n. If I don't add these two plugin manually, createProject.bat fail;
  • Run createProject.bat, the creation finish without errors.
  • Import in elcipse project and run it as Android Application;

The error sis the same (see bewlow).

I have tried to add i18n_it_IT.properties in folder C:\SAP\MobileSDK3\KapselSDK\plugins\logon\www\common\assets\i18n, bat the result not change.

09-15 16:04:44.050: E/AndroidProtocolHandler(3231): Unable to open asset URL: file:///android_asset/i18n/i18n_it_IT.properties

09-15 16:04:44.460: E/ClientHub(3231): Properties file not configured.

09-15 16:04:44.490: E/qdutils(3231): FBIOGET_FSCREENINFO failed

09-15 16:04:44.570: E/MAFLogonCoreCDVPluginLog(3231): CORECDVPlugin: Could not retrieve secure store policy.

09-15 16:04:50.316: E/ViewRootImpl(3231): sendUserActionEvent() mView == null

09-15 16:04:53.229: E/ViewRootImpl(3231): sendUserActionEvent() mView == null

09-15 16:05:01.607: E/MAFLogonCoreCDVPluginLog(3231): CORECDVPlugin: Could not retrieve secure store policy.

Thanks and Kind Regards,

Elia.

midhun_vp
Active Contributor
0 Kudos

Hi Elia,

Make sure all the prerequisites are met in your local system to add the kapsel plugins to your project. Before adding kapsel plugins to your project using appbuilder I would suggest you to create your own project, add plugins, platforms using cordova commands.

You can find the screen shots below:

  • Create a new cordova project:

  • Add android platform (Make sure you have installed Android SDK in your system):

  • Add logon plugin using the command: cordova -d plugin add com.sap.mp.cordova.plugins.logon --searchpath C:\SAP\MobileSDK3\KapselSDK\plugins
  • You can edit the index.html as mentioned here:
  • Next command: cordova prepare
  • To run the app in device: cordova run android

This should bring you the logon screen if all configurations in the system is perfect.

Again, I am not sure that Appbuilder supports SDK SP4. From SP4 onwards you have to mention the path where the SMP SDK is installed while creating project or calling the plugin. Ex.cordova -d plugin add com.sap.mp.cordova.plugins.logon --searchpath C:\SAP\MobileSDK3\KapselSDK\plugins

Regards,

Midhun VP

Former Member
0 Kudos

Hi Midhun,

I'm going crazy   

I followed all steps that you suggest, but when I deploy on my device I see only the Cordova logo with message "Device is Ready" blinking. But nothing appen, also if I tap the screen.

If I deploy the application without kapsel plugin, it work (I have a simple application with one textbox, one button and one superlist that retrive data by odata service. 

As last tentative, I followed the commands in the file createProject.bat, created by App Builder:

cordova create SAPB_HelloWorld it.dsgroup.AdventureWorks SAPB_HelloWorld

cd SAPB_HelloWorld

copy .\www\index.html .\www\index_cordova.html

xcopy ..\www\* .\www /s /f /y

cordova platform add android

copy ..\project.json .\platforms\android\assets\project.json /y

copy ..\www\res\icon\icon_512.png  .\platforms\android\res\drawable\icon.png /y

copy ..\www\res\icon\icon_android_36.png  .\platforms\android\res\drawable-ldpi\icon.png /y

copy ..\www\res\icon\icon_android_48.png  .\platforms\android\res\drawable-mdpi\icon.png /y

copy ..\www\res\icon\icon_android_72.png  .\platforms\android\res\drawable-hdpi\icon.png /y

copy ..\www\res\icon\icon_android_96.png  .\platforms\android\res\drawable-xhdpi\icon.png /y

cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git

cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git

cordova -d plugin add com.sap.mp.cordova.plugins.logon --searchpath C:\SAP\MobileSDK3\KapselSDK\plugins

cordova -d prepare

cordova - d run android

In this case, the app work As in the first (without using kapsel plugin), but there isn't the logon form for credential.

Thanks and Kind Regards,

Elia.

midhun_vp
Active Contributor
0 Kudos

Hi,

You have to modify the index.html file, where logon plugin was called to get the logon screen.

Regards,

Midhun VP

Former Member
0 Kudos

Thanks Midhun,

this solve my problem. Last question: is normal that the the app ask for credential only thre first time that I open it? If I close the application and reopen, I will go directly in my home page. The credential are stored on the SMP Server?

Thanks and Kind Regards,

Elia.

midhun_vp
Active Contributor
0 Kudos

Hi Elia,

The credentials are not stored in server. The credentials are managed by logon plugin, you can access the credentials stored by logon plugin using the code : applicationContext.registrationContext.user, applicationContext.registrationContext.password.

Regards,

Midhun VP

Answers (1)

Answers (1)

Virinchy
Active Contributor
0 Kudos

Hi Elia,

Which Version of Cordova are you working with ?

Regards

Virinchy

Former Member
0 Kudos

Hi Virinchy,

cordova version is 3.5.0-0.2.7

Regards,

Elia.

Virinchy
Active Contributor
0 Kudos

Kapsel support for Cordova versions 3.5 + is available from SMP 3.0 SDK SP05.

SMP 3.0 SDK 04 supports till Cordova 3.4


(Kapsel is a set of SAP® plugins for Apache Cordova 3.4.) - (Reference from here)

SMP 3.0 SDK 05 supports Cordova 3.5 also.

Kapsel is a set of SAP® plugins for Apache Cordova 3.5.(Reference from here)

Regards

Virinchy