文字列配列をAlarmReceiver.classからNotify.classに渡す必要がありますが、文字列は常に「null」です。さて、AlarmReceiver内のインテントに関する問題はありますか?
public class AlarmReceiver extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) {
[...]
Intent notificationIntent = new Intent("com.example.myapp", null, context, Notify.class);
notificationIntent.putExtra("notify", not1[x]);
PendingIntent contentIntent = PendingIntent.getActivity(context, 0, notificationIntent, 0);
クラスに通知:
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
Intent notificationIntent = getIntent();
String[] message = notificationIntent.getStringArrayExtra("notify");
Toast toast6=Toast.makeText(this,""+message,Toast.LENGTH_LONG);
toast6.show();