datatheorem / TrustKit-Android

Easy SSL pinning validation and reporting for Android.
MIT License
583 stars 87 forks source link

Clarify setting up TrustKit in the docs #82

Open myklosbotond opened 3 years ago

myklosbotond commented 3 years ago

Is your feature request related to a problem? Please describe.

We just ran into the problem described in #21: when the main activity's onCreate is called a second time an IllegalStateException is thrown. The solution described in the issue works, but I think this can be avoided.

Describe the solution you'd like

Make it clearer in the Getting Started docs in the "Initializing TrustKit with the Pinning Policy" section that the code snippet applies to the Application's onCreate method, rather than the MainActivity's method.

alexanderdibenedetto commented 11 months ago

Agreed with this, as it was a common enough issue that in the Xamarin version I created I had to add logic to prevent a second initialization attempt.