2017-09-14 98 views
0

我的導航抽屜中有一項名爲「共享應用程序」的項目,用戶可以使用該項目將應用程序鏈接分享給其他用戶。 我的問題是,我可以在沒有首先上傳到谷歌播放的情況下獲得鏈接。我不打算重新上傳我的應用程序在其他應用此功能。 我試過尋找這個答案沒有任何有意義的解決方案。在上傳之前從Google Play獲取應用程序鏈接

try { 
       Intent i = new Intent(Intent.ACTION_SEND); 
       i.setType("text/plain"); 
       i.putExtra(Intent.EXTRA_SUBJECT, "My application name"); 
       String sAux = "\nLet me recommend you this application\n\n"; 
       sAux = sAux + "https://play.google.com/store/apps/details?id=com.app.ben.example \n\n"; 
       i.putExtra(Intent.EXTRA_TEXT, sAux); 
       startActivity(Intent.createChooser(i, "choose one")); 
      } catch(Exception e) { 
       e.toString(); 
      } 

回答

0

Play store鏈接是確定性的。你的鏈接應該是這樣的:

https://play.google.com/store/apps/details?id=packagename

編輯 要知道你的包名,在明顯的標籤搜索包:https://developer.android.com/guide/topics/manifest/manifest-element.html

+0

做ü意思是這樣的? 「https://play.google.com/store/apps/details?id=com.example.leavenotes」? – Benfight

+0

就是這樣。鏈接末尾有%22。流浪的引號?希望它不是故意的。 –

+0

你是指引號後的意思嗎? – Benfight

相關問題