{"action":"created","issue":{"url":"https://api.github.com/repos/android-cn/android-discuss/issues/98","labels_url":"https://api.github.com/repos/android-cn/android-discuss/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/android-cn/android-discuss/issues/98/comments","events_url":"https://api.github.com/repos/android-cn/android-discuss/issues/98/events","html_url":"https://github.com/android-cn/android-discuss/issues/98","id":63384276,"number":98,"title":"[问答]如何通过外部隐式Intent调用Service","user":{"login":"mthli","id":4550173,"avatar_url":"https://avatars.githubusercontent.com/u/4550173?v=3","gravatar_id":"","url":"https://api.github.com/users/mthli","html_url":"https://github.com/mthli","followers_url":"https://api.github.com/users/mthli/followers","following_url":"https://api.github.com/users/mthli/following{/other_user}","gists_url":"https://api.github.com/users/mthli/gists{/gist_id}","starred_url":"https://api.github.com/users/mthli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mthli/subscriptions","organizations_url":"https://api.github.com/users/mthli/orgs","repos_url":"https://api.github.com/users/mthli/repos","events_url":"https://api.github.com/users/mthli/events{/privacy}","received_events_url":"https://api.github.com/users/mthli/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-21T10:00:27Z","updated_at":"2015-03-22T14:55:07Z","closed_at":"2015-03-22T00:15:07Z","body":"现在有一个具体的问题，通常点击一个链接之后会跳转到浏览器，我的想法是点击链接后在后台加载网页，而不是跳转到浏览器等待。所以我这样做了：\r\n\r\n    <service ...>\r\n        <intent-filter>\r\n            <action android:name=\"android.intent.action.VIEW\" />\r\n            <category android:name=\"android.intent.category.DEFAULT\" />\r\n            <category android:name=\"android.intent.category.BROWSABLE\" />\r\n            <data android:scheme=\"http\" />\r\n            <data android:scheme=\"https\" />\r\n        </intent-filter>\r\n    </service>\r\n\r\n结果是点击链接之后不会出现应用选择器，Service也不会被运行。[Intent | Android Developers](http://developer.android.com/reference/android/content/Intent.html#ACTION_VIEW \"Intent #ACTION_VIEW\")中描述__android.intent.action.VIEW__是__Activity Action__，这是否意味着这个action只能被用于Activity？\r\n\r\n或者有其他的方式可以实现点击链接启动Service的方法？"},"comment":{"url":"https://api.github.com/repos/android-cn/android-discuss/issues/comments/84625463","html_url":"https://github.com/android-cn/android-discuss/issues/98#issuecomment-84625463","issue_url":"https://api.github.com/repos/android-cn/android-discuss/issues/98","id":84625463,"user":{"login":"yuchuangu85","id":7369323,"avatar_url":"https://avatars.githubusercontent.com/u/7369323?v=3","gravatar_id":"","url":"https://api.github.com/users/yuchuangu85","html_url":"https://github.com/yuchuangu85","followers_url":"https://api.github.com/users/yuchuangu85/followers","following_url":"https://api.github.com/users/yuchuangu85/following{/other_user}","gists_url":"https://api.github.com/users/yuchuangu85/gists{/gist_id}","starred_url":"https://api.github.com/users/yuchuangu85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuchuangu85/subscriptions","organizations_url":"https://api.github.com/users/yuchuangu85/orgs","repos_url":"https://api.github.com/users/yuchuangu85/repos","events_url":"https://api.github.com/users/yuchuangu85/events{/privacy}","received_events_url":"https://api.github.com/users/yuchuangu85/received_events","type":"User","site_admin":false},"created_at":"2015-03-22T14:55:06Z","updated_at":"2015-03-22T14:55:06Z","body":"在android5.0系统中建议用显示启动服务，我测试时用隐士的就报错"}}