Android Simulator.alfredworkflow.zip
- Click 「Configure workflow and variables」
- Edit path
Android Simulator.alfredworkflow.zip
query=$1 | |
source ~/.zshrc | |
echo -n $query | |
$ANDROID_SDK/emulator/emulator -avd $query & |
EMULATOR_PATH = ENV['ANDROID_SDK'] || '' | |
if EMULATOR_PATH.empty? | |
puts 'ANDROID_SDK not set.' | |
exit | |
end | |
def item(index, name) | |
<<ITEM | |
<item uid="#{index}" arg="#{name}"> | |
<title>"#{name}"</title> | |
</item> | |
ITEM | |
end | |
sims = `#{EMULATOR_PATH}/emulator/emulator -list-avds` | |
items = sims.split(/\R/).map.with_index { |s, i| item(i, s)}.join('') | |
puts <<EOS | |
<items> | |
#{items}</items> | |
EOS |