title: Insert images/sticker/gif in Edittext in android from custom keyboard/google keyboard
body: <p>I tried to insert emoji using keyboard like Google keyboard <code>Gboard</code> to my <code>edittext</code> but it shows toast <code>This text field does not support GIF insertion from the keyboard</code>.</p>
  
  <p><a href="https://i.stack.imgur.com/h0OpZ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/h0OpZ.png" alt="enter image description here"></a></p>
  
  <p>There are couple of question regarding the same but don't have proper answer,. I read the <a href="https://developer.android.com/guide/topics/text/image-keyboard#how_it_works" rel="noreferrer">documentation reference given</a>, but not given the implementation.I tried this but it is not triggering <code>onCommitContent</code> -</p>
  
  <pre><code>EditText editText = new EditText(this) {
      @Override
      public InputConnection onCreateInputConnection(EditorInfo editorInfo) {
          final InputConnection ic = super.onCreateInputConnection(editorInfo);
  
          final InputConnectionCompat.OnCommitContentListener callback =
              new InputConnectionCompat.OnCommitContentListener() {
                  @Override
                  public boolean onCommitContent(InputContentInfoCompat inputContentInfo,
                          int flags, Bundle opts) {
                      // read and display inputContentInfo asynchronously
                      if (BuildCompat.isAtLeastNMR1() &amp;&amp; (flags &amp;
                          InputConnectionCompat.INPUT_CONTENT_GRANT_READ_URI_PERMISSION) != 0) {
                          try {
                              inputContentInfo.requestPermission();
                          }
                          catch (Exception e) {
                              return false; // return false if failed
                          }
                      }
  
                      // read and display inputContentInfo asynchronously.
                      // call inputContentInfo.releasePermission() as needed.
  
                      return true;  // return true if succeeded
                  }
              };
          return InputConnectionCompat.createWrapper(ic, editorInfo, callback);
      }
  };
  </code></pre>
  
  <p>but apps like Whatsapp, Telegram supports this feature. Do i need to create custom EditText or something ?</p>