How to pass an intent to my App without drawing the Activity? - android

I'm implementing a simple App that can receive 'share's from the YouTube App and simply sends it to a server.
I'm able to pass the Intent to a ShareActivity I've implemented, but every time I share a video from YouTube, it opens the ShareActivity.
Since the user doesn't need to interact with the App while sharing, I'd like to remove this phase entirely. That is, I'd like to receive the Intent from Youtube and process it in the background without any hassle to the user.
I'm thinking of creating an IntentService that can handle such incoming Intents, but I'm not sure how to proceed. (Is this the right way to achieve this? If so, from where should I start the IntentService?, Will it be able to receive Intents if the user kills my app?)
I can't seem to find any resources on the Internet regarding this. Any help is appreciated.
Edit: Okay, This is a minimal, not-working example. I hope this can help you guys guide me better. Cause I'm stuck.
Android Manifest File
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.blumonkey.versatyl">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name=".ShareService"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:host="www.youtube.com" android:mimeType="text/*" />
</intent-filter>
</service>
</application>
MainActivity.java
package com.blumonkey.versatyl;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent msgIntent = new Intent(this, ShareService.class);
startService(msgIntent);
}
}
ShareService.java
package com.blumonkey.versatyl;
import android.app.IntentService;
import android.content.Intent;
import android.util.Log;
/**
* An {#link IntentService} subclass for handling asynchronous task requests in
* a service on a separate handler thread.
* <p>
* TODO: Customize class - update intent actions and extra parameters.
*/
public class ShareService extends IntentService {
public ShareService() {
super("ShareService");
}
#Override
protected void onHandleIntent(Intent intent) {
Log.d("Msg:", "Got Intent!");
}
}
The only message that I see in the Log is when the MainActivity sends the Intent to the service to start it.

IntentService would be fine, or even a regular Service if you will need to use resources for long period of time - you just need to add an IntentFilter with the proper filter options to the service in the manifest.
The Android docs explain it for both Activities and Services:
https://developer.android.com/guide/components/intents-filters.html
Sometimes an Intent is designed to be handled by an Activity so just be cautious about that.
And this is the correct way to "wake up" your app if a user "kills" it. An Intent that your app is designed to handle will receive it. However, sometimes users can set preferred apps to handled certain Intents, in which case you do not have control over what happens.

Related

Android App to start automatically on Boot Up

I am trying to get my Android app to start automatically on boot up.
I have followed various examples and copied the code, but still, when I power up, the app does NOT start.
I am using a Galaxy Tab A7 Lite, running Android 11.
Any help gladly received.
Thank you.
Here is my code...
I have defined the receiver:
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
public class StartOnBootupReceiver extends BroadcastReceiver {
#Override
public void onReceive(Context context, Intent intent) {
if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
Intent activityIntent = new Intent(context, MainActivity.class);
context.startActivity(activityIntent);
}
}
}
And in the AndroidManifest.xml file:
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
and
<receiver android:name=".StartOnBootupReceiver"
android:exported="false"
>
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action..QUICKBOOT_POWERON" />
</intent-filter>
</receiver>
Your code looks good and your receiver is most likely executing. However, it is crashing because of the call to startActivity(). Since Android 10, startActivity() can only be called if the application is already in the Foreground or if it meets one of the listed exceptions listed in the Android guide Restrictions on starting activities from the background.
As an aside, the value of the android:exported has no effect. The OS can still call receivers who have android:exported="false" and, in the case of exported="true", other application cannot send a broadcast with BOOT_COMPLETED or QUICKBOOT_COMPLETED because they are protected intent actions.
All your code is correct. However, if you look up android:exported="false" meaning you will find that:
The "exported" attribute describes whether or not someone else can be allowed to use it. So if you have "exported=false" on an Activity, no other app, or even the Android system itself, can launch it. Only you can do that, from inside your own application.
In your <receiver> statment, the android:exported="false" needs to be true.
That info borrowed from here and here.

