Git Product home page Git Product logo

cordova-broadcaster's Introduction

Cordova Broadcaster

Cordova Plugin to allow message exchange between javascript and native (and viceversa).

npm Join the chat at https://gitter.im/bsorrentino/cordova-broadcaster

Ingredient Technologies

Broadcaster plugin providing bridge for the following native technologies:

target OS Native Technology
IOS NotificationCenter
Android LocalBroadcastManager

News

date infos refs
May 11, 2024 fix #67 - Receive broadcast data from external barcode scanner Thanks to lgl017 and kmitdebus for valuable feedbacks
Jul 19, 2023 fix #71 - Cannot find symbol "LocalBroadcastManager" Thanks to MrWeezle for valuable feedbacks
Jul 14, 2023 Merge pull request #70 - move to SDK 33 --> Android X. Thank to phyr0s for contribution
Mar 19, 2020 Concerning Android I've added support for broadcast Intent to external Apps, receive broadcast Intents from external Apps, Flags & Category on Intent insipred by navarrojava's fork
Jan 16, 2018 I've developed a complete ionic3 sample project using broadcaster ionic-broadcaster-sample
Jan 28, 2017 such plugin has been added to ionic-native distribution How to is available here

Installation

$ cordova create <PATH> [ID [NAME [CONFIG]]] [options]
$ cd <PATH>
$ cordova platform add [ios|android]
$ cordova plugin add cordova-plugin-broadcaster

Usage:

From Native to Javascript

Javascript

    console.log( "register didShow received!" );

    var listener = function( e ) {
      //log: didShow received! userInfo: {"data":"test"}
      console.log( "didShow received! userInfo: " + JSON.stringify(e)  );
    }

    window.broadcaster.addEventListener( "didShow", listener);

From ANDROID to Javascript - Extra ANDROID features

Listen for global message

if( cordova.platformId === "android" ) {

    var listener = function( e ) {
      //log: didShow received! userInfo: {"data":"test"}
      console.log( "CONNECTIVITY_CHANGE: " + JSON.stringify(e)  );
    }
    var isGlobal = true
    window.broadcaster.addEventListener( 'android.net.conn.CONNECTIVITY_CHANGE', isGlobal, listener);
}

ANDROID

final Intent intent = new Intent("didShow");

final Bundle child = new Bundle();
child.putString( "name", "joker");

final Bundle b = new Bundle();
b.putString( "data", "test");
b.putBoolean( "valid", true );
b.putBundle( "child", child );

intent.putExtras( b);

LocalBroadcastManager.getInstance(this).sendBroadcastSync(intent);

IOS

Objective-C
    NSDictionary * payload = @{
        @"data":@"test",
        @"valid": [NSNumber numberWithBool:YES],
        @"child": @{ @"name": @"joker" }
    };

    [[NSNotificationCenter defaultCenter] postNotificationName:@"TEST.EVENT"
                                                        object:nil
                                                      userInfo:payload];
Swift 5.x
  let payload:[String:Any] = [
          "data":"test",
          "valid": true,
          "child":[ "name": "joker" ]
      ]

  let nc = NotificationCenter.default
  nc.post(name:Notification.Name("didShow"), object: nil, userInfo: payload)

BROWSER

let event = new CustomEvent("didShow", { detail: { data:"test"} } );
document.dispatchEvent( event )

From Javascript to Native - ANDROID,BROWSER,IOS

Javascript

  window.broadcaster.fireNativeEvent( "test.event", { item:'test data' }, function() {
    console.log( "event fired!" );
    } );

From Javascript to ANDROID - Extra ANDROID features

Send a message with "flags" and "category"

if( cordova.platformId === "android" ) {

  // send a message with "flags" and "category"
  window.broadcaster.fireNativeEvent( "message", { extras:{ item:'test data' }, flags:0, category:'android.intent.category.INFO', packageName:'org.bsc'}, function() {
    console.log( "event fired!" );
  });
}

Send a global message

