Giter Site home page Giter Site logo

arnesson / cordova-plugin-firebase Goto Github PK

View Code? Open in Web Editor NEW
1.0K 65.0 1.5K 251.85 MB

Cordova plugin for Google Firebase

Home Page: http://arnesson.github.io/cordova-plugin-firebase

License: MIT License

Java 5.39% Objective-C 85.92% JavaScript 2.41% Shell 0.33% C 5.95%
firebase cordova notifications google-firebase crashlytics

cordova-plugin-firebase's Introduction

cordova-plugin-firebase

This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project! Android and iOS supported.

Supported Cordova Versions

  • cordova: >= 6
  • cordova-android: >= 6.4
  • cordova-ios: >= 4

Installation

Install the plugin by adding it to your project's config.xml:

<plugin name="cordova-plugin-firebase" spec="^2.0.0" />

or by running:

cordova plugin add cordova-plugin-firebase --save

Guides

Great installation and setup guide by Medium.com - https://medium.com/@felipepucinelli/how-to-add-push...

Setup

Download your Firebase configuration files, GoogleService-Info.plist for iOS and google-services.json for android, and place them in the root folder of your cordova project. Check out this firebase article for details on how to download the files.

- My Project/
    platforms/
    plugins/
    www/
    config.xml
    google-services.json       <--
    GoogleService-Info.plist   <--
    ...
IMPORTANT NOTES
  • This plugin uses a hook (after prepare) that copies the configuration files to the right place, namely platforms/ios/\<My Project\>/Resources for ios and platforms/android for android.
  • Firebase SDK requires the configuration files to be present and valid, otherwise your app will crash on boot or Firebase features won't work.

PhoneGap Build

Hooks do not work with PhoneGap Build. This means you will have to manually make sure the configuration files are included. One way to do that is to make a private fork of this plugin and replace the placeholder config files (see src/ios and src/android) with your actual ones, as well as hard coding your app id and api key in plugin.xml.

Google Play Services

Your build may fail if you are installing multiple plugins that use Google Play Services. This is caused by the plugins installing different versions of the Google Play Services library. This can be resolved by installing cordova-android-play-services-gradle-release.

If your build is still failing, you can try installing cordova-android-firebase-gradle-release. For more info, read the following comment about locking down the specific versions for play services and firebase. It is suggested to use + instead of 15.+ to ensure the correct versions are used.

Google Tag Manager

Checkout our guide for info on setting up Google Tag Manager.

Configuring Notifications

Checkout our guide for info on configuring notification icons and colors.

API

See the full API available for this plugin.

Supporters

PassportReader identity verification API - Get started for free - $0.01 per verification

cordova-plugin-firebase's People

Contributors

aikei avatar andrewlively avatar briantq avatar c4software avatar erikdju avatar felipeclopes avatar freezyexp avatar ginkgomzd avatar gvieduc avatar hardikinfodesk avatar hardikthakkar3 avatar hilljh82 avatar hirbod avatar imgos avatar jestcastro avatar jonsmart avatar juliocbcotta avatar keyz182 avatar lora-reames avatar m6246 avatar manuelsc avatar markterrill avatar noeldemartin avatar robertarnesson avatar soumak77 avatar swindex avatar taracque avatar thomas-alrek avatar troystopera avatar vlavrynovych 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  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

cordova-plugin-firebase's Issues

fix crash

add


      if(FirebasePlugin.callbackContext == null){
        return;
      }

in the first line of

 public static void onNotificationOpen(Bundle bundle)

Invalid GOOGLE_APP_ID closes the app

On XCode I'm able to see the following error:

The GOOGLE_APP_ID either in the plist file 'GoogleService-Info.plist' or the one set in the customized options is invalid. If you are using the plist file, use the iOS version of bundle identifier to download the file, and do not manually edit the GOOGLE_APP_ID. You may change your app's bundle identifier to '(null)'. Or you can download a new configuration file that matches your bundle identifier from https://console.firebase.google.com/ and replace the current one.
*** Terminating app due to uncaught exception 'com.firebase.core', reason: 'Configuration fails. It may be caused by an invalid GOOGLE_APP_ID in GoogleService-Info.plist or set in the customized options.'

Will be useful to catch it so the app doesn't close, and show an alert window, without XCode is really difficult to find this error.

(Android) Click on notification doesnยดt trigger onNotificationOpen callback

Cordova 6.3.1
Phonegap firebase plugin 0.1.12
Device: LG G5 with Android 6.0.1

