我想在 android studio 中收到的新电子邮件上显示简单的祝酒词……我正在使用 Receiver,但它没有被解雇……
<receiver
android:name=".MyReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.PROVIDER_CHANGED"/>
<data android:scheme="content"/>
</intent-filter>
</receiver>
在接收器中
@Override
public void onReceive(Context context, Intent intent) {
Toast.makeText(context, "Mail received ", Toast.LENGTH_SHORT).show();
Log.i("mail","mail received");
context.startActivity(new Intent(context,BottemNavigationActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
}