if( cordova.platformId === "android" ) {

  // send a global message
  var isGlobal = true
  window.broadcaster.fireNativeEvent( "GLOBAL_ACTION", isGlobal, { item:'test data' }, function() {
    console.log( "event fired!" );
  });

}

Send a global message with "flags" and "category"

if( cordova.platformId === "android" ) {

  // send a global message with "flags" and "category"
  var isGlobal = true
  window.broadcaster.fireNativeEvent( "GLOBAL_ACTION", isGlobal, { extras:{ item:'test data' }, flags:0, category:'android.intent.category.INFO', packageName:'org.bsc'}, function() {
    console.log( "event fired!" );
  });

}

ANDROID

final BroadcastReceiver receiver = new BroadcastReceiver() {
    @Override
    public void onReceive(Context context, Intent intent) {
        String data = intent.getExtras().getString("data");

        Log.d("CDVBroadcaster",
                String.format("Native event [%s] received with data [%s]", intent.getAction(), data));

    }
};

LocalBroadcastManager.getInstance(this)
            .registerReceiver(receiver, new IntentFilter("test.event"));
}

IOS

Objective-C
[[NSNotificationCenter defaultCenter] addObserverForName:@"test.event"
                                                  object:nil
                                                   queue:[NSOperationQueue mainQueue]
                                              usingBlock:^(NSNotification *notification) {
                                                      NSLog(@"Handled 'test.event' [%@]", notification.userInfo[@"item"]);
                                                    }];
Swift 5.x
let nc = NotificationCenter.default
nc.addObserver(forName:Notification.Name(rawValue:"test.event"),
               object:nil, queue:nil) {
  notification in
  print( "\(notification.userInfo)")
}

BROWSER

document.addEventListener( "test.event", ( ev:Event ) => {
  console.log( "test event", ev.detail );
});

cordova-broadcaster's People

Contributors

bpowell15 avatar bricepowell avatar bsorrentino avatar gitter-badger avatar phyr0s avatar shankari avatar tusharbhatta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-broadcaster's Issues

Laserscanner Event

Hi,

can anyone give me a hint how to work with a laserscanner?

I tried working with adb getevent and received the following things:

add device 5: /dev/input/event0 name: "keyremap_virtual" events: KEY (0001): KEY_F12 KEY_HOME KEY_VOLUMEUP KEY_SCALE KEY_MENU KEY_WAKEUP KEY_PROG1 KEY_BACK KEY_UNKNOWN input props: <none>

and this is appears when I show a live listener with adb

[ 119373.240199] /dev/input/event0: EV_KEY KEY_PROG1 DOWN [ 119373.240276] /dev/input/event0: EV_SYN SYN_REPORT 00000000 [ 119374.770156] /dev/input/event0: EV_KEY KEY_PROG1 UP [ 119374.770280] /dev/input/event0: EV_SYN SYN_REPORT 00000000

How can I implement this in the eventlistener now? I tried listen to "keyremap_virtual" but nothing happens.

The goal is to be able to trigger the laserscanner button anytime and receive the input to work with.

Thanks for any advice.

Why `sendBroadcastSync` over `sendBroadcast`?

In the example you suggest using sendBroadcastSync, but documentation suggests that it's a blocking operation. How come you suggest using it over the regular version of that call?

FireEvent no effect Communication in two H5 page

I registered in a page to monitor, route to b use the fireEvent notice a page after page, but will return to the page after page didn't receive b's radio, this is probably where I write wrong

broadcaster extras are missing

let listener = function( e ) {
  console.log('barcode :: ' + JSON.stringify(e));
}
window.broadcaster.addEventListener( "BarcodeReader", listener);

Android code
Intent intentVal = new Intent("BarcodeReader");


Bundle b = new Bundle();

b.putString( "barcode", content+"");

b.putString( "userdata", "{ "data": "test"}" );

intent.putExtras( b);


LocalBroadcastManager.getInstance(MainActivity.this).sendBroadcastSync(intentVal);

but e prints as {} instead of actual data.

Fire intent debugging in fireNativeEvent

I'm using the following code to trigger the GTALK heartbeat in order to maitain the GCM socket open.

