Meaning of a word

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
Rafi4
Posts: 281
Joined: 01 Dec 2017 05:23

Meaning of a word

Post by Rafi4 » 15 Apr 2020 23:49

Hi
Is there any way to know the meaning of a word for example " amazing " using http request action

https://translate.google.co.in/#view=ho ... xt=amazing

from record4
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1

BoBo
Posts: 129
Joined: 05 May 2014 12:45

Re: Meaning of a word

Post by BoBo » 16 Apr 2020 05:49

Maybe that helps: viewtopic.php?f=5&t=2831
అదృష్టం! :)

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Meaning of a word

Post by Desmanto » 19 Apr 2020 15:25

To translate using http request to google translate url, require API Key. If you try to view source in Chrome, that translate page doesn't give you anything close to the wording you want. Trying the chrome developer, seems to blocked by some certain mechanism. So they really protect their API right now. Maybe If we can figure out how to use the API key by the regular opening translate site, we can use that in the API.

The other way to do it is to use Google translate app, via Start Activity. The new one use process text.

Start Activity
Action : android.intent.action.PROCESS_TEXT
Data MIME type : text/plain
Explicit Component : checked
Package name : com.google.android.apps.translate
Class name : (leave blank)
Extras :

Code: Select all

putString("android.intent.extra.PROCESS_TEXT", "amazing")
You can get the translation part by using Control UI

Code: Select all

sleep(2000);
translated = getTextByIdAndIndex("com.google.android.apps.translate:id/copydrop_edit_text", 1);
You need to configure your google translate app to the language you want first. Or you can use control UI to set it later.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply