This file contains hidden or 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
| override fun onShowSendLogsDialog(stringPair: Pair<Array<String>, String>?) { | |
| val emailTo = "[email protected]" | |
| val emailSubj = "Subject" | |
| val chooserTitle = "Title" | |
| val fileNames: List<String>? = stringPair?.first?.toList() | |
| sendEmail(this, fileNames, emailTo, emailSubj, chooserTitle, stringPair?.second ?: "") | |
| } | |
| private fun sendEmail(ctx: Context, fileNames: List<String>?, | |
| emailTo: String, emailSubj: String, chooserTitle: String, |
This file contains hidden or 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 static void collectFiles(String fileName, | |
| LogsFilenameFilter filter) { | |
| final File cache = App.getAppContext().getCacheDir(); | |
| final File[] files; | |
| if (cache != null && cache.exists() && cache.isDirectory() | |
| && (files = cache.listFiles(filter)) != null | |
| && files.length > 0) { | |
| File targetLocation = new File(cache, fileName); | |
| try { |
This file contains hidden or 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 class CollectLogsTask extends AsyncTask<Void, Integer, Pair<String[], String>>{ | |
| private OnSendLogsDialogListener mListener; | |
| public static final String LOGS_ZIP_FILE_NAME = "logs.zip"; | |
| public CollectLogsTask(Activity activity, OnSendLogsDialogListener listener) { | |
| mListener = listener; | |
| } | |
| @Override | |
| protected Pair<String[], String> doInBackground(Void... params) { |
This file contains hidden or 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 static FileOutputStream getLogFileStream() { | |
| if (mLogFile != null) { | |
| try { | |
| mLogFileStream = new FileOutputStream(mLogFile); | |
| } catch (IOException e) { | |
| e.printStackTrace(); | |
| } | |
| } | |
| return mLogFileStream; | |
| } |
This file contains hidden or 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 static final String ANDROID_MANUAL_CLIENT_LOG = "app.log"; | |
| public static File prepareLogFile() { | |
| File f = null; | |
| try { | |
| f = new File(getCachePath(), | |
| ANDROID_MANUAL_CLIENT_LOG); | |
| if (f.exists()) { | |
| f.delete(); | |
| } | |
| f = new File(getCachePath(), |
This file contains hidden or 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 class LogcatHelper { | |
| private static final long THREAD_DELAY = 1000; | |
| private static final String[] PROC_ARRAY = new String[]{"logcat", "-v", | |
| "threadtime"}; | |
| private final AtomicBoolean saveSystemLog = new AtomicBoolean(false); | |
| private final AtomicBoolean prepareNewLogFile = new AtomicBoolean(false); | |
| private Thread mLogCheckThread; | |
| private final Runnable logcatRunnable = new Runnable() { | |
| private final byte[] buf = new byte[10240]; |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="de.mobilej.overlay" | |
| android:versionCode="1" | |
| android:versionName="1.0" > | |
| <uses-sdk android:minSdkVersion="14" /> | |
| <application android:label="SystemOverlay" > | |
| <activity |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.peirr.test"> | |
| <application | |
| android:allowBackup="true" | |
| android:icon="@mipmap/ic_launcher" | |
| android:label="@string/app_name" | |
| android:theme="@style/AppTheme"> |
This file contains hidden or 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
| <?php | |
| // extension=php_oci8_12c.dll must be uncommented in php.ini | |
| $c = oci_connect('v8train', 'train', 'localhost/xe'); | |
| if (!$c) { | |
| $m = oci_error(); | |
| trigger_error('Could not connect to database: ' . $m['message'], E_USER_ERROR); | |
| } | |
| $s = oci_parse($c, "SELECT * FROM TEST"); | |
| if (!$s) { | |
| $m = oci_error($c); |
This file contains hidden or 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
| ini_set("log_errors", 1); | |
| ini_set("error_log", "logs.log"); | |
| error_log("Logs!"); |
NewerOlder