deeplyloving / jspf

Automatically exported from code.google.com/p/jspf
0 stars 0 forks source link

CoolPluginImpl.sayHello() NullPointerException in Android project #38

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I use jspf.core-1.0.2.jar in my Android project.

I have an interface "RDMAddin" with "getData():String" method who extend Plugin.

I have an interface implementation "RDMAddinDevice" who implement RDMAddin.

In my Activity, I have this:

PluginManager pluginManager = PluginManagerFactory.createPluginManager();
pluginManager.addPluginsFrom(new ClassURI(RDMAddinDevice.class).toURI());
RDMAddin addinDevice = pluginManager.getPlugin(RDMAddinDevice.class);
Log.d(this.getClass().getName(), addinDevice.getData());

My problem:
When I run my activity, I have a nullpointerexception in last line 
(addinDevice.getData()) and I don't understand why.

I followed the tutorial and the RunningOnAndroid subject in wiki but I don't 
understand my error.

Thanks for your help.

Original issue reported on code.google.com by antoine....@gmail.com on 18 Sep 2012 at 1:27