Custom data from txt file on android enterprise devices

Solved Locked
KS
Kavinda Senarath
Cohesio Group

The status of the battery is dumped onto a text file in the device storage. 

The mobicontrol help states it can read the lines of a text file but only ini and xml is available for android. 

How can the txt file option be added onto the android enterprise devices?

6 years ago
Android
ANSWERS
RC
Raymond Chan Diamond Contributor
6 years ago (edited 6 years ago)

As I said in my last post, you need to add an arbitrary section name, and then choose INI file.  For the screenshot attached in previous post,  I cut and pasted your example text file as the base, and add the line

[main]

as the first line of the INI file.  In the custom data definition,  "main" was used as the "Section Name", and "soh" as the "Value Name".   This works also for v14.x.

Solution
MD
Matt Dermody Diamond Contributor
6 years ago

I think it would need to be submitted as a feature request. With that said, what additional battery data are you looking to see besides what's already reported? Charge cycles, manufacture date?

KS
Kavinda Senarath
6 years ago

Hi Matt,

We require the health of the battery so that we can run reports and present to the customer. 

below is what's contained in the dumped battery text file

rated_capacity=3559000
time_to_empty=3197859
cycle_count=26
current_capacity=3096000
soh=86 (state of health as a percentage)
serial_number=PEPA161700165
time_to_full=-1
updated=Fri Feb 08 15:36:12 GMT+11:00 2019

It would be nice to obtain this soh value and present next to each device using custom data.

RC
Raymond Chan Diamond Contributor
6 years ago

It should be quite easy to do, as long as you have a section name added at the top of your file.

I spent a few minutes to get it done on a v13.4 test server as shown in the screenshot below :

MD
Matt Dermody Diamond Contributor
6 years ago

So you can pull from a .txt file in the same way that you can pull from an .ini or a .xml in Android? Can you pull from .json?

KS
Kavinda Senarath
6 years ago

Hi, Raymond the instance of SOTI is V14 and I do not see the option for text files on this.

Does v13 support text files for android enterprise devices?