on 08-29-2013 10:06 AM
Hello,
I searched on net to use or call phone gap APIs from my HWC workflow application(no native please). Did not get any suitable tutorial.
I'm going through this:
http://scn.sap.com/community/mobile/blog/2013/06/03/building-phonegap-native-plugin-for-hwc-containe...
http://scn.sap.com/community/mobile/blog/2013/06/04/building-phonegap-native-plugin-for-hwc-container--anroid
But, it seems that, these are kind of Native(java and Objective-c)...
Actually, I want to call phone gap API/functionality from JS(that are available in generated workflow in sybase unwired workspace 2.1.3).
Could any one please guide me with a step by step approach?
Thanks.
This is what exactly you are looking for,
http://scn.sap.com/thread/3359393
In the example it uses PhoneGap APIs inside the custom.js
- Midhun VP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok.I'm doing to get Geo location..
The tutorial you refered for me...I didn't get how "hwc" object is declared.So I searched in net, how to load phone gap features...and found this:
Still, i'm not sure how to use this.
Any idea?
hwc.customBeforeNavigateForward = function(screenKey, destScreenKey){
}
Comes in sup 2.2, if you are working in sup 2.1.3 the same function will be function customBeforeNavigateForward(screenKey, destScreenKey) {}
So you need to write the code inside of these methods which are present in the custom.js file in the project.
- Midhun VP
Hi Midhun,
That means, the following two methods can also be called without HWC..right?
function run() {
....................
.............................
hwc.showAlertDialog(coords.latitude + ":" + coords.longitude); //should it be without HWC
};
var fail = function(e) {
hwc.showAlertDialog('Can\'t retrieve position.\nError: ' + e); //should it be without HWC
};
navigator.geolocation.getCurrentPosition(win, fail);
}
I did this without HWC.The alert dialog pops up showing latitude and longitude but still not getting the map/location. What could be the problem?
m'I doing any thing wrong in this method call: navigator.geolocation.getCurrentPosition(win, fail); ??
Please help.
I'm testing this on iphone simulator.Could you please tell me how to enable this on simulator? Am I missing some google map SDK related things? Do I need to get new iOS key from Google? If my code is correct..what step I need to follow? Is this something, I need to pay Google for this testing and access there map?
Thanks.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.