Thursday, July 29, 2010

Android ASE Perl dialogGetResponse() example

use Android;
my $a = Android->new();
my @choices=('omg','wtf','bbq');
$a->dialogCreateAlert("make a selection");
$a->dialogSetItems([@choices[0],@choices[1],@choices[2]]);
$a->dialogShow();
my $selection = $a->dialogGetResponse()->{'result'}->{'item'};
print "you selected @choices[$selection]\n";

Enjoy!

No comments: