mercredi 22 avril 2015

How to get a list of permissions by specify App from Google Play programatically

I build a platform of java website and I want to program some java code that I can get a list of permissions by specify App from Google Play. I also search some Market API of open-source, such as android-market-api and google-play-crawler. When I use those API that I find some problems...

  • android-market-api:

    AppsRequest appsRequest = AppsRequest.newBuilder().setStartIndex(0)
                    .setEntriesCount(10).setQuery("pname:jp.naver.line.android")
                    .setWithExtendedInfo(true).build();
    
    session.append(appsRequest, new Callback<AppsResponse>() {
            @Override
            public void onResult(ResponseContext context, AppsResponse response) {
                    int count = response.getAppCount();
                    for (int i = 0; i < count; i++) {
                            System.out.println("app=" + i);
                            App app = response.getApp(i);
                            System.out.print(app.toString());                                   
                    }
            }
    });
    session.flush();
    
    
  • google-play-crawler

    String login = "xxxx@gmail.com";
    String password = "xxx";
    String androidId = "xxxx";
    String securitytoken = "xxx";
    String command = "permissions";
    String packageName="com.yelp.android";
    
    Changed_googleplay gp = new Changed_googleplay();
    
    gp.operate(new String[] { "-i", androidId, "-e", login,
    "-p", password, "-t", securitytoken, command,
    packageName });
    
    

My problem is that I can't get many app's permission and its' permissions always return empty. But I can make sure that API can return other info like PackegeName, version etc. Only a few app can work normally. I don't know what happen..

Can anyone help me or you can recommend me other solutions. Thank you:))

Aucun commentaire:

Enregistrer un commentaire