When I click on the download button 127.0.0.1:1337/parse/files/myappID/93bc6b6559d4ebedf8c9dd1f11c92566_image.png link opens up. And on accessing it in my program ConnectException is given. How can I change this localhost address to the following address
http://3.129.72.123/parse/files/myappID/93bc6b6559d4ebedf8c9dd1f11c92566_image.png
ParseQuery<ParseObject> query = ParseQuery.getQuery("Image");
query.whereEqualTo("username", username);
query.orderByDescending("createdAt");
query.findInBackground(new FindCallback<ParseObject>() {
@Override
public void done(List<ParseObject> objects, ParseException e) {
if (e == null && objects.size() > 0){
for (ParseObject object : objects){
ParseFile file = (ParseFile) object.get("image");
file.getDataInBackground(new GetDataCallback() {
@Override
public void done(byte[] data, ParseException e) {
if(e == null) {//Error occurs here
if (data != null) {
Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length);
ImageView imageView = new ImageView(getApplicationContext());
imageView.setLayoutParams(new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT
));
imageView.setImageBitmap(bitmap);
linearLayout.addView(imageView);
} else {
Log.e("Image Error", "Couldn't fetch image properly");
}
}else{
Log.e("ParseException","Wrong IP address found");
e.printStackTrace();
}
}
});
}
}else{
Log.e("PArse Exception||Object", "Object size may be less than 0");
e.printStackTrace();
}
}
});