playMaker

Author Topic: Get data from iOS devices (mem, wifi, battery, etc.)  (Read 2737 times)

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 772
Get data from iOS devices (mem, wifi, battery, etc.)
« on: June 29, 2015, 06:23:45 AM »
Hi,

Following this thread, it appears that a request for custom actions would be a good idea.
It is a surprise though that there does not seem to be one single Playmaker-ready set of actions to collect such data, despite its usefulness, for example to display the data through a custom UI in an app.
So here are the requirements:

  • Battery's current state and level, and relevant events.
  • Device's CPU current use, and relevant events.
  • Device's RAM memory current use, and relevant events.
  • Device's storage memory, possibly with quantity of files, apps installed, etc.
  • Wifi connection's current state and quality, and relevant events.
  • Bluetooth's current state and quality, and relevant events.

Relevant events means changes in values or state. It's perhaps better to keep an eye on changes than actually ping values constantly.

Also, if possible, most actions should have an option to send data to a live log.
I'm not sure you can actually send such data from an iOS device, connected to the Mac, back to Unity, for all sort of legal and technical reasons.
Eventually, at best, the data would pass through Xcode and back to Unity's own log window, directly from within the build file, but at least there should be data sent to Xcode's log.

The overall category of the functions that would be used seems to pertain to a section of the iOS native core. If it rings any bell, it seems to be about "UI Device".
In the other thread, you can find plugins which have made accessible the core functions, notably all the U3DXT set.

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 772
Re: Get data from iOS devices (mem, wifi, battery, etc.)
« Reply #1 on: July 13, 2015, 12:24:11 PM »
Let's bump this and see where it goes. It seems the request isn't that popular, but perhaps it stems from a lack of explanation of the benefits.
Today, when you want to display some of the data I listed, you just ask Unity to display the full iOS bar that gives info about the connection and battery level, time and two or three more options.
And you have no other way around those limitations.
Now, say you make an app where the connection, battery level and other native informations play a more important role, or let's just say that you'd like to give this information to players when they press pause, so they actually get informed of such basic but still relevant pieces of information without having to leave the application (which is always a good thing), you would certainly want to have a way to present this information, but with your app's custom UI, instead of the dull iOS UI.
This is the objective of those actions, to have access to that data and be able to enhance it and do more with it!