This is a migrated thread and some comments may be shown as answers.

Custom plugin headache

3 Answers 76 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
X
Top achievements
Rank 1
X asked on 03 Sep 2013, 06:13 PM
I'm interested in having a look at some augmented reality plugins that are out there already (Wikitude, Moodstocks).
I've been able already to use some custom plugins like PowerManagement and Version, but I don't know how to approach the implementation of these ones, as they use their SDK and I don't know what to do with the files.

Any help please?
Thank you

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 04 Sep 2013, 11:06 AM
Hello,

To add reference to a framework, you can use the source-file and framework tags inside the plugin.xml file:

....
<source-file src="src/<platform>/frameworks/SDK.a" framework="true" />
....
<framework src="SOME.framework" weak="true" />
  </platform>
</plugin>

You can refer to a plugin that is already plugman compatible and has a plugin.xml file available, so you can use it as a base e.g.: https://github.com/phonegap-build/FacebookConnect/blob/master/plugin.xml

Regards,
Steve
Telerik

Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
0
X
Top achievements
Rank 1
answered on 04 Sep 2013, 12:33 PM
I'm trying to implement Wikitude Plugin (at least for android).

My Plugins folder structure is this one:
Plugins
   - Wikitude
      - src
         - com
            - wikitude
               - phonegap
                  - WikitudePlugin.java
                  - WikitudePluginExtended.java
      - www
         - WikitudePlugin.js
      - lib
         - wikitudesdk.jar
      - plugin.xml

I have modified the Android Configuration to add the plugin reference.
I have used in the plugin.xml:
 <framework src="lib/wikitudesdk.jar" weak="true" />

But when I try to build my app an error is thrown:
TypeError: Cannot read property 'install' of undefined at /Users/builder/Cordova/node_modules/plugman/src/install.js:147:66 at Array.forEach (native) at handleInstall (/Users/builder/Cordova/node_modules/plugman/src/install.js:146:30) at runInstall (/Users/builder/Cordova/node_modules/plugman/src/install.js:111:9) at /Users/builder/Cordova/node_modules/plugman/src/install.js:34:17 at Object.fetchPlugin [as fetch] (/Users/builder/Cordova/node_modules/plugman/src/fetch.js:39:23) at possiblyFetch (/Users/builder/Cordova/node_modules/plugman/src/install.js:29:31) at Object.installPlugin [as install] (/Users/builder/Cordova/node_modules/plugman/src/install.js:19:5) at Object.
Any help?
0
Accepted
Steve
Telerik team
answered on 04 Sep 2013, 01:29 PM
Hello,

For Android, adding a reference to a jar file has to be in source-file e.g.:

<source-file src="<path>/wikitudesdk.jar" />

See plugin.xml Manifest Format for more information.

Regards,
Steve
Telerik

Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
Tags
General Discussion
Asked by
X
Top achievements
Rank 1
Answers by
Steve
Telerik team
X
Top achievements
Rank 1
Share this question
or