Nov 3 | 8:50 AM |
Mark M. | has entered the room |
Nov 3 | 8:55 AM |
Mark M. | turned on guest access |
Matte | has entered the room |
Mark M. |
hello, Matte!
|
Mark M. |
how can I help you today?
|
Matte |
Hi there! Got your license yesterday, so expect to see me now and then :) First off, i have a couple of basic config-questions
|
Mark M. |
go right ahead
|
Mark M. |
though if somebody else joins, I'll take turns answering questions
|
Matte |
Sure. Well, as you know, the android sdk is kind of volatile sometimes, so i've taken to doing stuff like this: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2)
|
Nov 3 | 9:00 AM |
Matte |
But, whaf if the app runs on an older phone, where the Build class doesn't have the JELLY_BEAN field? Is it part of the appcompat somehow? In intellij, i have to put the version up for it to not scream, but it seems to work in the phone anyway.... im just not sure why
|
Mark M. |
"where the Build class doesn't have the JELLY_BEAN field? " -- that's an int, and so the value is inlined in the bytecode of your app
|
Matte |
so you mean, as long as i compile it with a new enough version, it'll work?
|
Mark M. |
correct
|
Matte |
thanks! ofcourse... :)
|
Mark M. |
JELLY_BEAN_MR2 needs to exist at compile time, but at runtime, it's the int value of that symbol that will be used
|
Matte |
great, silly me.
|
Matte |
ok, time for another?
|
Mark M. |
go right ahead
|
Matte |
right. Google Play Services! My app is kind of old, so i use maven still, havent gotten around to figuring out gradle. This means that i do this:
|
Matte |
View paste
|
Matte |
for example
|
Matte |
however, in intellij, it results in a directory with what looks like an entire sub-module/project is created in gen-external-apklibs with that dependency. Is this really how it should work?
|
Mark M. |
well, I don't use the Maven build system, and I don't use IntelliJ
|
Mark M. |
so, I can't really answer taht
|
Mark M. |
er, that
|
Matte |
np
|
Matte |
just checking
|
Nov 3 | 9:05 AM |
Mark M. |
if you look inside an AAR file (it's a ZIP archive), you'll see a manifest, a resource tree like in a regular project, an assets tree like in a regular project, and a JAR
|
Mark M. |
if what's in gen-external-apklibs looks like like that, it's probably just the unpacked AAR
|
Matte |
seems to be something with the aar format. not sure how android packages that with my apk, but i guess i'll notice if it doesn't work
|
Matte |
exactly
|
Mark M. |
in Android Studio, you don't see the unpacked AAR by default -- you have to go hunting around the build/ directory for it
|
Matte |
will it then pack that stuff back into my app when i build it? in intellij it is set up as a "module dependency"
|
Mark M. |
presumably, yes
|
Matte |
exactly, and add it yourself right
|
Mark M. |
otherwise, their stuff is broken :-)
|
Mark M. |
if we assume their stuff works, then the AAR contents are blended in with your app
|
Mark M. |
it's probably just that you are "seeing the sausage being made" more in IntelliJ+Maven
|
Matte |
right
|
Mark M. |
the "apklibs" reference is from Maven's prior packaging of Android library projects into artifacts
|
Mark M. |
they came up with their own approach, before Google debuted the AAR
|
Matte |
right
|
Matte |
yeah. well, i'll notice when i build. Still tons of stuff i apparently have to fix updating from LocationClient -> GoogleApiClient. Feels like yesterday i updated from the old locationclient to the fused one and now it's time again...
|
Mark M. |
yes, they seriously revamped that API
|
Mark M. |
my chapter on the fused location provider covers the latest stuff
|
Mark M. |
including dealing with Android 6.0 runtime permissions
|
Matte |
yeah speaking of that - there seems not to be any callbacks for disconnecting the client anymore?
|
Mark M. |
I don't remember -- sorry
|
Matte |
np mate
|
Nov 3 | 9:10 AM |
Matte |
but on that topic - i downloaded your omnibus, thought i'd save some time when im updating my geofencehandler from old to new - i couldn't find any geofence example?
|
Mark M. |
sorry, I don't have any material on geofencing at the moment
|
Matte |
no sweat, its ready, i just have to update to googleapiclient
|
Matte |
well thats all i have for now, but for the future - the whole location thing is really hairy on android and i might have a couole of future discussion topics there... have you worked a lot with it?
|
Mark M. |
some, less with the fused location provider, though
|
Matte |
Yeah. Our app has been on the store for about three years. We're a small shop though, and i do android, ios, web and backend, so as you can imagine, sometimes there's some time between my android crunch times. However, we've always had more problems with location on android than ios
|
Mark M. |
well, in terms of it being hairy, have you considered that what you thought was an Android device might really be a yak?
|
Mark M. |
:-)
|
Matte |
haha
|
Nov 3 | 9:15 AM |
Matte |
anyways, one example is that on android, we've had a recurring problem with the phone sometimes returning "old"/cached locations, but with updated timestamps, making it really hard to know whether to use the location. There are others with the same issue, so was just curious if you'd heard anything about it. It was the main driver for us moving to the fused provider
|
Mark M. |
I haven't heard of that problem, at least with GPS_PROVIDER
|
Matte |
There are a couple of similar SO threads, for example http://stackoverflow.com/questions/7648202/why-...
|
Mark M. |
note that the SO question and its answer are kinda old
|
Mark M. |
the half life of the value of an SO answer is about a year
|
Matte |
yeah i know. There are a couple of threads that are newer, but youre right. We still see that issue sometimes though. Mostly on Samsung.
|
Mark M. |
my needs for location data have been comparatively casual (e.g., when the user asks, make note of where we are now), so this sort of problem hasn't been an issue for me
|
Matte |
Right. Our app is a lot about location and maps
|
Matte |
Anyways, nothing more for now! Back to geofence coding... I might pop in at another time :) really like your book btw
|
Mark M. |
as with lots of things in Android, once you get past simple scenarios, things get exponentially icky
|
Nov 3 | 9:20 AM |
Mark M. |
glad you like it!
|
Matte |
indeed
|
Matte |
you should see our "locationfetchservice" :)
|
Matte |
anyways, have a good one!
|
Mark M. |
you too!
|
Matte | has left the room |
Nov 3 | 9:30 AM |
Matt | has entered the room |
Matt |
Hi Mark, hope you are well.
|
Mark M. |
hello, Matt!
|
Mark M. |
how can I help you today?
|
Matt |
I've got a quick question that i've pre-typed
|
Matt |
View paste
|
Nov 3 | 9:35 AM |
Mark M. |
"do you know of any open source projects/ libraries that i can integrate in to android? " -- by definition, that's impossible, short of custom ROMs
|
Mark M. |
the only reason TeamViewer would work is if Samsung put in hooks for TeamViewer
|
Mark M. |
outside of that, you're limited to things like the accessibility and media projection APIs
|
Mark M. |
and they are not capable of a TeamViewer-style remote-control mechanism
|
Matt |
so i will be limited to what TV has to offer?
|
Mark M. |
(actually, rooted devices could also offer remote access options, see VNC)
|
Mark M. |
unless Samsung has alternatives to TV, and unless you're going the root or custom ROM route, pretty much yes
|
Mark M. |
now, could you use accessibility and media projection to offer rudimentary remote support? yes
|
Matt |
I won't be able to root the devices as the new customer will be buying brand new phones and prob will not want to root them
|
Matt |
That sonds interesting
|
Matt |
what is VNC and how could i get this going?
|
Mark M. |
VNC is a long-standing remote access tool
|
Mark M. |
been around for ~15 years or so
|
Mark M. |
I know that there's a port for Android kicking around
|
Mark M. |
however, it needs root, to be able to access the framebuffer, fake input events, etc.
|
Mark M. |
that's basically the sort of low-level hooks that Samsung would have enabled for TeamViewer
|
Nov 3 | 9:40 AM |
Mark M. |
which IMHO kinda runs counter to the whole KNOX let's-lock-the-device-down logic, but, hey, I'm not Samsung :-)
|
Matt |
There is a TV app called quick support that has all the functioality i need but i'm not sure if i can call it with my TV license details
|
Mark M. |
yeah, you'd have to ask TV that
|
Matt |
I wonder how companies like Soti and bomgar acheive this? the user installs there app and the server app can control the whole phone
|
Matt |
the phones don't have to be rooted
|
Matt |
just android 4.4 and that's it
|
Mark M. |
"SOTI directly partners with over 70 mobile device manufacturers; we work very closely with the four largest Android device manufacturers that currently dominate the market"
|
Mark M. |
beyond that, they're using adb: https://www.soti.net/products/pocket-controller...
|
Mark M. |
basically, adb shell has elevated (though not root) access on production hardware
|
Matt |
View paste
|
Mark M. |
there are some recipes floating around that leverage this to allow an app to take screenshots and fake input
|
Matt |
does that mean i can liase with developers to get my system hooked with theirs?
|
Nov 3 | 9:45 AM |
Matt |
or when you said directly patner, do you mean something different?
|
Mark M. |
I have no idea -- I'm just quoting their Web site
|
Matt |
ok Thanks, i'm going to be talking to TV later tonight. i'll do some more digging on what they can offer.
|
Nov 3 | 9:50 AM |
Matt |
cheers bye for now.
|
Mark M. |
have a pleasant day!
|
Matt | has left the room |
Nov 3 | 9:55 AM |
Mark M. | turned off guest access |