2013-11-24 24 views
0
之間的用戶選擇

我已經與Dropbox的支持Android應用程序,它使用AccessType.DROPBOX初始化的會議上,所以我配置Dropbox的開發者控制檯應用程序是「完全的Dropbox」。現在一些用戶不希望讓應用程序完全訪問其Dropbox,而是將他們想要用於該應用程序的文件複製到apps/MyAppName之類的應用程序中。讓AccessType.DROPBOX和AccessType.APP_FOLDER

有什麼辦法,我可以詢問用戶,然後要麼使用AccessType.DROPBOX或AccessType.APP_FOLDER?如果我只是建立我與AccessType.APP_FOLDER會議,身份驗證對話框仍要求全Dropbox的,可能是因爲它的配置是這樣的開發者控制檯。我剛剛發現

回答

0

一個選項是在Dropbox的控制檯配置兩個應用程序,並在清單中添加第二個意圖過濾器:

<activity 
     android:name="com.dropbox.client2.android.AuthActivity" 
     android:configChanges="orientation|keyboard" 
     android:launchMode="singleTask" > 
     <intent-filter> 

      <!-- db- followed by app key --> 
      <data android:scheme="db-APPKey1" /> 

      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.BROWSABLE" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
     <intent-filter> 

      <!-- db- followed by app key --> 
      <data android:scheme="db-APPKey2" /> 

      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.BROWSABLE" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 

我希望的Dropbox將允許生產階段的第二個應用程序...

+0

這是正確的答案......有兩個不同的應用程序鍵。在啓動授權流程之前,您必須讓用戶選擇他們想要使用的內容。 – smarx