isInit = true;
}
}
public static void validateApiKey(String apikey) throws MalformedURLException, IOException, PushInvalidApiKeyException{
Message message = new Message.Builder().addData("message", "validateAPIKEY")
.build();
Sender sender = new Sender(apikey);
List<String> deviceid = new ArrayList<String>();
deviceid.add("ABC");
Map<Object, Object> jsonRequest = new HashMap<Object, Object>();
jsonRequest.put(JSON_REGISTRATION_IDS, deviceid);
Map<String, String> payload = message.getData();
if (!payload.isEmpty()) {
jsonRequest.put(JSON_PAYLOAD, payload);
}
String requestBody = JSONValue.toJSONString(jsonRequest);