特定のユーザー プロファイルで Android アプリケーションから Foursquare アプリケーションを開こうとしています。私は公式ドキュメントに従いました: https://developer.foursquare.com/resources/client#android
タイプの Intent を作成し、ACTION_VIEW
などの URI にhttp://m.foursquare.com/user?uid=USER_ID
、表示したいプロファイルの ID を指定しました。
Uri uri = Uri.parse("http://m.foursquare.com/user?uid=USER_ID");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
Android 2.3.3 および 4.2.2 で実行すると、次のような動作が得られます。インテント チューザーが表示され、アクションを終了する方法 (Foursquare または Browser) を尋ねられます。「Foursquare」をクリックすると、アプリケーションが表示され、すぐに消えます。
インテントが開始されたことを log cat で確認できます。次に、onResume
Foursquare の失敗の説明なしで、Fragment のメソッドが呼び出されます。
03-04 14:40:55.305: I/ActivityManager(2690): Starting: Intent { act=android.intent.action.VIEW dat=http://m.foursquare.com/user?uid=USER_ID flg=0x3800000 cmp=com.joelapenna.foursquared/.BrowsableActivity } from pid 2690
03-04 14:40:55.320: I/OrientationDebug(2690): [pwm] in updateOrientationListenerLp()
03-04 14:40:55.320: V/OrientationDebug(2690): in updateOrientationListenerLp(), Screen status=true, current orientation=-1, SensorEnabled=true
03-04 14:40:55.320: I/OrientationDebug(2690): [pwm] needSensorRunningLp(), return true #4
03-04 14:40:55.320: W/ActivityManager(2690): Trying to launch com.joelapenna.foursquared/.BrowsableActivity
03-04 14:40:55.355: E/ResourceType(4814): Style contains key with bad entry: 0x010102f3
03-04 14:40:55.355: E/ResourceType(4814): Style contains key with bad entry: 0x0101030b
03-04 14:40:55.355: E/ResourceType(4814): Style contains key with bad entry: 0x01010397
03-04 14:40:55.355: E/ResourceType(4814): Style contains key with bad entry: 0x0101039c
03-04 14:40:55.410: D/szipinf(4814): Initializing inflate state
03-04 14:40:55.420: I/OrientationDebug(2690): [pwm] in updateOrientationListenerLp()
03-04 14:40:55.420: V/OrientationDebug(2690): in updateOrientationListenerLp(), Screen status=true, current orientation=1, SensorEnabled=true
03-04 14:40:55.420: I/OrientationDebug(2690): [pwm] needSensorRunningLp(), return true #4
03-04 14:40:55.445: D/MyFragment(6374): onResume
ACTION_VIEW
のような URI を持つタイプのインテントを作成するfoursquare://users/USER_ID
と、Foursquare アプリケーションが起動しますが、指定されたプロファイルではなく、プロファイル画面にとどまります。
何か案が ?