• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

Smart School Android App - Mobile Application for Smart School

Smart School Android App - Mobile Application for Smart School v4.0

No permission to download
Has any body nulled it. it has query in dashboard.java

app\src\main\java\com\**Name**\students\NewDashboard.java
Code:
private void getDatasFromApi(String bodyParams) {

        final ProgressDialog pd = new ProgressDialog(this);
        pd.setMessage("Loading");
        pd.setCancelable(false);
        pd.show();

        final String requestBody = bodyParams;

            String url = "https://sstrace.qdocs.in/postlic/verifyappjsonv2";
            StringRequest stringRequest = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {
                @Override
                public void onResponse(String result) {
                    System.out.println("result=="+result);
                    if (result != null) {
                        pd.dismiss();
                        try {

                            JSONObject object = new JSONObject(result);

                            if(object.getString("status").equals("0")) {
                                Utility.setSharedPreferenceBoolean(getApplicationContext(), Constants.isLoggegIn, false);

                                android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(NewDashboard.this);
                                builder.setCancelable(false);
                                //builder.setMessage(R.string.verificationMessage);
                                builder.setMessage(object.getString("msg"));
                                builder.setTitle("");
                                builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {

                                    public void onClick(DialogInterface dialog, int which) {
                                        if (Utility.isConnectingToInternet(getApplicationContext())) {
                                            logoutparams.put("deviceToken", device_token);
                                            JSONObject obj=new JSONObject(logoutparams);
                                            Log.e("params ", obj.toString());
                                            System.out.println("Logout Details=="+obj.toString());
                                            loginOutApi(obj.toString());
                                        } else {
                                            makeText(getApplicationContext(),R.string.noInternetMsg, Toast.LENGTH_SHORT).show();
                                        }
                                    }
                                });

                                android.app.AlertDialog alert = builder.create();
                                alert.show();
                            }else {

                                if (Utility.getSharedPreferences(getApplicationContext(), Constants.loginType).equals("student")) {
                                    aparams.put("id", Utility.getSharedPreferences(getApplicationContext(), "studentId"));
                                    aparams.put("user_type", Utility.getSharedPreferences(getApplicationContext(), Constants.loginType));
                                    JSONObject obj = new JSONObject(aparams);
                                    Log.e("params ", obj.toString());
                                    System.out.println("Status Details==" + obj.toString());
                                    checkStudentStatus(obj.toString());
                                } else {
                                    aparams.put("id", Utility.getSharedPreferences(getApplicationContext(), Constants.parentsId));
                                    aparams.put("user_type", Utility.getSharedPreferences(getApplicationContext(), Constants.loginType));
                                    JSONObject obj = new JSONObject(aparams);
                                    Log.e("params ", obj.toString());
                                    System.out.println("Status Details==" + obj.toString());
                                    checkStudentStatus(obj.toString());
                                }
                            }

                        } catch (JSONException e) {
                            e.printStackTrace();
                        }
                    } else {
                        pd.dismiss();
                    }
                }
            }, new Response.ErrorListener() {
                @Override
                public void onErrorResponse(VolleyError volleyError) {
                    pd.dismiss();
                    Log.e("Volley Error", volleyError.toString());
                    Toast.makeText(NewDashboard.this, R.string.apiErrorMsg, Toast.LENGTH_LONG).show();
                }
            }) {
                @Override
                public Map<String, String> getHeaders() throws AuthFailureError {
                    headers.put("Client-Service", Constants.clientService);
                    headers.put("Auth-Key", Constants.authKey);
                    headers.put("Content-Type", Constants.contentType);
                    headers.put("User-ID", Utility.getSharedPreferences(getApplicationContext(), "userId"));
                    headers.put("Authorization", Utility.getSharedPreferences(getApplicationContext(), "accessToken"));
                    return headers;
                }

                @Override
                public String getBodyContentType() {
                    return "application/json; charset=utf-8";
                }

                @Override
                public byte[] getBody() throws AuthFailureError {
                    try {
                        return requestBody == null ? null : requestBody.getBytes("utf-8");
                    } catch (UnsupportedEncodingException uee) {
                        VolleyLog.wtf("Unsupported Encoding while trying to get the bytes of %s using %s", requestBody, "utf-8");
                        return null;
                    }
                }
            };
            //Creating a Request Queue
            RequestQueue requestQueue = Volley.newRequestQueue(NewDashboard.this);
            //Adding request to the queue
            requestQueue.add(stringRequest);


    }
 
  • Love