window.broadcaster.fireNativeEvent("com.google.android.intent.action.GTALK_HEARTBEAT", {}, function () {
    console.log("GTALK_HEARTBEAT fired");
}, function (e, a) {
    console.log("GTALK_HEARTBEAT error", e, a);
});

In the web console and logcat I'm seeing the "GTALK_HEARTBEAT fired" but not any mentions to the intent of being fire. Is this normal?

Could you help me to debug this?

iOS Terminate Event

I came across this plugin while looking for a way to catch an app terminated event for iOS in my Ionic 3 project and this broadcaster seemed to be just what I needed. I must not be using it right or something b/c I can get events when the app is put to the background but not when it's killed.

I'm also a super noob when it comes to swift/obj c and the iOS lifecycle so if someone has a better suggestion for an iOS app unload/close/exit/terminated event that would easily work with this package I'm definitely open to it.

Here's what I've tried so far...

This works. I can see the console log in my safari web inspector so I know I have the package installed and working as intended...

this.broadcaster.addEventListener('UIApplicationDidEnterBackgroundNotification').subscribe((event) => {
        console.log('ENTER BACKGROUND');
      });

These DO NOT work. As far I can tell, none of these listeners are fired when the app is closed. The appTerminated function sends a request to my api which updates my database so even if the console closes before I can see the log I should see a change in my database.

this.broadcaster.addEventListener('UIApplicationWillTerminate').subscribe((event) => {
  console.log("UIApplicationWillTerminate", event);
  this.appTerminated();
});

this.broadcaster.addEventListener('UIApplicationWillTerminateNotification').subscribe((event) => {
  console.log("UIApplicationWillTerminateNotification", event);
  this.appTerminated();
});

this.broadcaster.addEventListener('applicationWillTerminate').subscribe((event) => {
  console.log("applicationWillTerminate", event);
  this.appTerminated();
});

window.addEventListener('applicationWillTerminate', () => {
  console.log("WINDOW applicationWillTerminate");
  this.appTerminated();
});

window.addEventListener('UIApplicationWillTerminateNotification', () => {
  console.log("WINDOW UIApplicationWillTerminateNotification");
  this.appTerminated();
});

this.broadcaster.addEventListener('UIApplicationExitsOnSuspend').subscribe((event) => {
  console.log('SUSPENDED EXIT');
  this.appTerminated();
});

Finally, I tried adding this bit to the end of CDVBroadcaster.m file in my platforms/ios directory. Still no listeners getting executed.

- (void)applicationWillTerminate:(UIApplication *)application
{
    
    [[NSNotificationCenter defaultCenter] postNotificationName:@"applicationWillTerminate"
                                                        object:nil
                                                      userInfo:@{@"data": @"test"}];
    
}

Any help is appreciated.

Might be only me but i'm hvaing other build issues with backwards compatability

Thanks for the new update to 4.3.0 but is is still too "new" the if shorthand is aperently an issue for the old versions.
So i'm still locked to version 4.1.0

     `:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

     /usr/src/app/platforms/android/src/org/bsc/cordova/CDVBroadcaster.java:79: error: incompatible types: Optional<? extends Object> cannot be converted to Optional<Integer>

     flags = ( hasFlags ) ? Optional.ofNullable( userData.optInt("flags") ) : Optional.empty();
                          ^

     Note: Some input files use or override a deprecated API.
     Note: Recompile with -Xlint:deprecation for details.
     Note: Some input files use unchecked or unsafe operations.
     Note: Recompile with -Xlint:unchecked for details.
     1 error
     :compileDebugJavaWithJavac FAILED`

ionic app can't exit after adding listener

Ho notato che dopo aver utilizzato:

window.broadcaster.addEventListener("configChanged", function (e) {
  console.log( "configChanged received! userInfo: ", e  );
  $rootScope.$broadcast('configChanged', e);
});

l'applicazione cordova/ionic non riesce più ad uscire con il tasto back hardware ne con un comando esplicito exitApp.
Ho provato ad richiamare removeEventListener, ma niente da fare.

Hai qualche idea ?

