18
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AndroidでIPv6を無効化する

Last updated at Posted at 2015-08-21

2015年8月上旬頃よりWi-Fi環境で(公式アプリ、非公式アプリに関係なく)Twitter画像が表示されないという事象が発生しています。どうやらauひかり回線で特定のプロバイダ(または特定の端末)の場合に IPv6 の通信に問題が発生するようです。

仕方ないのでIPv6を無効化(IPv4を優先)する方法を探したところ、どうやら下記のコードでうまくIPv4を優先してくれるようです。

java.lang.System.setProperty("java.net.preferIPv4Stack", "true");
java.lang.System.setProperty("java.net.preferIPv6Addresses", "false");

IPv6を無効化しなきゃいけない状況がまずおかしいとは思うんですけどね-。

参考

18
17
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?