Android: Boot Complete only works if I launch App Immediately

I'm trying to reset alarms in my app and using a receiver to get onBootCompleted. To see if the intent was received, I'm using a toast. The toast only appears if I immediately open the app. Otherwise, the toast does not appear. I looked at previous questions but almost all of them involve services, which I am not using. I am not sure if that is a part of the problem.
Android Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="internalOnly"
package="package.name" >
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:configChanges="orientation|screenSize|keyboardHidden"
android:name=".MainActivity"
android:label="#string/app_name"
android:launchMode="singleTop" >
<meta-data android:name="android.app.searchable"
android:resource="#xml/searchable" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
</activity>
<receiver android:name=".AlarmReceiver" >
<intent-filter>
<action android:name="android.intent.action.ALARM_SERVICE" />
</intent-filter>
</receiver>
<receiver android:name=".AlarmReset"android:enabled="true" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
</application>
Receiver Class
public class AlarmReset extends BroadcastReceiver {
#Override
public void onReceive(Context context, Intent intent)
{
Toast.makeText(context, "Hello! Got message",
Toast.LENGTH_LONG).show();
//reset alarms etc. No service set.
}
I also tried writing the manifest receiver as
<receiver android:name=".AlarmReset" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
Key points I found online were to include permissions (which I did) and to watch out for logging.
What I do not understand is why it works if I immediately (within a few seconds, otherwise the toast does not appear) start my activity but is unsuccessful otherwise. I am considering testing a few possibilities like launching the activity itself through code or using a service like most others have. I am currently testing on Android 4.4 on an actual phone.
When an app is installed, it is in a stopped state. None of its components will be activated (such as your BOOT_COMPLETED receiver) until the app is moved out of this state by being launched by the user. This is why your app doesn't work unless you launch it once.
Note that force stopping the app from Settings also moves it into this stopped state.
See this page for more details (search the page for "launch controls").
Starting with Android 3.1 all applications, upon installation, are placed in a "stopped" state.(This is the same state that the application ends up in after the user force-stops the app from the Settings application.)
While in "stopped" state, the application will not run for any reason, except by a manual launch of an activity. (Meaning no BroadcastReceviers(ACTION_PACKAGE_INSTALLED, BOOT_COMPLETED etc.) will be invoked, regardless of the event for which they have registered, until the user runs the app manually.)
But you can start a serivice for ex-
1) In your element:
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
2) In your element (be sure to use a fully-qualified [or relative] class name for your BroadcastReceiver):
<receiver android:name="com.example.MyBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
In MyBroadcastReceiver.java:
package com.example;
public class MyBroadcastReceiver extends BroadcastReceiver {
#Override
public void onReceive(Context context, Intent intent) {
Intent startServiceIntent = new Intent(context, MyService.class);
context.startService(startServiceIntent);
}
}
I feel the need to clarify the issue and solution, since the question was not clear (due to confidentiality issues).
The Basic Solution to my problem was just starting a service.
The Problem: I was trying to make the alarm in my class, AlarmReset, through AlarmManager. That in itself may have been an issue, but in addition, I tried to access objects that were instantiated in the MainActivity, furthering my dilemma. The reason why it worked when I opened MainActivity quickly enough, I suspect, is because I was able to instantiate the objects and set up the prerequisites for the class to directly access. I think the toast not appearing is similar to the issue.
The Solution: I set up a service class which I directed AlarmReset to. This is what I changed the AlarmReset class to:
public class AlarmReset extends BroadcastReceiver {
#Override
public void onReceive(Context context, Intent intent)
{
Toast.makeText(context, "Hello! Got message",
Toast.LENGTH_LONG).show();
//Pretty sure the Toast doesn't appear still.
Intent service = new Intent(context, Service.class);
context.startService(service);
}
Then my service class
public class Service extends IntentService {
private DataBaseManager database;
public Service()
{
super("Service");
}
#Override
protected void onHandleIntent(Intent intent)
{
database = new DataBaseManager(this);
Toast.makeText(this, "Hi",
Toast.LENGTH_LONG).show();
Toast.makeText(this, "Hello! Got message",
Toast.LENGTH_LONG).show();
//rest of code
}
Similarly, the text does not appear except if I am on the app immediately (I suspect it has to do with the threads).
Here, I made sure to instantiate my objects before using them (or did so after crashing).
A few possible problems that others may encounter (as I have read) are the following:
Installing in internal storage
android:installLocation="internalOnly"
and receiving permission for booting
<uses-permission
android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
Some problems that people had suggested and were not very important were:
Using android:enabled and android:exported. Default values are fine
Writing the full receiver name. For me it wasn't necessary
<action android:name="android.intent.action.QUICKBOOT_POWERON" /> did not seem to do much.

Android App with Broadcast receiver after reboot as main

Hello i would to develop a simple app without Main Activity as launcher.
I want to register a broadcast receiver which starts after reboot of device and inside OnReceive callback starts an Activity
Here my manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="it.examples"
android:versionCode="1"
android:versionName="1.0"
>
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="18" />
<application android:label="#string/app_name" android:icon="#drawable/ic_launcher">
<receiver android:name=".AfterRebootBR" android:exported="false"
android:label="Boot Notification Receiver" android:enabled="true"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<activity android:name=".MainActivity"
android:label="#string/app_name">
</activity>
</application>
</manifest>
And here my Broadcast receiver
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package it.examples;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
public class AfterRebootBR extends BroadcastReceiver {
#Override
public void onReceive(Context context, Intent intent) {
Log.d("AfterRebootBR","***************** ON RECEIVE *********************");
Log.e("AfterRebootBR","***************** ON RECEIVE *********************");
Intent i = new Intent(context, MainActivity.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
}
}
And finally the MainActivity
package it.examples;
import android.app.Activity;
import android.os.Bundle;
public class MainActivity extends Activity
{
/** Called when the activity is first created. */
#Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
What is wrong in my code?
Thanks in advance
Francesco
my code is working..here is it...
in manifest
<receiver
android:name="com.calender.calenderevent.Reboot_Reciever"
android:enabled="true"
android:exported="true"
android:label="BootReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" >
</action>
</intent-filter>
</receiver>
I cant see anything wrong with your code, however i have something worth to try.
Move the permission out of the application tag :
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
If its not working, simplify the receiver :
<receiver android:name=".AfterRebootBR">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
Still not working? Try to add some delay, as mentioned here :
Timer timer = new Timer();
timer.schedule(new TimerTask() {
#Override
public void run() {
//run your service
}
}, 10000);
Quoted from the link above :
While, I suggestion to delay several seconds, e.g., 10 seconds, before
running the (1) line, which is more stable for different phones and
services.
For example, in my case, my service is going to write sd card. If you
start your service immediately, some phones may fail because the sd
card is not ready.
Starting with android 3.1 you cannot have a broadcast receiver to get spawned by the application service manager if it has no context in active state (aka. at least an activity or service that is keeping the process in an "active state")
Excerpt from specification
Note that the system adds FLAG_EXCLUDE_STOPPED_PACKAGES to all broadcast intents.
It does this to prevent broadcasts from background services from inadvertently or
unnecessarily launching components of stoppped applications. A background service or
application can override this behavior by adding the FLAG_INCLUDE_STOPPED_PACKAGES
flag to broadcast intents that should be allowed to activate stopped applications.
Applications are in a stopped state when they are first installed but are not yet
launched and when they are manually stopped by the user (in Manage Applications).
You need to somehow start your application, and then send it in a dormant state (but registered in the app manager). You can use a service for this.
It is strongly NOT recommended to start Activity from BroadcastReciever:
https://developer.android.com/training/run-background-service/report-status.html#ReceiveStatus
Never start an Activity in response to an incoming broadcast Intent.
In my case PackageManager.DONT_KILL_APP helped:
https://developer.android.com/training/scheduling/alarms.html#boot
ComponentName receiver = new ComponentName(context, SampleBootReceiver.class);
PackageManager pm = context.getPackageManager();
pm.setComponentEnabledSetting(receiver,
PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
PackageManager.DONT_KILL_APP);
I've experimented with MIUI 8 firmware real device Xiaomi Redmi Note 3.
My findings are:
you have to add app to autorun to enable it be fired by broadcast. I've checked it with such serious apps as Viber, WhatsApp.
I've compared with manifest settings (without enabling reciever programmatically):
<receiver
android:name=".activities.broadcastrecievers.CallReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
</intent-filter>

Start application without activity, my Broadcast Receiver not work

In my app, I have a Broadcast Receiver for catching the message sent to my phone
<receiver
android:name="com.qmobile.ows.SMS_Receiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
If I start app with activity GUI, the BroadCast Receiver works normally.
I want to start my application without activity and do not show icon app, so I remove this code below from my activity
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
And after that, Broadcast Receiver do not work.
Please help me solve this problem.
This is because Android OS does not allow BroadcastReceiver to receive some important broadcast(android.provider.Telephony.SMS_RECEIVED must be one of it) if the appĀ“s process is not alive.It was designed to against the evil apps. If you have an activity running,your process is alive and so your receiver is allowed to receive the broadcast.
I think you can make a transparent activity and use startService to start a service in background,then finish the activity.As your service is running ,your process is alive,so the Android OS will let you to receive the broadcast.
For Android 3.1 and higher,
You have to launch one of your activities before any manifest-registered BroadcastReceiver will work.
See developer docs specifically the section -
Launch controls on stopped applications for android-3.1
If you are testing Broadcast receiver without an Activity then you should edit your run configuration.
When the Edit configuration dialog appears, select the Do not launch Activity option so that the activity is installed but not launched and click on the Run button
This will launch the application without activity.
This could help you:
Creating and Sending the Broadcast Intent
Having created the framework for the SendBroadcast application, it is now time to implement the code to send the broadcast intent. This involves implementing the broadcastIntent() method specified previously as the onClick target of the Button view in the user interface. Locate and double click on the SendBroadcastActivity.java file and modify it to add the code to create and send the broadcast intent. Once modified, the source code for this class should read as follows:
package com.ebookfrenzy.sendbroadcast;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.content.Intent;
import android.view.View;
public class SendBroadcastActivity extends ActionBarActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_send_broadcast);
}
public void broadcastIntent(View view)
{
Intent intent = new Intent();
intent.setAction("com.ebookfrenzy.sendbroadcast");
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
sendBroadcast(intent);
}
.
.
.
}
Creating the Broadcast Receiver
In order to create the broadcast receiver, a new class needs to be created which subclasses the BroadcastReceiver superclass. Create a new project with the application name set to BroadcastReceiver and the company domain name set to com.ebookfrenzy, this time selecting the Add No Activity option before clicking on Finish.
Within the Project tool window, navigate to app -> java and right click on the package name. From the resulting menu, select the New -> Other -> Broadcast Receiver menu option, name the class MyReceiver and make sure the Exported and Enabled options are selected.
Once created, Android Studio will automatically load the new MyReceiver.java class file into the editor where it should read as follows:
package com.ebookfrenzy.broadcastreceiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
public class MyReceiver extends BroadcastReceiver {
public MyReceiver() {
}
#Override
public void onReceive(Context context, Intent intent) {
// TODO: This method is called when the BroadcastReceiver is receiving
// an Intent broadcast.
throw new UnsupportedOperationException("Not yet implemented");
}
}
As can be seen in the code, Android Studio has generated a template for the new class and generated a stub for the onReceive() method. A number of changes now need to be made to the class to implement the required behavior. Remaining in the MyReceiver.java file, therefore, modify the code so that it reads as follows:
package com.ebookfrenzy.broadcastreceiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;
public class MyReceiver extends BroadcastReceiver {
public MyReceiver() {
}
#Override
public void onReceive(Context context, Intent intent) {
Toast.makeText(context, "Broadcast Intent Detected.",
Toast.LENGTH_LONG).show();
}
}
The code for the broadcast receiver is now complete.
Configuring a Broadcast Receiver in the Manifest File
In common with other Android projects, BroadcastReceiver has associated with it a manifest file named AndroidManifest.xml.
This file needs to publicize the presence of the broadcast receiver and must include an intent filter to specify the broadcast intents in which the receiver is interested. When the BroadcastReceiver class was created in the previous section, Android Studio automatically added a <receiver> element to the manifest file. All that remains, therefore, is to add an <intent-filter> element within the <receiver> declaration appropriately configured for the custom action string:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ebookfrenzy.broadcastreceiver.broadcastreceiver" >
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<receiver
android:name=".MyReceiver"
android:enabled="true"
android:exported="true" >
<intent-filter>
<action
android:name="com.ebookfrenzy.sendbroadcast" >
</action>
</intent-filter>
</receiver>
</application>
</manifest>
With the manifest file completed, the broadcast example is ready to be tested.
add DEFAULT category in your intent filter
<category android:name="android.intent.category.DEFAULT" />
Ok. Here's what worked for me. I created a launcher activity. Removed the call to setContentView(R.layout.activity_main)
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.activity_main);
finish();
}

