Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Native Share for Android & iOS [Open Source]

Discussion in 'Assets and Asset Store' started by yasirkula, Mar 1, 2018.

Thread Status:
Not open for further replies.
  1. HamzaMushtaq

    HamzaMushtaq

    Joined:
    Sep 24, 2017
    Posts:
    10
    hi @yasirkula hope you are doing well. i am facing issue regarding native share plugin.
    i am using this plugin with AR foundation (Android Platform).
    i am using custom gradle of 7.1.1 and also did required changes in
    1. Custom Main Gradle Template
    2. Custom Launcher Gradle Template.
      bu still I am having gradle issue .here is SS
      upload_2021-8-21_0-5-7.png
      upload_2021-8-21_0-5-32.png upload_2021-8-21_0-5-46.png
     
  2. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    Can you test the following cases and tell me which ones build successfully:

    - Remove NativeShare and then undo Gradle Template changes
    - Remove NativeShare but don't undo Gradle Template changes
    - Don't remove NativeShare but undo Gradle Template changes
     
  3. Dmitry-Kuz

    Dmitry-Kuz

    Joined:
    Nov 15, 2016
    Posts:
    6
    Hi @yasirkula, thanks for this asset!

    There may have already been an answer to this question, but I couldn't find it. Is it possible to send images and videos in one message on iOS? I can send multiple images or multiple videos, but when I try to send a video and an image at the same time, I get only the text which I added.

    I use Unity 2020.3.12 and the latest version Xcode and iOS.
     
  4. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    I've googled "UIActivityViewController can't share image and video" but couldn't find any entries. I'd like to believe that this is an app-specific issue, i.e. doesn't occur while sharing to other apps. Perhaps commenting out these lines will resolve the issue on that app but it will probably cause some other apps to ignore attached images, so it may make things even worse.
     
  5. Dmitry-Kuz

    Dmitry-Kuz

    Joined:
    Nov 15, 2016
    Posts:
    6
    Thanks for the quick answer! I will try to comment out these lines.
     
  6. TiagoTFG

    TiagoTFG

    Joined:
    Jul 3, 2018
    Posts:
    7
    Hi! Have you seen this before? Seem to be happening exclusively with Redmi/Xiaomi devices:

    I find it strange that it seems to require a very specific App permission (Shazam?). I'm seeing this crash on a few thousand different users, so it could be something specific to that family of devices. Most commonly I see Instagram and Snapchat as target activities over there.
     
  7. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    This is the first time I hear about this, google didn't help either. I've traced stacktrace as far as this line but I honestly don't know what is going on inside this function: https://android.googlesource.com/pl...erver/wm/ActivityTaskManagerService.java#1040

    I've also realized that the stacktrace mentions NativeShareCustomShareDialog which is hand written. There is a slight chance that something wrong is going on in there but I can't spot any issues so far. Custom share dialog is used in different circumstances:
    • When native alwaysUseCustomShareDialog boolean is manually set to true
    • When SetCallback function is called on Huawei devices
    • When SetCallback function is called on Android 21 or earlier
    • On Xiaomi devices in landscape mode
     
    Last edited: Sep 11, 2021
  8. mkrfft

    mkrfft

    Joined:
    Sep 8, 2017
    Posts:
    22
    Hi @yasirkula,
    Been using your asset for a few years now and its been working great.
    However we recently migrated from using Image+Text share into dynamic links.

    Does the plugin support LPLinkMetadata to be able to get a preview of the link already in the share sheet?
     
  9. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    It sounds interesting but isn't used by NativeShare for the time being, unfortunately.
     
  10. mkrfft

    mkrfft

    Joined:
    Sep 8, 2017
    Posts:
    22
    Cool, I actually semi-solved it by adding an iOS function called
    Code (CSharp):
    1. _NativeShare_ShareLink(const char* link)
    which shares a NSUrl instead of strings. Its not instant in the sharesheet but at least it pulls the link metadata
     
    Last edited: Sep 21, 2021
  11. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    Did the built-in SetUrl function not work for you?
     
  12. mkrfft

    mkrfft

    Joined:
    Sep 8, 2017
    Posts:
    22
    I was on an old version, updated and tested with SetUrl which worked well :cool:
     
    yasirkula likes this.
  13. RyanTexture

    RyanTexture

    Joined:
    Jun 10, 2020
    Posts:
    16
    Hi there, thanks for making this plugin...

    Im trying to install it in a fresh project to try (Unity 2019.4.26f1) but i am unable to compile,

    i get the following error in console :

    Code (CSharp):
    1. Execution failed for task ':unityLibrary:javaPreCompileRelease'.
    2. > Could not resolve all files for configuration ':unityLibrary:releaseCompileClasspath'.
    3.    > Failed to transform ARPresto-.aar (:ARPresto:) to match attributes {artifactType=android-classes, org.gradle.status=integration, org.gradle.usage=java-api}.
    4.       > Execution failed for AarToClassTransform: C:\Unity\ar-media-wall\Temp\gradleOut\unityLibrary\libs\ARPresto.aar.
    5.          > entry
    6.    > Failed to transform UnityARCore-.aar (:UnityARCore:) to match attributes {artifactType=android-classes, org.gradle.status=integration, org.gradle.usage=java-api}.
    7.       > Execution failed for AarToClassTransform: C:\Unity\ar-media-wall\Temp\gradleOut\unityLibrary\libs\UnityARCore.aar.
    8.          > entry
    ive done the steps in Gradle Troubleshooting as per your FAQ, but i cant seem to find any other resource to help me out here.

    thanks for your assistance!
     
  14. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    Does deleting NativeShare resolve this issue? Because if not, it seems to be caused by Unity ARCore, not NativeShare.
     
  15. RyanTexture

    RyanTexture

    Joined:
    Jun 10, 2020
    Posts:
    16
    yes deleting nativeshare solves the problem
     
  16. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    Can I see the full error message(s)?
     
  17. Eltayeb

    Eltayeb

    Joined:
    Jan 24, 2014
    Posts:
    20
    Hello There,

    I'm trying to build the project after importing NativeShare, but i get this error.

    * What went wrong:
    Execution failed for task ':launcher:processReleaseResources'.
    > Android resource linking failed
    Temp\gradleOut\launcher\build\intermediates\merged_manifests\release\AndroidManifest.xml:43: AAPT: error: unexpected element <queries> found in <manifest>.

    Can you help me solve it.

    Best Regards
    Alaa Eltayeb
     
  18. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    Please see the relevant FAQ entry.
     
  19. RyanTexture

    RyanTexture

    Joined:
    Jun 10, 2020
    Posts:
    16
    Hi there, thanks for responding! it seems like the plugin isnt playing nice with ARCore...

    Here it is:

    Code (CSharp):
    1. CommandInvokationFailure: Gradle build failed.
    2. C:/Program Files/Unity/Hub/Editor/2019.4.26f1/Editor/Data/PlaybackEngines/AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Users\ryan\Downloads\gradle-6.9.1-bin\gradle-6.9.1\lib\gradle-launcher-6.9.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
    3.  
    4. stderr[
    5.  
    6. FAILURE: Build failed with an exception.
    7.  
    8. * What went wrong:
    9. Execution failed for task ':unityLibrary:javaPreCompileRelease'.
    10. > Could not resolve all files for configuration ':unityLibrary:releaseCompileClasspath'.
    11.    > Failed to transform ARPresto-.aar (:ARPresto:) to match attributes {artifactType=android-classes, org.gradle.status=integration, org.gradle.usage=java-api}.
    12.       > Execution failed for AarToClassTransform: C:\Unity\arvr_discoveryapp\Temp\gradleOut\unityLibrary\libs\ARPresto.aar.
    13.          > entry
    14.    > Failed to transform UnityARCore-.aar (:UnityARCore:) to match attributes {artifactType=android-classes, org.gradle.status=integration, org.gradle.usage=java-api}.
    15.       > Execution failed for AarToClassTransform: C:\Unity\arvr_discoveryapp\Temp\gradleOut\unityLibrary\libs\UnityARCore.aar.
    16.          > entry
    17.  
    18. * Try:
    19. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    20.  
    21. * Get more help at https://help.gradle.org
    22.  
    23. BUILD FAILED in 2s
    24. Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    25. ]
    26. stdout[
    27.  
    28. > Configure project :launcher
    29. WARNING: DSL element 'useProguard' is obsolete and will be removed soon. Use 'android.enableR8' in gradle.properties to switch between R8 and Proguard..
    30. WARNING: DSL element 'useProguard' is obsolete and will be removed soon. Use 'android.enableR8' in gradle.properties to switch between R8 and Proguard..
    31. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.26f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\28.0.3\package.xml. Probably the SDK is read-only
    32. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.26f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    33. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.26f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
    34. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.26f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
    35.  
    36. > Task :launcher:preBuild UP-TO-DATE
    37. > Task :unityLibrary:preBuild UP-TO-DATE
    38. > Task :launcher:preReleaseBuild UP-TO-DATE
    39. > Task :unityLibrary:preReleaseBuild UP-TO-DATE
    40. > Task :unityLibrary:compileReleaseAidl NO-SOURCE
    41. > Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
    42. > Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
    43. > Task :launcher:generateReleaseBuildConfig UP-TO-DATE
    44. > Task :launcher:compileReleaseAidl NO-SOURCE
    45. > Task :launcher:compileReleaseRenderscript NO-SOURCE
    46. > Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE
    47. > Task :unityLibrary:generateReleaseResValues UP-TO-DATE
    48. > Task :launcher:mainApkListPersistenceRelease UP-TO-DATE
    49. > Task :unityLibrary:generateReleaseResources UP-TO-DATE
    50. > Task :launcher:generateReleaseResValues UP-TO-DATE
    51. > Task :launcher:generateReleaseResources UP-TO-DATE
    52. > Task :launcher:createReleaseCompatibleScreenManifests UP-TO-DATE
    53. > Task :launcher:extractDeepLinksRelease UP-TO-DATE
    54. > Task :unityLibrary:packageReleaseResources UP-TO-DATE
    55. > Task :launcher:prepareLintJar UP-TO-DATE
    56. > Task :unityLibrary:parseReleaseLocalResources UP-TO-DATE
    57. > Task :unityLibrary:javaPreCompileRelease FAILED
    58. > Task :unityLibrary:processReleaseManifest
    59. > Task :launcher:mergeReleaseResources
    60.  
    61. Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
    62. Use '--warning-mode all' to show the individual deprecation warnings.
    63. See https://docs.gradle.org/6.9.1/userguide/command_line_interface.html#sec:command_line_warnings
    64. 13 actionable tasks: 3 executed, 10 up-to-date
    65. ]
    66. exit code: 1
    67. UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    68. UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    69. UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    70. UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    71. UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    72. Rethrow as GradleInvokationException: Gradle build failed
    73. UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    74. UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    75. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    76. Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    77. UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    78. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    79. UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    80. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    81. UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <e6522990dfdf40458abbd5eeeb595b91>:0)
    82. UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
    83. BuildScript:AndroidBuild() (at C:/Unity/commonUnity/Editor/BuildScript.cs:97)
    thanks for your assistance
     
  20. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    I'm trying to understand; the last time the error was about <queries> element. This new error says "Probably the SDK is read-only". Is this another one of the many errors you're getting or did something change?
     
  21. RyanTexture

    RyanTexture

    Joined:
    Jun 10, 2020
    Posts:
    16
    Thanks for responding! i managed to fix it by updating a few packages, i guess older versions of some packages dont play well with the new settings / gradle etc.
     
    yasirkula likes this.
  22. El1t3L33t

    El1t3L33t

    Joined:
    Jun 14, 2020
    Posts:
    13
    Seems like this plugin no longer works when targeting api level 30
     
  23. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    What do you mean? I haven't heard this before. Perhaps you need to check logcat logs to see if there is an error message there.
     
  24. El1t3L33t

    El1t3L33t

    Joined:
    Jun 14, 2020
    Posts:
    13
    I've always used it and love your plugin but I noticed that it wasn't working on API level 30 - at least not the NativeShare.TargetExists call. I checked log cat but I wasn't getting any messages just that the package doesn't exist. When I try targeting API level 29, it works perfectly. But the play store has a minimum now of 30.
     
  25. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    Thank you for the details, that helps narrow down the issue. Did the "Android resource linking failed: unexpected element <queries> found in <manifest>" error occur and if so, how did you fix it? By following the steps here or by deleting
    <queries>
    from AndroidManifest?
     
  26. El1t3L33t

    El1t3L33t

    Joined:
    Jun 14, 2020
    Posts:
    13
    Thanks for the quick reply - I didn't run into that error and I'm using the built-in Gradle with Unity. I'm on version 2019.4.23f1 and it seems to have Gradle version 5.1.1 but I'm not positive.
     
  27. El1t3L33t

    El1t3L33t

    Joined:
    Jun 14, 2020
    Posts:
    13
    I updated to Gradle version 5.6.4 but still no dice.
     
    yasirkula likes this.
  28. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    I have a possible solution in mind that'll require me to modify the native source code. Will let you know afterwards (via PM).
     
  29. El1t3L33t

    El1t3L33t

    Joined:
    Jun 14, 2020
    Posts:
    13
    That would be excellent. Let me know if I can help with anything.
     
  30. daveinpublic

    daveinpublic

    Joined:
    May 24, 2013
    Posts:
    167
    Hi!

    I'm wanting to share multiple files..... but I'm not sure how many files there will be ahead of time.

    I want one button to export all files, but once again, I don't know how many ahead of time. Any help would be appreciated!..

    Code (CSharp):
    1. // I know that this works
    2. string fileName1 = Path.Combine(Application.persistentDataPath, "filename1.xml");
    3. string fileName2 = Path.Combine(Application.persistentDataPath, "filename2.xml");
    4.  
    5. new NativeShare().AddFile(fileName1).AddFile(fileName2)
    6.         .SetSubject("Share all files")
    7.         .SetCallback((result, shareTarget) => Debug.Log("Share result: " + result + ", selected app: " + shareTarget))
    8.         .Share();
    9.  
    10. //But there could be 5 files, or 65. Is there a way to pass a string array? Or any other solution?
    11. new NativeShare().AddFile(fileName[])
    12.         .SetSubject("Share all files")
    13.         .SetCallback((result, shareTarget) => Debug.Log("Share result: " + result + ", selected app: " + shareTarget))
    14.         .Share();
     
  31. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    You can do it like this:
    Code (CSharp):
    1. NativeShare nativeShare = new NativeShare();
    2. foreach( string filepath in filepaths )
    3.     nativeShare.AddFile( filepath );
    4. nativeShare.SetSubject(blabla).SetCallback(blabla).Share();
     
  32. daveinpublic

    daveinpublic

    Joined:
    May 24, 2013
    Posts:
    167
    Thanks for the fast response! Works great.
     
    yasirkula likes this.
  33. mkrfft

    mkrfft

    Joined:
    Sep 8, 2017
    Posts:
    22
    Dont know if this is a new issue with latest iOS but all of a sudden, sharing an image does not show the image nor the text in the sharesheet.

    Tried with all the text properties of share:
    Code (CSharp):
    1. var share = new NativeShare();
    2. share.AddFile(Application.persistentDataPath + "/Share your image.png","image/png");
    3. share.SetSubject("Share your image").SetText("Share your image").SetTitle("Share your image");
    4. share.Share();
    IMG_30A95F2FB761-1.jpeg
     
  34. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    Yes it doesn't look correct. Can you identify if removing subject, text and title (for testing purposes) resolves this issue?
     
  35. mkrfft

    mkrfft

    Joined:
    Sep 8, 2017
    Posts:
    22
    Nope, its coming up the same. That is how I have had it for 2 years now and got a bugreport on the sharesheet not working a week ago. Added all the text parts to try to fix it.
     
  36. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    I don't use an iPhone. Can you remind me how it's supposed to look?
     
  37. mkrfft

    mkrfft

    Joined:
    Sep 8, 2017
    Posts:
    22
    IMG_30A95F2FB761-1.jpeg

    edit: found an old screenshot
    screen.png
     
    Last edited: Dec 7, 2021
  38. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    OK I though you were talking about the recent contacts section which was a huge emptiness in the previous screenshot (did I mention that I don't use iPhone) :D I remember someone else mentioning the same issue but I unfortunately couldn't find the link. Changing that preview probably requires modifying the native source code. I might take a look at it after completing my current tasks (which will take some time).
     
  39. mkrfft

    mkrfft

    Joined:
    Sep 8, 2017
    Posts:
    22
    I can look into the native code now to see whats wrong. Reporting back with my findings.
     
  40. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    You can google "uiActivityViewController image preview" to know what to look for.
     
    mkrfft likes this.
  41. mkrfft

    mkrfft

    Joined:
    Sep 8, 2017
    Posts:
    22
    Ok seems like adding the file as UIImage does more harm then good so works if you change the file adding:
    Code (CSharp):
    1. for( int i = 0; i < filesCount; i++ )
    2.     {
    3.         NSString *filePath = [NSString stringWithUTF8String:files[i]];
    4.         UIImage *image = [UIImage imageWithContentsOfFile:filePath];
    5.         if( image != nil )
    6.             [items addObject:image];
    7.         else
    8.             [items addObject:[NSURL fileURLWithPath:filePath]];
    9.     }
    10.  
    Into this simple version:
    Code (CSharp):
    1. for( int i = 0; i < filesCount; i++ )
    2.     {
    3.         NSString *filePath = [NSString stringWithUTF8String:files[i]];
    4.         [items addObject:[NSURL fileURLWithPath:filePath]];
    5.     }
    6.  
    Created a pull request for the fix :)
     
    Last edited: Dec 7, 2021
  42. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
  43. mkrfft

    mkrfft

    Joined:
    Sep 8, 2017
    Posts:
    22
    Sure, but then you know why sharing of images doesn't work on iOS atleast.
    Maybe put in a check for "*.gif" in that case?
     
  44. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    I couldn't fully understand what this check will do for gif files. I have to share images as UIImage regardless of their types otherwise they may not be attached to some apps at all.
     
  45. MTeplytskyi

    MTeplytskyi

    Joined:
    Jun 16, 2020
    Posts:
    26
    Hi! Thanks a lot for plugin!
    I have a question. Could you please explain why on Android share dialog looks like on image 1 and in some other apps it looks like on image 2 ?
     

    Attached Files:

    • 1.jpg
      1.jpg
      File size:
      45.3 KB
      Views:
      251
    • 2.jpg
      2.jpg
      File size:
      37.2 KB
      Views:
      260
  46. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    MTeplytskyi likes this.
  47. MTeplytskyi

    MTeplytskyi

    Joined:
    Jun 16, 2020
    Posts:
    26
    Thanks!
     
    yasirkula likes this.
  48. zhaoxin2022

    zhaoxin2022

    Joined:
    Dec 29, 2021
    Posts:
    6
    Thanks for your open source, @yasirkula
    I am excited to use your sharing plugin, it seems to look great!
    As some questions listed above, I want to share some dynamic texts inputted by user to Facebook, email and g+.
    Currently, I am running the project on unity editor, it says "Shared!" on unity editor.

    So my questions are:
    1. should I create a new GameObject that reflects dynamic text to be shared when I want to share particular text?
    2. When I succeed to share text, where is destination (target email or anywhere)?
    3. In order to share the text with FB and G+, the other sharing plugin need to be used for?

    Thanks.
     
    Last edited: Jan 18, 2022
  49. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,789
    Hi,

    1. You can fetch the text from an Input Field, for example. InputField has a text property for it
    2. You can get this info by registering to the share result callback (SetCallback)
    3. No other plugin is needed
     
  50. zhaoxin2022

    zhaoxin2022

    Joined:
    Dec 29, 2021
    Posts:
    6
    Thanks for your reply, @yasirkula
    1. make sense.
    2. I found out callback named "SetCallback" from NativeShare.cs.
    The question of what I want to ask for is that I need to sequentially call SetCallback function after invoking SetText("text").Share() ?
    3. Without other 3rd party APIs including FB, G+, your plugin has power enough to implement them, right?
    If so, I'd like you to put some codes here so that I can figure out the way of how to do.

    Thanks.
     
Thread Status:
Not open for further replies.