This is the code I am using:
`var app = {
// Application Constructor
initialize: function () {
this.bindEvents();
},
// Bind Event Listeners
//
// Bind any events that are required on startup. Common events are:
// 'load', 'deviceready', 'offline', and 'online'.
bindEvents: function () {
document.addEventListener('deviceready', this.onDeviceReady, false);
},
// deviceready Event Handler
//
// The scope of 'this' is the event. In order to call the 'receivedEvent'
// function, we must explicitly call 'app.receivedEvent(...);'
onDeviceReady: function () {
console.log ("Estamos en onDeviceReady");
if (navigator.connection.type == Connection.NONE) {
navigator.notification.alert('Se requiere conexiรณn a Internet');
} else {
window.FirebasePlugin.onNotificationOpen(function(notification) {
console.log(notification);
navigator.notification.alert ("Recibido");
}, function(error) {
console.log(error);
});
}
},

};
app.initialize();`

I receive notifications in the tray of system in all the situations: app in background, foreground and closed and when I click on notification, app is open in the three cases but callback is not triggered.

Is there anything wrong in the code?

Thanks in advance.

Hanging on launch

Hey,

I built my app today and noticed it was hanging badly on start up.
If i wait long enough it would eventually load up (around 3 - 4 mins).

Removed all plugins & app worked fine added everything one by one and its this plugin that causes the hang.
Removed all other plugins bar firebase and still get a hang

I have latest android SDK's
up to date Cordova
I've updated this plugin to .12 and still getting it

This plugins worked 100% up until today. Any ideas?

Cheers

Data callback?

Is there a way to get the data/message from the notification to the app via a callback?

The normal flow for notifications are:

  1. App In Background/ App Off
    • Show Notification in toolbar
    • When notification is clicked, receive callback with data.
  2. App in Foreground:
    • Receive callback with data.

(Android): Click on Notification is not opening the app

Android / Smartphone.

I can receive notifications, which display nicely in the notification area, but when I click on one, I would expect that the main app is launched. But it is not. Is there any particular reason for it?

I see that it should be supported: User taps the notification and the app opens

Unable to parse topic

So I am getting an Unable to parse topic: "/topic/<my-topic>" error in Xcode and I found the issue. It's only happening on iOS, and In the FirebasePlugin.m the subscribe and unsubscribe functions have this line:
NSString* topic = [NSString stringWithFormat:@"/topic/%@", [command.arguments objectAtIndex:0]];,
when I think the string it sends through actually needs to be
NSString* topic = [NSString stringWithFormat:@"/topics/%@", [command.arguments objectAtIndex:0]];.

I am basing that off of this documentation. I might be wrong but I changed it to have topics instead of topic in my workspace and everything seems to be working fine now.

Cordova - Multiple dex files define

I like to use Fibebase Analytic in my cordova project, while trying to build android below error is thrown. Im using jdk 1.8

Please let em know what is the issue and how to resolve it. Thanks

Error: cmd: Command failed with exit code 1 Error output:
Dex: Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/firebase/FirebaseException;
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lcom/google/firebase/FirebaseException;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:591)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:546)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:528)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)

Android: logEvent does not track event value properly

I've started using the plugin and noticed that event value is not tracked for Android. I guess the cause of the issue if that during conversion to Bundle all attribute values serialized as strings, but the framework expects Float or Long instead in some cases.

Compatiblity with Phonegap Build

Hello,,

It seems there's no way to include the Firebase config files in the root directory of a Phonegap Build package as this kind of package is usually just the www folder.
Can the plugin be modified to locate the config files either in the root dir or the www dir?

Android on build :: variable conflict with phonegap-plugin-push :: duplicate string google_app_id after merge resources

Hello guys!

Thanks for the plugin!

I have this problem because phonegap-plugin-push and this plugins both use google_app_id variable input. This result in a conflict when i try to build android version of my app.
The google_app_id in the push plugin is used for the GCM and here is used for Firebase.
Would be possible/viable to change the name of the variable like fb_google_app_id
There is also the thing that google is not deprecating GCM in favor of FCM, i dont know if the App Ids will be the same, in that case would not need to change the variable id.

Ill still use GCM for a while so if you have no plan to update the variable name i guess the only option i have is to fork the project and do a find/replace

Thanks again!

iOS build error

I haven't seen these specific errors mentioned in #9 or #11, so here's another build error.

During compilation (cordova build ios), I get these errors:

platforms/ios/testapp/Plugins/cordova-plugin-firebase/FirebasePlugin.m:76:15: error: property 'app' not found on object of type 'FirebasePlugin *'
        [self.app setApplicationIconBadgeNumber:number];
              ^
platforms/ios/testapp/Plugins/cordova-plugin-firebase/FirebasePlugin.m:78:15: error: no visible @interface for 'FirebasePlugin' declares the selector 'sendPluginResult:callbackId:'
        [self sendPluginResult:CDVCommandStatus_OK callbackId:command.callbackId];
         ~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
