Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Scope

This chapter focuses on how you can extend PhoneGap functionality to expose more of your native code.

However, please note that even if you write PhoneGap plug-ins, the only way to inject the plug-in is to add the plug-in source to your project. There is currently no way to build a plug-in into a package and add the package to your PhoneGap project. This stops you using your custom plug-ins when you are using PhoneGap build.

For this chapter, let's keep the nature of the plug-in very simple. We call this a helloworld plug-in. We pass a name to the plug-in, and we get back a string “Hello <name>! The time now is <Current Time>”.

This way, we focus mainly on the bridge aspect of the plug-in.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint