zoukankan      html  css  js  c++  java
  • Launch custom android application from android browser

    1. http://stackoverflow.com/questions/2958701/launch-custom-android-application-from-android-browser

    2. http://stackoverflow.com/questions/3038958/launch-app-with-url

    有一点要注意:Main action: android.intent.action.MAIN,

    这个主要的action比较特殊,即使你对他加了data, category也不起作用。像下面的例子中,

    即使将Test action中的属性 data, category加到LunchApplicationFromBrowserActivity上也不会起作用的.

     

    data: http://developer.android.com/guide/topics/manifest/data-element.html#mime

    Adds a data specification to an intent filter.  The specification can  be just a data type (the mimeType attribute),  just a URI, or both a data type and a URI.  A URI is specified by separate  attributes for each of its parts:

    scheme://host:port/path orpathPrefix or pathPattern

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package
    ="lunch.application.browser"
        android:versionCode
    ="1"
        android:versionName
    ="1.0" >

        <uses-sdk android:minSdkVersion="10" />

        <application
            
    android:icon="@drawable/ic_launcher"
            android:label
    ="@string/app_name" >
            <activity
                
    android:name=".LunchApplicationFromBrowserActivity"
                android:label
    ="@string/app_name" >
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />                       
                    <category android:name="android.intent.category.LAUNCHER" />               
                </intent-filter>
            </activity>
            
              <activity
                
    android:name=".Test"
                android:label
    ="@string/app_name" >
                 <intent-filter>
                    <action android:name="android.intent.action.VIEW"></action>
                    <data android:scheme="https"></data>
                    <data android:scheme="lync"></data>
                    <data android:scheme="http" />
                   <data android:scheme="https" /> 
                   <data android:scheme="Https" />  
                    <category android:name="android.intent.category.LAUNCHER" />
                    <category android:name="android.intent.category.DEFAULT"/>
                    <category android:name="android.intent.category.BROWSABLE"/> 
                </intent-filter>
            </activity>
                    
        </application>

    </manifest>
  • 相关阅读:
    DataTable 导出到Excel
    asp.net 连接新浪微博
    ASP.NET中的HTTP模块和处理程序
    asp.net 前台获得url参数的最简单方法
    将Excel导入到DataTable (用ODBC方法连接)
    下拉框控件dhtmlXCombo在ASP.NET中的使用详解
    iis站点 asp.net网站访问弹出提示框
    习惯的力量
    1.面向对象设计模式与原则
    5. Factory Method 工厂方法(创建型模式)
  • 原文地址:https://www.cnblogs.com/Jessy/p/2391930.html
Copyright © 2011-2022 走看看