platforms/ios/testapp/Plugins/cordova-plugin-firebase/FirebasePlugin.m:84:28: error: property 'app' not found on object of type 'FirebasePlugin *'
        long badge = [self.app applicationIconBadgeNumber];
                           ^
platforms/ios/testapp/Plugins/cordova-plugin-firebase/FirebasePlugin.m:86:15: error: no visible @interface for 'FirebasePlugin' declares the selector
      'sendPluginResult:messageAsLong:callbackId:'
        [self sendPluginResult:CDVCommandStatus_OK messageAsLong:badge callbackId:command.callbackId];
         ~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 errors generated.

It ends with:

The following build commands failed:
    CompileC build/testapp.build/Release-iphoneos/testapp.build/Objects-normal/armv7/FirebasePlugin.o testapp/Plugins/cordova-plugin-firebase/FirebasePlugin.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,platforms/ios/cordova/build-release.xcconfig,-project,testapp.xcodeproj,-target,testapp,-configuration,Release,-destination,platform=iOS,build,CONFIGURATION_BUILD_DIR=platforms/ios/build/device,SHARED_PRECOMPS_DIR=platforms/ios/build/sharedpch

Any ideas?

Check Google Play Services Version

Please, while initializing the plugin add some code like this to check if Google Play Services is updated in the user device and case it is not start the problem resolution.

getInstanceId return null

Please don't close an issue not resolved.

I understand your pitch, and you are right, throw error is not the way, my bad.

But in this case, return null is not the solution.
Just because this delegate plugin logic in application code, and it's not his responsibility.
Or just because null is shit like you want.

So, maybe we can think about returning a promise or an observable instead of a very limited callback ?

Getting Error on Application Launch

Hey, thanks for FCM plugin.
I am facing one issue on app launch in Cordova. Please help me to solve this issue. Here is the my logcat.

06-27 18:41:29.552: E/AndroidRuntime(28330): FATAL EXCEPTION: main
06-27 18:41:29.552: E/AndroidRuntime(28330): Process: xxx.xxx.xxx, PID: 28330
06-27 18:41:29.552: E/AndroidRuntime(28330): java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx.xxx.xxx/xxx.xxx.xxx.MainActivity}: java.lang.IllegalStateException: FirebaseApp with name [DEFAULT] doesn't exist. 
06-27 18:41:29.552: E/AndroidRuntime(28330):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2521)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2595)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at android.app.ActivityThread.access$800(ActivityThread.java:178)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at android.os.Handler.dispatchMessage(Handler.java:111)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at android.os.Looper.loop(Looper.java:194)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at android.app.ActivityThread.main(ActivityThread.java:5631)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at java.lang.reflect.Method.invoke(Native Method)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at java.lang.reflect.Method.invoke(Method.java:372)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
06-27 18:41:29.552: E/AndroidRuntime(28330): Caused by: java.lang.IllegalStateException: FirebaseApp with name [DEFAULT] doesn't exist. 
06-27 18:41:29.552: E/AndroidRuntime(28330):    at com.google.firebase.FirebaseApp.getInstance(Unknown Source)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at com.google.firebase.FirebaseApp.getInstance(Unknown Source)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at com.google.firebase.iid.FirebaseInstanceId.getInstance(Unknown Source)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at com.google.firebase.messaging.FirebaseMessaging.getInstance(Unknown Source)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at com.gae.scaffolder.plugin.FCMPlugin.initialize(FCMPlugin.java:34)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at org.apache.cordova.CordovaPlugin.privateInitialize(CordovaPlugin.java:57)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:172)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:98)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at org.apache.cordova.PluginManager.init(PluginManager.java:87)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at org.apache.cordova.CordovaWebViewImpl.init(CordovaWebViewImpl.java:116)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:144)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:214)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at xxx.xxx.xxx.MainActivity.onCreate(MainActivity.java:32)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at android.app.Activity.performCreate(Activity.java:6092)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112)
06-27 18:41:29.552: E/AndroidRuntime(28330):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2468)
06-27 18:41:29.552: E/AndroidRuntime(28330):    ... 10 more

Android Status Bar Icon - All White

Hi,
I have been trying to find away to change the icon that is displayed on a android status bar when a push notification is delivered. Here is an example of what is happening:

screenshot_2016-09-13-08-53-22

As you can see the icon for my app is not a transparent image. If i change it to a transparent image the push icon looks fine but the app icon is now the transparent image and that isn't what i want. I have tried different variations of file names but nothing seems to work. When looking into the code, src/android/FirebasePluginMessagingService.java on line 73 there is this:
.setSmallIcon(getApplicationInfo().icon)