Reactions: khali06
Hi guys ,
First of all thanks for sharing.
Does it work with Java 11, gradle 7.2 and API targetsdk 34?
And is it Nulled?
Thank for your reply
 
Has any body nulled it. it has query in dashboard.java

app\src\main\java\com\**Name**\students\NewDashboard.java
Code:
private void getDatasFromApi(String bodyParams) {

        final ProgressDialog pd = new ProgressDialog(this);
        pd.setMessage("Loading");
        pd.setCancelable(false);
        pd.show();

        final String requestBody = bodyParams;

            String url = "https://sstrace.qdocs.in/postlic/verifyappjsonv2";
            StringRequest stringRequest = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {
                @Override
                public void onResponse(String result) {
                    System.out.println("result=="+result);
                    if (result != null) {
                        pd.dismiss();
                        try {

                            JSONObject object = new JSONObject(result);

                            if(object.getString("status").equals("0")) {
                                Utility.setSharedPreferenceBoolean(getApplicationContext(), Constants.isLoggegIn, false);

                                android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(NewDashboard.this);
                                builder.setCancelable(false);
                                //builder.setMessage(R.string.verificationMessage);
                                builder.setMessage(object.getString("msg"));
                                builder.setTitle("");
                                builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {

                                    public void onClick(DialogInterface dialog, int which) {
                                        if (Utility.isConnectingToInternet(getApplicationContext())) {
                                            logoutparams.put("deviceToken", device_token);
                                            JSONObject obj=new JSONObject(logoutparams);
                                            Log.e("params ", obj.toString());
                                            System.out.println("Logout Details=="+obj.toString());
                                            loginOutApi(obj.toString());
                                        } else {
                                            makeText(getApplicationContext(),R.string.noInternetMsg, Toast.LENGTH_SHORT).show();
                                        }
                                    }
                                });

                                android.app.AlertDialog alert = builder.create();
                                alert.show();
                            }else {

                                if (Utility.getSharedPreferences(getApplicationContext(), Constants.loginType).equals("student")) {
                                    aparams.put("id", Utility.getSharedPreferences(getApplicationContext(), "studentId"));
                                    aparams.put("user_type", Utility.getSharedPreferences(getApplicationContext(), Constants.loginType));
                                    JSONObject obj = new JSONObject(aparams);
                                    Log.e("params ", obj.toString());
                                    System.out.println("Status Details==" + obj.toString());
                                    checkStudentStatus(obj.toString());
                                } else {
                                    aparams.put("id", Utility.getSharedPreferences(getApplicationContext(), Constants.parentsId));
                                    aparams.put("user_type", Utility.getSharedPreferences(getApplicationContext(), Constants.loginType));
                                    JSONObject obj = new JSONObject(aparams);
                                    Log.e("params ", obj.toString());
                                    System.out.println("Status Details==" + obj.toString());
                                    checkStudentStatus(obj.toString());
                                }
                            }

                        } catch (JSONException e) {
                            e.printStackTrace();
                        }
                    } else {
                        pd.dismiss();
                    }
                }
            }, new Response.ErrorListener() {
                @Override
                public void onErrorResponse(VolleyError volleyError) {
                    pd.dismiss();
                    Log.e("Volley Error", volleyError.toString());
                    Toast.makeText(NewDashboard.this, R.string.apiErrorMsg, Toast.LENGTH_LONG).show();
                }
            }) {
                @Override
                public Map<String, String> getHeaders() throws AuthFailureError {
                    headers.put("Client-Service", Constants.clientService);
                    headers.put("Auth-Key", Constants.authKey);
                    headers.put("Content-Type", Constants.contentType);
                    headers.put("User-ID", Utility.getSharedPreferences(getApplicationContext(), "userId"));
                    headers.put("Authorization", Utility.getSharedPreferences(getApplicationContext(), "accessToken"));
                    return headers;
                }

                @Override
                public String getBodyContentType() {
                    return "application/json; charset=utf-8";
                }

                @Override
                public byte[] getBody() throws AuthFailureError {
                    try {
                        return requestBody == null ? null : requestBody.getBytes("utf-8");
                    } catch (UnsupportedEncodingException uee) {
                        VolleyLog.wtf("Unsupported Encoding while trying to get the bytes of %s using %s", requestBody, "utf-8");
                        return null;
                    }
                }
            };
            //Creating a Request Queue
            RequestQueue requestQueue = Volley.newRequestQueue(NewDashboard.this);
            //Adding request to the queue
            requestQueue.add(stringRequest);


    }
