Office Hours — Today, October 8

Thursday, October 2

Oct 8
7:20 PM
Mark M.
has entered the room
Mark M.
turned on guest access
7:25 PM
Susheel
has entered the room
Susheel
Hi Mark
Mark M.
hello, Susheel
how can I help you today?
Susheel
So I have a custom built Single Board Computer with Android installed on it. It does not have an accelerometer. I am trying to manually rotate the display by 180 degrees when inverted. I am only interested in landscape mode. How can I do that?
Mark M.
I have no idea, as that would have to be at the firmware level AFAIK
Susheel
I used rotation attribute on the layout but it only rotates the layout and the Toast messages, popup menus etc appear upside down.
Mark M.
after all, you have no way of rotating the status bar or navigation bar yourself at the SDK level
right
that's why the only full solution that I would know of would have to be in the OS itself, and the details of that are well outside my area of expertise
7:30 PM
Susheel
I do have a customly installed accelerometer and it notifies me when the device is inverted. I was thinking I might be able to just rotate the display but I guess now I have to manually write some tweaked code instead :)
Mark M.
sorry I didn't have a better solution for you
Susheel
No problem, thank you
D S.
has entered the room
Mark M.
hello, D Shen!
D S.
Hello!
Mark M.
D Shen: Susheel has already asked a question, so it is your turn -- do you have a question?
D S.
Did I interrupt an ongoing question? Or may I ask mine
ah nice
James P.
has entered the room
James P.
Hi
D S.
So are you familiar with the iOS pattern where the notifications are shown as a red bubble next to the icon app on the home screen?
Mark M.
hello, James!
(James: your turn will be next!)
James P.
Sure, no worries
Mark M.
D Shen: I assume you're referring to what in Android has been called a badge
D S.
right, yep
I'd the launcher icon to show a badge by default
I'm able to make a widget which shows the badge
but I'd like to be able to have that widget with the badge, be the default home screen icon
7:35 PM
D S.
does that make sense?
Mark M.
yes, though it's not supported
D S.
ah shoot
Mark M.
there is nothing that requires a home screen to offer badge support
D S.
I wasn't able to find much online about it
Mark M.
some device manufacturers have home screens that support badges
Susheel
has left the room
Mark M.
and there's no standards around them
D S.
right. So perhaps then can you shed some light on why Android phones in other parts of the world do have badges>
ah ok haha
Mark M.
and plenty of home screens will not support the badges, including any written by Google
D S.
ah i see
Hmm. Is there anything I can do as a developer if I were able to get my hands on another phone that does support badges?
Mark M.
the Stack Overflow question I just pasted a link to contains some discussion of manufacturer-specific badge support
I ran across it recently when helping somebody out on a related issue
D S.
oh awesome, yea looks helpful
Mark M.
and I think I read that there's a library that tries to wrap up all that manufacturer-specific stuff into a common API
just bear in mind that only some users will get the benefit, so be judicious in how you market this feature
D S.
excellent
Mark M.
let me take a question from James, and I'll be back with you in a bit
D S.
yup, i'll keep that in mind
Mark M.
James: your turn! do you have a question?
D S.
that's awesome, thanks a lot makr
mark
James P.
Yep Mark
Its a simple one, but I seem to be having more trouble than I should be
Im having trouble importing projects the cw-omnibus-master projects into android studio
Mark M.
that's not surprising
7:40 PM
Mark M.
I've been running into that with attendees of my training this week
James P.
Oh ok good to know im not alone
Mark M.
there are two things you need to address to get those to import at present:
1. you need Gradle 1.12 to be installed, from gradle.org
2. you need to have the appropriate Build Tools installed from the SDK Manager (mostly version 19.1.0)
I hope to improve this somewhat for next week's book update
James P.
ok
Mark M.
though that'll depend a bit on how large of a rabbit I can pull out of my hat
James P.
so currently the latest version of gradle seemns to be 2.1
Mark M.
correct
the problem is the Gradle for Android plugin
up until ~10 days ago, the latest Gradle for Android plugin was 0.12.2
and that only worked with Gradle 1.x
(of which 1.12 is the latest)
James P.
Ohh ok
Mark M.
Gradle for Android 0.13.2 is now out, and that requires Gradle 2.1
and so I'll be updating my samples to use Gradle for Android 0.13.2, which will change the Gradle requirement
James P.
Ohh ok yep
Mark M.
I am also hoping to work out the means by which to convince Android Studio to add a Gradle wrapper for the projects, avoiding the need for you to have to install Gradle separately
I'll also be updating my requested Build Tools to be whatever Android Studio presently ships (20.0.0?)
James P.
so when it asks me to locate Gradle Home, Im assuming I point to the location of the 1.12 installation
Mark M.
correct
or, set your GRADLE_HOME environment variable to point there, and Android Studio should find it automagically
James P.
Oh yep thats sounds good
7:45 PM
James P.
is it the root directory of the installation or a subdirectory?
(that I should be pointing to)
Mark M.
the root
James P.
Ok cool
thanks Mark for the pointers
Mark M.
let me take a question from D Shen, and I'll be back with you in a bit
D Shen: your turn! do you have another question?
James P.
Im all good Mark, thanks for your help, and thanks for the awesome book!
Mark M.
you are very welcome, and thanks for the kind words!
James P.
has left the room
7:50 PM
Mark M.
D Shen: do you have a question?
8:10 PM
D S.
oops sorry, no questions
I was afk
thanks again!
bye bye
D S.
has left the room
8:25 PM
Mark M.
turned off guest access

Thursday, October 2

 

Office Hours

People in this transcript

  • D Shen
  • James Pang
  • Mark Murphy
  • Susheel