Nov 17 | 8:55 AM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Nov 17 | 9:00 AM |
Refael O. | has entered the room |
Mark M. |
hello, Refael!
|
Mark M. |
how can I help you today?
|
Refael O. |
Hi Mark
|
Refael O. |
been a while since last time i've been here :)
|
Refael O. |
ok, i have 2 questions please
|
Mark M. |
go ahead with the first one
|
Refael O. |
i am currently developing a new smartwatch.
|
Refael O. |
now, one of my apps is a system app on this watch
|
Refael O. |
and it's running 24/7
|
Refael O. |
my problem is :
|
Refael O. |
i have a location manager, and currently i am using "requestLocationUpdates" method with LocationManager.NETWORK_PROVIDER
|
Refael O. |
i am taking a sample every 60 sec
|
Refael O. |
now, I want to change to Passive, to save battery
|
Refael O. |
View paste
|
Nov 17 | 9:05 AM |
Refael O. |
since passive only provide a sample if another app uses gps
|
Refael O. |
or network
|
Mark M. |
I guess I don't understand the question
|
Mark M. |
you can't have "every 60 seconds" *and* passive
|
Mark M. |
for the reasons that you cited
|
Refael O. |
View paste
|
Mark M. |
um, well, to be honest, implementing an Android SDK app to do this, running 24x7, would be bad on a phone or tablet
|
Mark M. |
on a smartwatch, it would seem to be "a non-starter"
|
Mark M. |
why is this an SDK app in the first place?
|
Yaniv | has entered the room |
Mark M. |
if it's part of the system, and it's supposed to run 24x7, why isn't this some Linux daemon
|
Mark M. |
where you can more tightly bind yourself to the core OS bits that handle location services
|
Mark M. |
and perhaps come up with some solution that further minimizes battery ?
|
Mark M. |
(BTW, hello, Yaniv -- I will be with you shortly!)
|
Yaniv |
thanks
|
Refael O. |
didn't thought about this like that, since i have zero experience in developing it
|
Nov 17 | 9:10 AM |
Mark M. |
developing for a smartwatch is closer to embedded systems engineering than even developing for a low-end phone, just due to the battery size
|
Refael O. |
our battery size is 800mAh..
|
Mark M. |
most developers have no choice but to work at the SDK level, because they aren't creating smartwatch firmware
|
Refael O. |
still pretty lowish, but higher then most watches
|
Mark M. |
however, you *are* creating smartwatch firmware
|
Refael O. |
yeah, ok i'll have to check out this option if you say so
|
Refael O. |
okie, take a question from Yaniv while i write my 2nd question.
|
Mark M. |
OK
|
Mark M. |
Yaniv: your turn! do you have a question?
|
Yaniv |
Hi
|
Yaniv |
I have an android device that I would like it to be in the car
|
Yaniv |
and when phones bind to it with bluetooth
|
Yaniv |
I want it to pull certain data from the phones like their current battery status
|
Yaniv |
contact list
|
Yaniv |
their signal strength
|
Yaniv |
etc
|
Yaniv |
I have no idea how to do that since the android api's for bluetooth don't mention this type of client-server relatioship
|
Yaniv |
I have seen bluetooth profiles implemented in java
|
Yaniv |
open source stuff like bluecove
|
Yaniv |
but I don't know how to do that in android as weel
|
Yaniv |
well
|
Mark M. |
my knowledge of Android's Bluetooth APIs can fit on the back of a postage stamp
|
Nov 17 | 9:15 AM |
Mark M. |
there should already be a Bluetooth profile for the contact list
|
Mark M. |
as that is used by hands-free dialing
|
Yaniv |
there is
|
Mark M. |
with respect to the rest, my assumption is that you would need to have a Bluetooth service exposed on the device that the car can call into
|
Mark M. |
whether that uses RFCOMM or some custom Bluetooth profile is beyond my experience
|
Mark M. |
I am not aware of battery status and signal strength being exposed by any conventional Bluetooth protocol, though I cannot rule it out
|
Mark M. |
again, I have very little Bluetooth experience
|
Mark M. |
heck, I'm happy when I can get Bluetooth working as a *user* :-)
|
Yaniv |
I see
|
Yaniv |
ok well , thanks anyway
|
Mark M. |
sorry I could not be of greater assistance
|
Mark M. |
let me take a question from Refael, and I will be back with you in a bit
|
Yaniv |
no worries
|
Mark M. |
Refael: your turn! do you have another question?
|
Yaniv |
I don't have any other questions
|
Refael O. |
Yeah
|
Refael O. |
OK
|
Yaniv | has left the room |
Refael O. |
I have an image, and I want to take the top 50% of it's height, and blur it + write some text on the blur.
|
Refael O. |
what way should i use to achieve that?
|
Refael O. |
for the blurring i mean, do i need to cut the bitmap in half?
|
Mark M. |
um, well, that would depend a bit on how you want to do the blur
|
Mark M. |
um, well, that would depend a bit on how you want to do the blur :-)
|
Nov 17 | 9:20 AM |
Mark M. |
I can see three main options for doing a blur effect:
|
Refael O. |
can you explain? :P
|
Mark M. |
1. actually blur the image itself
|
Mark M. |
2. apply some sort of blur effect while rendering the unblurred image
|
Mark M. |
3. have some overlay on top of the image on the Z axis that, through translucency, is providing the blur effect
|
Refael O. |
ok, which of this options would you recommend?
|
Mark M. |
is the blur+text a permanent condition of the image? or is it an artifact of something you want to display, but the image itself should remain untouched?
|
Refael O. |
hmm
|
Refael O. |
View paste
|
Mark M. |
but the price and the image are tied together and tied to the deal?
|
Refael O. |
i guess they are, every deal has a different price and image
|
Mark M. |
then the simplest programming solution is: have the graphic designer give you the image with the blur and text applied
|
Mark M. |
is there a reason why you would need the unblurred/un-overwritten image?
|
Nov 17 | 9:25 AM |
Refael O. |
aw now i see where you went with that question hehe
|
Refael O. |
i wish I could do that
|
Refael O. |
but there's a million picture possibilies
|
Refael O. |
i get the image url in a json
|
Mark M. |
well, your graphic designer is already preparing the million pictures, right?
|
Refael O. |
and every business owner can upload his own picture
|
Refael O. |
they don't go threw my designer
|
Mark M. |
then apply the blur and text on the server, where the image gets uploaded
|
Refael O. |
thru**
|
Mark M. |
general rule: never do on a mobile device what can be done more efficiently elsewhere, such as on the server
|
Refael O. |
can it be done on the server?
|
Mark M. |
sure
|
Mark M. |
people have been doing that for a long, long time
|
Mark M. |
ImageMagick and kin
|
Mark M. |
do you think all those meme PNGs (e.g., I CAN HAZ ...) are hand-generated by elves?
|
Mark M. |
:-)
|
Refael O. |
hehe
|
Refael O. |
k i'll get up from my chair and have a talk with my backend developer ;]
|
Refael O. |
thanks a lot Mark
|
Mark M. |
happy to be useful!
|
Refael O. |
have a good day!
|
Mark M. |
you too!
|
Nov 17 | 9:50 AM |
Refael O. | has left the room |
Nov 17 | 9:55 AM |
Mark M. | turned off guest access |