0

I am not getting any response or error. I just want to decrypt and verify via google servers. I'm a bit of a beginner at this. Links: play integrity ,
volley

not working stackoverflow question

IntegrityManager integrityManager = IntegrityManagerFactory.create(getApplicationContext());
                    Task<IntegrityTokenResponse> integrityTokenResponse = integrityManager.requestIntegrityToken(IntegrityTokenRequest.builder().setNonce(mynonce).build());
                    integrityTokenResponse.addOnCompleteListener(new OnCompleteListener<IntegrityTokenResponse>() {
                        @Override
                        public void onComplete(@NonNull Task<IntegrityTokenResponse> taskplay) {
                            if (taskplay.isSuccessful()){
                                String mytoken=taskplay.getResult().token().toString();
                                String urlplay = "playintegrity.googleapis.com/v1/PACKAGE_NAME:decodeIntegrityToken -d \\\n" + "  '{ \"integrity_token\": "+mytoken+" }'";
                                JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, urlplay, null, new Response.Listener<JSONObject>() {
                                    @Override
                                    public void onResponse(JSONObject response) {

                                    }
                                }, new Response.ErrorListener() {
                                    @Override
                                    public void onErrorResponse(VolleyError error) {

                                    }
                                });
                            }
                        }
                    });
MySingleton.getInstance(this).addToRequestQueue(jsonObjectRequest);
Rubén
  • 34,714
  • 9
  • 70
  • 166
  • If you want to add information please edit your question. Comments are for discussion with other users. Also the part about volley and the part about app integrity check doesn't match together (the presented URL is designed to be executed from within your backend server, not from within your ap). Please edit your question and describe the relation between both parts. – Robert Feb 09 '23 at 14:29

1 Answers1

0

playintegrity.googleapis.com/v1/PACKAGE_NAME:decodeIntegrityToken

it is command to decode it on server not a url for call

Vijay
  • 571
  • 4
  • 4