0
votes

Is there anyway I can use an InputBox for android? I have tried looking online but found nothing. I'm not sure if it's something to do with permissions or what.

I have tried using this method but still no luck:

New Non Blocking InputBox Function In Delphi XE7 Firemonkey On Android And IOS

I'm using Android 6.0.1 and Android 25.2.5 SDK and API 25.

The InputBox is grayed out

Screenshot

and when using it:

Screenshot

I'm new to FireMonkey.

1
See docwiki.embarcadero.com/RADStudio/XE7/en/…, in particular the next to last paragraph under that heading, which says *If you call InputBox, InputQuery, or MessageDlg and you do not provide an anonymous method on your call, these methods behave as they used to behave in XE6: calls are blocking on all platforms, including iOS, and Android is not supported. * - Ken White
Did you read the message from the screen shot that you included? If so, why not observe its content. If mot, why not? - David Heffernan
I did read it but i'm struggling with it. I don't know how to do what it asks and looking online for it just gives me a more complex tutorial - Newb101

1 Answers

2
votes

You can use the inputbox like this. Remember that the inputbox is not modal. User answer is handled in the anonymous method that is provided as 4th parameter.

  InputBox('Box Caption','Box prompt','Default value',
    procedure(const AResult: TModalResult; const AValue: string)
    begin
      // This is executed when user closes the input box
      // Check result and value here and do whatever is needed
    end
    );