Skip to content

Commit

Permalink
Merge branch 'master' into beta-2.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
rdelrosario committed Aug 2, 2018
2 parents 7d8525f + ac20432 commit 8c9b791
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 10 deletions.
8 changes: 7 additions & 1 deletion docs/FAQ.md
Expand Up @@ -16,7 +16,13 @@

3. You won't receive any push notifications if application is stopped while <b>debugging</b>, should reopen and close again for notifications to work when app closed. This is due to the application being on an unstable state when stopped while debugging.

4. On some phones android background services might be blocked by some application. This is the case of <b>ASUS Zenfone 3</b> that has an <b>Auto-start manager</b>, which disables background services by default. You need to make sure that your push notification service is not being blocked by some application like this one, since you won't receive push notifications when app is closed if so.
4. On some phones android background services might be blocked by some application. This is the case of the following phones:

- On your Huawei device go to Settings > Protected apps > check "My App" where.
- On your Xiaomi make sure your phone has the "Auto-start" property enabled for your app.
- On your Asus make sure the <b>Auto-start manager</b> of your phone has the "Auto-start" property enabled for your app

These phones disables background services starting by default. You need to make sure that your push notification service is not being blocked by the manufacturer application, since you won't receive push notifications when app is closed if so.

5. Must compile against 26+ as plugin is using API 26 specific things. Here is a great breakdown: http://redth.codes/such-android-api-levels-much-confuse-wow/ (Android project must be compiled using 8.0+ target framework)

Expand Down
32 changes: 23 additions & 9 deletions docs/GettingStarted.md
Expand Up @@ -77,6 +77,17 @@ Example of initialization:
public override void OnCreate()
{
base.OnCreate();

//Set the default notification channel for your app when running Android Oreo
if (Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.O)
{
//Change for your default notification channel id here
FirebasePushNotificationManager.DefaultNotificationChannelId = "DefaultChannel";

//Change for your default notification channel name here
FirebasePushNotificationManager.DefaultNotificationChannelName = "General";
}


//If debug you should reset the token each time.
#if DEBUG
Expand All @@ -92,15 +103,7 @@ Example of initialization:

};

//Set the default notification channel for your app when running Android Oreo
if (Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.O)
{
//Change for your default notification channel id here
FirebasePushNotificationManager.DefaultNotificationChannelId = "DefaultChannel";

//Change for your default notification channel name here
FirebasePushNotificationManager.DefaultNotificationChannelName = "General";
}

}
}

Expand Down Expand Up @@ -158,6 +161,17 @@ Add FirebaseAppDelegateProxyEnabled in the app’s Info.plist file and set it to

![Disable Swizzling](https://github.com/CrossGeeks/FirebasePushNotificationPlugin/blob/master/images/iOS-disable-swizzling.png?raw=true)

#### Known issues

* Error `Native linking failed, duplicate symbol '_main'` appears when you try to build for **iPhoneSimulator**. A workaround for this is to change the behavior of the **Registrar**:
1. Open your project settings
2. Go to **Build** tab
3. Select **iOS Build** option
4. Type `--registrar:static` in **Additional mtouch arguments** textbox
5. Click on **Ok**

Don't forget to add this in **Release** and **Debug** configuration of **iPhoneSimulator** platform.

### iOS Initialization

There are 3 overrides to **FirebasePushNotificationManager.Initialize**:
Expand Down

0 comments on commit 8c9b791

Please sign in to comment.