Am i correct in saying that you can not set a different icon than your app icon?
Would it be possible to set a different file for the status bar icon?
Or any other suggestions on how to get round this issue?

Last commit error

Hi,

I tried to use the last commit and I got these errors :

../platforms/android/src/org/apache/cordova/firebase/FirebasePlugin.java:218: error: unreported exception JSONException; must be caught or declared to be thrown String value = params.getString(key); ^ Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error

Something is wrong in the new one right ?

Thanks

Hello,
Thank you for this project and your great job!

Stop by to said that.

Error on build

After I add this plugin to my Cordova project, I got an error Message:

MDAVSCLI : error : Uh oh!
Executing "before_plugin_install" hook for "cordova-plugin-firebase" on android.
Install start for "cordova-plugin-firebase" on android.
Beginning processing of action stack for android project...
"(ProjectPath)\platforms\android\google-services.json" already exists!
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

My Environment:

  • cordova-plugin-firebase Version 0.1.9
  • Visual Studio 2015 Apache Cordova Update 7
  • Cordova CLI Version 5.4.1
  • Cordova Android Version 4.1.1

Separate Push Notification Setup From applicationDidFinishLaunching()

On iOS we're getting permission prompts on first launch of apps requesting permission to send push notifications.

To improve user experience what do you think about moving registerForRemoteNotifications into its own function outside of applicationDidFinishLaunching(). That way we do not get these permission prompts on first run.

iOS10 background issue

Is there a problem with iOS10 notifications when app is in background?

If app is in background or closed i can see nothing, I receive notifications only when app is in foreground.

[DISCUSSION] Report javascript exceptions with Firebase

There are several ways to do this:

A) Using Firebase Crash Reporting.
This option would involve implementing FIRCrashLog/FirebaseCrash.log to first log the javascript exception(s) to a crash report, then on android we can send the report by triggering a non-fatal error

FirebaseCrash.report(new Exception());

On IOS its more complicated because Firebase only handles fatal errors. We can implement our own report method that calls e.g. assert(false); to trigger a crash which will cause the report to be sent. But javascript errors are essentially non-fatal so I don't like the idea of having to crash the entire app to catch them.

Crash docs: https://firebase.google.com/docs/crash/

B) Use logEvent to log exceptions.
The problem here is that there seems to be a character limit to event names and params (32 characters). We could split the exception info over several params, a message is rarely > 32 characters. But I feel that this will clutter the analytics console plus it would be ideal to have no size restriction so that e.g. the full callstack could be attached if desired.

logEvent would need a rewrite for this. Right now the event name and param names are hardcoded

Analytics docs: https://firebase.google.com/docs/analytics/

C) Use a combination of e.g. logEvent and Storage.
This option would involve implementing Firebase Storage and rewriting logEvent, the rest of the implementation is done in the client by the user.
An example implementation would be to upload the javascript exception as a text file to Firebase Storage and also log an event with e.g. name "exception" and url to the file as param. You could also generate a hash from the exception/message/callstack and save that as a param as well, this way crashes can be grouped in the analytics console

Opinions, ideas?

Error on second build

Hello,
Thank you for this project and your great job!

I have problem in ionic project.
First, I add the string in my config.xml:
<plugin name="cordova-plugin-firebase" spec="https://github.com/arnesson/cordova-plugin-firebase" />
Second, I put google-services.json (which I got from firebase web console) in root directory.
I run my build, and this works:

$ cordova run android
Running command: /home/user/android-app/App/hooks/after_prepare/010_add_platform_class.js /home/user/android-app/App
add to body class: platform-android
**Discovered plugin "cordova-plugin-firebase" in config.xml. Adding it to the project**
Fetching plugin "https://github.com/arnesson/cordova-plugin-firebase" via git clone
Repository "https://github.com/arnesson/cordova-plugin-firebase" checked out to git ref "master".
Installing "cordova-plugin-firebase" for android
ANDROID_HOME=/home/user/Android/Sdk/
JAVA_HOME=/opt/java/jdk1.8.0_92
No target specified, deploying to device 'F9AZCY31J032'.
:preBuild UP-TO-DATE

But my second build always fails...

$ cordova run android
Running command: /home/user/android-app/App/hooks/after_prepare/010_add_platform_class.js /home/user/android-app/App
add to body class: platform-android
Error: Invalid data, chunk must be a string or buffer, not object

I was trying to install plugin by cordova plugin add https://github.com/arnesson/cordova-plugin-firebase.git --save. But in this case even first build crashes with Error: Invalid data, chunk must be a string or buffer, not object

And when I start android application with first build, code below doesn't work for me:

angular.module('app', ['ionic', 'app.controllers', 'app.routes', 'app.services', 'app.directives', 'firebase'])

