Skip to main content

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 JNI interfaces for relevant entrypoints and it start working!

Next step is to separate OS specific interfaces so that this plugin can be built with platform specific code separate and sdk related code separately.

I hope this help anyone looking for building NPAPI plugin for Android, feel free to contact me in case you need any assistance.


Popular posts from this blog

Getting Started with Rancher & Kubernetes

During my time working at Azoi (a startup), I was responsible for maintaining Gitlab for my team along with various other self-hosted internal services. When I first setup Gitlab in 2013, it was quite a task, as setting it up would involve configuring various services using provided scripts and a lot of luck. Fortunately, I found Bitnami Gitlab package to make that process easier. However initial setup is one thing and keeping up with the latest releases was a nightmare.

Fast forward to 2016, I joined eInfochips as Solutions Consultant. Where one of my responsibilities was to modernize development workflow and encourage DevOps culture. It made sense to use Gitlab specially for Gitlab-runner and since this was a fresh setup, I explored few options to setup Gitlab, I found that Gitlab monthly releases were now published as Docker images. So I decided to use Gitlab docker image to host gitlab-ce internally. This time around, the experience was very different, initial setup and upgrading…

Get Double Speed BSNL Broadband Simple Trick High Speed Broadband


Step 1: Make sure that your modem is in Bridge Mode.

Step 2: Make a new Virtual Machine and install Windows XP on it.

Step 3 : Create a new text file and type following command:

rasdial "Broadband Connection" username password

username = ur broadband username
password = ur broadband password
Broadband Connection = Name of the Connection you use to connect, you can find it in Control Panel -> Network Connections

save it as "connect.bat"

double click on that file to check if it connects to the internet or not.

Step 5:
Copy that file to XP running in Virtual Machine.

Step 6:

Click Start -> Programs -> Accessories -> System -> Task Scheduler

select connect.bat as application to run and then set the time to run that app (same time in both systems*)

Time should be 2 minutes from current time so you dont have to wait too much...

*Very Important if connect.bat doesnt run at same time then only 1 XP would be connected to internet.

Complete Step 6 on both host and …