Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    Java Sdk not working in android 11-12

    NodeJS SDK
    0
    4
    51
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      techsharad last edited by

      generateSession() not working in android version above 10. its giving null pointer exception as Mac address not found. please help me out its very urgent. Thank you.

      B 2 Replies Last reply Reply Quote 1
      • B
        bh_nil @techsharad last edited by

        @techsharad Error : exception createPostRequest @admin please look into concern

        1 Reply Last reply Reply Quote 0
        • B
          bh_nil @techsharad last edited by

          @techsharad This function is giving error Null pointer exception
          public Request createPostRequest(String apiKey, String url, JSONObject params) {
          try {

          		MediaType JSON = MediaType.parse("application/json; charset=utf-8");
          		RequestBody body = RequestBody.create(params.toString(), JSON);
          
          		String privateKey = apiKey;
          		Request request = new Request.Builder().url(url).post(body).header("Content-Type", "application/json")
          				.header("X-ClientLocalIP", apiheader.getString("clientLocalIP"))
          				.header("X-ClientPublicIP", apiheader.getString("clientPublicIP"))
          				.header("X-MACAddress", apiheader.getString("macAddress"))
          				.header("Accept", apiheader.getString("accept")).header("X-PrivateKey", privateKey)
          				.header("X-UserType", apiheader.getString("userType"))
          				.header("X-SourceID", apiheader.getString("sourceID")).build();
          		return request;
          	} catch (JSONException e) {
          		System.out.println("exception createPostRequest");
          		System.out.println(e.getMessage());
          		return null;
          	}
          }
          
          1 Reply Last reply Reply Quote 0
          • T
            techtix last edited by techtix

            @techsharad said in Java Sdk not working in android 11-12:

            generateSession() not working

            I experienced a similar error while I was trying to integrate third-party apps. I think you will need to help of WorldPay developer, you can hire from techtix.co

            1 Reply Last reply Reply Quote 0
            • First post
              Last post