V
V
Vyacheslav Shabunin2022-02-15 00:35:17
Java
Vyacheslav Shabunin, 2022-02-15 00:35:17

How to trust server on local machine on android emulator?

Hello. I am developing a practice app for android. Stack: asp.net web api server. java android studio.

Iis the server provided a certificate on first run and I added it to the hub.
But through the proxy on the emulator, the system does not trust my local server.
But for testing, I need to make requests to api through the emulator.

On the application side:
When trying, an exception pops up saying that the certificate is not trusted or it is missing.
I am using okHttp.

1. How can I make my local api trusted on the device?
2. If on 7x+ devices, devices do not trust user certificates, how can I ensure that I can test my application?
3. If the 2nd question is wrong, how can I get the certificate of which is generated by iis and if I add it to the user certificate system, will this method work?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jacen11, 2022-02-15
@Jacen11

Stack: asp.net web api server. java android studio.
well, crap. You would also write a stack: Visual studio, android sdk
https://developer.android.com/training/articles/se...
I am using okHttp.
well lol. In each guide they write that retrofit is used. Although okHttp is of course under cover there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question