TLRequestContactsGetContacts tlRequestContactsGetContacts = new TLRequestContactsGetContacts();
tlRequestContactsGetContacts.setHash("1L"); // <-- no meaning but you should set any value.
TLObject result = kernel.getKernelComm().getApi().doRpcCall(tlRequestContactsGetContacts);
TLContacts tlContacts = (TLContacts)result;
A result contains id, userHash based on your telegram account. So you can send message as below.
User user = new User( {userId} );
user.setUserHash( {accessHash for user} );
kernel.getKernelComm().sendMessage(user, "Some message to here. ");
After login with auth code.
You can do this as below.
A result contains id, userHash based on your telegram account. So you can send message as below.
And you need to check,
MessageHandler