Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48978

Ionic capacitor app build android studio FCM Push notifications

$
0
0

MainActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Below MainActivity.java file code:-

package io.ionic.starter;

import com.getcapacitor.community.fcm.FCMPlugin;

import android.os.Bundle;

import com.getcapacitor.BridgeActivity;

import com.getcapacitor.Plugin;

import java.util.ArrayList;

public class MainActivity extends BridgeActivity {

  @Override

  public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    // Initializes the Bridge

    this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{

      // Additional plugins you've installed go here

      // Ex: add(TotallyAwesomePlugin.class);

      add(FCMPlugin.class);

    }});

  }

}

After installing Community FCM plugin I am not getting token.

Is there any issue with this code?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>