We provide a button in our app to share to Google Classroom using a URL which opens in the default browser, similar to this answer: https://stackoverflow.com/a/32460724/6257608
It would be preferable to launch and share directly via the Classroom app, if it's installed. Does google provide a way to do this, either via their SDK or an app specific protocol? (From what I can tell, the SDK doesn't support their sharing API.)
Basically you can do that.
See Apple Inter-App Communication chapter: Using URL Schemes to Communicate with Apps
Google seems to support it, I found in their Info.plist this:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>com.google.sso.900820440409-fbmgl9p4k9hlmkq01gjmjs2aiirbjaca</string>
</array>
</dict>
<dict>
<key>CFBundleURLName</key>
<string>${BUNDLE_IDENTIFIER}</string>
<key>CFBundleURLSchemes</key>
<array>
<string>googleclassroom</string>
</array>
</dict>
</array>
So they have an URL-Scheme registered. I'm not familiar with the Google Classroom App. So I don't know, what type of data you can share. You can probably find it on the Internet. But you should be able to share data with this information.
How to get contents of Info.plist:
I hope this can help you.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.