Categories
Audio podCast podcast

Conversation with Allen Bauer, Chief Scientist

Allen BauerIn this special episode we talk with Allen Bauer, Chief Scientist here at Embarcadero Technologies. This month is the 7 year anniversary of the Podcast at Delphi.org, and today is Allen’s birthday. This conversation was recorded during Delphi Week, a celebration of Delphi’s birthday back in February.

We talk about what Allen does as a Chief Scientist as well as some of his side projects. We also discuss some of the new platforms we face today as developers and the challenges and likelihood of Delphi targeting them. Finally some discussion about features Allen would like to see added to Delphi in the future.

Categories
Android

Adding to the Android User Dictionary

On Android there is a single UserDictionary that works across all keyboards, and any app (with the appropriate permissions) can query, add and remove words. Here is some simple code to add a word to the dictionary (via XE8):

uses
  Androidapi.JNI.Provider, Androidapi.Helpers, Androidapi.JNI.JavaTypes;
 
procedure AddUserWord(const AWord: string);
begin
  // Need WRITE_USER_DICTIONARY permission
  TJUserDictionary_Words.JavaClass.addWord(
    SharedActivityContext, // Context
    StringToJString(AWord),// Word to add
    255,                   // Frequency: 1- 255
    nil,                   // optional shortcut
    SharedActivityContext.getResources.getConfiguration.locale
    );
end;

If you also want to read the dictionary then you need to have the READ_USER_DICTIONARY permission. Check out the documentation for more information on the UserDictionary and it’s Words list.