Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/226.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Android解析推送_Java_Android_Parse Platform_Push - Fatal编程技术网

Java Android解析推送

Java Android解析推送,java,android,parse-platform,push,Java,Android,Parse Platform,Push,我正在使用解析服务向设备发送推送消息。 在iOS上,一切正常,但在Android上,如果我发送推送消息,它会向接收者显示我的包名(“com.example.app”)。为什么不显示我的应用程序名称(“示例应用程序”)? 谢谢。您应该再次检查您的源代码,我遵循解析文档,它工作正常,您可能发送了错误的标题内容 Intent intent = new Intent(context, ZHSplashActivity.class); PendingIntent pIntent = Pending

我正在使用解析服务向设备发送推送消息。 在iOS上,一切正常,但在Android上,如果我发送推送消息,它会向接收者显示我的包名(“com.example.app”)。为什么不显示我的应用程序名称(“示例应用程序”)?
谢谢。

您应该再次检查您的源代码,我遵循解析文档,它工作正常,您可能发送了错误的标题内容

Intent intent = new Intent(context, ZHSplashActivity.class);
    PendingIntent pIntent = PendingIntent.getActivity(context, (int) System.currentTimeMillis(), intent, 0);
    Notification n  = new Notification.Builder(context)
            .setContentTitle(context.getResources().getString(R.string.app_name))
            .setContentText(message)
            .setSmallIcon(R.drawable.app_icon)
            .setContentIntent(pIntent)
            .setAutoCancel(true).build();

    NotificationManager notificationManager =
            (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);

    notificationManager.notify(0, n);

是因为它处于调试模式而没有发布吗?如果自定义,请显示推送接收器代码