.run(function($ionicPlatform) {
  $ionicPlatform.ready(function() {
    // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
    // for form inputs)
    if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
      cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
      cordova.plugins.Keyboard.disableScroll(true);
    }
    if (window.StatusBar) {
      // org.apache.cordova.statusbar required
      StatusBar.styleDefault();
    }

    window.FirebasePlugin.getInstanceId(function(token) {
      // save this server-side and use it to push notifications to this device
      console.log("Token", token);
    }, function(error) {
      console.error(error);
    });

  });
})

This code returns ["Token", "null"] to console.

Thank you in advance.

getInstanceId return null

hello,

I have used, this plugin : https://github.com/fechanique/cordova-plugin-fcm, and it works correctly.
But your plugin provides support for a more important part of Firebase system.
So I Try to migrate to your solution.

However, I cannot get the Firebase Token, function return "null", and I can't see any error in DDMS.

Do you see where can be the problem ?

Error on build

I am getting the following error when i try to compile:

GoogleIPhoneUtilities(GIPReachability.o)
duplicate symbol OBJC_IVAR$GIPReachability.monitoring in:
/Users/radumac/ionic/ionic-ctm/platforms/ios/CTM App/Plugins/phonegap-plugin-push/GCM/Libraries/libGIP_Reachability.a(GIPReachability.o)
CTM App/Plugins/cordova-plugin-firebase/GoogleIPhoneUtilities.framework/GoogleIPhoneUtilities(GIPReachability.o)
duplicate symbol OBJC_IVAR$GIPReachability.hostName in:
/Users/radumac/ionic/ionic-ctm/platforms/ios/CTM App/Plugins/phonegap-plugin-push/GCM/Libraries/libGIP_Reachability.a(GIPReachability.o)
CTM App/Plugins/cordova-plugin-firebase/GoogleIPhoneUtilities.framework/GoogleIPhoneUtilities(GIPReachability.o)
ld: 504 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am using:
Node version: v4.4.1
Cordova version: 6.2.0
Xcode 7.3
Build version 7D175

Plugin didnt use project root folder config file. PGB

Im using Phonegap build. Found that the plugin using src//<plist/json> file instead of my project root folder

  • My Project/
    platforms/
    plugins/
    www/
    config.xml
    google-services.json <--
    GoogleService-Info.plist <--
    ...
    How to solve this issue?

getInstanceId is undefined

Hello
I have copied google-services.json to root folder and installed the plugin

Phone constantly tells me that window.FirebasePlugin.getInstanceId is undefined
I'm of course running it at deviceready event.

Thanks

Log every page visit

I'm using framework7 (single page application) for android, and trying to analyze user behavior on my apps. I want to know at which page users mostly stop using my apps by counting page visit. I'm trying put this code from example :
window.FirebasePlugin.logEvent("page_view", {page: "dashboard"});
everytime I call a page (change page parameter with my custom page name), but I still can't see the result at my firebase console. Is it possible to do this?

Cordova Google Maps : error on build

Hi there,

My build was working and then I added cordova-plugin-googlemaps, and now I got this message when I am trying to build for android :

`Dex: Error converting bytecode to dex:

Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/firebase/FirebaseException;
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lcom/google/firebase/FirebaseException;`

Looks like googlemaps and firebase plugin are not working together.
I read that I have to exclude some dependencies ? How can I do that ?
Thanks !

Fail to fetch APNS -- Connected to FCM (but no token shown)

Hello,

When I launch with xcode my app I got the message that say I am connected to FCM but I don't have the token. (I have to show it with console.log when I launch the app, is it normal ?)
Moreover it said "fail to fetch to APNS" but it is before "connected to FCM"

Have a look please :

<FIRAnalytics/INFO> Firebase Analytics v.3200000 started
2016-08-25 08:07:48.018: <FIRMessaging/INFO> FIRMessaging library version 1.1.0
2016-08-25 08:07:48.025 HelloCordova[2432:] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)
2016-08-25 08:07:48.027: <FIRMessaging/WARNING> FIRMessaging AppDelegate proxy enabled, will swizzle app delegate remote notification receiver handlers. Add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2016-08-25 08:07:48.034 HelloCordova[2432:] <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
2016-08-25 08:07:48.237 HelloCordova[2432:] <FIRAnalytics/INFO> Firebase Analytics enabled
2016-08-25 08:07:48.280: <FIRInstanceID/WARNING> APNS Environment in profile: development
2016-08-25 08:07:48.319 HelloCordova[2432:673788] Resetting plugins due to page load.
2016-08-25 08:07:48.835 HelloCordova[2432:673788] Finished load of: file:///var/containers/Bundle/Application/7E2C9DCA-2957-4330-A9E9-952537162969/HelloCordova.app/www/index.html#/connected
2016-08-25 08:07:49.514 HelloCordova[2432:673788] Connected to FCM.
2016-08-25 08:07:50.439 HelloCordova[2432:673788] THREAD WARNING: ['GoogleMaps'] took '350.825684' ms. Plugin should use a background thread.

