Work No
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Merge core/template-android-project to this repo / merge-if-needed (push) Failing after 14s
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Merge core/template-android-project to this repo / merge-if-needed (push) Failing after 14s
				
			This commit is contained in:
		| @@ -31,8 +31,7 @@ | |||||||
|             <intent-filter> |             <intent-filter> | ||||||
|                 <action android:name="android.intent.action.SEND"/> |                 <action android:name="android.intent.action.SEND"/> | ||||||
|                 <category android:name="android.intent.category.DEFAULT"/> |                 <category android:name="android.intent.category.DEFAULT"/> | ||||||
|                 <data android:mimeType="text/plain"/> |                 <!-- TODO ... Реализовать в xml возможность принятия изображений и текста для активити GetActivity --> | ||||||
|                 <data android:mimeType="image/*"/> |  | ||||||
|             </intent-filter> |             </intent-filter> | ||||||
|         </activity> |         </activity> | ||||||
|     </application> |     </application> | ||||||
|   | |||||||
| @@ -37,11 +37,9 @@ class GetActivity : AppCompatActivity(){ | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     private fun getBitmap(intent: Intent):Bitmap{ |     private fun getBitmap(intent: Intent):Bitmap{ | ||||||
|         val uri = intent.getParcelableExtra<Uri>(Intent.EXTRA_STREAM) |         TODO() //Реализовать получение картинки из Intent | ||||||
|         val bitmap = MediaStore.Images.Media.getBitmap(this.contentResolver, uri); |  | ||||||
|         return bitmap |  | ||||||
|     } |     } | ||||||
|     private fun getText(intent: Intent):String{ |     private fun getText(intent: Intent):String{ | ||||||
|         return intent.getStringExtra(Intent.EXTRA_TEXT)!! |         TODO() //Реализовать получение текста из Intent | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @@ -46,15 +46,9 @@ class MainActivity : AppCompatActivity() { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     val requestPicker = registerForActivityResult(ActivityResultContracts.PickMultipleVisualMedia()) { uris -> |     val requestPicker = registerForActivityResult(ActivityResultContracts.PickMultipleVisualMedia()) { uris -> | ||||||
|         val share = Intent(Intent.ACTION_SEND) |  | ||||||
|  |  | ||||||
|         share.type = "image/*" |  | ||||||
|  |  | ||||||
|         for (uri in uris) { |        TODO()//Реализовать requestPicker по выбору картинки и отправке в друго приложение с выбором | ||||||
|             share.putExtra(Intent.EXTRA_STREAM, uri) |  | ||||||
|         } |  | ||||||
|         startActivity(Intent.createChooser(share, "Share Image!")) |  | ||||||
|         Toast.makeText(applicationContext, "Image shared", Toast.LENGTH_LONG).show() |  | ||||||
|  |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
		Reference in New Issue
	
	Block a user