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 carter-carl30 · Dec 17, 2013 at 12:23 PM · androidjavascriptscoreemailattachment

How to email highscore through android?

Hi all, I have been trying to find out how to do this but I can only find fragments of information any help would be much appriciated

I currently have a highscore screen where the highscore is displayed as guitext once the game is over/completed.

what I hope to achieve is a button to email score to a friend, so when the player is on the highscore screen they can press SHARE SCORE and it would open up the android email client (gmail?) and read the score from players current score to be included in the email.

Is this possible?

this is my score code

 var highScore3dText : TextMesh;
 var yourScoreText : TextMesh;
 
 function Start(){
 
 yourScoreText.text = "Your Score: " + PlayerPrefs.GetInt("yourscore").ToString();
 
 highScore3dText.text = "High Score: " + PlayerPrefs.GetInt("highscore").ToString();
 
 }

I'm thinking a screenshot would be better as it would be easy to just type a score in lol but this looks even more complicated when I have tried to find any information and no tutorials seem to be available

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Briksins · Dec 17, 2013 at 12:43 PM

It is theoretically possible but not nice from the user experience point of view.

You see Android devices does not have in built email server, so you can't send emails from it directly, and using native Email app or GMail app is not a nice solution, as first of all you have no idea how to pass email content/arguments to the 3d party app (it might be even not possible) and 2ly what if user doesn't have email? no native email app configured/set up nor Gmail? he wouldn't be able to share his score? it is not nice :)

What you should do is to create server side and send email from server automatically. technically it will work that way:

  • User on the Android phone click Send score button

  • He type in email address of the friend and click send

  • Android device send request to the server with content of: High Score value and email address of recipient

  • Server capture this request

  • Server(has email server set up) send email to email with content of high score to provided recipient from your admin email like "NoRepaly@YourAppName.com"

however here you have another not nice problem for the user, where would he get email address to type in from? do he have to remember it? it is also not good idea. So you should provide some kind of look Contacts up mechanism or the best solution is to Attache Social Media

why would you send email with high score? you better post it on his wall on Facebook or Google+ or Tweeter or instagram or whatever you like

Comment
Add comment · Show 5 · Share
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
avatar image carter-carl30 · Dec 17, 2013 at 01:27 PM 0
Share

thankyou for your answer, like you say social media share seems the better option. Do you know of any tutorials on how I would do this?

avatar image Briksins · Dec 17, 2013 at 02:02 PM 0
Share

Yes absolutely, there is complete API pack from Facebook 1st Link 2nd Link 3d Link

avatar image carter-carl30 · Jan 04, 2014 at 02:38 PM 0
Share

I checked out that API pack but users seem to comment that its buggy/not working properly at best are there any other options?

avatar image Briksins · Jan 05, 2014 at 12:21 PM 0
Share

Where did u find info that it is buggy and users complain? more over what version of API do the complain about? it is updating nearly each month or even more often. I would suggest you to try it yourself rather then relay on people comments.

avatar image carter-carl30 · Jan 10, 2014 at 08:36 PM 0
Share

@Birksins - just from reading the comments below it on the asset store, no malice was intended just read what people had put

avatar image
0

Answer by Voxel-Busters · Aug 12, 2015 at 09:33 AM

You can use Application.OpenURL with mailto: scheme.

There is no direct way to send html text. You need to use a plugin.

Cross Platform Native Plugins allows share via

  • E-Mail

  • SMS

  • Facebook

  • Twitter

  • Whats-App

It supports iOS and Android platforms with a unified interface.

You can send HTML text as body here and supports attachments. The plugin is free to use for sharing feature.

Comment
Add comment · Share
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

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

19 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

Related Questions

How to attach a file to an email on android (using intent and C#)? 1 Answer

Unity android build SMTP attachment problem 0 Answers

BCE0051: Operator '<' cannot be used with a left hand side of type 'Object' and a right hand side of type 'int'. 1 Answer

Calling an Android plugin from Javascript? 0 Answers

Make an object move when clicking a GUI button? 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