cancel
Showing results for 
Search instead for 
Did you mean: 

HWC and Phonegap

Former Member
0 Kudos

Dear Forum Members,

I want to make use of Phonegap APIs in my HWC application. I went through the infocenter and forums;however,I am unable to successfully do the HWC and Phonegap integration.

Can anyone be kind enough to educate the end-to-end process (HWC sourcecode compilation with phonegap APIs) for any of the native API ?

What are the steps involved in achieving this integration ? Any documentation with snapshots would be really useful.

In infocenter, it mentions of these steps:

  1. Create an Android project.
  2. Include PhoneGap dependencies.
  3. Implement the plug-in class.
  4. Implement the plug-in JavaScript.

Regards,

Suraj

Accepted Solutions (1)

Accepted Solutions (1)

tahir_z
Contributor
0 Kudos
Former Member
0 Kudos

Hi Tahir,

Thank you very much for your response. I will be eagerly waiting for your next blog as I am trying this on Android device .

I hope it will be soon

- Suraj

tahir_z
Contributor
Former Member
0 Kudos

Thank you very much Tahir.

I really appreciate your help and support.

- Suraj

Answers (3)

Answers (3)

Former Member
0 Kudos

It can be helpfull for you - http://scn.sap.com/docs/DOC-40436

also you can check http://scn.sap.com/docs/DOC-404355

Former Member
0 Kudos

Hi Denysyuk,

Thanks for the links.

However, I have proceeded with barcode scanning and got stuck at one place. Can you please check this http://scn.sap.com/thread/3372820 and would like to hear your comments.

Thanks for your help.

- Suraj

Former Member
0 Kudos

It can be helpfull for you - http://scn.sap.com/docs/DOC-40436

also you can check http://scn.sap.com/docs/DOC-404355

Dan_vL
Product and Topic Expert
Product and Topic Expert
0 Kudos

The following sample may be helpful.

PhoneGap and Hybrid Web Container Customization Sample for 2.1 ESD #3  https://cw.sdn.sap.com/cw/docs/DOC-149428

Note that the phonegap is already integrated into the Hybrid Web Container so there is no need to build or compile anything to use one of the standard phonegap api's.

Former Member
0 Kudos

Hi Daniel,

Thank you very much for your reply.I will try the code sample.

However, I learnt that for the Phonegap APIs not supported by HWC, then we should compile the HWC source code with phonegap plugins.

Is my understanding correct ? Or HWC supports all the phonegap APIs ( for example: Barcode scanner).

Regards,

Suraj

Dan_vL
Product and Topic Expert
Product and Topic Expert
0 Kudos

The API's supported by phonegap are documented on the phonegap website.

http://docs.phonegap.com/en/2.0.0/index.html

Perhaps I missed it but I don't believe there is an api for a bar code scanner so you would need to write a plugin to phonegap to provide this.

http://docs.phonegap.com/en/2.0.0/guide_plugin-development_index.md.html#Plugin%20Development%20Guid...

Former Member
0 Kudos

Hi Daniel,

Thank you very much for your reply. I am struggling to implment the desired plugin to HWC container.

I am unable to get right contents to perform this procedure. All I got to know is (a) Compile the HWC container code with plugin (b) call the method in custom.js .

However, I am unable to perform this. Would you be kind enough to share any good information that anyone has already performed this ? I can refer to it.

- Suraj