Grazie.

Adding Windows support by including BroadcasterProxy.js?

Given Cordova for Windows is WinJS, has consideration been given to adding the windows platform that would simply include the BroadcasterProxy.js?

If this would be an OK addition I would be happy to do a PR to add and test it.

Battery mode

Hello guys, can I get the current Battery Mode (normal, low power mode)?

removeEventListener does not remove event key

When I call successively addEventListener, removeEventListener and addEventListener again, it does not subscribe using the new function passed in. I think it would be more proper to remove the key from the list of events so that it does register a new function.

It would basically mean adding delete me._channels[eventname] here

executing javascript directly in the webview is deprecated

e.g. https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/CordovaWebView.java#L92

    /**
     * Send JavaScript statement back to JavaScript.
     *
     * Deprecated (https://issues.apache.org/jira/browse/CB-6851)
     * Instead of executing snippets of JS, you should use the exec bridge
     * to create a Java->JS communication channel.
     * To do this:
     * 1. Within plugin.xml (to have your JS run before deviceready):
     *    <js-module><runs/></js-module>
     * 2. Within your .js (call exec on start-up):
     *    require('cordova/channel').onCordovaReady.subscribe(function() {
     *      require('cordova/exec')(win, null, 'Plugin', 'method', []);
     *      function win(message) {
     *        ... process message from java here ...
     *      }
     *    });
     * 3. Within your .java:
     *    PluginResult dataResult = new PluginResult(PluginResult.Status.OK, CODE);
     *    dataResult.setKeepCallback(true);
     *    savedCallbackContext.sendPluginResult(dataResult);
     */

Note also that executing javascript directly requires specifying 'unsafe-eval' in the Content-Security-Policy.

Ionic addEventListener is not working

I'm building a app for iOS with Ionic and want to use some native code. When the volumebutton is pressed there will be a broadcast send to the Ionic app:

if ([keyPath isEqual:@"outputVolume"]) { NSLog(@"volume"); [[NSNotificationCenter defaultCenter] postNotificationName:@"eventName" object:nil userInfo:@{ @"data":@"test"}]; }

This is working and "Volume" is logged.

Unfortunately the broadcaster is nog listening to the broadcast or something?
i use the following code:

if(this.platform.is("cordova"))
{
var observable = this.broadcaster.addEventListener("eventName");
this.volume = 30;
observable.subscribe((event) => this.volume = 50, (event) => this.volume = event);
this.broadcaster.fireNativeEvent("eventName", {}).then(() => console.log('success'));
}

I only set the volume to 50 for a check, but the volume is never set to 50.
Did i do something wrong?

Failing to send broadcast from javascript to native

Hi tried using the code snipper to send a broadcast from javascript to native with some data and the fireNativeEvent promise always resolves to error:

this.broadCaster .fireNativeEvent("com.service.print", { extras: { item: "test data" } }) .then((result) => { console.log("broadcast sent:" + result); }) .catch((error) => { console.log("Error sending broadcast:" + error); });

here is the original question on SO

Display push notification to user when application is in foreground

Hello, I use phonegap plugin to handle push notification receiving in my cordova project.
Currently I face the ios only issue that when application is running push notifications arrive directly to the app and not to the notification center.
That means I have to display the custom alert to show user the push notification.
The question is if I can use your plugin to forward the push notification from the app to the notification center to provide the consistent behavior for both background and foreground receive?
Thank you in advance.

[iOS] Broadcast doesn't work.

I have to send broadcast from iOS. I used following code which is not working.

NotificationCenter.default.post(name: NSNotification.Name(rawValue: "callback"), object: nil, userInfo: nil)

this.broadcaster = new Broadcaster();
          this.broadcaster.addEventListener("callback").subscribe((event) => {  // you can subscribe for multiple events from native
            console.log("received event : ");
         });

I even checked if something was wrong with the broadcast by listening to it in native side only and it was working perfectly fine there.

