我有一個Android應用程序,嚴格運行在無法使用Google Play服務的Android版本上。該應用程序通過HttpsUrlConnection從正在更新的遠程服務器發出數據請求,僅支持TLS 1.2握手。我看着這個blog post並試圖實現它,但它不適合我。我知道我可以使用Google Play服務並更新SSL提供商,但這不適用於我的特定Android設備。我的問題是,如果沒有Google Play服務的幫助,我可以讓TLS 1.2在Android 4.4上運行嗎?如何在沒有Google Play服務的幫助下使TLS 1.2在Android 4.4中工作?
2
A
回答
-2
我結束了安裝谷歌的副本從apkmirror.com播放服務來解決這個問題,並使用:
ProviderInstaller.installIfNeeded(getContext());
1
我有同樣的要求。我能夠使用httpClient 4.1.2爲Android 4.1啓用TLS 1.1+ 我使用此鏈接https://github.com/erickok/transdroid/blob/master/app/src/main/java/org/transdroid/daemon/util/TlsSniSocketFactory.java
將代碼中包含該文件後,只需在下面的代碼中引用它們即可。
SchemeRegistry registry = new SchemeRegistry();
registry.register(new Scheme("https", new TlsSniSocketFactory(), 443));
client = new DefaultHttpClient(new ThreadSafeClientConnManager(httpParameters, registry),httpParameters);
希望這對你有所幫助。
相關問題
- 1. 在Android 4.4中啓用TLS 1.2
- 2. Android Https Web服務通信(SSL/TLS 1.2)
- 3. 如何知道Azure服務器是否在TLS 1.2下
- 4. 不會在沒有Google Play服務的情況下運行
- 5. 沒有任何工作。 Realm Migration [Android 1.2]
- 6. Android Wear Google Play服務
- 7. 我的Android遊戲中Google Play服務無法正常工作
- 8. Android 4.1至4.4 KitKat - 爲API啓用TLS 1.2
- 9. Geofence不能在更新的Google Play服務中工作
- 10. Android Google Play遊戲服務
- 11. 在Cocos2d-JS中使用Google Play服務
- 12. 如何使PowerBuilder 12.5 web服務符合TLS 1.2
- 13. 在Android Web服務中需要幫助
- 14. 如何在Android Studio中查找google play服務版本?
- 15. 如何讓Google Play服務在android studio中編譯?
- 16. 最近有沒有通過Google Play服務發佈Google地圖?
- 17. 幫助在web服務在android
- 18. 如何讓Google Play服務的定位服務起作用?
- 19. Google Play服務庫沒有在SDK Manager中列出
- 20. 如何在Android上使用Xamarin啓用NTLM和TLS 1.2?
- 21. 如何,如果Android應用程序和服務器實際使用TLS 1.2
- 22. Google Play API中的「Google Play服務正在更新」
- 23. 將使用Google Play服務的apk上傳到Google Play因版本號
- 24. 如何協助用戶獲取Google Play服務
- 25. 在Android 2.3.3上實現TLS 1.2
- 26. Android AVD與Circle.ci上的Google Play服務
- 27. Android 4.2.2,如何爲HttpsURLConnection啓用TLS 1.2?
- 28. 使用Google Play服務時出錯
- 29. 只有TLS_RSA_WITH_AES_128_CBC_SHA才能使用TLS 1.2服務器/客戶端嗎?
- 30. 在沒有Google Play服務的設備中使用Firebase雲消息
我居然看着那個,但遇到同樣的問題,因爲使用HttpURLConnection類。兩者仍然使用尚未從Google Play服務更新的SSLEngine。 – Kelly
@凱利不,你不需要。你必須註冊課程。它爲我工作得很好。無論如何,看起來你找到了一種選擇。 – LoveForDroid
在許多其他嘗試和挫折之後,這對我來說很有用。謝謝! – rjfellman