Java Code Examples for org.jivesoftware.smack.util.stringencoder.Base64#setEncoder()
The following examples show how to use
org.jivesoftware.smack.util.stringencoder.Base64#setEncoder() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Java7SmackInitializer.java From Smack with Apache License 2.0 | 5 votes |
@Override public List<Exception> initialize() { if (SystemUtil.onAndroid()) { // @formatter:off throw new RuntimeException( "You need to remove the smack-java7 dependency/jar from your build, " + "as it does not run on Android. " + "Use smack-android instead."); // @formatter:on } SmackConfiguration.setDefaultHostnameVerifier(new XmppHostnameVerifier()); Base64.setEncoder(Java7Base64Encoder.getInstance()); Base64UrlSafeEncoder.setEncoder(Java7Base64UrlSafeEncoder.getInstance()); return null; }
Example 2
Source File: AndroidSmackInitializer.java From Smack with Apache License 2.0 | 5 votes |
@Override public List<Exception> initialize() { SmackConfiguration.setDefaultHostnameVerifier(new StrictHostnameVerifier()); Base64.setEncoder(AndroidBase64Encoder.getInstance()); Base64UrlSafeEncoder.setEncoder(AndroidBase64UrlSafeEncoder.getInstance()); return null; }