anybody can look in to this pls
 
Has any body nulled it. it has query in dashboard.java

app\src\main\java\com\**Name**\students\NewDashboard.java
Code:
private void getDatasFromApi(String bodyParams) {

        final ProgressDialog pd = new ProgressDialog(this);
        pd.setMessage("Loading");
        pd.setCancelable(false);
        pd.show();

        final String requestBody = bodyParams;

            String url = "https://sstrace.qdocs.in/postlic/verifyappjsonv2";
            StringRequest stringRequest = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {
                @Override
                public void onResponse(String result) {
                    System.out.println("result=="+result);
                    if (result != null) {
                        pd.dismiss();
                        try {

                            JSONObject object = new JSONObject(result);

                            if(object.getString("status").equals("0")) {
                                Utility.setSharedPreferenceBoolean(getApplicationContext(), Constants.isLoggegIn, false);

                                android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(NewDashboard.this);
                                builder.setCancelable(false);
                                //builder.setMessage(R.string.verificationMessage);
                                builder.setMessage(object.getString("msg"));
                                builder.setTitle("");
                                builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {

                                    public void onClick(DialogInterface dialog, int which) {
                                        if (Utility.isConnectingToInternet(getApplicationContext())) {
                                            logoutparams.put("deviceToken", device_token);
                                            JSONObject obj=new JSONObject(logoutparams);
                                            Log.e("params ", obj.toString());
                                            System.out.println("Logout Details=="+obj.toString());
                                            loginOutApi(obj.toString());
                                        } else {
                                            makeText(getApplicationContext(),R.string.noInternetMsg, Toast.LENGTH_SHORT).show();
                                        }
                                    }
                                });

                                android.app.AlertDialog alert = builder.create();
                                alert.show();
                            }else {

                                if (Utility.getSharedPreferences(getApplicationContext(), Constants.loginType).equals("student")) {
                                    aparams.put("id", Utility.getSharedPreferences(getApplicationContext(), "studentId"));
                                    aparams.put("user_type", Utility.getSharedPreferences(getApplicationContext(), Constants.loginType));
                                    JSONObject obj = new JSONObject(aparams);
                                    Log.e("params ", obj.toString());
                                    System.out.println("Status Details==" + obj.toString());
                                    checkStudentStatus(obj.toString());
                                } else {
                                    aparams.put("id", Utility.getSharedPreferences(getApplicationContext(), Constants.parentsId));
                                    aparams.put("user_type", Utility.getSharedPreferences(getApplicationContext(), Constants.loginType));
                                    JSONObject obj = new JSONObject(aparams);
                                    Log.e("params ", obj.toString());
                                    System.out.println("Status Details==" + obj.toString());
                                    checkStudentStatus(obj.toString());
                                }
                            }

                        } catch (JSONException e) {
                            e.printStackTrace();
                        }
                    } else {
                        pd.dismiss();
                    }
                }
            }, new Response.ErrorListener() {
                @Override
                public void onErrorResponse(VolleyError volleyError) {
                    pd.dismiss();
                    Log.e("Volley Error", volleyError.toString());
                    Toast.makeText(NewDashboard.this, R.string.apiErrorMsg, Toast.LENGTH_LONG).show();
                }
            }) {
                @Override
                public Map<String, String> getHeaders() throws AuthFailureError {
                    headers.put("Client-Service", Constants.clientService);
                    headers.put("Auth-Key", Constants.authKey);
                    headers.put("Content-Type", Constants.contentType);
                    headers.put("User-ID", Utility.getSharedPreferences(getApplicationContext(), "userId"));
                    headers.put("Authorization", Utility.getSharedPreferences(getApplicationContext(), "accessToken"));
                    return headers;
                }

                @Override
                public String getBodyContentType() {
                    return "application/json; charset=utf-8";
                }

                @Override
                public byte[] getBody() throws AuthFailureError {
                    try {
                        return requestBody == null ? null : requestBody.getBytes("utf-8");
                    } catch (UnsupportedEncodingException uee) {
                        VolleyLog.wtf("Unsupported Encoding while trying to get the bytes of %s using %s", requestBody, "utf-8");
                        return null;
                    }
                }
            };
            //Creating a Request Queue
            RequestQueue requestQueue = Volley.newRequestQueue(NewDashboard.this);
            //Adding request to the queue
            requestQueue.add(stringRequest);


    }
PHP:
private void getDatasFromApi(String bodyParams) {

        final ProgressDialog pd = new ProgressDialog(this);
        pd.setMessage("Loading");
        pd.setCancelable(false);
        pd.show();

        final String requestBody = bodyParams;

            String url = "https://localhost.com/";
            StringRequest stringRequest = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {
                @Override
                public void onResponse(String result) {
                    System.out.println("result=="+result);
                    if (result != null) {
                        pd.dismiss();
                        try {

                            JSONObject object = new JSONObject(result);

                            if(object.getString("status").equals("1")) {
                                Utility.setSharedPreferenceBoolean(getApplicationContext(), Constants.isLoggegIn, false);

                                android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(NewDashboard.this);
                                builder.setCancelable(false);
                                //builder.setMessage(R.string.verificationMessage);
                                builder.setMessage(object.getString("msg"));
                                builder.setTitle("");
                                builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {

                                    public void onClick(DialogInterface dialog, int which) {
                                        if (Utility.isConnectingToInternet(getApplicationContext())) {
                                            logoutparams.put("deviceToken", device_token);
                                            JSONObject obj=new JSONObject(logoutparams);
                                            Log.e("params ", obj.toString());
                                            System.out.println("Logout Details=="+ obj);
                                            loginOutApi(obj.toString());
                                        } else {
                                            makeText(getApplicationContext(),R.string.noInternetMsg, Toast.LENGTH_SHORT).show();
                                        }
                                    }
                                });

                                android.app.AlertDialog alert = builder.create();
                                alert.show();
                            }else {

                                if (Utility.getSharedPreferences(getApplicationContext(), Constants.loginType).equals("student")) {
                                    aparams.put("id", Utility.getSharedPreferences(getApplicationContext(), "studentId"));
                                    aparams.put("user_type", Utility.getSharedPreferences(getApplicationContext(), Constants.loginType));
                                    JSONObject obj = new JSONObject(aparams);
                                    Log.e("params ", obj.toString());
                                    System.out.println("Status Details==" + obj);
                                    checkStudentStatus(obj.toString());
                                } else {
                                    aparams.put("id", Utility.getSharedPreferences(getApplicationContext(), Constants.parentsId));
                                    aparams.put("user_type", Utility.getSharedPreferences(getApplicationContext(), Constants.loginType));
                                    JSONObject obj = new JSONObject(aparams);
                                    Log.e("params ", obj.toString());
                                    System.out.println("Status Details==" + obj);
                                    checkStudentStatus(obj.toString());
                                }
                            }

                        } catch (JSONException e) {
                            e.printStackTrace();
                        }
                    } else {
                        pd.dismiss();
                    }
                }
            }, new Response.ErrorListener() {
                @Override
                public void onErrorResponse(VolleyError volleyError) {
                    pd.dismiss();
                    Log.e("Volley Error", volleyError.toString());
                    Toast.makeText(NewDashboard.this, R.string.apiErrorMsg, Toast.LENGTH_LONG).show();
                }
            }) {
                @Override
                public Map<String, String> getHeaders() throws AuthFailureError {
                    headers.put("Client-Service", Constants.clientService);
                    headers.put("Auth-Key", Constants.authKey);
                    headers.put("Content-Type", Constants.contentType);
                    headers.put("User-ID", Utility.getSharedPreferences(getApplicationContext(), "userId"));
                    headers.put("Authorization", Utility.getSharedPreferences(getApplicationContext(), "accessToken"));
                    return headers;
                }

                @Override
                public String getBodyContentType() {
                    return "application/json; charset=utf-8";
                }

                @Override
                public byte[] getBody() throws AuthFailureError {
                    return requestBody == null ? null : requestBody.getBytes(StandardCharsets.UTF_8);
                }
            };
            //Creating a Request Queue
            RequestQueue requestQueue = Volley.newRequestQueue(NewDashboard.this);
            //Adding request to the queue
            requestQueue.add(stringRequest);


    }


