"sjb64" wrote:
Even though I answered that question I never actually thought of doing that till you asked, now my statistics dashboard can distinguish between dev (sideloaded), testing, and production. Realized that once we got published knowing if I'm seeing a pattern or issue in test or in production was a huge need. A case where I really am glad you asked.
'exerpted from a set of private functions in an AA
ChannelID: function () as string
'get ip from deviceIP function
ip=m.deviceIP()
m.ipAddress=ip
'read manifest file from local storage
manifest=readAsciiFile("pkg:/manifest")
'convert manifest file into array delimited by carriage returns
phase1=manifest.tokenize(chr(10))
'iterate through result and find app title
for each line in phase1
if lcase(line.left(line.instr("=") ) )="title" then
apptitle=line.mid(line.instr("=")+1)
end if
end for
'to do: handle case if no title field in manifest
'get list of apps from device ECP
xfer=createobject("roURLTransfer")
xfer.seturl("http://"+ip+":8060/query/apps")
data=xfer.gettostring()
xml=createobject("roXMLElement")
Identity=""
if xml.parse(data) then
?"iterate through all apps in list and find one where the title matches manifest title"
for each entry in xml.app
if entry.getText() = apptitle.trim()
Identity=entry@id
if instr(identity,"_") > 0 then
Identity=left(Identity,instr(Identity,"_")-1)
end if
end if
end for
if identity="dev" then
?"ID=DEV"
return "00000"
else
if identity=invalid then
print "identity is invalid, replacing with 00000"
identity="00000"
end if
if identity="" then
print "identity is null string, replacing with 00000"
identity="00000"
end if
end if
else
?"got bad xml from device, return null channel id:"
return identity
end if
return identity
end function
DeviceIP: function () as string
di=createobject("rodeviceinfo")
temp=di.getipaddrs()
temp.reset()
while true
aakey=temp.next()
if not temp=invalid then
return temp[aakey]
end if
end while
end function
"EnTerr" wrote:
Congrats on getting published (8/11), btw!
Ha! 51 channels published on 8/13. FIFTY ONE. In one day. Really?!
"RokuJoel" wrote:
Just for fun, here's how I did it before getID() was implemented. ...
"RokuJoel" wrote:
Just for fun, here's how I did it before getID() was implemented. ...
"sjb64" wrote:
Thanks, we got to spend like a day and a half visible on the new list. Watching historically I told them it would be a week visible, then 2 to 3 on the list, but seems that changed suddenly just in time for us.
Such is life...
Watching our install counts with no idea what is a good successful number or a rough start, but still fun to watch.