暗黙のintent呼び出し(ACTION_SEND呼び出し)

構文 system.impCallActionSend( データ文字列 [,タイプ] )
説明 暗黙のintent呼び出しコマンドです。ACTION_SEND呼び出しを行います。
引数 データ文字列: 送信データです。
タイプ: タイプは省略化です。例えば、text/plain など。
アプリを呼び出した場合は、Luaridaは終了します。呼び出せなかった場合は、後の処理を続けます。
戻り値 なし

------------------------------------------
-- 暗黙のintent呼び出しコマンドのサンプル system_impCallActionSend.lua
------------------------------------------
function main()
 
  canvas.drawCls(color(255,255,255))
  canvas.drawText("暗黙のintent呼び出しコマンドのサンプル", 0, 0, 24, color(0,0,0))
 
  while(true)do
    item.clear()
    item.add("1:text/plain")
    item.add("2:text/html")
    item.add("3:終了")
    no = item.list( "暗黙のintent呼び出しコマンドのサンプル" )
 
    if( no == 3 )then
      toast( "終了します", 0 )
      break
    elseif( no == 1 )then
      system.impCallActionSend("text/plain test", "text/plain")
    elseif( no == 2 )then
      system.impCallActionSend("text/html test","text/html")
    end
  end
end
 
main()
 

1.ダイアログが表示され、1:text/plainから選択していくと。
2.1:text/plainを選択すると、アプリケーションを選択で、BluetoothとCメールが選ばれました。
3.2:text/htmlを選択すると、アプリケーションを選択で、BluetoothとEメールが選ばれました。
4.3:image/pngを選択すると、アプリケーションを選択で、BluetoothとCamScannerが選ばれました。
(私の環境では、こうなりますが…普通でしょうか?)


コメント(最大10行)
名前:
コメント

すべてのコメントを見る



タグ:

+ タグ編集
  • タグ:

このサイトはreCAPTCHAによって保護されており、Googleの プライバシーポリシー利用規約 が適用されます。

最終更新:2011年10月21日 13:33
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。