Here is the modified code that works.
 
  • Like
Reactions: deadmanwalking
PHP:
private void getDatasFromApi(String bodyParams) {

        final ProgressDialog pd = new ProgressDialog(this);
        pd.setMessage("Loading");
        pd.setCancelable(false);
        pd.show();

        final String requestBody = bodyParams;

            String url = "https://localhost.com/";
            StringRequest stringRequest = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {
                @Override
                public void onResponse(String result) {
                    System.out.println("result=="+result);
                    if (result != null) {
                        pd.dismiss();
                        try {

                            JSONObject object = new JSONObject(result);

                            if(object.getString("status").equals("1")) {
                                Utility.setSharedPreferenceBoolean(getApplicationContext(), Constants.isLoggegIn, false);

                                android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(NewDashboard.this);
                                builder.setCancelable(false);
                                //builder.setMessage(R.string.verificationMessage);
                                builder.setMessage(object.getString("msg"));
                                builder.setTitle("");
                                builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {

                                    public void onClick(DialogInterface dialog, int which) {
                                        if (Utility.isConnectingToInternet(getApplicationContext())) {
                                            logoutparams.put("deviceToken", device_token);
                                            JSONObject obj=new JSONObject(logoutparams);
                                            Log.e("params ", obj.toString());
                                            System.out.println("Logout Details=="+ obj);
                                            loginOutApi(obj.toString());
                                        } else {
                                            makeText(getApplicationContext(),R.string.noInternetMsg, Toast.LENGTH_SHORT).show();
                                        }
                                    }
                                });

                                android.app.AlertDialog alert = builder.create();
                                alert.show();
                            }else {

                                if (Utility.getSharedPreferences(getApplicationContext(), Constants.loginType).equals("student")) {
                                    aparams.put("id", Utility.getSharedPreferences(getApplicationContext(), "studentId"));
                                    aparams.put("user_type", Utility.getSharedPreferences(getApplicationContext(), Constants.loginType));
                                    JSONObject obj = new JSONObject(aparams);
                                    Log.e("params ", obj.toString());
                                    System.out.println("Status Details==" + obj);
                                    checkStudentStatus(obj.toString());
                                } else {
                                    aparams.put("id", Utility.getSharedPreferences(getApplicationContext(), Constants.parentsId));
                                    aparams.put("user_type", Utility.getSharedPreferences(getApplicationContext(), Constants.loginType));
                                    JSONObject obj = new JSONObject(aparams);
                                    Log.e("params ", obj.toString());
                                    System.out.println("Status Details==" + obj);
                                    checkStudentStatus(obj.toString());
                                }
                            }

                        } catch (JSONException e) {
                            e.printStackTrace();
                        }
                    } else {
                        pd.dismiss();
                    }
                }
            }, new Response.ErrorListener() {
                @Override
                public void onErrorResponse(VolleyError volleyError) {
                    pd.dismiss();
                    Log.e("Volley Error", volleyError.toString());
                    Toast.makeText(NewDashboard.this, R.string.apiErrorMsg, Toast.LENGTH_LONG).show();
                }
            }) {
                @Override
                public Map<String, String> getHeaders() throws AuthFailureError {
                    headers.put("Client-Service", Constants.clientService);
                    headers.put("Auth-Key", Constants.authKey);
                    headers.put("Content-Type", Constants.contentType);
                    headers.put("User-ID", Utility.getSharedPreferences(getApplicationContext(), "userId"));
                    headers.put("Authorization", Utility.getSharedPreferences(getApplicationContext(), "accessToken"));
                    return headers;
                }

                @Override
                public String getBodyContentType() {
                    return "application/json; charset=utf-8";
                }

                @Override
                public byte[] getBody() throws AuthFailureError {
                    return requestBody == null ? null : requestBody.getBytes(StandardCharsets.UTF_8);
                }
            };
            //Creating a Request Queue
            RequestQueue requestQueue = Volley.newRequestQueue(NewDashboard.this);
            //Adding request to the queue
            requestQueue.add(stringRequest);


    }


