AndroidManifest.xml中配置:
<!-- 在百度开发者中心查询应用的API Key, MainUIActivity的onCreate方法中记得启动 --> <meta-data android:name="api_key" android:value="48YiX3RgcCYmv9aaTcr3uTVK" />
继承FrontiaApplication
public class PushApplication extends FrontiaApplication
在应用入口的onCreate方法中加上:
PushManager.startWork(this, PushConstants.LOGIN_TYPE_API_KEY, "48YiX3RgcCYmv9aaTcr3uTVK");
时间: 2024-12-08 07:02:04