Android Question Download image

RUNO

Active Member
Licensed User
Longtime User
I am trying to download a picture from my site but it gives me this message for show not save

ResponseError. Reason: java.net.UnknownServiceException: CLEARTEXT communication to omxxxxx.com not permitted by network security policy, Response:

Before it was without problems from the free site but when I bought the domain I could not, so is there a difference between free or paid
 

JohnC

Expert
Licensed User
Longtime User
The reason why your app probably worked before the domain change is that the original domain used an HTTPS connection (which does NOT require the manifest line), but your new domain uses HTTP, which does require the manifest line.

As far as the problems you see with appcompat. There is either:

1) A problem in your code. Please try reducing your app to just the main activity and see if you can reproduce the error, then upload the project.
2) Maybe by rebuilding the SDK it may solve the appcompat problem.
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
I need appcompat for cart

What do you mean by "cart"?

And was your app working with the "cart" with the old domain?
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
Please upload the small project so we can see any issues.
 
Upvote 0

RUNO

Active Member
Licensed User
Longtime User
Please upload the small project so we can see any issues.

I tried to upload the small project but size file
Now I rebuild my project from start step by step for found the problem but I stoped for this error

B4X:
httpjob_getbitmap (java line: 170)
java.lang.RuntimeException: Error loading bitmap.
    at anywheresoftware.b4a.objects.drawable.CanvasWrapper$BitmapWrapper.Initialize2(CanvasWrapper.java:539)
    at anywheresoftware.b4a.objects.drawable.CanvasWrapper$BitmapWrapper.Initialize(CanvasWrapper.java:517)
    at anywheresoftware.b4a.keywords.Common.LoadBitmap(Common.java:1342)
    at b4a.example.httpjob._getbitmap(httpjob.java:170)
    at b4a.example.main$ResumableSub_Catalog_Start.resume(main.java:551)
    at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:267)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:207)
    at anywheresoftware.b4a.keywords.Common$11.run(Common.java:1178)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6669)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

If I used the free domain link there is no error but with the paid domain this error appears
What does it mean ?
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
This error means what it says - there was a problem loading a bitmap.

I don't understand why the project is too big to upload because the code you provided in post #13 was very, very small.

There seems to be a disconnect in what we are suggesting and what you are doing.

So the only way we can properly help you is if you upload a sample project that demonstrates the issue.
 
Upvote 0

RUNO

Active Member
Licensed User
Longtime User
This error means what it says - there was a problem loading a bitmap.

I don't understand why the project is too big to upload because the code you provided in post #13 was very, very small.

There seems to be a disconnect in what we are suggesting and what you are doing.

So the only way we can properly help you is if you upload a sample project that demonstrates the issue.

I apologize for the delay.
I can't upload any files because the zip file is larger than 1MB
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
Then please reduce the sample app to just the one main activity and remove any unneeded files from the "files" tab.

That will surely reduce the app to less then 1MB.
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
But it is difficult to help you without being able to see a small project that demonstrates the problem.
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
Is it a ZIP file you are trying to upload?

Please post a screen shot of the error you get when you try to upload the project
 
Upvote 0

RUNO

Active Member
Licensed User
Longtime User
Is it a ZIP file you are trying to upload?

Please post a screen shot of the error you get when you try to upload the project
This is screen shot for example for problem not for my project
pp01.png
 
Last edited:
Upvote 0

RUNO

Active Member
Licensed User
Longtime User
How do you generate the zip file?
If your zip it from the IDE and the zip file is too large you can, in the project folder, delete the Objects folder and zip the project with another zip program like 7zip.

Thank you for helping
The uploaded file is an example of a problem that I find
Can any one help me
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
OK, the problem is that the free link returns just data for an image, so Job1.Getbitmap works fine.

However, the paid link returns both text and an image, so because it is not just pure image data, the .GetBitmap is failing.

This was easily determined by opening both links in a browser.

It appears there is some code on the paid server that is doing a redirect to the homepage (with the text and image shown) when you try to access the image directly - maybe a header needs to be set when trying to download the image?
 
Last edited:
Upvote 0
Top