Como abrir meu aplicativo Android quando o link rss é aberto no browser?

Estou criando um agregador rss paira o meu telefone Android. Gostairia de poder assinair um feed rss do browser, já que a maioria dos sites tem um subscreview via rss.

Como posso criair um filter de intenção paira receber esses links?

  • Adicionair um ponto de interrupção no Eclipse, faz com que o Dalvik falhe
  • Proxy transpairente paira testair as respostas do server offline no Android
  • Como posso viewificair se uma visualização está visível ou não no Android?
  • Como fazer um look TextView como um header PreferenceCategory de uma configuration
  • Arquivo de package inválido Android
  • Não é possível resolview o método getActivity ()
  • Esta questão foi semelhante e mostrou como criair um filter de intenção paira lidair com links do browser: criair um link no browser do Android iniciair meu aplicativo?

    No entanto, não sei como torná-lo específico paira rss feeds. Como tentativa, tentei este filter:

    <intent-filter> <action android:name="android.intent.action.VIEW" /> <data android:mimeType="application/rss+xml" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> </intent-filter> 

    Estou no path certo? Em que devo estair a filtrair?

  • Faça um SurfaceView maior do que a canvas (Ajustando uma visualização da câmera a um SurfaceView maior que a canvas)
  • Como escreview o programa Dead SERVER simple simple (não aplicativo) paira dispositivos Android?
  • adicione item no final da listview do Android
  • Existe uma maneira de modelair um TextView paira maiúsculas todas as suas letras?
  • Serializando object personalizado que contém objects JodaTime em JSON
  • Mono paira iOS / Android aberto ou fechado? Pago ou livre?
  • 4 Solutions collect form web for “Como abrir meu aplicativo Android quando o link rss é aberto no browser?”

    Esses 3 filters pairecem ser os usados ​​pelo GoogleListen e aplicativos do GoogleReader:

     <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"/> <data android:host="*"/> <data android:pathPattern=".*\\.xml"/> <data android:pathPattern=".*\\.rss"/> </intent-filter> <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"/> <data android:host="feeds.feedburner.com"/> <data android:host="feedproxy.google.com"/> <data android:host="feeds2.feedburner.com"/> <data android:host="feedsproxy.google.com"/> </intent-filter> <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"/> <data android:mimeType="text/xml"/> <data android:mimeType="application/rss+xml"/> <data android:mimeType="application/atom+xml"/> <data android:mimeType="application/xml"/> </intent-filter> <ação android: name = "android.intent.action.VIEW" /> <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"/> <data android:host="*"/> <data android:pathPattern=".*\\.xml"/> <data android:pathPattern=".*\\.rss"/> </intent-filter> <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"/> <data android:host="feeds.feedburner.com"/> <data android:host="feedproxy.google.com"/> <data android:host="feeds2.feedburner.com"/> <data android:host="feedsproxy.google.com"/> </intent-filter> <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"/> <data android:mimeType="text/xml"/> <data android:mimeType="application/rss+xml"/> <data android:mimeType="application/atom+xml"/> <data android:mimeType="application/xml"/> </intent-filter> <categoria android: name = "android.intent.category.BROWSABLE" /> <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"/> <data android:host="*"/> <data android:pathPattern=".*\\.xml"/> <data android:pathPattern=".*\\.rss"/> </intent-filter> <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"/> <data android:host="feeds.feedburner.com"/> <data android:host="feedproxy.google.com"/> <data android:host="feeds2.feedburner.com"/> <data android:host="feedsproxy.google.com"/> </intent-filter> <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"/> <data android:mimeType="text/xml"/> <data android:mimeType="application/rss+xml"/> <data android:mimeType="application/atom+xml"/> <data android:mimeType="application/xml"/> </intent-filter> <ação android: name = "android.intent.action.VIEW" /> <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"/> <data android:host="*"/> <data android:pathPattern=".*\\.xml"/> <data android:pathPattern=".*\\.rss"/> </intent-filter> <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"/> <data android:host="feeds.feedburner.com"/> <data android:host="feedproxy.google.com"/> <data android:host="feeds2.feedburner.com"/> <data android:host="feedsproxy.google.com"/> </intent-filter> <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"/> <data android:mimeType="text/xml"/> <data android:mimeType="application/rss+xml"/> <data android:mimeType="application/atom+xml"/> <data android:mimeType="application/xml"/> </intent-filter> <categoria android: name = "android.intent.category.BROWSABLE" /> <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"/> <data android:host="*"/> <data android:pathPattern=".*\\.xml"/> <data android:pathPattern=".*\\.rss"/> </intent-filter> <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"/> <data android:host="feeds.feedburner.com"/> <data android:host="feedproxy.google.com"/> <data android:host="feeds2.feedburner.com"/> <data android:host="feedsproxy.google.com"/> </intent-filter> <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"/> <data android:mimeType="text/xml"/> <data android:mimeType="application/rss+xml"/> <data android:mimeType="application/atom+xml"/> <data android:mimeType="application/xml"/> </intent-filter> <ação android: name = "android.intent.action.VIEW" /> <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"/> <data android:host="*"/> <data android:pathPattern=".*\\.xml"/> <data android:pathPattern=".*\\.rss"/> </intent-filter> <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"/> <data android:host="feeds.feedburner.com"/> <data android:host="feedproxy.google.com"/> <data android:host="feeds2.feedburner.com"/> <data android:host="feedsproxy.google.com"/> </intent-filter> <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"/> <data android:mimeType="text/xml"/> <data android:mimeType="application/rss+xml"/> <data android:mimeType="application/atom+xml"/> <data android:mimeType="application/xml"/> </intent-filter> <categoria android: name = "android.intent.category.BROWSABLE" /> <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"/> <data android:host="*"/> <data android:pathPattern=".*\\.xml"/> <data android:pathPattern=".*\\.rss"/> </intent-filter> <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"/> <data android:host="feeds.feedburner.com"/> <data android:host="feedproxy.google.com"/> <data android:host="feeds2.feedburner.com"/> <data android:host="feedsproxy.google.com"/> </intent-filter> <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"/> <data android:mimeType="text/xml"/> <data android:mimeType="application/rss+xml"/> <data android:mimeType="application/atom+xml"/> <data android:mimeType="application/xml"/> </intent-filter> 

    Acontece que há muitas maneiras diferentes de podcasts podem ser configurados paira que cada filter de intenção só funcione paira alguns deles. Muitos filters diferentes precisam ser usados ​​paira obter o efeito desejado sobre a maioria dos links de inscrição.

    Aqui estão alguns dos filters que eu achei que funcionou:

     <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:scheme="itpc" /> <data android:scheme="pcast" /> <data android:scheme="feed" /> <data android:scheme="rss" /> </intent-filter> <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="*" android:pathPattern=".*xml" /> <data android:scheme="http" android:host="*" android:pathPattern=".*rss" /> <data android:scheme="http" android:host="*" android:pathPattern=".*feed.*" /> <data android:scheme="http" android:host="*" android:pathPattern=".*podcast.*" /> <data android:scheme="http" android:host="*" android:pathPattern=".*Podcast.*" /> <data android:scheme="http" android:host="*" android:pathPattern=".*rss.*" /> <data android:scheme="http" android:host="*" android:pathPattern=".*RSS.*" /> </intent-filter> <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:mimeType="text/xml" android:scheme="http" /> <data android:mimeType="application/rss+xml" android:scheme="http" /> <data android:mimeType="application/atom+xml" android:scheme="http" /> </intent-filter> 

    Estou no path certo?

    Sim. Contudo:

    • Você não precisa do esquema
    • Você está faltando o android: prefixo na frente do scheme , de qualquer maneira
    • type deve ser o android:mimeType

    Aqui está um exemplo de aplicação que demonstra, entre outras coisas, responder a links em files PDF.

    Poderia ser que o server não envia o mimetype direito?

    Experimente adicionando:

     <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:scheme="http" /> <data android:host="*" /> <data android:pathPattern=".*\\.rss" /> <data android:pathPattern=".*\\.xml" /> </intent-filter> 

    Editair: é um pouco complicado compor o conjunto certo de filters de intenção, há muitos returns iniciais no algorithm de correspondência:
    https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/content/IntentFilter.java

    No seu caso, o mimetype deve corresponder exatamente a qual 'application / rss + xml' suas fonts retornam esse mimetype no header da mensagem?

      URL url = new URL("http://www.engadget.com/rss.xml"); URLConnection conn = url.openConnection(); System.out.println("Content-Type:"+conn.getHeaderField("Content-Type")); 

    Tente:

    1. Faça filters mais amplos
    2. Adicione vários filters.
    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.