Using Tyrus Websocket Client in Android with Proguard -


i trying use tyrus (org.glassfish.tyrus.bundles:tyrus-standalone-client:1.10) in android. here proguard related part:

-dontoptimize -keepparameternames -keepclassmembers,allowoptimization enum * { public static **[] values(); public static ** valueof(java.lang.string); } -keep class org.glassfish.tyrus.** {  *; } -keep class org.glassfish.grizzly.** { *; } -keep class javax.websocket.** { *; } 

i make call clientmanager connecttoserver , method doesnt return , hangs.but works if disable proguard. how can make work in android proguard?

you need add following line fragment or activity use tyrus

-keep,includedescriptorclasses class com.package.yourclass$* { *; } 

for tyrus need add following lines

-keepattributes signature,innerclasses,*annotation* -keep,includedescriptorclasses  class org.glassfish.tyrus.** {  *; } -keep,includedescriptorclasses  class org.glassfish.grizzly.** { *; } -keep,includedescriptorclasses  class javax.websocket.** { *; } 

by adding these lines, managed use tyrus in android. here reference tyrus: https://blogs.oracle.com/pavelbucek/entry/reducing_websocket_client_jar_size


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -