Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can an IME (soft keyboard) get the name of the app using it?

Tags:

android

Can an IME get the name of the app using it? (assuming it has the right permissions)

Thanks in advance, Barry

like image 877
Barry Fruitman Avatar asked Jan 19 '23 15:01

Barry Fruitman


2 Answers

Answering my own question again! :)

The EditorInfo passed to InputMethodService.onStartInput() and onStartInputView() contains the member EditorInfo.packageName which contains the name of the calling app's package.

like image 91
Barry Fruitman Avatar answered Jan 30 '23 12:01

Barry Fruitman


Try getCurrentInputEditorInfo().packageName

In add to your question and answer can you know how get current name Activity and name of field?

like image 26
Tapa Save Avatar answered Jan 30 '23 14:01

Tapa Save