如何保存Play商店中安装的应用程序ID? [英] how do i save playstore install application id?

查看:324
本文介绍了如何保存Play商店中安装的应用程序ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序I M给用户的搜索布顿从GOOGLEPLAY商店搜索应用,并保存应用程序的名称在数据库中,因此我在code写的Play商店中的网址
因此,当用户打开playstire是找到任何产品和安装我只是想保存eproduct ID存储在数据库中怎么做呢
?怎么我只保存sepcific项目从网址??

 开放的URI = Uri.parse(https://play.google.com/store/apps);
意向意图=新意图(Intent.ACTION_VIEW,URI);
startActivity(意向);

当用户点击这个按钮Play商店中开放假设用户searcj产品和安装的URL是这样的。

  https://play.google.com/store/apps/details?id=com.imangi.templerun2&
功能= search_result#?T = W251bGwsMSwxLDEsImNvbS5pbWFuZ2kudGVtcGxlcnVuMiJd

我怎么只保存ID构成本UL数据库是 ID = com.imangi.templerun2


解决方案

 字符串的URL =htt​​ps://play.google.com/store/apps/details?id=com。 imangi.templerun2&安培;
功能= search_result#T = W251bGwsMSwxLDEsImNvbS5pbWFuZ2kudGVtcGxlcnVuMiJd?;的String [] = splited url.split(与&);
的String [] n = splited [0] .split(ID =?);
//你的ID [1]将等于= com.imangi.templerun2

in my application i m giving user a search buton to search app from googleplay store and save that application name in database so i write playstore url in my code so when user open playstire is find any product and install i just want to save that eproduct id save in database how do i do that ? how i save only sepcific item from url??

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

When user click this button playstore open suppose user searcj a product and install which url is this

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

How do i save only id form this ul to database which is id=com.imangi.templerun2

解决方案

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 

这篇关于如何保存Play商店中安装的应用程序ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