This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.pathways.redwood.activity; | |
import android.app.ProgressDialog; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.util.Log; | |
import android.view.View; | |
import android.widget.Button; | |
import android.widget.EditText; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String getStringImage(Bitmap bmp) { | |
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); | |
bmp.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream); | |
byte[] imageBytes = byteArrayOutputStream.toByteArray(); | |
return "data:image/jpeg;base64," + Base64.encodeToString(imageBytes, Base64.DEFAULT); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Convert image bitmap to base64 string | |
* @param bmp bitmap | |
* @return base64 string | |
*/ | |
public String getStringImage(Bitmap bmp) { | |
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); | |
bmp.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream); | |
byte[] imageBytes = byteArrayOutputStream.toByteArray(); | |
return "data:image/jpeg;base64," + Base64.encodeToString(imageBytes, Base64.DEFAULT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. go to https://sslvpn.demo.sonicwall.com/cgi-bin/welcome | |
2. log in with demo/password | |
3. click on NetExtender icon, this will download a tar.gz with the client | |
4. sudo ln -s /lib/x86_64-linux-gnu/libssl.so.1.0.0 /usr/lib/libssl.so.6 | |
5. sudo ln -s /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.6 | |
6. un-tar the client, make install script executable and launch install |