"WebRTC is a way to allow browsers to get in touch with one another using audio or video data without the help of a server. Google has been something of a pioneer in this area, and submitted a suggested technology for the standard. Mozilla has gone along with it, making it all look good. Microsoft, on the other hand, just seemed to be standing on the sidelines, watching what was happening. However, Microsoft now has a product that needs something like WebRTC; namely, Skype. It has been working on a web-based version of Skype and this has focused the collective mind on the problems of browser-to-browser communication. It now agrees that a standard is needed, just not the one Google and Mozilla are behind. Microsoft has submitted its own proposals for CU-RTC-Web or Customizable, Ubiquitous Real Time Communication over the Web, to the W3C. It may well be that Microsoft's alternative has features that make it superior, but a single standard is preferable to a better non-standard. Given Microsoft's need to make Skype work in the browser, it seems likely that, should its proposal not be accepted as the standard, it will press on regardless, thus splitting the development environment. Both Google and Mozilla have already put a lot of work into WebRTC, and there are partial implementations in Firefox, Chrome and Opera."
2012年8月11日土曜日
2012年8月2日木曜日
特定のURLをフックしてアプリを起動させる(暗黙的インテント)
やりたいこと
・特定のURLクリック時にアプリをインストールしている場合はアプリケーション選択ダイアログが出て、ブラウザで遷移するかアプリを起動するか選べる
・アプリをインストールしていない場合は普通にページ遷移
具体的に言うと、オンエアー中のアニメのタイムラインを見に行こうとするとアプリケーションに移動するか、スマフォサイトで用意したページに行くか選べるようにしたいってこと。
まず、AndroidManifest.xmlを変更
<activity
android:name=".Test"
android:label="@string/test.title">
<intent-filter>
<action
android:name="android.intent.action.VIEW" />
<category
android:name="android.intent.category.DEFAULT" />
<category
android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="http"
android:host="test.tsubuani.com"
android:pathPrefix="/live" />
</intent-filter>
</activity>
intent-filterにaction.View,category.DEFAULT,cateogry.BROWSABLEを追加。
dataにscheme,host,pathPrefixを追加。
schemeやhostとかはそれぞれ依存しているので注意が必要。
pathPrefixの他にも、pathやpathPatternなんてのも指定できる。
細かい仕様は下記参照。
http://www.techdoctranslator.com/android/guide/manifest/data-element
今回の例で言うと
http://test.tsubuani.com/live*******
っていうURLにアクセスしようとするとTestActivityが起動するという感じになる。
ActivityはonNewIntentに処理を書いてやればよい
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
Intent intent = getIntent();
if( intent != null ) {
/** リンク先のURLを取得する。 */
String data = intent.getDataString();
if(data != null){
//urlを元にごにょごにょ
}
}
}
これで、アプリをインストールしている人はアプリで実況TLを見ることが出来るし、
そうでない人はスマフォサイトで用意したページに遷移させることが出来る。
Androidはこんな感じでアプリ同士の連携がすごい簡単に出来るのが素敵。
・特定のURLクリック時にアプリをインストールしている場合はアプリケーション選択ダイアログが出て、ブラウザで遷移するかアプリを起動するか選べる
・アプリをインストールしていない場合は普通にページ遷移
具体的に言うと、オンエアー中のアニメのタイムラインを見に行こうとするとアプリケーションに移動するか、スマフォサイトで用意したページに行くか選べるようにしたいってこと。
まず、AndroidManifest.xmlを変更
<activity
android:name=".Test"
android:label="@string/test.title">
<intent-filter>
<action
android:name="android.intent.action.VIEW" />
<category
android:name="android.intent.category.DEFAULT" />
<category
android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="http"
android:host="test.tsubuani.com"
android:pathPrefix="/live" />
</intent-filter>
</activity>
intent-filterにaction.View,category.DEFAULT,cateogry.BROWSABLEを追加。
dataにscheme,host,pathPrefixを追加。
schemeやhostとかはそれぞれ依存しているので注意が必要。
pathPrefixの他にも、pathやpathPatternなんてのも指定できる。
細かい仕様は下記参照。
http://www.techdoctranslator.com/android/guide/manifest/data-element
今回の例で言うと
http://test.tsubuani.com/live*******
っていうURLにアクセスしようとするとTestActivityが起動するという感じになる。
ActivityはonNewIntentに処理を書いてやればよい
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
Intent intent = getIntent();
if( intent != null ) {
/** リンク先のURLを取得する。 */
String data = intent.getDataString();
if(data != null){
//urlを元にごにょごにょ
}
}
}
これで、アプリをインストールしている人はアプリで実況TLを見ることが出来るし、
そうでない人はスマフォサイトで用意したページに遷移させることが出来る。
Androidはこんな感じでアプリ同士の連携がすごい簡単に出来るのが素敵。
登録:
投稿 (Atom)