Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved How to check for open interface?

Joined
Dec 24, 2018
Messages
29
Let's say I wanted to detect this interface.

29da7be76ca5a07481174fef46c8e5ac.png


This is what I tried:

interface = Interfaces.newQuery().texts("Congratulations").results().first();

But it just returns null, while being logged in with the above interface visible. What am I doing wrong here? Do ChatboxInterfaces use a different class?
 
Community Manager
Joined
Apr 7, 2015
Messages
1,398
You'd have to get the full text for the component if you want to use .texts, try using .textContains instead.
Also you should get the type of component for speed/efficiency with your querys.
 
Joined
Dec 24, 2018
Messages
29
You'd have to get the full text for the component if you want to use .texts, try using .textContains instead.
Also you should get the type of component for speed/efficiency with your querys.

Thanks! Works perfectly.
 
Joined
Jun 9, 2015
Messages
3,735
If you're specifically looking for that interface, you can use:
Code:
ChatDialog.getContinue()
ChatDialog

If not, you can do what the others suggested.
 
Last edited:
Community Manager
Joined
Apr 7, 2015
Messages
1,398
This is literally:
Code:
ChatDialog.getContinue()
ChatDialog

Come one guys.
He said in his first post, "Let's say I wanted to detect this interface.". So I was pretty sure this was a question about interfaces in general, not just ChatDialog.
 
The Omen
Joined
Dec 27, 2018
Messages
159
I can think of two reasons as to why you are looking to detect this interface.

1) If your intention is to notify the user of a level up and extra the information from that notification then you should look at querying via the Interfaces api. By doing a new query with the interface container, type, and actions (if appropriate), you can extra the exact component you wish to find.

2) If you're interested in finding this interface so that you can continue skilling, your best bet is to use the ChatDialog api, more specifically the ChatDialog#getContinue method. This returns the component that can be interacted with in order progress through the dialog by calling ChatDialog.Continue#select on it.
 
Joined
May 24, 2016
Messages
1,113
I can think of two reasons as to why you are looking to detect this interface.

1) If your intention is to notify the user of a level up and extra the information from that notification then you should look at querying via the Interfaces api. By doing a new query with the interface container, type, and actions (if appropriate), you can extra the exact component you wish to find.

2) If you're interested in finding this interface so that you can continue skilling, your best bet is to use the ChatDialog api, more specifically the ChatDialog#getContinue method. This returns the component that can be interacted with in order progress through the dialog by calling ChatDialog.Continue#select on it.

MVP.
 
Joined
Dec 24, 2018
Messages
29
If you're specifically looking for that interface, you can use:
Code:
ChatDialog.getContinue()
ChatDialog

If not, you can do what the others suggested.

Not specifically, but this is really helpful as well! Thank you.
ChatDialog.getContinue() returns a Continue object, I assume you can cast this to InterfaceComponent? It doesn't help that there isn't much explanation in the API.
 
He said in his first post, "Let's say I wanted to detect this interface.". So I was pretty sure this was a question about interfaces in general, not just ChatDialog.

It was a question in general, but his suggestion is still very welcome.
 
I can think of two reasons as to why you are looking to detect this interface.

1) If your intention is to notify the user of a level up and extra the information from that notification then you should look at querying via the Interfaces api. By doing a new query with the interface container, type, and actions (if appropriate), you can extra the exact component you wish to find.

2) If you're interested in finding this interface so that you can continue skilling, your best bet is to use the ChatDialog api, more specifically the ChatDialog#getContinue method. This returns the component that can be interacted with in order progress through the dialog by calling ChatDialog.Continue#select on it.

I was mostly just wondering what I was doing wrong with my interfaces query, but yeah the goal was to continue skilling after leveling up. This is great to know! Thanks for the explanation.
 
Top