Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to match master #1

Merged
merged 22 commits into from
Jun 24, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b50e88d
Merge pull request #8 from distinctdan/master
sagrawal31 Jun 19, 2019
bfd4bf6
Some code cleanup and changes to log stacktrace in Firebase.
sagrawal31 Jun 19, 2019
428f306
3.2.0
sagrawal31 Jun 19, 2019
680ac02
Backward compatibility fixes to support breaking changes released by …
sagrawal31 Jun 19, 2019
32f40c7
Merge pull request #14 from wizpanda/firebase-breaking-backward
sagrawal31 Jun 19, 2019
cd3abfd
3.3.0
sagrawal31 Jun 19, 2019
92af2ff
First version of changes to make the app build after breaking changes…
sagrawal31 Jun 18, 2019
f72326d
Changing the minimum required cordova-android version to 8.0.0
sagrawal31 Jun 18, 2019
0379213
Updating README.md
sagrawal31 Jun 19, 2019
bc4cf4e
Merge pull request #13 from wizpanda/google-breaking-changes
sagrawal31 Jun 19, 2019
ed019d1
GitHub issue template cleanup. Updating JS files to use "const" or "l…
sagrawal31 Jun 19, 2019
066042f
4.0.0
sagrawal31 Jun 19, 2019
65e6925
Formatting plugin.xml to use 4 spaces.
sagrawal31 Jun 19, 2019
5219529
Fixed typo in firebase-browser.js fixes #16
sagrawal31 Jun 19, 2019
9d968eb
Only formatting the JS files.
sagrawal31 Jun 19, 2019
688b634
4.0.1
sagrawal31 Jun 19, 2019
6a965f6
Breaking Change: Merging `logJSError` to `logError` method for consis…
sagrawal31 Jun 24, 2019
03ee4ff
Updating the API doc.
sagrawal31 Jun 24, 2019
d72c302
Generated "Table of Contents" via markdown-toc generator.
sagrawal31 Jun 24, 2019
a2a1377
Handling a few edge cases for "logError" method.
sagrawal31 Jun 24, 2019
70b2c6c
Updating README.
sagrawal31 Jun 24, 2019
999f666
Merge pull request #21 from wizpanda/android-fixes
sagrawal31 Jun 24, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
.build-browser
package-lock.json
node_modules
lib/
47 changes: 28 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

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

## 4.0.0 - Breaking Change

Minimum `v8.0.0` of `cordova-android` is now required. View https://github.com/wizpanda/cordova-plugin-firebase-lib/pull/13 for details.

## Difference from the fork repository

