0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

MIT App Inventorでのブラウザを起動させる方法について(GoogleMapやYouTubeも起動できる!)

Posted at

はじめに

MIT App InventorでChromeなどのブラウザに移動する方法です.ブラウザで開くので別アプリに飛ぶこともできます.ブラウザ使っているとGoogleMapやAmazonのアプリに飛ぶことがありますよね.
MIT App InventorにはサイトにアクセスできるWebViewerがありますが,GoogleMapやYoutubeといった別アプリで開きたいときに使える方法を説明します.

アプリの概要

ボタンを押したらブラウザを開きます.ここでは https://www.google.com/ を開きます.MIT App Inventorから別アプリへ飛ぶのにActivityStarterを使用しました.

注意
AI Companionとインストールではアプリの動作が異なりました.

デザイナー画面

ボタンを押したら別のアプリに飛ぶので非常にシンプルです.
スクリーンショット 2025-05-06 203114.png

機能 内容
Button1 クリックしたらブラウザを開く
ActivityStarter1 別のアプリに飛ぶためのコンポーネント

ブロック画面

ここも非常にシンプルです.作成するのは一つだけです.

when Button1. Click

クリックしたらブラウザへ移動します.
blocks.png

以下,ブロック内のテキスト
set ActivityStarter1. Action to

android.intent.action.VIEW

set ActivityStarter1. DataUri to

## Googleに飛びたいとき
https://www.google.com/

## YouTube開きたいとき
https://www.youtube.com/

## Google Map開きたいとき
https://www.google.co.jp/maps/

実行結果

Chromeを開きました.また,mapを開く際には,ブラウザもしくはアプリの選択画面がでました.

終わりに

MIT App Inventorから別アプリに飛べるのは,アプリ開発の幅が広がりそうです.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?