NotificationCenter.default.addObserver(self, selector: #selector(checkBroadcast(_:)), name: NSNotification.Name(rawValue: "callback"), object: nil)

func checkBroadcast(_ notif: NSNotification){
    print("Success");
}

The same is working fine when i am sending broadcasts from android side using following code:


Intent intent = new Intent("callback");
        intent.putExtras(bundle);
        LocalBroadcastManager.getInstance(context).sendBroadcastSync(intent);

addEventListner does not get called back

I am trying to use this plugin to receive android broadcast intents.
I register for the broadcast event

     window.broadcaster.addEventListener("com.android.action.SEND_SCAN_RESULT", function (e) { 
            console.log("com.android.action.SEND_SCAN_RESULT received."); 
       });
      console.log("com.android.action.SEND_SCAN_RESULT registered");

but if the intent gets fired

   V/ActivityManager(  775): Broadcast: Intent { act=com.android.action.SEND_SCAN_RESULT flg=0x10 (has extras) } ordered=false userid=0 callerApp=ProcessRecord{1418277c 775:system/1000}

the callback does not get triggered.

The only log message is

com.android.action.SEND_SCAN_RESULT registered

do I have to add anything to the Android Manifest file?

What is {"isTrusted": false} being appended in the listener?

var listener = function( e ) { //log: didShow received! userInfo: {"data":"test"} alert( "didShow received! userInfo: " + JSON.stringify(e) ); }

Appears to returns:
{"isTrusted": false}

Prefixed inside the response object from my iOS NSNotificationCenter post. I'm assuming it might have something to do with trusting the broadcaster?

addEventListner does not get called back in ios

This is my code in ionic.

constructor(public navCtrl: NavController,public broadcaster: Broadcaster,private platform: Platform) 
{
   this.platform.ready().then(() => {
     console.log('Ready')
     this.broadcaster.addEventListener('postevent')
       .subscribe((Event) => console.log('After post ionic'));

      this.broadcaster.fireNativeEvent('eventName', {}).then(() => console.log('After fire ionic'));
   });

And i have add following code in native side. In MainViewController

 (void)viewDidLoad
{
    [super viewDidLoad];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(navigateFromPlugin) name:@"eventName" object:nil];
    // Do any additional setup after loading the view from its nib.
}
-(void)navigateFromPlugin
{
    NSLog(@"Print Native **************");
    
    [[NSNotificationCenter defaultCenter] postNotificationName:@"postevent" object:self];

}

This code not working. 'After post ionic' log not printed.

How to use this plugin in ios?

I add CDVBroadcaster.h and CDVBroadcaster.m file to my iOS Project. and add
""feature name="broadcaster"><param name="ios-package" value="CDVBroadcaster"
/feature""

in my config.xml.
but when I run js. it not working.

Listen volume buttons click

Hi i need to subscribe my app to the volume buttons click event, but i dont know what's the event name i have to subscribe, there's a list event i can check?

In the ionic native docs:

// Listen to events from Native
this.broadcaster.addEventListener('eventName').subscribe((event) => console.log(event));

Greetings!!

removeEventListener does not remove event key #15

This issue is still (see #15) am having with latest version as well. I am not able to remove the listener. Since am using the same with multiple places with different purpose hence i want to remove from one page and add at another page (ionic 2 project)

[IOS]the Broadcaster plugin is not installed.

Hello,

I try to use the Broadcaster in IOS, but I always have the same error:

[Warning] Native: I tried to call Broadcaster.addEventListener, but the Broadcaster plug-in is not installed. (vendor.js, line 72225)
[Warning] Install the Broadcaster plugin: 'ionic cordova plugin add cordova-plugin-broadcaster' (vendor.js, line 72231)
[Warning] Native: I tried to call Broadcaster.removeEventListener, but the Broadcaster plug-in is not installed. (vendor.js, line 72225)
[Warning] Install the Broadcaster plugin: 'ionic cordova plugin add cordova-plugin-broadcaster' (vendor.js, line 72231)
[Error] ERROR - Error: plugin_not_installed

on Android works well

I use the latest version of the plugin and the latest version of @ ionic-native / broadcaster

What could be wrong?

Thanks

a bit more info on this plogin please

Hi there,

can you please provide some example/infos where this plugin would be useful.

I am trying to voice activate my Cordova app and wanted to see if this plugin would help with that.

thanks

Send JSONObject as Bundle not working for Android

I want to send a simple JSON object but the plugin was not able to convert it correctly to JSON

I want to send this simple JSON
{ "data":{ "testingkey":"testingValue" } }

So according to the documentation should be something like this

val bundle1 = Bundle()
bundle1.putString("testingkey", "testingValue")
val bundle2 = Bundle()
bundle2.putBundle("json", bundle1)
intent.putExtra("data",  bundle2)

After that in the listener when I put the log to see the response
console.log(JSON.stringify(e, null, "\t"))

I got this:
{ "isTrusted": false, "data": "Bundle[{json=Bundle[{TestingKey=TestingValue}]}]" }

Note that I don't want to send the JSON as string because if I try something like this:

intent.putExtra("data", jsont.toString())

I got this:

{ 
   "data":"{\"testingkey\":\"testingValue\"}"
}

So it appears that your plugin is supporting just one depth in the JSON Object

Broadcast message not being received

Is this plugin working at all ? I am trying this in an ionic app like below but not able to make it work :

Here is my code inside app.js's $ionicPlatform.ready function :

if (window.broadcaster) {
window.broadcaster.addEventListener( "CUSTOM_EVENT_NAME_BROADCASTED_FROM_NATIVE_LAYER", function( e ) {
console.log( "Event received! userInfo: " + JSON.stringify(e) );
});
} else {
console.log('windown.broadcaster not available');
}

It's not invoking the else block, and the registered callback-block is not called also.

Any pointer would be helpful.

Thanks

  • Tushar

package android.support.v4.content does not exist

Hi. Error in title just one of few. Getting these errors in ionic app.
Didn't do anything but starting project and installing this plugin.
I used plugin as mentioned in ionic docs
Can't use this plugin as your readme anyway. When i try to use an error says expected 1 argument but got 2.

Some of other errors:

error: cannot find symbol
    LocalBroadcastManager.getInstance(super.webView.getContext()).unregisterReceiver(receiverHolder.receiver);
    ^
  symbol:   variable LocalBroadcastManager

error: cannot find symbol
    return LocalBroadcastManager.getInstance(super.webView.getContext()).sendBroadcast(intent);
           ^
  symbol:   variable LocalBroadcastManager
  location: class CDVBroadcaster

Btw i can build kotlin version of my app with the same intent. Which is airplane mode. So i am guessing the problem isn't with my java/gradle ... versions or anything with my computer.

Where should I write Android code?

I'm a front-end engineer and don't know anything about Android....Now I have a web-project and use cordova to build apk but i dont konw whitch .java file to write your android code ... thanks

Android Build Failure/Solution

Yesterday, I came across this error when building my android platform in my Ionic 3 project.


:processDebugResources
ERROR: In FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In FontFamilyFont, unable to find attribute android:ttcIndex

FAILED

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':processDebugResources'.
com.android.ide.common.process.ProcessException: Failed to execute aapt

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 9.294 secs
Error: cmd: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
ERROR: In FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In FontFamilyFont, unable to find attribute android:ttcIndex

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':processDebugResources'.
com.android.ide.common.process.ProcessException: Failed to execute aapt

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

[ERROR] An error occurred while running cordova build android (exit code 1).


Removing this plugin, then removing and re-adding the android platform allows me to build successfully. If I have this plugin installed it kills the build. Initially, I had plugin v2.3.0 and updating to v3.0.1 didn't help.

Via this ionic forum topic, that's had some recent activity, I tried editing this line in the plugin.xml in the node_modules and plugin directory from
<framework src="com.android.support:support-v4:+" />
to
<framework src="com.android.support:support-v4:26+" />
and got it to build after adding the android platform.
(26 is my targetSdkVersion)

I've been using the broadcaster for iOS events for months and have had no issues building any of the platforms up to this point. I figured I'd put this here just in case anyone else has this problem and so it can be addressed in subsequent builds.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.