Posts

Showing posts from June, 2021

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); ...