Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by BBickelESMT · Apr 26, 2021 at 11:09 PM · androiderrorsharegallery

Android Share Creates Invalid Photo,Invalid Image on Android Share

Hi Everyone, hoping someone out there can help me. I've been stuck on this a few days now.


I'm using the plugin Ultimate Mobile Pro from Stan's Assets which is overall pretty great, but I'm trying to implement sharing on Android platforms. We've got a working build for IOS where share and save are both working as intended, but on android some of our devices work and some don't.


When I try to perform a share of a Texture2D (generated at runtime) on a device it fails with, I get a variety of errors depending on the app I choose to share it to. Invalid format, can't send empty message, can't find file, things of that nature. After attempting to share, I see an empty file is added to the device's gallery:


This file is size 0 bytes and is supposedly located at "/Internal storage/Pictures" but I can't ever locate it via "My Files" or browsing while connected to a PC. After several seconds, the correct image appears in the gallery, but by this time the "Share" action has failed.


I've contacted support for the plugin, but thought I would reach out to the community as well to see if I've missed anything, or if anyone can point me in the right direction. Some things I've considered:

  • I've dug into the plugin and although the code has many layers, at the core it appears to be doing things correctly, adding the image via intent as best I could tell (i'm not really an Android expert).

  • I've tried builds with "Write Permission" set to Internal and External and both have the same behavior.

  • The Texture2D is read/write enabled since it's generated at runtime.

  • The test devices might indicate newer versions of Android are what causes the problem, the 2 devices it works on are using Android 5 and 9, whereas the ones that use 10 and 11 are the ones that don't work. This isn't really conclusive though.


I am hoping I am just missing a Manifest line or project setting or something but I can't for the life of me figure out what it could be. Any and all help is greatly appreciated! Thank you.

,Hi Everyone, hoping someone out there can help me. I've been stuck on this a few days now.

I'm using the plugin Ultimate Mobile Pro from Stan's Assets which is overall pretty great, but I'm trying to implement sharing on Android platforms. We've got a working build for IOS where share and save are both working as intended, but on android some of our devices work and some don't.


When I try to perform a share of a Texture2D (generated at runtime) on a device it fails with, I get a variety of errors depending on the app I choose to share it to. Invalid format, can't send empty message, can't find file, things of that nature. After attempting to share, I see an empty file is added to the device's gallery:

This file is size 0 bytes and is supposedly located at "/Internal storage/Pictures" but I can't ever locate it via "My Files" or browsing while connected to a PC.

After several seconds, the correct image appears in the gallery, but by this time the "Share" action has failed: alt text

I've contacted support for the plugin, but thought I would reach out to the community as well to see if I've missed anything, or if anyone can point me in the right direction. Some things I've considered:

  • I've dug into the plugin and although the code has many layers, at the core it appears to be doing things correctly, adding the image via intent as best I could tell (i'm not really an Android expert).

  • I've tried builds with "Write Permission" set to Internal and External and both have the same behavior.

  • The Texture2D is read/write enabled since it's generated at runtime.

  • The test devices might indicate newer versions of Android are what causes the problem, the 2 devices it works on are using Android 5 and 9, whereas the ones that use 10 and 11 are the ones that don't work. This isn't really conclusive though.

I am hoping I am just missing a Manifest line or project setting or something but I can't for the life of me figure out what it could be. Any and all help is greatly appreciated! Thank you.

screenshot-20210426-174519-gallery.jpg (25.9 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

293 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

i can't export 0 Answers

script does not update inspector? 3 Answers

Connect Andorid Phone and get error 1 Answer

Easy way of using Android's natives gallery / sound library? 0 Answers

Make sphere shoot to Touch.position error 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges