View Single Post
Old 07-03-2020, 06:20 AM   #4
pazos
cosiņeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,406
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
Yup, you're confusing a few things.

When you use the "share text" button or the dictionary lookup you're opening other activities. These activities did enable certain filters to let other activities notice they can do things with them (like share, process text or open a document).

That's why when you click "share text" you'll be prompted with activities that can handle text sharing (from Whatsapp to Twitter, note taking apps, dictionaries... whatever)

All activities have their own UI, because that's what they are (see https://developer.android.com/guide/...tro-activities)

What you want needs an application that provides a service, not an activity. That service needs to be available for other activities. If you find an offline translator that provides an service that can be bounded by 3rd party apps (using AIDL, for instance) then we can use its API like we use the API of google translate.
pazos is offline   Reply With Quote