Skip to content

Commit 418aeb1

Browse files
authored
Merge pull request #32 from rogerhu/patch-7
Update README.md
2 parents 7656391 + db8ebd2 commit 418aeb1

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Next, add this line to your `app/build.gradle` file:
2424

2525
```gradle
2626
dependencies {
27-
compile 'com.codepath.libraries:android-oauth-handler:1.1.0'
27+
compile 'com.codepath.libraries:android-oauth-handler:1.1.2'
2828
}
2929
```
3030

@@ -241,3 +241,25 @@ In order to [troubleshoot API calls](http://guides.codepath.com/android/Troubles
241241
RestClient client = RestApplication.getRestClient();
242242
client.enableProxy();
243243
```
244+
245+
Proxies are useful for monitoring the network traffic but require a custom SSL certificate to be added to your emulator or device. Because Android API 24 and above now require [explicit control](https://developer.android.com/training/articles/security-config.html) on custom SSL certificates that are used in apps, you will need to allow for added certs to be added by specifying `res/xml/network_security_config.xml` in your app:
246+
247+
```xml
248+
<?xml version="1.0" encoding="utf-8"?>
249+
<network-security-config>
250+
<debug-overrides>
251+
<trust-anchors>
252+
<!-- Trust user added CAs while debuggable only -->
253+
<certificates src="user" />
254+
</trust-anchors>
255+
</debug-overrides>
256+
</network-security-config>
257+
```
258+
259+
Inside your AndroidManifest.xml file, make sure to include this `networkSecurityConfig` parameter:
260+
261+
```xml
262+
<application
263+
android:name=".RestApplication"
264+
android:networkSecurityConfig="@xml/network_security_config"
265+
```

0 commit comments

Comments
 (0)