Posts

Voice recorder

 First on "On activity Create" set these codes: } private MediaRecorder myAudioRecorder; private void fo4o () { Then on "Button1" clicked set these 2 codes: Code 1: myAudioRecorder = new MediaRecorder(); myAudioRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); myAudioRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); myAudioRecorder.setAudioEncoder(MediaRecorder.OutputFormat.AMR_NB); myAudioRecorder.setOutputFile(FilePath); Code 2: try { myAudioRecorder.prepare(); myAudioRecorder.start(); } catch (Exception e) {} Thanks for reading..... Video tutorial link: At last, on "Button2" clicked set these codes: try { myAudioRecorder.stop(); myAudioRecorder.release(); myAudioRecorder = null ; } catch (Exception e) {}

Screenshot blocker

 Set these codes: getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE); Thanks for watching...... All tutorials: https://youtube.com/playlist?list=PLBJuGex9TxtGLZllla7bwqhPl53Tldd8o

Code for "Seach in list view"

 Copy these codes: ((ArrayAdapter)listview1.getAdapter()).getFilter().filter(edittext1.getText().toString()); Thanks for watching.... Get all sketchware tutorials here: https://youtube.com/playlist?list=PLBJuGex9TxtGLZllla7bwqhPl53Tldd8o

Code for "App Uninstallation".

 Copy these codes:  Intent startupIntent = new Intent(Intent.ACTION_MAIN); startupIntent.addCategory(Intent.CATEGORY_LAUNCHER); final android.content.pm.PackageManager pm = getPackageManager(); List<android.content.pm.ResolveInfo> activities = pm.queryIntentActivities(startupIntent,0); Collections.sort(activities, new Comparator<android.content.pm.ResolveInfo>() { public int compare(android.content.pm.ResolveInfo a, android.content.pm.ResolveInfo b) { android.content.pm.PackageManager pm = getPackageManager(); return String.CASE_INSENSITIVE_ORDER.compare( a.loadLabel(pm).toString(), b.loadLabel(pm).toString()); } }); ArrayAdapter<android.content.pm.ResolveInfo> adapter = new ArrayAdapter<android.content.pm.ResolveInfo>( this, android.R.layout.simple_list_item_1, activities) { public View getView(int pos, View convertView, ViewGroup parent) { TextView tv = new TextView(MainActivity.this); ...

Code for "Webview download"

 Set the whole different fon codes: webview1.setDownloadListener(new DownloadListener() { public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url)); String cookies = CookieManager.getInstance().getCookie(url); request.addRequestHeader("cookie", cookies); request.addRequestHeader("User-Agent", userAgent); request.setDescription("Downloading file..."); request.setTitle(URLUtil.guessFileName(url, contentDisposition, mimetype)); request.allowScanningByMediaScanner(); request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); java.io.File aatv = new java.io.File(Environment.getExternalStorageDirectory().getPath() + "/Webview/Download");if(!aatv.exists()){if (!aatv.mkdirs()){ Log.e("TravellerLog ::","Problem creating Image folder");}} request.setDestinati...

Code for "Button Effect"

 Set the codes on the block: android.content.res.ColorStateList clr = new android.content.res.ColorStateList(new int[][]{new int[]{}},new int[]{Color.parseColor(_color)}); android.graphics.drawable.RippleDrawable ripdr = new android.graphics.drawable.RippleDrawable(clr, null, null); _view.setBackground(ripdr);

Code for "Video Record"

Set these codes: Intent takeVideoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); if (takeVideoIntent.resolveActivity(getPackageManager()) != null) {startActivityForResult(takeVideoIntent, REQ_CD_CAM); } Go to our channel: https://youtube.com/channel/UCfRsBA71sa4LaDTZuSkmasw