Oct 8 | 7:20 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Oct 8 | 7:25 PM |
Susheel | has entered the room |
Susheel |
Hi Mark
|
Mark M. |
hello, Susheel
|
Mark M. |
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
|
Mark M. |
right
|
Mark M. |
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
|
Oct 8 | 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
|
D S. |
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!
|
Mark M. |
(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
|
D S. |
I'd the launcher icon to show a badge by default
|
D S. |
I'm able to make a widget which shows the badge
|
D S. |
but I'd like to be able to have that widget with the badge, be the default home screen icon
|
Oct 8 | 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>
|
D S. |
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
|
D S. |
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. | |
Mark M. |
the Stack Overflow question I just pasted a link to contains some discussion of manufacturer-specific badge support
|
Mark M. |
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
|
Mark M. |
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
|
D S. |
mark
|
James P. |
Yep Mark
|
James P. |
Its a simple one, but I seem to be having more trouble than I should be
|
James P. |
Im having trouble importing projects the cw-omnibus-master projects into android studio
|
Mark M. |
that's not surprising
|
Oct 8 | 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:
|
Mark M. |
1. you need Gradle 1.12 to be installed, from gradle.org
|
Mark M. |
2. you need to have the appropriate Build Tools installed from the SDK Manager (mostly version 19.1.0)
|
Mark M. |
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
|
Mark M. |
the problem is the Gradle for Android plugin
|
Mark M. |
up until ~10 days ago, the latest Gradle for Android plugin was 0.12.2
|
Mark M. |
and that only worked with Gradle 1.x
|
Mark M. |
(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
|
Mark M. |
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
|
Mark M. |
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
|
Mark M. |
or, set your GRADLE_HOME environment variable to point there, and Android Studio should find it automagically
|
James P. |
Oh yep thats sounds good
|
Oct 8 | 7:45 PM |
James P. |
is it the root directory of the installation or a subdirectory?
|
James P. |
(that I should be pointing to)
|
Mark M. |
the root
|
James P. |
Ok cool
|
James P. |
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
|
Mark M. |
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 |
Oct 8 | 7:50 PM |
Mark M. |
D Shen: do you have a question?
|
Oct 8 | 8:10 PM |
D S. |
oops sorry, no questions
|
D S. |
I was afk
|
D S. |
thanks again!
|
D S. |
bye bye
|
D S. | has left the room |
Oct 8 | 8:25 PM |
Mark M. | turned off guest access |