2017-01-04 15 views
2

私はAndroid開発の新機能です。 アンドロイドアプリの起動ハイパーリンクを作成してHTMLページに埋め込む方法がわかりません。 誰でもアンドロイドアプリが自動的に起動します。このリンクをクリックしたとき私のシナリオがあり、(アプリがデバイスにプリインストールされます。)ここでAndroidアプリを起動するハイパーリンクをHTMLにするにはどうすればいいですか?

マニフェストコードです:

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:"http://schemas.android.com/apk/res/android" android:versionCode="9" android:versionName="1.0.4" package="com.happyconz.wherelive" platformBuildVersionCode="22" platformBuildVersionName="5.1.1-1819727"> 
    <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="21" /> 
    <supports-screens android:anyDensity="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:resizeable="true" android:xlargeScreens="true" /> 
    <uses-feature android:name="android.hardware.camera" /> 
    <uses-permission android:name="android.permission.INTERNET" /> 
    <uses-permission android:name="android.permission.NETWORK" /> 
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
    <uses-permission android:name="android.permission.CAMERA" /> 
    <uses-permission android:name="android.permission.RECORD_AUDIO" /> 
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> 
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> 
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> 
    <uses-permission android:name="android.permission.VIBRATE" /> 
    <uses-permission android:name="android.permission.WAKE_LOCK" /> 
    <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" /> 
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> 
    <uses-permission android:name="android.permission.GET_TASKS" /> 
    <uses-permission android:name="android.permission.GET_ACCOUNTS" /> 
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /> 
    <uses-permission android:name="android.permission.USE_CREDENTIALS" /> 
    <uses-permission android:name="com.happyconz.wherelive.permission.INTERNAL" /> 
    <permission android:name="com.happyconz.wherelive.permission.INTERNAL" android:protectionLevel="signature|signatureOrSystem" /> 
    <application android:theme="0x7f0b0095" android:label="0x7f09028c" android:icon="0x7f02011d" android:name="com.happyconz.wherelive.GlobalApplication" android:allowBackup="true" android:largeHeap="true"> 
     <activity android:theme="0x7f0b0099" android:label="0x7f09028c" android:name="com.happyconz.wherelive.activity.HomeActivity" android:launchMode="singleTask" android:configChanges="keyboardHidden|orientation|screenSize" /> 
     <activity android:theme="0x7f0b0095" android:label="0x7f09028c" android:name="com.happyconz.wherelive.Main" android:configChanges="keyboardHidden|orientation|screenSize"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 
       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
     <activity android:label="0x7f09011e" android:name="com.happyconz.wherelive.about.CustomActivity" /> 
     <activity android:theme="@style/Theme_AppCompat_Light_NoActionBar" android:label="0x7f09028c" android:name="com.happyconz.wherelive.video.youtube.sign.LoginActivity" android:launchMode="singleTask" android:configChanges="keyboardHidden|orientation|screenSize" /> 
     <activity android:theme="@style/Theme_AppCompat_Light_NoActionBar" android:label="0x7f09028c" android:name="com.happyconz.wherelive.video.youtube.sign.LogoutActivity" android:launchMode="singleTask" android:configChanges="keyboardHidden|orientation|screenSize" /> 
     <activity android:theme="0x7f0b0099" android:name="com.happyconz.wherelive.recode.Recorder" android:permission="com.happyconz.wherelive.permission.INTERNAL" android:launchMode="singleTask" android:configChanges="keyboardHidden|orientation|screenSize"> 
      <intent-filter> 
       <action android:name="com.happyconz.wherelive.action.Recorder" /> 
      </intent-filter> 
     </activity> 
     <activity android:theme="0x7f0b008f" android:name="com.happyconz.wherelive.CertFailDialog" android:configChanges="keyboardHidden|orientation|screenSize" /> 
     <activity android:label="0x7f09025a" android:icon="0x7f020121" android:name="com.happyconz.wherelive.video.MyLiveListActivity" android:launchMode="standard" android:configChanges="keyboardHidden|orientation|screenSize" /> 
     <activity android:label="0x7f090259" android:icon="0x7f020121" android:name="com.happyconz.wherelive.video.LiveListActivity" android:launchMode="standard" android:configChanges="keyboardHidden|orientation|screenSize" /> 
     <activity android:label="0x7f09003f" android:icon="0x7f020121" android:name="com.happyconz.wherelive.preference.InfoActivity" android:launchMode="standard" android:configChanges="keyboardHidden|orientation|screenSize" /> 
     <activity android:theme="0x7f0b0095" android:name="com.happyconz.wherelive.activity.WebViewActivity" android:configChanges="keyboardHidden|orientation|screenSize" /> 
     <activity android:theme="@*android:style/Theme.NoDisplay" android:name="com.happyconz.wherelive.video.youtube.sign.CheckAuthActivity" /> 
     <activity android:theme="0x7f0b0095" android:name="com.happyconz.wherelive.video.CreateChannelActivity" android:configChanges="keyboardHidden|orientation|screenSize" /> 
     <activity android:theme="0x7f0b0095" android:name="com.happyconz.wherelive.video.CreateLiveChannelActivity" android:configChanges="keyboardHidden|orientation|screenSize" /> 
     <activity android:theme="@*android:style/Theme.Translucent" android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" /> 
     <activity android:theme="@*android:style/Theme.Translucent.NoTitleBar" android:name="com.happyconz.wherelive.adv.AdEverFullScreen" android:taskAffinity="com.wherelive.pro" android:launchMode="singleTask" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" /> 
     <activity android:theme="@style/Theme_AppCompat_Light_NoActionBar" android:name="com.happyconz.wherelive.adv.AdMainFullScreen" android:launchMode="singleTask" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" /> 
     <activity android:theme="0x7f0b0098" android:icon="0x7f020121" android:name="com.happyconz.wherelive.preference.SettingActivity" android:launchMode="standard" android:configChanges="keyboardHidden|orientation|screenSize" /> 
     <activity android:theme="0x7f0b0098" android:icon="0x7f020121" android:name="com.happyconz.wherelive.preference.AccountSettingActivity" android:launchMode="standard" android:configChanges="keyboardHidden|orientation|screenSize" /> 
     <activity android:theme="0x7f0b0098" android:icon="0x7f020121" android:name="com.happyconz.wherelive.preference.ScreenSettingActivity" android:launchMode="standard" android:configChanges="keyboardHidden|orientation|screenSize" /> 
     <activity android:theme="0x7f0b0098" android:icon="0x7f020121" android:name="com.happyconz.wherelive.preference.LiveSettingActivity" android:launchMode="standard" android:configChanges="keyboardHidden|orientation|screenSize" /> 
     <activity android:theme="0x7f0b0098" android:icon="0x7f020121" android:name="com.happyconz.wherelive.preference.MoreSettingActivity" android:launchMode="standard" android:configChanges="keyboardHidden|orientation|screenSize" /> 
     <activity android:icon="0x7f020121" android:name="com.happyconz.wherelive.preference.SettingProActivity" android:taskAffinity="com.wherelive.pro" android:launchMode="singleTask" android:configChanges="keyboardHidden|orientation|screenSize" android:allowTaskReparenting="true"> 
      <intent-filter> 
       <action android:name="com.happyconz.wherelive.preference.SettingActivity" /> 
       <category android:name="android.intent.category.DEFAULT" /> 
      </intent-filter> 
     </activity> 
     <activity android:theme="@*android:style/Theme.NoDisplay" android:name="com.happyconz.wherelive.LicenseChecker" /> 
     <receiver android:name="com.happyconz.wherelive.recode.service.AlarmReceiver" android:process=":remote"> 
      <intent-filter android:priority="995"> 
       <action android:name="com.happyconz.wherelive.recode.service.alarm" /> 
      </intent-filter> 
     </receiver> 
     <receiver android:name="com.happyconz.wherelive.receiver.AuthReceiver" android:process=":remote"> 
      <intent-filter android:priority="998"> 
       <action android:name="com.happyconz.wherelive.recode.service.certification" /> 
      </intent-filter> 
     </receiver> 
     <receiver android:label="0x7f09028c" android:icon="0x7f020120" android:name="com.happyconz.wherelive.recode.widget.AutoboyWidgetProvider"> 
      <intent-filter> 
       <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> 
       <action android:name="android.intent.action.USER_PRESENT" /> 
      </intent-filter> 
      <meta-data android:name="android.appwidget.provider" android:resource="0x7f070001" /> 
     </receiver> 
     <service android:name="com.happyconz.wherelive.recode.service.RecorderService" android:exported="true"> 
      <intent-filter android:priority="999"> 
       <action android:name="com.happyconz.wherelive.recode.service.IRecorderService" /> 
       <action android:name="com.happyconz.wherelive.RECORDER_SERVICE" /> 
      </intent-filter> 
     </service> 
     <service android:name="com.happyconz.wherelive.recode.service.CertificationService" /> 
     <service android:name="com.happyconz.wherelive.recode.widget.AutoboyWidgetService" /> 
     <service android:name="com.happyconz.wherelive.video.youtube.streaming.StreamerService" /> 
     <meta-data android:name="com.crashlytics.ApiKey" android:value="e357fa9000ab877757425745ec7b43ad971b647b" /> 
     <meta-data android:name="com.google.android.gms.version" android:value="0x7f0e0006" /> 
     <activity android:theme="0x7f0b0098" android:label="0x7f090211" android:name="com.happyconz.wherelive.sns.SNSSettingActivity" android:configChanges="keyboardHidden|orientation|screenSize" /> 
     <activity android:theme="@*android:style/Theme.Translucent.NoTitleBar" android:label="0x7f09028c" android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize" /> 
     <activity android:label="0x7f09028c" android:name="com.happyconz.wherelive.sns.twitter.TwitterActivity"> 
      <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="oauth" android:host="com.happyconz.wherelive.sns" /> 
      </intent-filter> 
     </activity> 
     <activity android:label="0x7f09028c" android:name="com.happyconz.wherelive.sns.twitter.TwitterProActivity" android:taskAffinity="com.wherelive.pro" android:launchMode="singleTask" android:configChanges="keyboardHidden|orientation|screenSize" android:allowTaskReparenting="true"> 
      <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="oauth" android:host="com.happyconz.wherelive.sns.pro" /> 
      </intent-filter> 
     </activity> 
     <activity android:name="com.happyconz.wherelive.sns.twitter.OAuthActivity" /> 
     <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="0x7f09032a" /> 
     <meta-data android:name="io.fabric.ApiKey" android:value="180b89f527bdd6961fab824c28327acefbae668c" /> 
     <activity android:name="com.mikepenz.aboutlibraries.ui.LibsActivity" /> 
    </application> 
</manifest> 
+0

構文は何ですか、あなたはあなたがマニフェスト内のいくつかのコードを追加する必要があります –

+0

教えてくださいすることができます。上記のコードはデコンパイルされたマニフェストなので、そのアプリケーションのプロジェクトにアクセスし、新しいマニフェストで再コンパイルする必要があると思います。また、これをチェックしてください。 http://stackoverflow.com/questions/3469908/make-a-link-in-the-android-browser-start-up-my-app – Mohsen

答えて

0

それとも別のオプションがあります。

アプリケーションpackagenameを見つけたら、アプリケーションがストアにある場合は、アプリケーションリンクに保存することができます。既にインストールされている場合、「開く」ボタンを押すことができます。

だから、リンクされています

market://search?q=pname:<package_name> 

または:

http://market.android.com/search?q=pname:<package_name> 
関連する問題