Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

Commit

Permalink
Fixed markdown issue in FAQ
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirkula authored May 10, 2021
1 parent 29d91ba commit 0a1f502
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ Simply create a new **NativeShare** object and customize it by chaining the foll
- `SetCallback( ShareResultCallback callback )`: invokes the *callback* function after the share action is completed. **ShareResultCallback** has the following signature: `void ShareResultCallback( ShareResult result, string shareTarget )`
- `ShareResult result` can take 3 values:
- **Unknown:** we can't determine whether or not the user has shared the content
- **Shared:** user has probably shared the content. This value guarantees that the user has at least selected an app from the share sheet. But it is impossible to say whether the user has actually shared the content or cancelled the operation right after selecting the app from the share sheet
- **NotShared:** either the user has closed the share sheet immediately or selected an app from the share sheet but then decided not to share the content (unfortunately, most apps return *Shared* for the latter case)
- **Shared:** user has probably shared the content. This value guarantees that the user has at least selected an app from the share sheet. But it is impossible to say whether the user has actually shared the content or cancelled the operation right after selecting the app from the share sheet
- **NotShared:** either the user has closed the share sheet immediately or selected an app from the share sheet but then decided not to share the content (unfortunately, most apps return *Shared* for the latter case)
- `string shareTarget` stores information about the app that the user has selected from the share sheet. It can be *null* or empty, if this information isn't provided. Usually, this is the package name/class name of the selected application. You can use this value to e.g. determine if the user has picked Twitter from the share sheet: `shareTarget != null && shareTarget.ToLowerInvariant().Contains( "twitter" )`

Finally, calling the **Share()** function of the NativeShare object will present the share sheet.
Expand All @@ -68,7 +68,7 @@ On Android, you can share on a specific app via *AddTarget*. For iOS, you can ch

It is just not possible to share an image/file with text/subject on some apps (e.g. Facebook), they intentionally omit either the image or the text from the shared content. These apps require you to use their own SDKs for complex share actions. For best compatibility, I'd recommend you to share either only image or only text.

- **I can't build the project to Android, it says "Android resource linking failed: unexpected element <queries> found in <manifest>" in the error message**
- **I can't build the project to Android, it says "Android resource linking failed: unexpected element &lt;queries&gt; found in &lt;manifest&gt;" in the error message**

NativeShare adds `<queries>` element to AndroidManifest.xml due to the new [package visibility change](https://developer.android.com/training/package-visibility). The build error can be fixed by following these steps: https://developers.google.com/ar/develop/unity/android-11-build (in my tests, changing "*Gradle installed with Unity*" wasn't necessary). In the worst case, if you are OK with NativeShare not working on some of the affected devices, then you can open *NativeShare.aar* with WinRAR or 7-Zip and then remove the `<queries>...</queries>` element from *AndroidManifest.xml*.

Expand Down

0 comments on commit 0a1f502

Please sign in to comment.