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> | ||||
|                 <action android:name="android.intent.action.SEND"/> | ||||
|                 <category android:name="android.intent.category.DEFAULT"/> | ||||
|                 <data android:mimeType="text/plain"/> | ||||
|                 <data android:mimeType="image/*"/> | ||||
|                 <!-- TODO ... Реализовать в xml возможность принятия изображений и текста для активити GetActivity --> | ||||
|             </intent-filter> | ||||
|         </activity> | ||||
|     </application> | ||||
|   | ||||
| @@ -37,11 +37,9 @@ class GetActivity : AppCompatActivity(){ | ||||
|     } | ||||
|  | ||||
|     private fun getBitmap(intent: Intent):Bitmap{ | ||||
|         val uri = intent.getParcelableExtra<Uri>(Intent.EXTRA_STREAM) | ||||
|         val bitmap = MediaStore.Images.Media.getBitmap(this.contentResolver, uri); | ||||
|         return bitmap | ||||
|         TODO() //Реализовать получение картинки из Intent | ||||
|     } | ||||
|     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 share = Intent(Intent.ACTION_SEND) | ||||
|  | ||||
|         share.type = "image/*" | ||||
|  | ||||
|         for (uri in uris) { | ||||
|             share.putExtra(Intent.EXTRA_STREAM, uri) | ||||
|         } | ||||
|         startActivity(Intent.createChooser(share, "Share Image!")) | ||||
|         Toast.makeText(applicationContext, "Image shared", Toast.LENGTH_LONG).show() | ||||
|        TODO()//Реализовать requestPicker по выбору картинки и отправке в друго приложение с выбором | ||||
|  | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user