iOS Question How to check album permission ?

Discussion in 'iOS Questions' started by Ramezanpour, May 18, 2015.

  1. Ramezanpour

    Ramezanpour Active Member Licensed User

    Hi

    How to check album permission ?
     
  2. narek adonts

    narek adonts Well-Known Member Licensed User

    Which album?
     
    Ramezanpour likes this.
  3. Ramezanpour

    Ramezanpour Active Member Licensed User

    photos permission
     
  4. narek adonts

    narek adonts Well-Known Member Licensed User

    Code:
    Dim status as Int
    Dim no As NativeObject
    status=no.Initialize(
    "ALAssetsLibrary").RunMethod("authorizationStatus",Null).AsNumber
    status=3 is authorized
     
    Erel likes this.
  5. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    Hey Narek,

    Do you know how to enumerate all photo album folder?

    Or know how to move some photo from camera roll to specific album?

    Thanks

    Alberto Iglesias
     
  6. narek adonts

    narek adonts Well-Known Member Licensed User

    If you will tell me what would you like to achieve maybe I can help you.
     
  7. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    The problem: In native Photos App, you can´t simply move a photo to specific album, those albuns are disable to receive this photos, you need to create directly on iPhone.

    I need choose some camera roll photo and move to some album

    just that
     
  8. narek adonts

    narek adonts Well-Known Member Licensed User

    I think your knowledge about xCode and Objective C is much more than mine. You could easly find a library and wrap it for B4i.

    I can help you to find the Objective C source if you need
     
  9. narek adonts

    narek adonts Well-Known Member Licensed User

    I forgot. I have the code in B4i to get all photos from all the albums. You need it?
     
    Last edited: Mar 26, 2016
  10. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    Yeah, sure! Please

    I can construct some to do this, but I don´t have time right now :-(
     
  11. narek adonts

    narek adonts Well-Known Member Licensed User

    please find attached the Module that I was using.

    It will help you a lot I think.

    I will also try to add a code to save the Image to another album

    narek
     

    Attached Files:

    Last edited: Mar 26, 2016
  12. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    I will try right now and I tell you after!

    thanks
     
  13. narek adonts

    narek adonts Well-Known Member Licensed User

    it is a static module
     
  14. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    I cant find any method to save images in determinate album, but I find this class, look in attach...
     

    Attached Files:

  15. narek adonts

    narek adonts Well-Known Member Licensed User

    I told you that this is for enumerating all the photos (in all albums). Full images and Thumbnails. So you can make a custom Photo browser with it if you need.

    It should not be difficult to add a function to create an album and save the image in that album.

    Did you managed to use the Module for retreiving all the photos?
     
  16. narek adonts

    narek adonts Well-Known Member Licensed User


    Check this

    http://stackoverflow.com/questions/10954380/save-photos-to-custom-album-in-iphones-photo-library

    It is very easy
     
  17. narek adonts

    narek adonts Well-Known Member Licensed User

    I have added some functions to ALAsset to get all the albums, create an album, put an asset to a album, put a bitmap to a album
     

    Attached Files:

    Erel likes this.
  18. Erel

    Erel Administrator Staff Member Licensed User

    You should also make a post in the libraries forum about this.
     
  19. narek adonts

    narek adonts Well-Known Member Licensed User

    You are right ))

    I will cleane the code a bit and post it in Libraries forum.
     
    Erel likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice