Receiving Intents by App Factory App?

115 views
Skip to first unread message

whitedavidp

unread,
Jun 7, 2020, 3:04:50 PM6/7/20
to Tasker
Is this possible? I don't see why not but I am no expect and I am having no success.

I have enabled  this profile:

Profile: Leash_Leash_Intent_Profile (183)
    Restore: no
    Event: Intent Received [ Action:com.whitedavidp.bluetooth_leash.LEASH Cat:None Cat:None Scheme:* Mime Type:* ]
    Enter: Leash Intent Receiver (182)
    A1: Flash [ Text:Intent received: action=%evtprm1, data=%intent_data Long:Off ] If [ %Leash_Debug Set ]
 
I have then built the app with App Factory, installed it, etc. I then use this Task from Tasker to send the intent as a test:

Leash Test (260)
    A1: Send Intent [ Action:com.whitedavidp.bluetooth_leash.LEASH Cat:None Mime Type: Data:none Extra: Extra: Extra: Package:com.whitedavidp.bluetooth_leash Class: Target:Broadcast Receiver ]    

But I find no joy. I have used Tasker to send/get lots of intents over the years but I am getting old and maybe missing something obvious. It also may not work in App Factory for some reason I do not understand. Can anyone enlighten me?

Thanks

whitedavidp

unread,
Jun 7, 2020, 3:10:30 PM6/7/20
to Tasker
I should further point out that as I am rooted, I can run the command dumpsys package com.whitedavidp.bluetooth_leash and when I peruse the results I see information of broadcast receivers. But I do not see anything mentioning the action I have specified.

whitedavidp

unread,
Jun 7, 2020, 3:21:13 PM6/7/20
to Tasker
And I have looked into my App Facotry app's manifest and see nothing. I presume from here, where it says

"It's not (easily) possible to determine which intents an app listens for dynamically (i.e. while the app is running)"

that almost all intent received profiles end up registering for broadcasts dynamically.

A few lines down from the above line I see under limitations:

"intents which are broadcast with a specification of a particular package component to receive it cannot be received."

So maybe that is part of the issue?

Thanks for your help!

Jimmy Jimmy

unread,
Jun 7, 2020, 10:37:39 PM6/7/20
to Tasker
Could the global variable be the issue? It is probably NOT set in your kid app.

If [ %Leash_Debug Set ]

 

whitedavidp

unread,
Jun 7, 2020, 10:42:54 PM6/7/20
to Tasker
Thanks for the time and comment. But that isn't the problem. Cheers

Jimmy Jimmy

unread,
Jun 8, 2020, 3:31:07 AM6/8/20
to Tasker
Does it not flash at all? Or doesn't flash with the right data? I have a very similar profile and it works fine.

whitedavidp

unread,
Jun 8, 2020, 12:19:55 PM6/8/20
to Tasker
I finally figured this out! The run log was never showing the intent received profile being invoked. It turns out that I was sending (or trying to send) a string using the data field. If I simply removed that, the intent got received and my task got run. The data I was trying to send was a simple string ("none"). So I am thinking that something caused Tasker's intent receipt and processing code to have problems.

Now, I know it says here about the data field, "The main data specification in the form of a URI." And my simple string may NOT qualify as being in the form of a URI. So perhaps a call to Uri.parse() faults if that is what Tasker is using. But even though this might not be in the form of a URI, I am also using Tasker's Send Intent to start my app (launch its main activity) and pass the same string using the data field. In this case, there is no action value, only package (com.whitedavidp.bluetooth_leash), class (net.dinglisch.android.taskerm.Kid), and target (activity) along with the data field ("none"). And this appears to pass muster without problem with the data ending up in my %launch_data as I hoped. So I wonder what's up?

Anyhow, I have moved the "none" from the data to an extra in my send intent and all is working.

Thanks to all.

Jimmy Jimmy

unread,
Jun 8, 2020, 9:29:36 PM6/8/20
to Tasker
Yes, extra in the form 'variable_name:content'. Glad you found it!
Reply all
Reply to author
Forward
0 new messages