2012-10-18 4 views
3

내 앱이 특정 사이트 링크를 열어 사람들에게 앱을 보내길 원합니다. 응용 프로그램이 설치되어있는 경우,이 경이로움을 작동합니다Spotify 인 텐트 시작하기

그러나
final Intent intent = new Intent(Intent.ACTION_VIEW, 
        Uri.parse("spotify:album:7rt7AxYexFTtdEqaJPekvX")); 

,이 응용 프로그램이 아직 설치되지 않은 경우가 될 것이다, 그래서이 다른 의도로 플레이 그들이 구글에서 다운로드 할 수 있습니다 :

final Intent intent = new Intent(
        Intent.ACTION_VIEW, 
        Uri.parse("https://play.google.com/store/apps/details?id=com.spotify.mobile.android.ui")); 

하지만 Google Play가 설치되어있는 경우 사람들이 앱을 열도록 선택하는 대신 Google Play에서 바로 설치하기를 원합니다. Google Play가 누락 된 경우 열려고하는 앱을 선택해야합니다 (종종 탐색기가되지만 무엇이든).

이 방법이 있습니까? http://developer.android.com/distribute/googleplay/promote/linking.html

:

답변

3

그러나, 난 정말 대신

사용 market://Uri 대신 https://Uri을 열 수있는 응용 프로그램을 선택하는 사람들을시키는의 Google Play에서 직접 설치하려면 또한 공개적으로 문서화되고 지원되는 경우에만 spotify: 구성표를 사용하십시오.

+0

Spotify를 설치 한 경우에만 작동합니다. – razielsarafan

+0

@ santirivera92 : Spotify가 앱을 바꿀 때까지 공개적으로 문서화되고 지원되는 경우에만'spotify :'계획을 사용하십시오. – CommonsWare

+1

http://www.spotify.com/es/blog/archives/2008/01/14/linking-to-spotify/입니다. 모든 Spotify 앱에서도 일정합니다. – razielsarafan