Speak Text of TrueCaller Caller Name

jhl

New member
Hello :)
I'm new to this app and this forum, so if you can help me I would very much appreciate it!

I'm trying to make a macro that will "speak text" of "incoming calls from non contact number", but it will speak the TrueCaller name, not the number.
So I'm trying to use "send intent" and I'm stuck on this stage.
All I know is "package name: com.truecaller"
and maybe: "com.truecaller.tagger.NameSuggestionActivity" (used APK analyzer)

Screenshot_20210306-060522.jpg

How do I manage to make MacroDroid get the information from TrueCaller and speak it?

Once you receive a call while you have TrueCaller installed you will have a widget (a floating window, a popup) with all the information of that contact, such as name, country, phone number, cellular company, and last call.
Screenshot_20210306-060901.jpg

I wish to extract only the name and make MacroDroid speak it.

So in this case I want it to speak "Y" when I receive a call from this unsaved contact.
 

FrameXX

Well-known member
I really don't know how you are going to get caller name with just intent.

com.truecaller.tagger.NameSuggestionActivity is propably class

If true caller shows notification on incoming call, that contains that name you could be able to extract it from there.
 

jhl

New member
I really don't know how you are going to get caller name with just intent.

com.truecaller.tagger.NameSuggestionActivity is propably class

If true caller shows notification on incoming call, that contains that name you could be able to extract it from there.
TrueCaller does have a notification.
How do I extract it from the notification?
But there is no way to extract it from pop up?
 

FrameXX

Well-known member
TrueCaller does have a notification.
How do I extract it from the notification?
But there is no way to extract it from pop up?
Could you please make a screenshot of that notification?
You need to extract notification title or text (depending on where the caller name is located) and then use regex to extract only that name.

I can make it for you, but I need to see how that notification looks like.

Extract from pop up would be able only with screen unlocked while someone's calling, you would need a plugin, and it would probably be far less reliable.
 
  • Like
Reactions: jhl

jhl

New member
Could you please make a screenshot of that notification?
You need to extract notification title or text (depending on where the caller name is located) and then use regex to extract only that name.

I can make it for you, but I need to see how that notification looks like.

Extract from pop up would be able only with screen unlocked while someone's calling, you would need a plugin, and it would probably be far less reliable.
1615034904791.png

Let's try to extract it using the notification for now and if it's working perfectly even with screen locked it will be fantastic!

Thank you for eveything so far!
 

FrameXX

Well-known member
View attachment 102

Let's try to extract it using the notification for now and if it's working perfectly even with screen locked it will be fantastic!

Thank you for eveything so far!


Tell me if it works

Regex was essentially not needed to use, but now you can even more edit sentence to speak aloud.

If link not working, just look into latest uploaded templates. It should be there.
 
Last edited:

jhl

New member

Tell me if it works

Regex was essentially not needed to use, but now you can even more edit sentence to speak aloud.

If link not working, just look into latest uploaded templates. It should be there.
Ok, so after some testing there's one problem, the notification ("Call from X") only appears when it's someone in your contacts.
Meaning - The macro only works if this is someone from your contacts.
NOT GOOD.
So - We will have to extract the name that appears on the pop-up (as the screenshot from the first post shows), and the pop-up always shows, even when the screen is locked.
Can you guide me on how to do that?

And again - thank you for everything so far!
 

FrameXX

Well-known member
Ok, so after some testing there's one problem, the notification ("Call from X") only appears when it's someone in your contacts.
Meaning - The macro only works if this is someone from your contacts.
NOT GOOD.
So - We will have to extract the name that appears on the pop-up (as the screenshot from the first post shows), and the pop-up always shows, even when the screen is locked.
Can you guide me on how to do that?

And again - thank you for everything so far!

But if someone is calling and it's not your contact, there is no name. So what you want to read aloud? Caller number? I doubt that you remember phone numbers.
 

jhl

New member
But if someone is calling and it's not your contact, there is no name. So what you want to read aloud? Caller number? I doubt that you remember phone numbers.
Let me explain the app behavior.

Contact is calling me = a notification + pop-up will appear.
Non-contact is calling me = Only a pop-up will appear.
So a pop-up is a more reliable way to extract the name.
A pop-up will appear even when the screen is locked.

On that pop-up, there's a name defined by either the caller itself (if installed truecaller on his phone) or by other people that suggest a name for that caller.
So if for example a non-contact is calling me and there's a name of a business named "telecom" (a name suggested by others), I want it to read aloud the name "telecom".

So, to reply to this: "But if someone is calling and it's not your contact, there is no name",
in most cases, there IS a name.
And if there is NO name we can edit it on regex to exclude numbers and only include letters.

How do I extract the name of that pop-up?
You said I would need a plugin?
There is no way to extract it using send intent or MacroDroid other functions?
Either way - Let's continue, please?
 

Pseudocyclic

Well-known member
Try this app:


I have never used it (I copied the screenshot from the Play Store) but it may be that it can help you by converting the pop-ups to notifications.
 

Attachments

  • Screenshot_20210307-140305_Google Play Store.jpg
    Screenshot_20210307-140305_Google Play Store.jpg
    308.4 KB · Views: 7

jhl

New member
Try this app:


I have never used it (I copied the screenshot from the Play Store) but it may be that it can help you by converting the pop-ups to notifications.
1615126202096.png

As per your suggestion I tried it.
I gave it all permissions, it seems like it doesn't work.
There's no notification, no toast, nothing changed.
 

FrameXX

Well-known member
View attachment 110

As per your suggestion I tried it.
I gave it all permissions, it seems like it doesn't work.
There's no notification, no toast, nothing changed.

Problem is that TrueCaller is not showing toast message but whole window/activity.

Plugin I was talking about was TouchTask. You can use "screen update" trigger and use some text that is contained same in every window of that "incoming call" pop up.

I have no clue if this is going to work, since text in that pop up could be unreadable for TouchTask if it use custom canvas.

On the end TouchTask can detect it, read screen and trigger macro only if screen is on.
 
  • Like
Reactions: jhl

jhl

New member
Problem is that TrueCaller is not showing toast message but whole window/activity.

Plugin I was talking about was TouchTask. You can use "screen update" trigger and use some text that is contained same in every window of that "incoming call" pop up.

I have no clue if this is going to work, since text in that pop up could be unreadable for TouchTask if it use custom canvas.

On the end TouchTask can detect it, read screen and trigger macro only if screen is on.
I guess it doesn't work too.
I gave it all the permissions it needed, I enabled the accessibility and it doesn't seem to work.
1615127789419.png
 

jhl

New member
Add Trigger

Applications > Tasker/Locale Plugin > TouchTask > Screen update
Do you mean to enable "screen update" on "TouchTask"? I did enable it, you can see on the screenshot I added on post #14.
But I did not notice any change on the phone, no notification or toast or something, feedback that it's working.
 

FrameXX

Well-known member
Could you please try attached macro and tell me if it works for unknown calls for you?

Sorry I can't attach file.
Use THIS link.
 
  • Like
Reactions: jhl
Top