Maintained by [Wiz Panda](https://www.wizpanda.com/).
Expand All @@ -12,37 +16,42 @@ The [author](https://github.com/arnesson) did a great job on the plugin. But see
thought to maintain the repository with the latest changes & fixes so the others can take benefit of the Firebase in their cordova
application.

Here are the following changes in the first version i.e. 3.0.0
To see a full list of changes done after we started maintaining this fork, please see the [Releases](https://github.com/wizpanda/cordova-plugin-firebase-lib/releases)
or read the [CHANGELOG.md](https://github.com/wizpanda/cordova-plugin-firebase-lib/blob/master/CHANGELOG.md#v300)

1. Cordova@9 support
2. Fixes issues cause by Firebase SDK updates on [5 April 2019](https://firebase.google.com/support/release-notes/android#update_-_april_05_2019).
Thanks to [Dave Alden](https://github.com/dpa99c) for [commit](https://github.com/wizpanda/cordova-plugin-firebase-lib/commit/46a7bd1c06434fb4c5a72c2c20ae5d951a2e37f4)
3. Remove obsolete <service> entry for FirebasePluginInstanceIDService. Thanks to [Dave Alden](https://github.com/dpa99c) for [commit](https://github.com/wizpanda/cordova-plugin-firebase-lib/commit/eee2cfe845e6c2466d4c7fcb69d70c0c8840ea6b)
4. Remove unnecessary extra <config-file> block which can lead to race condition. Thanks to [Dave Alden](https://github.com/dpa99c) for [commit](https://github.com/wizpanda/cordova-plugin-firebase-lib/commit/17eb7c46176d5ad28fc93b53a2c49d9e6ed1888b)
5. Remove redundant build-extras.gradle. Thanks to [Dave Alden](https://github.com/dpa99c) for [commit](https://github.com/wizpanda/cordova-plugin-firebase-lib/commit/289706fc30fe848de082c468440c91ffecdce97d)
## Installation

For the changes on the next versions, please check the [CHANGELOG.md](https://github.com/wizpanda/cordova-plugin-firebase-lib/blob/master/CHANGELOG.md)
### For `cordova-android >= 8.x.x`

## Supported Cordova Versions
Since `v4.0.0`, this plugin no longer support `cordova-android 7.x.x` because of the breaking change released by Google on Jun 17, 2019.
See https://github.com/wizpanda/cordova-plugin-firebase-lib/pull/13

- cordova: `>= 7`
- cordova-android: `>= 7.0.0`
- cordova-ios: `>= 4.5.5`
To install the latest version, run the following in your terminal:

## Installation
```bash
cordova plugin add cordova-plugin-firebase-lib --save
```

Install the plugin by adding it to your project's `config.xml`:
### For `cordova-android 7.x.x`

```xml
<plugin name="cordova-plugin-firebase-lib" spec="^3.0.0" />
Run the following in your terminal:

```bash
cordova plugin add cordova-plugin-firebase-lib@3.3.0 --save
```

or by running:
Or add the following in your `config.xml`:

```bash
cordova plugin add cordova-plugin-firebase-lib --save
```xml
<plugin name="cordova-plugin-firebase-lib" spec="^3.3.0" />
```

## Supported Cordova Versions

- cordova: `>= 8`
- cordova-android: `>= 8.0.0`
- cordova-ios: `>= 4.5.5`

### Guides

1. Great installation and setup guide [https://medium.com/@felipepucinelli/how-to-add-push...](https://medium.com/@felipepucinelli/how-to-add-push-notifications-in-your-cordova-application-using-firebase-69fac067e821)
Expand Down
11 changes: 6 additions & 5 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ xmlns:android="http://schemas.android.com/apk/res/android">

<engines>
<engine name="cordova" version=">=7.0.0"/>
<engine name="cordova-android" version=">=8.0.0"/>
</engines>

<platform name="android">
Expand Down Expand Up @@ -49,11 +50,11 @@ xmlns:android="http://schemas.android.com/apk/res/android">

<framework src="src/android/build.gradle" custom="true" type="gradleReference" />
<framework src="com.google.android.gms:play-services-tagmanager:16.+" />
<framework src="com.google.firebase:firebase-auth:17.+" />
<framework src="com.google.firebase:firebase-core:16.+" />
<framework src="com.google.firebase:firebase-messaging:18.+" />
<framework src="com.google.firebase:firebase-config:17.+" />
<framework src="com.google.firebase:firebase-perf:17.+" />
<framework src="com.google.firebase:firebase-auth:18.+" />
<framework src="com.google.firebase:firebase-core:17.+" />
<framework src="com.google.firebase:firebase-messaging:19.+" />
<framework src="com.google.firebase:firebase-config:18.+" />
<framework src="com.google.firebase:firebase-perf:18.+" />
</platform>

<platform name="ios">
Expand Down
1 change: 0 additions & 1 deletion scripts/after_prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* Credits: https://github.com/arnesson.
*/
var fs = require('fs');
var path = require('path');
var utilities = require("./lib/utilities");

var config = fs.readFileSync('config.xml').toString();
Expand Down
4 changes: 2 additions & 2 deletions src/android/FirebasePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v4.app.NotificationManagerCompat;
import androidx.core.app.NotificationManagerCompat;
import android.util.Base64;
import android.util.Log;

import android.annotation.TargetApi;
import android.app.NotificationChannel;
import android.content.ContentResolver;
import android.os.Build;
import android.support.v4.app.NotificationCompat;
import androidx.core.app.NotificationCompat;
import android.media.AudioAttributes;
import android.net.Uri;

Expand Down
2 changes: 1 addition & 1 deletion src/android/FirebasePluginMessagingService.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.NotificationCompat;
import androidx.core.app.NotificationCompat;
import android.util.Log;
import android.app.Notification;
import android.text.TextUtils;
Expand Down
1 change: 1 addition & 0 deletions src/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ buildscript {
classpath 'com.google.gms:google-services:4.1.0'
}
}

repositories {
mavenCentral()
maven {
Expand Down