Here is the modified code that works.
been waiting for some1 to pitch on this let me try
 
If you want to null make following changes in
app/src/main/java/com/qdocs/app/students/NewDashboard.java

Change line 1006 from
Code:
            String url = "https://sstrace.qdocs.in/postlic/verifyappjsonv2";

to
Code:
            String url = "https://localhost.com";
1703937750518.png And change line 1017 from

Code:
                            if(object.getString("status").equals("0")) {

to

Code:
                            if(object.getString("status").equals("1")) {
1703937824262.png
 
  • Like
Reactions: intelyes
been waiting for some1 to pitch on this let me try
I just bypassed it.
been waiting for some1 to pitch on this let me try
Can you help me with this? New to android studio not much experience with it.


I am unable to remove Smart School logo from login, forget password and dashboard top. I have replaced the image files in drawables with my logo, but it doesnt refresh when I test run the apk. I have checked I cant see any smartschool logo anywhere in directory, but still it fetches somehow.
 
been waiting for some1 to pitch on this let me try
I just bypassed it. r
Screenshot (3).png

Anyone how to fix I'm using latest Android Studio
Honestly buddy, I tried to build project on my windows for 3 hours and too much errors. I went with Mac. What worked for me was, changing gradle version. to 7.3.3 and Gradle plugin version to 7.2.0
Also changed this two lines (40 and 41) with
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
 
I just bypassed it. r

Honestly buddy, I tried to build project on my windows for 3 hours and too much errors. I went with Mac. What worked for me was, changing gradle version. to 7.3.3 and Gradle plugin version to 7.2.0
Also changed this two lines (40 and 41) with
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
i can assist you on that let me compile with this changes and let me ping u back
 


Version 4.0

Mon, 08 Jan, 2024
Smart School Android App

Released Date: 9 January, 2024

General Changes
  • Whole system updated for PHP version 8.1
  • Updated for Codeigniter 3 latest version 3.1.13
  • Api level 33 update

Bug Fixes
  • File upload issue
  • Processing Fees issue
 
PHP:
private void getDatasFromApi(String bodyParams) {

        final ProgressDialog pd = new ProgressDialog(this);
        pd.setMessage("Loading");
        pd.setCancelable(false);
        pd.show();

        final String requestBody = bodyParams;

            String url = "https://localhost.com/";
            StringRequest stringRequest = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {
                @Override
                public void onResponse(String result) {
                    System.out.println("result=="+result);
                    if (result != null) {
                        pd.dismiss();
                        try {

                            JSONObject object = new JSONObject(result);

                            if(object.getString("status").equals("1")) {
                                Utility.setSharedPreferenceBoolean(getApplicationContext(), Constants.isLoggegIn, false);

                                android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(NewDashboard.this);
                                builder.setCancelable(false);
                                //builder.setMessage(R.string.verificationMessage);
                                builder.setMessage(object.getString("msg"));
                                builder.setTitle("");
                                builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {

                                    public void onClick(DialogInterface dialog, int which) {
                                        if (Utility.isConnectingToInternet(getApplicationContext())) {
                                            logoutparams.put("deviceToken", device_token);
                                            JSONObject obj=new JSONObject(logoutparams);
                                            Log.e("params ", obj.toString());
                                            System.out.println("Logout Details=="+ obj);
                                            loginOutApi(obj.toString());
                                        } else {
                                            makeText(getApplicationContext(),R.string.noInternetMsg, Toast.LENGTH_SHORT).show();
                                        }
                                    }
                                });

                                android.app.AlertDialog alert = builder.create();
                                alert.show();
                            }else {

                                if (Utility.getSharedPreferences(getApplicationContext(), Constants.loginType).equals("student")) {
                                    aparams.put("id", Utility.getSharedPreferences(getApplicationContext(), "studentId"));
                                    aparams.put("user_type", Utility.getSharedPreferences(getApplicationContext(), Constants.loginType));
                                    JSONObject obj = new JSONObject(aparams);
                                    Log.e("params ", obj.toString());
                                    System.out.println("Status Details==" + obj);
                                    checkStudentStatus(obj.toString());
                                } else {
                                    aparams.put("id", Utility.getSharedPreferences(getApplicationContext(), Constants.parentsId));
                                    aparams.put("user_type", Utility.getSharedPreferences(getApplicationContext(), Constants.loginType));
                                    JSONObject obj = new JSONObject(aparams);
                                    Log.e("params ", obj.toString());
                                    System.out.println("Status Details==" + obj);
                                    checkStudentStatus(obj.toString());
                                }
                            }

                        } catch (JSONException e) {
                            e.printStackTrace();
                        }
                    } else {
                        pd.dismiss();
                    }
                }
            }, new Response.ErrorListener() {
                @Override
                public void onErrorResponse(VolleyError volleyError) {
                    pd.dismiss();
                    Log.e("Volley Error", volleyError.toString());
                    Toast.makeText(NewDashboard.this, R.string.apiErrorMsg, Toast.LENGTH_LONG).show();
                }
            }) {
                @Override
                public Map<String, String> getHeaders() throws AuthFailureError {
                    headers.put("Client-Service", Constants.clientService);
                    headers.put("Auth-Key", Constants.authKey);
                    headers.put("Content-Type", Constants.contentType);
                    headers.put("User-ID", Utility.getSharedPreferences(getApplicationContext(), "userId"));
                    headers.put("Authorization", Utility.getSharedPreferences(getApplicationContext(), "accessToken"));
                    return headers;
                }

                @Override
                public String getBodyContentType() {
                    return "application/json; charset=utf-8";
                }

                @Override
                public byte[] getBody() throws AuthFailureError {
                    return requestBody == null ? null : requestBody.getBytes(StandardCharsets.UTF_8);
                }
            };
            //Creating a Request Queue
            RequestQueue requestQueue = Volley.newRequestQueue(NewDashboard.this);
            //Adding request to the queue
            requestQueue.add(stringRequest);


    }


Here is the modified code that works.
@MichaelKingzztonne i tried ur modification unable to connect to my test server give me error unable to get response from api, any inputs
 
If you want to null make following changes in
app/src/main/java/com/qdocs/app/students/NewDashboard.java

Change line 1006 from
Code:
            String url = "https://sstrace.qdocs.in/postlic/verifyappjsonv2";

to
Code:
            String url = "https://localhost.com";
1703937750518.png And change line 1017 from

Code:
                            if(object.getString("status").equals("0")) {

to

Code:
                            if(object.getString("status").equals("1")) {
1703937824262.png
It worked .. thanks
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock