Is there a way to sync OS X Photos app with Android Phone?

I have an Android phone and a MacBook, and what I am trying to figure out is a way to do bi-directional sync between the OS X Yosemite’s new Photos app and my device’s internal storage. So far, I am using DropSync to do a two-way sync between my device photos and storage in Dropbox, and that works fine. The next step that I thought I could do was use Automator to force sync that particular folder with Photos app, but I cannot seem to find any option in Automator that works with Photos – all I have is iPhoto. Is there any way to achieve this?

P.S. I even tried the new Google Photos, but that doesn’t do two-way sync with my device’s internal memory if I delete something from the Photos library.

Answer

Here is how you can sync from Dropbox (or a directory of your choosing) into Photos, when new photos are added:

  1. Open Automator, and create a “Folder Action”
    enter image description here
  2. On the top where it says “Folder Action receives files and folders added to” select “Choose folder”, then “Other”, and select your Dropbox folder (or whichever directory contains your photos)
  3. Add a single Run AppleScript action with the following code:

    on run {input, parameters}
        set file_strings to {}
        repeat with current_file in input
            set file_as_string to (current_file as string)
            if words -2 through -1 of (do shell script "file --mime-type " & quoted form of (POSIX path of file file_as_string as string)) contains "image" then
                set file_strings to file_strings & {(file_as_string) as alias}
            end if
        end repeat
    
        tell application "Photos" to import file_strings
    end run
    

    Your Folder Action should look like this:
    enter image description here

  4. Now save it with a name of your choosing, and from now on, photos added to the folder you chose will be imported to Photos.

Let me know if anything goes wrong!

Attribution
Source : Link , Question Author : Aatif Khan , Answer Author : William T Froggard

Leave a Comment