1

I am developing an application in java for mac osx. I need to implement a custom protocol for it. Its same as some inbuilt application in osx, like when we hit mailto:// in Safari browser it open default mail application. My requirement is same as it. I have written following code in info.plist of application bundle and its working fine.

 <key>CFBundleURLTypes</key>
    <array>
      <dict>
        <key>CFBundleURLName</key>
        <string>SBR</string>
        <key>CFBundleURLSchemes</key>
        <array>
          <string>sbr</string>
        </array>
      </dict>
    </array>

I can open my application using Safari browser by hitting sbr://.

Problem- I want to pass some argument with this protocol like sbr://user:[email protected] and then take these arguments user:[email protected] as String in java code to perform some operation.

Any help or suggestion is appreciated. thanks.

1 Answer 1

0

I think I found the solution to your problem:

https://stackoverflow.com/a/31694986/382877

It worked for me. I was using MacOS X 10.8.2

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.