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 Clavus · Nov 27, 2014 at 04:12 PM · androidinputtouch

Using an Android tablet as input device for a desktop app

I'm looking at ways to have the player use an Android tablet as an input device for a desktop Unity game (so it's basically a touchpad of sorts). Right now my options seem to be (1) finding an existing Android app that somehow communicates touch input to the desktop in some usable format (not yet found one), or (2) build a Unity app for Android that reads touch input, and somehow communicate that to my computer where the desktop Unity game.

My main concern is that it needs to be quite easy to set up and work reliably. Does anyone know if there are existing solutions? Or recommended ways to implement this myself? I've got some ideas of my own but I want to be sure there aren't easier solutions.

Comment
Add comment · Show 4
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 meat5000 ♦ · Nov 27, 2014 at 03:17 PM 0
Share

https://www.google.co.uk/?gfe_rd=cr&ei=SkB3VPuVGYuehQeD94CQCA&gws_rd=ssl#q=android+joystick+for+pc

avatar image Clavus · Nov 27, 2014 at 03:21 PM 0
Share

@meat5000: I'm not really looking for a joystick emulator, I want the solution to send touch input so I can detect things like pinching, swiping, tapping, etc.

avatar image meat5000 ♦ · Nov 27, 2014 at 03:44 PM 0
Share

You should check some of them out. Some do have different joystick and touch options, so some can just send touch info. Sometimes licenses will allow you to decompile the app to see how it works. Just don't go ripping code. You may find it requires native code on Android to control the hardware.

avatar image Clavus · Nov 27, 2014 at 04:45 PM 0
Share

@Josh-Naylor: Yeah I know there are plenty of libraries to handle touch input on the device itself, but I want to communicate the touch input to the desktop app somehow. I'm wondering if there's a solution for that out there already, and not one that emulates joysticks or gamepads.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by $$anonymous$$ · Nov 27, 2014 at 05:37 PM

I've done something like this in the past. Not using android or unity, but iOS. But the approach should work for your question as well.

The approach :

  1. Create a desktop app.

  2. Run a server on desktop.

  3. Have a web API that communicate with the server.

  4. Have a mobile app (android app in your case)

  5. Communicate between server (web API) and mobile app (I was just sending some HTML requests with parameters appended to the URL and grabbing it from web api side of things and feeding it to the main desktop app)

Keep in mind that I was not using this for realtime input instead just passing commands to the desktop app from an iPad, as in 'Start app', 'close screen saver' kind of thing,

I know this is a pretty vague. Hope it helps though.

Comment
Add comment · Show 1 · 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 Clavus · Nov 27, 2014 at 06:45 PM 0
Share

Yeah that was the idea I had if I'd have to implement it myself. HTTP doesn't really seem suited for continuous input however (like pinch-scaling etc), like you said.

avatar image
0

Answer by tanoshimi · Nov 27, 2014 at 07:37 PM

Haven't personally ever tried it, but I'd probably try to use Bluetooth a la https://code.google.com/p/androhid/

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Touch Input madness 2 Answers

Android - touch a 3d object and something happens to it 1 Answer

Touch joystick tutorials ? 0 Answers

input touch android help 0 Answers

Touch Input in Android... 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