Skip to content

Commit

Permalink
Merge pull request arnesson#314 from apility/master
Browse files Browse the repository at this point in the history
Fix Android issues
  • Loading branch information
robertarnesson authored Jul 4, 2017
2 parents 2522d2a + 59b31b6 commit 4f8530c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<service android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementService" />
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<service android:name="org.apache.cordova.firebase.FirebasePluginMessagingService">
<intent-filter>
Expand All @@ -49,6 +52,7 @@ xmlns:android="http://schemas.android.com/apk/res/android">
<source-file src="src/android/OnNotificationOpenReceiver.java" target-dir="src/org/apache/cordova/firebase" />
<source-file src="src/android/FirebasePluginInstanceIDService.java" target-dir="src/org/apache/cordova/firebase" />
<source-file src="src/android/FirebasePluginMessagingService.java" target-dir="src/org/apache/cordova/firebase" />
<source-file src="src/android/colors.xml" target-dir="res/values" />

<framework src="src/android/build.gradle" custom="true" type="gradleReference" />
<framework src="com.google.firebase:firebase-core:+" />
Expand Down
1 change: 1 addition & 0 deletions scripts/after_prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ if (directoryExists("platforms/ios")) {
try {
var contents = fs.readFileSync(paths[i]).toString();
fs.writeFileSync("platforms/ios/" + name + "/Resources/GoogleService-Info.plist", contents)
fs.writeFileSync("platforms/ios/" + name + "/Resources/Resources/GoogleService-Info.plist", contents)
} catch(err) {
process.stdout.write(err);
}
Expand Down
1 change: 1 addition & 0 deletions src/android/FirebasePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ protected void pluginInitialize() {
public void run() {
Log.d(TAG, "Starting Firebase plugin");
mFirebaseAnalytics = FirebaseAnalytics.getInstance(context);
mFirebaseAnalytics.setAnalyticsCollectionEnabled(true);
if (extras != null && extras.size() > 1) {
if (FirebasePlugin.notificationStack == null) {
FirebasePlugin.notificationStack = new ArrayList<Bundle>();
Expand Down
6 changes: 6 additions & 0 deletions src/android/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="primary">#FFFFFF00</color>
<color name="primary_dark">#FF220022</color>
<color name="accent">#FF00FFFF</color>
</resources>

0 comments on commit 4f8530c

Please sign in to comment.