Problem with build

Environment: Windows, newest Cordova:

cordova create app com.my project
cd app
cordova platform add android
cordova plugin add https://github.com/arnesson/cordova-plugin-firebase.git --save
xcopy ..\google-services.json .
cordova prepare
cordova build android

Results in:

ANDROID_HOME=d:\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.6.0_45
Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
java.lang.IllegalStateException: buildToolsVersion is not specified.
at com.google.common.base.Preconditions.checkState(Preconditions.java:176)
at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:599)
at com.android.build.gradle.BasePlugin$10$1.call(BasePlugin.java:566)
at com.android.build.gradle.BasePlugin$10$1.call(BasePlugin.java:563)
at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:55)
at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:47)
at com.android.build.gradle.BasePlugin$10.execute(BasePlugin.java:562)
at com.android.build.gradle.BasePlugin$10.execute(BasePlugin.java:559)
at org.gradle.listener.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:109)
at org.gradle.listener.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:98)
at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:83)
at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:31)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy12.afterEvaluate(Unknown Source)
at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:79)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:65)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:504)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:83)
at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:42)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:129)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:47)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:35)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:24)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
at org.gradle.launcher.daemon.server.exec.StartStopIfBuildAndStop.execute(StartStopIfBuildAndStop.java:33)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:71)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:69)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:69)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:70)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
at org.gradle.launcher.daemon.server.exec.DaemonHygieneAction.execute(DaemonHygieneAction.java:39)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:46)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)

BUILD FAILED

Total time: 2.994 secs

FAILURE: Build failed with an exception.

  • Where:
    Script 'D:\javasrc\workspace\kreisalarm.de\temp\app\platforms\android\cordova-plugin-firebase\my-build.gradle' line: 7

  • What went wrong:
    A problem occurred evaluating script.

    Could not find method compile() for arguments [me.leolin:ShortcutBadger:1.1.4@aar] on org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandle
    ecorated@34caeeb8.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    Error: Error code 1 for command: cmd with args: /s,/c,"D:\javasrc\workspace\kreisalarm.de\temp\app\platforms\android\gradlew cdvBuildDebug -b D:\javasrc\workspace
    eisalarm.de\temp\app\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"

Multi-line

Would it be possible to support multi-line notifications?

Error on build, Duplicate class

Hi everyone!