Reading a QR-Code with URI -> BroadcastReceiver ignored, while Activity works fine

I'm trying to receive a simple custom intent, based on my wn URI.
Here is my manifest:
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.intenttest.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver
android:name="com.example.intenttest.TestReceive"
android:enabled="true"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="testo" />
</intent-filter>
</receiver>
</application>
My receiver is extremely simple:
public class TestReceive extends BroadcastReceiver {
#Override
public void onReceive(Context context, Intent arg1) {
Log.d("", "YAY!!!!!");
Toast.makeText(context, "TEST!!!", Toast.LENGTH_LONG).show();
}
}
When I try browsing to testo://blahblah, or fir this intent via URI Launer my receiver is not being fired.
Here is the code to simulate firing the intent from a different app:
String url = "testo://test/test";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
sendBroadcast( i );
But when I move the <intent-filer> block to the <activity> tag in the manifest, the activity IS being fired.
How can I make my receiver receive the intent?
If you are trying to dynamically register a receiver you should do so programmatically. This example by Eric Nordvik will server you well!
Now, the main reason to do it this way is because it is straight forward. The downside is that you won't be able to receive broadcasts when your application's lifecycle is not currently active (paused, stopped).
Update: As read in the comments, the OP requires to receive broadcasts independent of the lifecycle of the activity. I would urge anyone to rethink his design and only then decide if it is really needed.
As specified by the official documentation, android:name is used to designate the name of the class that implements the BroadcastReceiver. Omitting it in your code means that the Activity itself will receive the broadcast. I believe your issue is that you did not fully qualify it by android:name but referred to it as name. Fixing it should also fix your problem!
Update: The OP has since corrected a typo and this is not the issue. At this point, my best guess is either that the broadcast is generated wrongly or that the reference to the BroadcastReceiver should use the shorthand notation android:name=".NameOfReceiverClass".
OK - This whole issue was probably caused by me taking the wrong approach.
The sample code for sending the intent DOES work and does initiate my receiver.
So it appears that most QR Readers in the market do not fire an intent with the QR-read URI, as in my sample code, but rather look for an Activity that should respond to it and then call it directly.
I have no idea why is this the case.
The solution was to create a silent Activity, that handles what the BroadcastReceiver was supposed to handle.
Oy vey.

Categories

Resources