on 11-26-2015 12:30 PM
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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
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
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.