This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// iOS Swift Code | |
import Flutter | |
let CHANNEL = "com.example.native_calls" | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); | |
File photoFile = null; | |
try { | |
photoFile = createImageFile(); | |
} catch (IOException ex) { | |
} | |
// Continue only if the File was | |
// successfully created | |
if (photoFile != null) { | |
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photoFile)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.videointro; | |
import java.io.IOException; | |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.content.res.AssetFileDescriptor; | |
import android.media.MediaPlayer; | |
import android.os.Build; | |
import android.util.AttributeSet; |