![]() Thanks for reading if you want any help then follow me on Github, Twitter. Step 03: After that, call this function on click listener. So, these lines will remove the sharing restrictions. val builder: = () tVmPolicy(builder.build())īefore Android 7.0 there were no restriction to share data on other apps but after Android 7.0 Google made some restrictions on data sharing. Step 02: Add below code in onCreate() method. Step 01: Add Picasso dependency in adle(app) ![]() Here's a function that invokes an Intent to capture a photo. This process involves three pieces: the Intent itself, a call to start the external Activity, and some code to handle the image data when focus returns to your activity. So, I did it by in my own way using Picasso library. Android delegates actions to other applications by invoking an Intent. I searched many solutions on StackOverflow but those were not cases I wanted. val sendIntent = Intent() sendIntent.action = Intent.ACTION_SEND sendIntent.putExtra( Intent.EXTRA_TEXT, "Send a simple text" ) sendIntent.type = "text/plain" startActivity(sendIntent) Share image using intentĪ few days ago I had a task where I wanted to share the image with other apps. So, In this section, we’ll share a simple text using intent. Now we’ll learn how we share text and image using android Intent with the help of share intent. The ACTION_SEND helps to open the share intent where you will share your required data. In this article, we’ll see about the action ACTION_SEND. The intent is a class that helps to perform different actions like open ACTION_VIEW, ACTION_WEB_SEARCH, ACTION_SEARCH, etc. This article is part of the “Today I Learnt” category. ![]() In this article, we will learn how to share your required data using android intent. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |