cancel
Showing results for 
Search instead for 
Did you mean: 

Error in kapsel logon application while registering users

BrajeshKumar
Explorer
0 Kudos

Hi Experts,

I am facing issue when running the logon app and error are below and i was following

and i am following the below code for this as per below

Could you please help me out on this OR steps specific steps to follow to implement the logon app.. please suggest.

Best regards,

Brajesh

Accepted Solutions (1)

Accepted Solutions (1)

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Are you not testing it in a mobile device?

Kapsel plugin (Logon in your case) is for mobile devices, looks like you are trying it in a browser, hence getting that error.

Regards,

JK

BrajeshKumar
Explorer
0 Kudos

Hi Jitendra,

I tried to run on android phone but same error was showing over there "sap not defined" as shown above. and it is occurring in line

"sap.Logon.init(logonSuccessCallback, logonErrorCallback, appId, context); "

but my question is where this method(sap.Logon.init) is triggering , i mean where is controller for this method. then i can debug this..

Point 1>  src="cordova.js which is mentioned in Index file and located folder LogonDemo1\platforms\android\assets\www.

Point 2>  There are two Index file, one which is under LogonDemo1\www and another is under LogonDemo1\platforms\android\assets\www.

and the first Index file location does not have cordova.js file but another Index file is having cordova.js file.

so how its relating to each other when i run apps on android..

since method when execute sap.Logon.init, system is unable to find the method so throw error..



I tried to find the init method in cordova.js file but could not get that..


Could you please help me on this ?

Best Regards,

Brajesh

BrajeshKumar
Explorer
0 Kudos

Hi All,

Now my issue got fixed and  i just followed proper steps from

this is done from first way to register the user to SMP ,

Remaining steps are still pending like using kapsel plugin logon scenario ...

could any one suggest me on this .. which controller get called for sap.Logon.init method from index file..

since i am getting error on that line as describe above..

Regards,

Brajesh Kumar

Dan_vL
Product and Topic Expert
Product and Topic Expert
0 Kudos

The Logon section of the Getting Started with Kapsel guide may be some help as it goes step by step how to setup your environment for Android or iOS development and then creates some simple projects demonstrating each of the Kapsel plugins.


The most recent version of that guide is available here.

It also has a section that highlights how the samples should be changed if using the HCPms server rather than the SMP 3.0 server.

In general, errors related to sap not defined usually occur if the plugin was not added to the project, if the index.html did not include cordova.js or if you try calling an api before the device ready event fires.

Hope that helps,

Dan van Leeuwen

BrajeshKumar
Explorer
0 Kudos

Hi Daniel Van,

I am getting below error while building the application.. it says

Error:

        uses-sdk:minSdkVersion 10 cannot be smaller than version 14 declared in library

from C:\Users\Brajesh\myLogon\platforms\android\AndroidManifest.xml file..

I tried to add <uses-sdk tools:overrideLibrary="com.example.afariaprovider_res"> in AndroidManifest.xml as suggested,

but did not work.


could you please suggest me how to fix this error?


Best Regards,

Brajesh

Dan_vL
Product and Topic Expert
Product and Topic Expert
0 Kudos

If you encounter an error that says Uses-sdk:minSdkVersion 10 cannot be smaller than version 14 declared in library, the AndroidManifest.xml file can be updated to use a version 14. Note this problem should not occur once the Kapsel SDK uses Android 4.1.1 or higher.


This is mentioned here


http://scn.sap.com/docs/DOC-65386

Hope that helps,


Dan van Leeuwen

BrajeshKumar
Explorer
0 Kudos

Hi Daniel Van, Good Morning.

Thank you so much !!

My issue got resolved by doing the same..

Best Regards,

Brajesh Kumar

0 Kudos

Hi Brajesh,

I am good with Fiori/UI5 but new to Apk packaging and stuff.


I too got the same error, Error in devlogon.js at line sap.Logon.init. Can you please let me know how u have solved this issue.

Best Regards,

Mahesh

Answers (0)