Skip to main content


Showing posts from April, 2012

Cross platform NPAPI browser plugin.

Recently, I got chance to work on building NPAPI plugin. I've used few NPAPI plugin and had basic idea about what it is but didn't knew how to build one.

Primary use case for me was to make it run on Android and interact with a C++ service running in background. There is a sensor attached with Android based hardware and my task is to build a JavaScript SDK which allows developers to access this hardware sensor data via C++ service.

I started building a simple plugin using NPAPI SDK which has a function which can be invoked using JavaScript from Firefox running on Ubuntu. However, this focuses on building it for Linux.

After some digging, I was able to build it on Android (Gingerbread). But when I tried to load it on Emulator it wasn't working. Looks like a strange issue as it just doesn't register with browser on Android emulator.

 I posted my query on StackOverflow, but didn't come across anything useful. After trying some more I was able to resolve it by adding …