Posts

light app in sketchware

Image
  Flashlight app in sketchware pro is the most searched and most asked project in sketchware pro community but sketchware pro do not provide functionality turn on and turn off flashlight. Flashlight app in sketchware In this post I'll tell two method to turn on and turn off flashlight programmatically using codes in sketchware pro. Turn on flashlight in sketchware To turn on flashlight copy and paste this code in add source directly of sketchware pro.  android.hardware.camera2.CameraManager cameraManager = (android.hardware.camera2.CameraManager) getSystemService(Context.CAMERA_SERVICE); try { String cameraId = cameraManager.getCameraIdList()[0]; cameraManager.setTorchMode(cameraId, true); } catch (android.hardware.camera2.CameraAccessException e) { } You can use this code in onclick event. Turn off flashlight in sketchware pro To turn off flashlight there is another code, copy and paste this code in sketchware pro. Use this code in add source directly of sketchware pro. android.ha

How to show one time message/dialog in sketchware

Image
One time message or one time dialog is a simple task for sketchware that every new coder find difficult to implement in sketchware. This task can easily be done by use of shared preferences and it do not require any external codes or blocks. What is shared preferences  It is a component of sketchware that is used to store strings database in app data. The files made by shared preferences is not stored locally in internal storage of device. Shared preferences can store any type of strings and that is what we are going to use in sketchware today. Making one time appear dialog  Follow these steps to make one time appear dialog in sketchware. Go to your project Go to component manager Click on + icon and choose shared preferences name it "sp" When user click on any button or something put data key show to no In oncreate, add an if-then-else condition and check if sp get key show equals blank then show dialog else don't show dialog. You can name anything to these variables but

How to fix intent filter problem while uploading your apps to google play

Image
  Hey coders in this small post i am going to tell you the method, To fix intent filter issue in google play.  After the release of android 12 , google play console started showing this error. this error could be fixed by adding a android:exported tag in your android manifest file.  How to do this in sketchware pro To make this thing possible in sketchware pro go inside your project.  Click on three dots in top right corner. A new drawer will open  In this drawer scroll and choose android manifest option  A new window will open  Here Click on add activity button  Then a dialog will open just click save option A new option will be added to list  Open it (and remember you have to add only mainactivity here.) After opening this option you will see a "+" iconed fab in bottom right corner.   click on it and you will see a dialog opens  Fill the empty values as shown in the picture  Let me write values for your convinence  res =  android attr =  exported value =  false After done s

Import java files in sketchware | How to add java files in sketchware | Basics of sketchware

Image
  Two days ago i was designing an app in sketchware but i got stuck when i realize how can i import java files in sketchware.  Because whenever i tried to import i got stuck and my project shows error. After a few more tries i found a solution to all error of java files in sketchware.  Step 1. Open any of your sketchware project in which you want to import java file in sketchware. Step 2. Click on three dots in top right corner and a drawer will open. Step 3 Click on java option from this drawer. Step 4. Now a new window will open. Here is the main thing to focus. If you add java files using fab button on bottom then ou'll probably get error. So i reccomend using of file picker button on the top right corner. After Clicking on it a new dialog will open. Step 5. Here you can choose java file from your local storage. and you can easily import it.  Step 6. How to fix error  To fix error click on your imported java file and check in first line if the package name matches the same which

Make Round corner Imageview in sketchware | Set crner radius to imageview in sketchware pro

Image
  Sketchware provides many option to set corner radius of linear, buttons and etc. But there is no option to set corner radius round of imageview. There are only two possibilities either we have to use a square image or a completely round image but we can't set custom corner radius to an imageview. So in this post i am going to tell an awesome method to how to set corner radius to imageview. For that you follow these steps 1. Add a linear layout with padding set to 0 2. Add a imageview in this. Do same steps which are shown in photo 3. Add moreblock which is given in the last of post with sh recovery. 4. Use that moreblock and set it for rounded linear. The imageview which is embede inside that linear will automatically be rounded. That all were steps for rounded imageview with custom radius in sketchware pro. Also there is a simple trick you can use. Use any image corner radius app from playstore and set custom radius to your imageview and use that generated iamge in your project.