0

I tried creating a few dialogs for a program.. thing is when executed. nothing happens, so I tried the basic hello world getInput code below:

import android
droid = android.Android()


name = droid.dialogCreateInput("Hello!", "What's your Name?")
print name
droid.makeToast("Hello, %s" % name.result)

lf thing is when I view the name Which is essentially the result of the dialogCreateInput nothing happens, it's as if the dialog isn't called and a dialogShow would not work using the name variable. if I use the droid variable as below:

droid.dialogShow()

with the code above. it'll say that there is no dialog to show. so i do not know what I can do to call any dialogs for use in programming. some help would be appreciated

Sean Perez
  • 99
  • 1
  • 12

1 Answers1

0

You need to use droid.dialogGetInput if you want a result from a single call. It's a convenience, so you don't need to use the dialogCreateInput, dialogShow and dialogGetResponse methods for just getting input. There's a dialogGetPassword method that does the same thing. In all other cases you need to do at least three calls to do a dialog. Try these docs; they're a little bit more explanatory.

Carl Smith
  • 3,025
  • 24
  • 36