2013-06-23 42 views
0

在我的應用IM給用戶的搜索布頓從GOOGLEPLAY商店搜索應用,並保存在數據庫應用程序的名稱,所以我寫Play商店中的網址在我的代碼 所以當用戶打開playstire是找到任何產品並安裝我只是想保存eproduct id保存在數據庫中我該怎麼做 ?我如何保存從url唯一項目?我如何保存Playstore安裝應用程序ID?

Uri uri = Uri.parse("https://play.google.com/store/apps"); 
Intent intent = new Intent(Intent.ACTION_VIEW, uri); 
startActivity(intent); 

當用戶點擊這個按鈕Play商店中開放假設用戶searcj產品和安裝的網址是這個

https://play.google.com/store/apps/details?id=com.imangi.templerun2&  
feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5pbWFuZ2kudGVtcGxlcnVuMiJd 

如何保存唯一ID構成本UL數據庫是id=com.imangi.templerun2

+0

按照本教程http://www.androidhive.info/2011/11/android-sqlite-database-tutorial/ – MDMalik

+0

查看Android培訓指南的這一部分:http://developer.android.com/training/ b asics/data-storage/index.html – Evilunclebill

+0

不,不知道如何保存在數據庫中只是打電話給我什麼應用程序用戶從應用程序商店安裝我如何保存是數據庫中的ID?如何diffrenciate ID從URL –

回答

1
String url = "https://play.google.com/store/apps/details?id=com.imangi.templerun2&  
feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5pbWFuZ2kudGVtcGxlcnVuMiJd"; 

String[] splited = url.split("&"); 
String[] id = splited[0].split("?id="); 
// your id[1] will equal = com.imangi.templerun2 
+0

的許多方面的問題是我不知道的應用程序用戶想我只是給在點擊按鈕WEBURL這是https://play.google.com/store/apps」,所以瀏覽器會oepn因此,假設用戶安裝任何東西AP我如何保存在我的數據庫AP ID我專有技術在數據庫中插入只是告訴我,我怎麼把該應用程序ID形式的網址是用戶安裝 –

+0

UR tricvk少幫我,但我該怎麼辦?我只是給這個網址https://play.google.com/store/apps「和網址將oepn我如何獲得身份證表格的網頁? –

+0

如何保存網址? bcoz當這個網址的用戶點擊play.google.com/store/apps應用程序商店開,所以我如何保存這個網址「https://play.google.com/store/apps/details?id=com.imangi.templerun2& 功能= search_result#?T = W251bGwsMSwxLDEsImNvbS5pbWFuZ2kudGVtcGxlcnVuMiJd」 –

相關問題