Search Unity

Check if user does not allow recording permission to ReplayKit

Discussion in 'iOS and tvOS' started by pep_dj, Sep 5, 2017.

  1. pep_dj

    pep_dj

    Joined:
    Nov 7, 2014
    Posts:
    179
    When StartRecording() is first called, an alert window displays asking the user to confirm recording. How can I know when the user answered "no" to this alert window?
     
    AlgeratorUbi and dancitron like this.
  2. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    232
    Bump. Good question!
     
  3. dancitron

    dancitron

    Joined:
    Aug 7, 2017
    Posts:
    6
    Great question? Did you ever end up figuring this out?
     
  4. pep_dj

    pep_dj

    Joined:
    Nov 7, 2014
    Posts:
    179
    No :(

    Until there is a method for this, this is my workaround: just wait a couple of seconds and test if I'm receiving audio data. If there is no data, I assume the user answered "no".
     
  5. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,024
  6. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,965
    There is one. But unity internally uses default Replay kit api provided by iOS frameworks. However, this has couple of limitations like not delivering proper status, no file path for recorded video. Also, default replay kit api has many microphone related issues on iOS 11 & 12.

    We have a plugin on asset store which solves the issues and also the plugin with the same api works on Android too!
    Please do have a look at Cross Platform Replay Kit.

    Cheers,
    VB Team
     
  7. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,024
    Thank you.
     
  8. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,965
    Version 1.4 submitted to Asset Store and is under review.
    • Now on Android, the permission request is cached and will be displayed only once.
    • Updated error strings with error codes to have your own customised text for error responses
    • Support for Android Q (Due to manifest backward incompatibility, you need to enable it manually in settings if you are targeting Android 10/Q).
     
  9. ChildsGame

    ChildsGame

    Joined:
    Dec 30, 2018
    Posts:
    2
    Hi Voxel-Busters, I am using your assets and I am asked for permissions every time I try to record. Is there a way to check if the app already has permission to record?
     
  10. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,965
    Permission is displayed by native os and there is currently no way to avoid it. We use native frameworks for screen recording. On iOS its displayed for after every last 8 mins inactivity.