npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-alljoyn

v0.0.5

Published

Cordova AllJoyn Plugin

Downloads

8

Readme

cordova-plugin-alljoyn

iOS | Windows | Android --- | --- | --- Build Status | Build status | Circle CI

A Cordova plugin to expose the AllJoyn Thin Client (AJTCL 14.12) to cross platform applications written in Javascript.

Purpose

To provide a plugin which allows using the AllJoyn Thin Client library across all mobile platforms without requiring the user to deal with implementing and compiling the native code for each operating system.

Current Platforms:

  • iOS
  • Windows Modern App
  • Windows Phone
  • Android (in-progress)

An effort has been made to expose as many of the AJTCL features to Javascript as possible, while maintaining a clean Javascript API. Features are prioritized based on which scenarios they unblock.

Resources

Various explanatory blog posts can be found here: http://www.stefangordon.com/introducing-the-alljoyn-plugin-for-cordova/

For Plugin Developers / Contributors

After cloning this repository, a plugin developer needs to get AJTCL by running these commands in the project root folder:

$ git clone https://github.com/AllJoyn-Cordova/ajtcl.git src/ajtcl

For plugin users, above is taken care of by a hook run after plugin is added with Cordova scripts.

Using The Plugin On Windows

$ cd /path/to/your/cordova/app
$ cordova add [/path/to/plugin or https://github.com/AllJoyn-Cordova/cordova-plugin-alljoyn.git or cordova-plugin-alljoyn]
$ cordova platform add windows

Running With Cordova Scripts:

// To run on Windows Phone 8.1 emulator
$ cordova run windows --emulator --archs="x86" -- -phone
// Running on Windows Phone 8.1 device
$ cordova run windows --device --archs="arm" -- -phone
// To run on Windows
$ cordova run windows --device --archs="x64" -- -win

Alternative for running with Cordova scripts is to open the solution file generated after "cordova platform add windows"-command in Visual Studio and running the wanted app project. In this case, these is a need to manually select the correct architecture from build configuration.

Building For Android

In addition to the Android SDK, the NDK is required. See https://developer.android.com/tools/sdk/ndk/index.html for installation instructions.

The environment variables ANDROID_HOME and ANDROID_NDK_HOME must be set to the point to the locations where the Android SDK and NDK are installed.

There are some external dependencies when building the plugin for the Android platform. Those are Ant, Gradle and Swig (Swig version needs to be 3.0 or higher). Before building for Android, make sure the respective binaries are found from your PATH environment variable.

The plugin build process is currently depending on Android build tools version 20.0.0. If you don't have that installed, it can be obtained using the Android SDK manager or via command line with command:

$ android update sdk --no-ui --all --filter build-tools-20.0.0

When building on a Mac, one of the easiest ways to install the dependencies is via Homebrew with following command:

$ brew install ant gradle swig

After the dependencies are met, the steps to build and run using the Cordova CLI are something like:

$ cordova platform add android
$ cordova build android
$ cordova run android

If the Android build fails on Windows with an error like:

[...]\AllJoynLib\src\main\jni\aj_keyauthentication.o.d: No such file or directory

It might be caused by hitting the maximum path length limitation. As a workaround, try moving your project to a shorter path.

Running Tests

The tests can be run locally with:

$ npm install
$ npm test

An AllJoyn router must be accessible in the network in which the target device runs for the tests to pass.

The target platform will be selected automatically based on which platform the tests are run. On Mac, an iOS build is made. On Windows, the Cordova universal Windows platform is used and on Linux, the build will be targeting Android. To switch the target, one needs to edit the variable cordovaPlatformMapping at the top of file tests/run.js.

To run tests on Windows, first ensure that fresh enough Cordova script is found from the path. You can look at appveyor.yml file from the root of this repository how this is done in the CI environment. You can use where command to check which cordova is found first from your path:

$ where cordova

If you only want to verify that the build is working via Cordova scripts, you can run:

$ npm run build-only