Add a common sharing button in sketchware app | sketchwarecodes.com

Add a common sharing button in sketchware app | sketchwarecodes.com

Hi friends today in this sketchware tutorial we will see how to creat a common share button to share any text from your app in sketchware.

 

You can also check our tutorial about how to add a app sharing button to share your app
 
Remember we will only share texts but not any images. 
 
Let’s see how to do this
 
Step No. 1
Create new project or you can use your existing project to try this on.
 
In your project Create a new String variable called Share
 

 

 
Step No. 2
 
If you want to share a static text just like ‘thanks for sharing’ or any kind of pre defined text 
Then on sharing button clicked
 add the set String __to__ block and manually set the text like this

or if you want to share a edit text or a TextView data the then do like this

 

 

 
 
Step No. 3
 
Now on sharing button onClick event
And add a add source directly block and use this code
 
Intent i = new Intent(android.content.Intent.ACTION_SEND); i.setType(“text/plain”);  i.putExtra(android.content.Intent.EXTRA_TEXT, share); startActivity(Intent.createChooser(i,”Share using”));
 
Finally run your project. 
 
I hope there may be no problem while running this project. But in case if you have any problem then you can comment that I will try to help you. 

This Post Has One Comment

Leave a Reply