Java tutorial
//package com.java2s; //License from project: Open Source License import android.util.Log; import java.net.URLEncoder; public class Main { public static final String TAG = "GloomyDungeons2"; public static String urlEncode(String text) { try { text = URLEncoder.encode(text, "UTF-8"); } catch (Exception ex) { log(ex); } return text; } public static void log(String message) { Log.e(TAG, message); } public static void log(Throwable tr) { Log.e(TAG, "Exception: " + tr, tr); } public static void log(String message, Throwable tr) { Log.e(TAG, message, tr); } }