How to create a new intent for another application broadcast receiver?

In the examples, they create an Intent as:

Intent intent = new Intent(this, AlarmReceiver.class);

But suppose my AlarmReceiver class is in another application, how do I create this intent?

I tried with

new Intent("com.app.AlarmReceiver")

but nothing happens .. It was not called ..

Any idea?

- Advanced definition added using manifest editor on Eclipse:

<receiver android:name="AlarmReceiver"></receiver>
</application>

- Related Page:
How do I launch an application from another application? (but the same code does not work for translations ..)

+3
source share
1 answer

But I suppose my AlarmReceiver class is in another application, how do I create this intent?

, <intent-filter> <receiver>, Intent .

, , , Intent.

+4

Source: https://habr.com/ru/post/1756210/


All Articles