2011-12-21 18 views
1

私はiPhoneとAndroidを対象としたRhomobileアプリケーションを作成しています。
カスタムURLスキームを作成して、test://some-paramsのようなURLを作成できるようにして、プログラムを起動してパラメータを渡します。Rhomobile:カスタムURLスキーム

私の知る限り、これはbuild.ymlでBundleURLSchemeパラメータを使用して行い、次にSystem.get_start_params()を使用してそれらのパラメータを取得することを理解しています。 しかし、私の知る限り、これはiPhone上でのみ動作します。 Androidでこの作業を行う方法はありますか?

ありがとう!

答えて

1

大丈夫、私は自分自身に答える見つけた、ケースには誰もこれを必要とします。ここで説明したように

  • は、アプリケーションの拡張機能を作成します。に記載されているように http://docs.rhomobile.com/rhodes/extensions#generating-a-native-extension-template
  • は、android_manifest_changesファイルを追加します。上記のリンク。のみ<data android:pathPrefix='' android:scheme='' android:host='' />行が正しい特性で埋めなければならない

    <manifest xmlns:android='http://schemas.android.com/apk/res/android' 
    android:versionName='1.0' package='com.rhomobile.webbrowserpoc' 
    android:versionCode='10000' android:installLocation='auto'> 
    <application android:name='com.rhomobile.rhodes.RhodesApplication' 
        android:label='@string/app_name' android:icon='@drawable/icon' 
        android:debuggable='true'> 
        <activity android:name='com.rhomobile.rhodes.RhodesActivity' 
         android:label='@string/app_name' android:launchMode='singleTask' 
         android:configChanges='orientation|keyboardHidden' 
         android:screenOrientation='unspecified'> 
         <intent-filter> 
          <action android:name='android.intent.action.VIEW' /> 
          <category android:name='android.intent.category.BROWSABLE' /> 
          <category android:name='android.intent.category.DEFAULT' /> 
          <data android:pathPrefix='' android:scheme='' 
           android:host='' /> 
         </intent-filter> 
        </activity> 
    </application> 
    

:そのファイルに

  • は、次の行を追加します。

  • 関連する問題