cancel
Showing results for 
Search instead for 
Did you mean: 

How can i integrate Custom Plug-in to the Android Hybrid Web Container .

Former Member
0 Kudos
82

Hi , i want to add plugin to the HWC application.Things  i have done according to the document are follow.

1)I installed Android in SUP.

2)I added phone gap dependences also.I created android phone gap project.

3)I created plugin class and mapped in the plugin.xml file.i added functionality in js file also.

4)I have created another HWC PROJECT.

5)I created workflow.I added  html view to that start screen .

My question is how can i integrate android phone gap project into the Hybrid Web Container,even SUP 2.1.3 supports phone gap framework.

I studied the document so many times but ,in that the integartion part is missing.

Please tell me if i miss anything

So can any body help me.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Finally the issue was resolved by my self.Steps i followed

1)In Sybase folder go to this folder mobilesdk/hybridcontainer/android/ .

2)Here we can see template.zip.

3)Extract this one / import this project in eclipse  .

4)I added directorylist.java  in src folder.

5)I mapped the class in plugins.xml folder.

6)I generated apk for this project.

7)I installed my workflow container in the real  device.

8)I followed the SUP document and i reached goal.

Thank you

midhun_vp
Active Contributor
0 Kudos

Hi,

Thanks for your information rajarmaesh chinta.

I am also working on the HWC and native applications. But I don't know how to use phonegap and hwc together. Can you please share any links/doc that contains information similar to tutorials on that.

Regards

Midhun

midhunvp@gmail.com

Former Member
0 Kudos

With the Hybrid Web Container (HWC), a PhoneGap application is just like any other web application you would deploy into the container. Unless you're using a PhoneGap plug-in in your application, you would simply package up the PhoneGap application for deployment to the SUP server (and therefore to SUP HWC Users) just like you would for any other web application. As I understand it, the SUP server has no knowledge that a web app it's deploying is a PhoneGap application, it's simply a web application.

midhun_vp
Active Contributor
0 Kudos

John,

Thanks for your reply. I developed some HWC apps without Phonegap. What is the need to use the phone gap? From some documents I could know that phonegap is used to access some of the native features of the platform like accessing camera,gps etc.

Other than this can we do any UI designing with this?

Also please tell tell me the steps in the development using phonegap.

The normal steps involved are :

  1. Design MBO
  2. Deploy MBO
  3. Develop workflow by designing the UI by drag and drop .

please tell where we can Phone gap between these steps?

Regards

Midhun

Former Member
0 Kudos

The HWC is simply PhoneGap with a bunch of enhancements and additional services wired in. PhoneGap is an open source hybrid container - the HWC and PhoneGap are very similar. The difference is that the HWC adds remote provisioning, the ability to run multiple apps in the container, security, encryption, authentication and much more.

You don't need PhoneGap for anything when you have the HWC in your environment, but many companies were already using PhoneGap, so what we did was allow you to leverage your investment in PhoneGap when using our tools. So, if you have a PhoneGap application written, we give you a way to manage it remotely and run it in our HWC. To learn more about it, refer to this post: http://scn.sap.com/community/mobile/blog/2012/07/05/sup-phonegap or you can of course buy my PhoneGap book called PhoneGap Essentials (www.phonegapessentials.com).

All PhoneGap does is provide API's that allows a web appliction to access native API's. The HWC in most cases already has those APIs in place. Where PhoneGap becomes important is with Plug-ins. The HWC is not easily extensible, but PhoneGap has a published, supported plug-in architecture, so the PhoneGap integration with the HWC allows you to leverage PhoneGap plug-ins in the HWC which is really cool and allows you to really do some cool things.

Former Member
0 Kudos

Hi midhunvp,  there is no document on this specification,

I struggled for 5 days,i resolved my self.Finaly i got the way.

But I have given steps to reach the customplugin.

steps i followed

1.Search for template.zip in mobilesdk/HybribContainer/android

2.Import template.zip in eclipse phonegap environment /SUP android phone gap environment.

3.Then go for infocenter.sybase.com,there search on custom plugin for android .

4.In that DirectoryListing.java file   definition is already mentioned.

copy the  content.

5.In template project under src folder create DirectoryListing.java  ,now paste the code.

6.Map the class name in plugin.xml

7,Build the project and generate the apk.

8.Now you can see your own hybrid container on the device.

9.Now study the document.

10. Create SUP HWC project  create workflow.

11.Copy description.js file content and paste in js folder.

12,Copy the code in the customafterworkflowload()

13.Delpoy it now you can see list of files on the sdcard.

Former Member
0 Kudos

The documentation for adding PhoneGap plug-ins to the HWC can be found here: http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01218.0213/doc/html/vhu1333482674969...

Former Member
0 Kudos

Hi john Wargo ,I have seen the document previously,In the document some information is missing, which is very important.I have searched the document for   5 -6 times,there the missing information is not mentioned, finally i break through it.The missing information is mentioned in my previous post.

Thank you

Former Member
0 Kudos

Hi Rajamaesh,

Even, I am facing the same issue. I am unable to decipher the information document in infocenter.

I am also unsure about the process that needs to be followed. I need to integrate certain device features ( camera, barcode scanner) in a HWC application.

I didn't really understand from the infocenter documents. As you mentioned, I checked in the folder structure mobilesdk/HybribContainer/android , but didn't find template.zip.

Can you please help me here ?

Regards,

Suraj

midhun_vp
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Midhun,

Thanks for your response.

Would I need to compile HWC app with Phonegap plugins before I follow the steps mentioned in this post ?  http://scn.sap.com/thread/3359393

Or HWC will be able to directly call all the phonegap APIs. The reason is in the infocenter it states that phonegap APIs upto 1.4 are supported.

Appreciate your response and co-operation.

- Suraj

Former Member
0 Kudos

Yes, the HWC will need to be compiled with the PhoneGap plugin, there's no other way to get the plugin into the container. PhoneGap 1.4 support was made available in SUP 2.1.3 and SMP 2.3 added support for Cordova 2.0.

If you're just using Cordova or PhoneGap APIs, then there's no need to compile anything - we already include those libraries in the appropriate versions of our product.

Former Member
0 Kudos

John,

Thanks for the information. Appreciate your response.

-Suraj

Former Member
0 Kudos

Hi Midhun ,

Have you done with "barcode reader" in HWC (using SMP 2.3) with or without phonegap.

Please help or share some code .