Error output:
`:compileDebugNdk UP-TO-DATE
:compileDebugSources
:prePackageMarkerForDebug
:transformClassesWithJarMergingForDebug FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 14.071 secs

  • What went wrong:
    Execution failed for task ':transformClassesWithJarMergingForDebug'.

    com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzpx.class

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    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.
    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.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':transformClassesWithJarMergingForDebug'.

    com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzpx.class

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

Plugin list:
cordova-plugin-compat 1.0.0 "Compat" cordova-plugin-device 1.1.2 "Device" cordova-plugin-file 4.2.0 "File" cordova-plugin-file-opener2 2.0.2 "File Opener2" cordova-plugin-file-transfer 1.5.1 "File Transfer" cordova-plugin-firebase 0.1.9 "Google Firebase Plugin" cordova-plugin-geolocation 2.2.0 "Geolocation" cordova-plugin-inappbrowser 1.4.0 "InAppBrowser" cordova-plugin-network-information 1.2.1 "Network Information" cordova-plugin-splashscreen 3.2.2 "Splashscreen" cordova-plugin-whitelist 1.2.2 "Whitelist" cordova-plugin-x-toast 2.5.2 "Toast" plugin.google.maps 1.3.9 "phonegap-googlemaps-plugin"

Any idea to resolve? Thanks!

Error at launch - invalid plist

Hello,

I downloaded the plist in my firebase project and put it in my root folder.
When I launch my app I get :

Terminating app due to uncaught exception 'com.firebase.core', reason: '[FIRApp configure] could not find a valid GoogleServices-Info.plist in your project. Please download one from https://console.firebase.google.com/.'

Why could it be invalid ?

window.FirebasePlugin undefined

No matter what I try to do or how long I wait, I get window.FirebasePlugin undefined on iOS

My app is using Ionic and I have impletemented $ionicPlatform.ready(function() { }) to wait until cordova is loaded before trying to execute window.FirebasePlugin.getInstanceId(), but every time I do I receive the undefined error message.

Any ideas?

Analytics Framework and ionic2

Hi!
Could I use the plugin with ionic2 ? ever tested?

The plugin has Analytics Firebase Framework (as I have seen in plugin.xml). If I can use this librairy (?) your are the first plugin integrate it !

subscribe to topics

Hi, would it be possible to use this plugin to subscribe/unsubscribe to FCM topics?
Thanks

NPE fix and request for onNotification

A possible NPE occurs here:

public static void onNotificationOpen(Bundle bundle) {
final CallbackContext callbackContext = FirebasePlugin.callbackContext.get();

when callbackContext is null so if there's no callbackContext is set.

Generally spoken I would use an ArrayList here so that multiple listeners can be registered...

In addition for this I want to suggest to implement a onNotification listener, which works just the same for notifications received while the app is in the foreground.

No notifications on iOS when app is in background

I've followed all the instructions I could find, and am a loss.
I'm receiving notifications in the app (in both XCode console and JavaScript with the onNotificationOpen handler.

Once I switch apps on the iPhone, XCode logs 2016-09-29 17:53:49.538 Burp[1715:2558636] Disconnected from FCM and when I send another notification, nothing happens.

Once I bring the app to the foreground, it then receives the notification.

What am I missing?

PS thanks for all the work on this!

Import AppDelegate of Swift

Hi there,

I have been trying to use this plugin in my Cordova project where all classes are written in Swift. Hence I hit an issue in the FirebasePlugin.h and FirebasePlugin.m because they are trying to import Objective-C version of appDelegate.h. There are some suggestions out there for this issue e.g. http://stackoverflow.com/questions/33781505/cant-find-swift-appdelegate-inside-objective-c,
http://stackoverflow.com/questions/24062618/swift-to-objective-c-header-not-created-in-xcode-6 but found no luck, I was wondering if you have any ideas or workaround for it ?

Thanks in advance

Plugin crashes on iOS7 devices

Commenting the line below fixes cause of the bug:
https://github.com/chemerisuk/cordova-plugin-firebase/commit/1506f25011116629522918a7101922b8f9642f40

Not sure why you call registerForRemoteNotifications at applicationDidFinishLaunching. May be better to do it in grantPermission?

Code below should work on all devices, but I don't have a chanse to do appropriate testing...

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
  if ([[UIApplication sharedApplication]respondsToSelector:@selector(registerUserNotificationSettings:)]) {
    UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UserNotificationTypes categories:nil];
    [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
    [[UIApplication sharedApplication] registerForRemoteNotifications];
  } else {
    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:notificationTypes];
  }
#else
    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:notificationTypes];
#endif

Event parameters

I am trying to log an event to firebase and I am able to receive the event name in firebase console, however, I am unable to see the parameters and filter by them. Any idea what can be the problem?

window.FirebasePlugin.logEvent('openScreen', {screenName: 'welcome'});

Can't download dependencies

Hello
I tried to reinstall plugin and run app then this happened:
image

Are dependencies really missing on server or I am doing something wrong ?
Thanks

Error When Running On Android

First off, thanks for pioneering this!

Having a little trouble getting off the ground after installing the plugin. What I've I done:

  1. Installed the plugin using this command: cordova plugin add https://github.com/arnesson/cordova-plugin-firebase.git --variable AD_UNIT_ID_FOR_BANNER_TEST="toBeFilledInLater" --variable AD_UNIT_ID_FOR_INTERSTITIAL_TEST="toBeFilledInLater" --variable CLIENT_ID="toBeFilledInLater" --variable REVERSED_CLIENT_ID="toBeFilledInLater" --variable API_KEY="toBeFilledInLater" --variable GCM_SENDER_ID="toBeFilledInLater" --variable BUNDLE_ID="toBeFilledInLater" --variable PROJECT_ID="toBeFilledInLater" --variable STORAGE_BUCKET="toBeFilledInLater" --variable GOOGLE_APP_ID="toBeFilledInLater" --variable DATABASE_URL="toBeFilledInLater"
  2. Added my app's values into plugins/cordova-firebase-plugin/plugin.xml.

When I attempt to run on android I am getting these errors reported via logcat:

W/System.err( 8000): java.lang.ClassNotFoundException: cordova-plugin-firebase.FirebasePlugin
W/System.err( 8000):    at java.lang.Class.classForName(Native Method)
W/System.err( 8000):    at java.lang.Class.forName(Class.java:308)
W/System.err( 8000):    at java.lang.Class.forName(Class.java:272)
W/System.err( 8000):    at org.apache.cordova.PluginManager.instantiatePlugin(PluginManager.java:490)
W/System.err( 8000):    at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:170)
W/System.err( 8000):    at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:98)
W/System.err( 8000):    at org.apache.cordova.PluginManager.init(PluginManager.java:87)
W/System.err( 8000):    at org.apache.cordova.CordovaWebViewImpl.init(CordovaWebViewImpl.java:116)
W/System.err( 8000):    at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:144)
W/System.err( 8000):    at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:214)
W/System.err( 8000):    at com.vandersw.pullupchallenge.MainActivity.onCreate(MainActivity.java:32)
W/System.err( 8000):    at android.app.Activity.performCreate(Activity.java:5958)
W/System.err( 8000):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1129)
W/System.err( 8000):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
W/System.err( 8000):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2474)
W/System.err( 8000):    at android.app.ActivityThread.access$800(ActivityThread.java:144)
W/System.err( 8000):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1359)
W/System.err( 8000):    at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err( 8000):    at android.os.Looper.loop(Looper.java:155)
W/System.err( 8000):    at android.app.ActivityThread.main(ActivityThread.java:5696)
W/System.err( 8000):    at java.lang.reflect.Method.invoke(Native Method)
W/System.err( 8000):    at java.lang.reflect.Method.invoke(Method.java:372)
W/System.err( 8000):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1028)
W/System.err( 8000):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
W/System.err( 8000): Caused by: java.lang.ClassNotFoundException: Didn't find class "cordova-plugin-firebase.FirebasePlugin" on path: DexPathList[[zip file "/data/app/com.vandersw.pullupchallenge-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
W/System.err( 8000):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
W/System.err( 8000):    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
W/System.err( 8000):    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
W/System.err( 8000):    ... 24 more
W/System.err( 8000):    Suppressed: java.lang.ClassNotFoundException: cordova-plugin-firebase.FirebasePlugin
W/System.err( 8000):        at java.lang.Class.classForName(Native Method)
W/System.err( 8000):        at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
W/ActivityManager(  680):   Force finishing activity com.vandersw.pullupchallenge/.MainActivity
W/System.err( 8000):        at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
W/System.err( 8000):        at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
W/System.err( 8000):        ... 25 more
W/System.err( 8000):    Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
I/System.out( 8000): Error adding plugin cordova-plugin-firebase.FirebasePlugin.
D/StatusBarManagerService(  680): setSystemUiVisibility(0x8600)
E/AndroidRuntime( 8000): FATAL EXCEPTION: main
E/AndroidRuntime( 8000): Process: com.vandersw.pullupchallenge, PID: 8000
E/AndroidRuntime( 8000): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vandersw.pullupchallenge/com.vandersw.pullupchallenge.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CordovaPlugin.privateInitialize(java.lang.String, org.apache.cordova.CordovaInterface, org.apache.cordova.CordovaWebView, org.apache.cordova.CordovaPreferences)' on a null object reference
E/AndroidRuntime( 8000):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2411)
E/AndroidRuntime( 8000):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2474)
E/AndroidRuntime( 8000):    at android.app.ActivityThread.access$800(ActivityThread.java:144)
E/AndroidRuntime( 8000):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1359)
E/AndroidRuntime( 8000):    at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 8000):    at android.os.Looper.loop(Looper.java:155)
E/AndroidRuntime( 8000):    at android.app.ActivityThread.main(ActivityThread.java:5696)
E/AndroidRuntime( 8000):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 8000):    at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 8000):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1028)
E/AndroidRuntime( 8000):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
E/AndroidRuntime( 8000): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CordovaPlugin.privateInitialize(java.lang.String, org.apache.cordova.CordovaInterface, org.apache.cordova.CordovaWebView, org.apache.cordova.CordovaPreferences)' on a null object reference
E/AndroidRuntime( 8000):    at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:172)
E/AndroidRuntime( 8000):    at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:98)
E/AndroidRuntime( 8000):    at org.apache.cordova.PluginManager.init(PluginManager.java:87)
E/AndroidRuntime( 8000):    at org.apache.cordova.CordovaWebViewImpl.init(CordovaWebViewImpl.java:116)
E/AndroidRuntime( 8000):    at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:144)
E/AndroidRuntime( 8000):    at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:214)
E/AndroidRuntime( 8000):    at com.vandersw.pullupchallenge.MainActivity.onCreate(MainActivity.java:32)
E/AndroidRuntime( 8000):    at android.app.Activity.performCreate(Activity.java:5958)
E/AndroidRuntime( 8000):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1129)
E/AndroidRuntime( 8000):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
E/AndroidRuntime( 8000):    ... 10 more
D/StatusBarManagerService(  680): manageDisableList userId=0 what=0x0 pkg=WindowManager.LayoutParams
E/ActivityManager(  680): App crashed! Process: com.vandersw.pullupchallenge

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.