Posts

Showing posts from June, 2022

How to make share button in Sketchware?

Image
 How to make share button in Sketchware? Add a button follow below image. Click on button add source directly blog follow below image. Copy code..... shareApplication(); Create a block follow below image. Click on your block follow below image. Copy code } private void shareApplication() {      android.content.pm.ApplicationInfo app =      getApplicationContext().getApplicationInfo();      String filePath = app.sourceDir;     Intent intent = new Intent(Intent.ACTION_SEND);      intent.setType("*/*");      java.io.File originalApk = new java.io.File(filePath);      try {        java.io.File tempFile = new java.io.File(getExternalCacheDir() + "/ExtractedApk");        if (!tempFile.isDirectory())        if (!tempFile.mkdirs())        return;        tempFile = new java.io.File(tempFil...

How to create SpeechToText in Sketchware?

Image
 How to create SpeechToText in Sketchware? Add textview and imageview follow below image. Add a filepicker component click onfilesPicked follow below image. Click on files picked. Add source directly follow below image. Copy this code.... } break; case REQ_CODE_SPEECH_INPUT: if (_resultCode == RESULT_OK && null != _data) { ArrayList<String> result = _data.getStringArrayListExtra(android.speech.RecognizerIntent.EXTRA_RESULTS); edittext1.setText(result.get(0)); Click on imageview to add source directly follow below image.  Copy this code....... Intent intent = new Intent(android.speech.RecognizerIntent.ACTION_RECOGNIZE_SPEECH); intent.putExtra(android.speech.RecognizerIntent.EXTRA_LANGUAGE_MODEL, android.speech.RecognizerIntent.LANGUAGE_MODEL_FREE_FORM); intent.putExtra(android.speech.RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault()); intent.putExtra(android.speech.RecognizerIntent.EXTRA_PROMPT, "Speak Now"); try { startActivityForResult(intent, REQ_CODE_SPEEC...