Nov 23 | 3:50 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Nov 23 | 4:00 PM |
Suzanne A. | has entered the room |
Mark M. |
howdy, Suzanne!
|
Suzanne A. |
hi mark
|
Suzanne A. |
Am I the only one here, other than you?
|
Mark M. |
presently, yes
|
Mark M. |
that might change
|
Suzanne A. |
ok. may I ask a question from our dev forums?
|
Suzanne A. |
ok :)
|
Mark M. |
sure
|
Mark M. |
if you want, just paste in a link
|
Suzanne A. | |
Suzanne A. |
It's on Contacts. Is the issue on our side, or his?
|
Mark M. |
well, I haven't tried ACTION_PICK with a content type instead of a Uri
|
Nov 23 | 4:05 PM |
Mark M. |
didn't know that worked
|
Nov 23 | 4:05 PM |
Mark M. |
in fact, the more I ponder, I'm a bit surprised it does
|
Suzanne A. |
yes, I wasn't sure either
|
Suzanne A. |
it's on the data level, right?
|
Mark M. |
not sure I understand that question
|
Suzanne A. |
In 2.0+, Contacts has 3 levels ... data, raw, and contact
|
Suzanne A. |
at least, according to the Android docs
|
Suzanne A. | |
Mark M. |
oh, yeah, well, you just blew past my limited comprehension of the new Contacts system
|
Mark M. |
the old system was bad enough
|
Mark M. |
the new one gives me a headache just thinking about it
|
Suzanne A. |
I know :-)
|
Suzanne A. |
Me too :-)
|
Suzanne A. |
I think what he's trying to do is display only contacts with a phone number
|
Suzanne A. |
Is there a new/old way that works?
|
Mark M. |
via ACTION_PICK, not sure
|
Mark M. |
if you have the READ_CONTACTS permission, then definitely
|
Suzanne A. |
So maybe that's our suggestion to him ...
|
Mark M. |
the Contacts/Spinners sample out of the Advanced Android book demonstrates it, for old and new APIs
|
Suzanne A. |
right, and I ran it on a DROID X, and it was fine
|
Mark M. |
the real question is: is what he's trying to do actually supposed to work?
|
Suzanne A. |
My guess is that our Blur syncs are changing IDs, and that's why he's getting a null back
|
Mark M. |
his phrasing suggests that he has an app on the Market, and that it's working for other devices
|
Suzanne A. |
I haven't seen it in any docs, articles, or samples
|
Suzanne A. |
Yes, but developers tell us that all the time, to get us to debug their apps
|
Mark M. |
oh, that's likely
|
Suzanne A. |
"My app works on all devices except Motorola X .. "
|
Suzanne A. |
I mean, who do they think I am? You?
|
Mark M. |
heh
|
Suzanne A. |
yeah
|
Nov 23 | 4:10 PM |
Mark M. |
the last entry on there suggests a private message to you
|
Mark M. |
did he send you an APK?
|
Suzanne A. |
Yes, he sent me a pm, but no apk yet
|
Suzanne A. |
Most I can do is run his APK on two devices and if needed, file a bug
|
Suzanne A. |
But our Contacts has gone into maintenance ..
|
Suzanne A. |
so it's unlikely to be fixed
|
Suzanne A. |
so I'm looking for a coding technique for him
|
Mark M. |
ah
|
Mark M. | |
Mark M. |
here, somebody is using an Intent with that MIME type
|
Mark M. |
but they also set a Uri
|
Suzanne A. |
oh, so it is okay
|
Suzanne A. |
right !!
|
Suzanne A. |
you're a genius ..
|
Suzanne A. |
so I'll refer him to that
|
Mark M. |
here's another reference to the same concept: http://groups.google.com/group/android-dev…
|
Suzanne A. |
ok, thanks
|
Mark M. |
I just Googled on setType(ContactsContract.CommonDataKinds.Phone.CONTENT_TYPE);
|
Mark M. |
those links and others showed up
|
Suzanne A. |
ok
|
Suzanne A. |
I'll google that too and see what else is there
|
Suzanne A. |
I think we should just refer these devs directly to you
|
Mark M. |
oy
|
Suzanne A. |
To buy WareScriptions and use your chats. Yes?
|
Suzanne A. |
oh?
|
Mark M. |
sorry, I thought you meant direct emails
|
Suzanne A. |
no, I want them to pay you :-)
|
Mark M. |
Motorola is certainly welcome to refer people my way, and I certainly would appreciate such referrals
|
Mark M. |
if I were in Motorola's shoes...well, I'd want to ponder that approach
|
Suzanne A. |
why so?
|
Mark M. |
I suppose it's better than just having threads tail off and moulder
|
Suzanne A. |
Well, our direction is not to do 1-1 consulting, because our support is free
|
Mark M. |
understood
|
Nov 23 | 4:15 PM |
Mark M. |
perhaps it's just a matter of messaging
|
Suzanne A. |
yes
|
Suzanne A. |
So I'll refer him to those links, thanks so very much
|
Mark M. |
no problem
|
Suzanne A. |
And I'll mention to Lisa that we might to message what we do/don't do on forums
|
Suzanne A. |
And/or refer devs to you, for WareScriptions, not direct email
|
Mark M. |
yeah
|
Suzanne A. |
I once spent 12+ hours debugging some guy's widget ..
|
Suzanne A. |
He claimed it worked on all devices but DROID 2
|
Suzanne A. |
Man, what a lesson
|
Mark M. |
the key really is getting the developers to
demonstrate that the problem exists on some MOTODEVICE but works fine on
others, and that would typically require an APK
|
Suzanne A. |
Right
|
Suzanne A. |
Only thing is, if they do send it, and we do reproduce ..
|
Suzanne A. |
We can't always get a fix anyway
|
Mark M. |
true, but it gets back to messaging
|
Suzanne A. |
Yes, entirely right
|
Mark M. |
if the problem truly exists on a MOTODEVICE, then you're in normal MOTODEV support territory
|
Mark M. |
if the problem exists on other hardware, you can steer them to StackOverflow or me or [android-developers] or wherever
|
Suzanne A. |
Right
|
Mark M. |
and, if they do not supply an APK, that's their own fault
|
Suzanne A. |
I'm leaning how to handle these
|
Suzanne A. |
Yes, I agree
|
Mark M. |
it's why I always recommend attaching a project to an issue on b.android.com
|
Mark M. |
same sort of thing applies here
|
Suzanne A. |
b.android.com? bug site?
|
Mark M. |
yes
|
Mark M. |
issues seem to get incrementally more love if they are replicable
|
Suzanne A. |
yes, that's the way of software engineering
|
Nov 23 | 4:20 PM |
Mark M. |
alas, "software engineering" is a foreign concept to many developers
|
Suzanne A. |
yes, especially those who build consumer apps, right?
|
Mark M. |
for me, it seems more a question of background and scope
|
Mark M. |
firms tend to be pretty decent
|
Suzanne A. |
right, but individuals?
|
Mark M. |
that depends on where they've worked and how much they internalized the process
|
Mark M. |
or, whether they had to respond to public issue trackers... :-)
|
Suzanne A. |
right
|
Mark M. |
on the whole, at least in Android, a lot of the solo developers are pretty new to all of this
|
Sean S. | has entered the room |
Suzanne A. |
So the second link you sent
|
Mark M. |
howdy, Sean!
|
Suzanne A. |
Doesn't have a URI? Is that recommended?
|
Sean S. |
Hi Mark!
|
Mark M. |
Suzanne: oh, you're right
|
Mark M. |
never mind that
|
Mark M. |
sorry
|
Suzanne A. |
Ok. You've been a great help
|
Suzanne A. |
Have a wonderful holiday, talk soon
|
Mark M. |
Sean: do you have a question?
|
Mark M. |
you too!
|
Sean S. |
Yes, I do, just a sec
|
Sean S. |
It's about what the best practice would be to accomplish a particular task in Android.
|
Mark M. |
um, ok
|
Mark M. |
got a task in mind?
|
Mark M. |
or can I pick one? :-)
|
Sean S. |
I'm starting an app which will access information on my car's computer
|
Nov 23 | 4:25 PM |
Sean S. |
It will have a lot of different functions
|
Sean S. |
let's take one, a map for example.
|
Sean S. |
I may display the car's location on the map on the phone.
|
Suzanne A. | has left the room |
Sean S. |
I have an icon on the map representing the car.
|
Sean S. |
I want to click on the icon and let the user choose from many Tasks (to use an Android term I've found in the documentation)
|
Mark M. |
I really doubt you want to choose from Android tasks, but go on
|
Sean S. |
so, each item in the list that the icon pops up will let the user perform a specific Task
|
Sean S. |
for example, tasks might be, "find nearest" or "unlock doors" or whatever
|
Sean S. |
but I decide to release this app and only some of the tasks are done.
|
brack | has entered the room |
Sean S. |
I am thinking of writing each "task" as a separate application, with no icon
|
Mark M. |
(btw, howdy, brack!)
|
Sean S. |
An intent will launch the Activity for that "task"
|
brack |
(hello again, Mark!)
|
Mark M. |
Sean: so far, that all sounds reasonable
|
Sean S. |
So when the user starts the app, the app that
shows the map goes to the web and discovers that "unlock doors" is now
complete and ready as an app
|
Sean S. |
and at this point I'd love to have my app start a
download in the background and install that app but I know that is not
possible yet.
|
Nov 23 | 4:30 PM |
Mark M. |
well, you can do the download and kick off an install, but it won't install "quietly"
|
Mark M. |
the user will still go through the permission check and such
|
Sean S. |
Right, and it annoys the user.
|
Mark M. |
:: shrug ::
|
Mark M. |
only if they are not expecting it
|
Mark M. |
that's a question of messaging
|
Sean S. |
so I would wait until the user clicks the icon and I would display, "unlock doors"
|
Sean S. |
but when the user clicks that, I would say, "hey,
this feature is available, but will take a few clicks to install, wanna
do that now?"
|
Sean S. |
basically, what I'm trying to do is extend my app
as features become available, rather than constantly bug a user to
install a new version, for a feature they might not even care about.
|
Mark M. |
that sounds great
|
Sean S. |
Where is Android as far as making this kind of use case possible/?
|
Mark M. |
in fact, in 2011, if nobody else solves it, I have plans on tackling this very problem
|
Mark M. |
well, it's mostly there
|
Mark M. |
you need to call out to a Web service or download a page or something to determine which of your plugins are ready
|
Mark M. |
that will drive your list which has the "unlock doors" option
|
Sean S. |
I think we're talking about a module system. hate to reinvent something.
|
Mark M. |
sorta
|
Mark M. |
these are all really standalone apps
|
Mark M. |
they're just not designed for independent distribution on the Android Market
|
Mark M. |
by "standalone", I mean they are APK files
|
Sean S. |
there is no concept for a "plug-in" for android yet, is there? all have to be standalone?
|
Mark M. |
well, the easy path is standalone
|
Mark M. |
there are some hooks in there to download what amount to JARs of Dalvik bytecode
|
Mark M. |
haven't tried them
|
Sean S. |
I assume they are in the proprietary API
|
Mark M. |
no
|
Sean S. |
really!
|
Nov 23 | 4:35 PM |
Mark M. |
dalvik.system.DexClassLoader
|
Mark M. |
again, though, I haven't tried it
|
Mark M. |
your kilometerage may vary
|
Sean S. |
I will have to look at that one and see what restrictions there are
|
Mark M. |
yeah, classloaders are tricky, even in regular Java
|
Mark M. |
I can't imagine it is somehow easier on Android
|
Mark M. |
anyway, let me take a question from brack, and we can swing back to you for followup if needed
|
Mark M. |
brack: do you have a question?
|
Sean S. |
and the other option would be to have that feature
sit there on the Android market as an application that one can
purchase. The problem is that as a "plug-in" it would not have a
visible icon; if people bought it I suppose the first thing it would do
when run (if the user figured out how to start it) would be to tell them
to download the rest of the app
|
Sean S. |
OK, go ahead. I'll stand by
|
brack |
yep, quick one, hopefully
|
brack |
right now I have a service that uses a
MediaPlayer. the big issue right now is that when i scroll, say, a
listview, it lags the audio very badly
|
brack |
i'm assuming the service isn't getting enough cpu resource
|
Mark M. |
that's very possible
|
Mark M. |
are you using startForeground()?
|
brack |
that's in the service, right?
|
Mark M. |
yes
|
brack |
i don't know if i actually added that, no.
|
brack |
damn, i looked at that too. you think that'll do it?
|
Mark M. |
I *think* that might keep your service in foreground priority
|
brack |
wasn't sure if it was that or threading, or if i needed to create a remote service and run it in a separate process
|
Nov 23 | 4:40 PM |
Mark M. |
hopefully neither of those
|
brack |
yeah heh
|
Mark M. |
try startForeground()
|
brack |
thanks- will lurk for a bit while i try this. appreciate it
|
Mark M. |
no problem
|
Mark M. |
Sean: there's a middle ground between DexClassLoader and APK-on-the-Market
|
Mark M. |
you can always download and kick off the installs of APKs yourself
|
Mark M. |
this still puts an icon in their Settings > Applications > Manage Applications screen
|
Sean S. |
I'm OK with the icon in settings, just not in the main app list
|
Mark M. |
just don't create an Activity with a LAUNCHER <intent-filter>
|
Sean S. |
when you say "you can download" do you mean "you" as the user or "you" as the application?
|
Mark M. |
"you" as the application
|
Sean S. |
How would my app do that?
|
Mark M. |
ummm...HTTP GET, presumably
|
Sean S. |
because that sounds good enough. my app will look to see if the plug-in is installed, and if not, install it
|
Mark M. |
then an ACTION_VIEW Intent with the APK MIME type
|
Mark M. |
you could do an ACTION_VIEW on the APK URL directly, but I think the user needs to do an additional step as part of the install
|
Sean S. |
That sounds very promising, I will give that a shot
|
Nov 23 | 4:45 PM |
Mark M. |
you will have to deal with updates yourself
|
Mark M. |
brack: do you have another question?
|
brack |
yeah, i was generally curious about the seekbar and if you can disable trackpad interaction
|
Mark M. |
usually, no
|
Mark M. |
either it is enabled (touch plus d-pad/trackball/whatever) or it is not
|
brack |
roger. main issue is that it's hooked up to a media player, and the movements with the trackpad seem to lag it out
|
Mark M. |
you could subclass it and try to eat the events
|
brack |
nah, i'll just put a limiter on the callback for adjusting the seek position
|
brack |
thanks, that answers that one. appreciate it. how long are you online? till 5?
|
Mark M. |
yes
|
Mark M. |
Sean: got another question?
|
Sean S. |
yes
|
Nov 23 | 4:50 PM |
Sean S. |
let's say I use the "plug-in" approach to sell a
feature at the point it is needed. The user is directed to the market
to install the plug-in. I see several problems with this: (1) the
plugin has no LAUNCHER, so if someone buys it wituout the app they will
not be happy and (2) how to return to the app once the plug-in is
installed
|
Mark M. |
(2) is the user pressing BACK
|
Mark M. |
(1) is indubitably a problem
|
Mark M. |
which is why I am hoping we in the community can work out a plugin mechanism, with an update manager, for this sort of thing
|
Sean S. |
both significant user experience problems
|
Sean S. |
I am looking for a project just like that!
|
Sean S. |
where is this being discussed?
|
Sean S. |
I guess I mean, is the community already discussing this, and if so, where?
|
Mark M. |
by the voices inside my head
|
Mark M. |
:-)
|
Mark M. |
it's an itch I will need to scratch at some point, if nobody else scratches it
|
Mark M. |
I am not aware of anyone working on something quite like this, though it's a big community
|
brack |
that actually sounds really interesting, a plugin updating manager (if I've been reading correctly)
|
Sean S. |
Well, I will put it on my own short list of things to research.
|
Sean S. |
yes
|
Sean S. |
I believe OSGi is meant to do this
|
Mark M. |
my personal itch will be for more of a general non-Market-APK updating manager, but it could be applied for plugins as well
|
Nov 23 | 4:55 PM |
Mark M. |
I know some people have been poking at Apache Felix vis-a-vis Android
|
Nov 23 | 4:55 PM |
Mark M. |
however, OSGi feels like engineering-by-committee
|
Sean S. |
right, that is my concern too
|
Sean S. |
it would need to be something that can be done in pieces or it will be too big and never get done
|
Mark M. |
OK, our time is running out -- any last questions?
|
brack |
one quick one if you have a sec: does it matter where i call startforeground?
|
brack |
anywhere in the service OK, or does it have to be in startCommand
|
Mark M. |
sometime before you need foreground priority
|
brack |
gotcha; great, thanks!
|
Mark M. |
since it puts an icon in the launcher, I'd do it
at the point the user did whatever it was that caused your service to
need foreground priority
|
Mark M. |
that way, user sees cause-and-effect
|
Mark M. |
versus an icon appearing out of proverbial nowhere
|
Mark M. |
er, not icon in the launcher
|
Mark M. |
icon in the *taskbar*
|
Mark M. |
wow, I need sleep
|
brack |
right- yeah. that's what i'm doing now
|
brack |
haha
|
Sean S. |
if brack has no others I might ask: I'm on the
Java ME executive committee for the JCP, watching the SE/EE vote on
SE7/SE8; do you have any opinions on Java's future with Oracle? anywhere
you'd prefer it to go?
|
brack |
i was curious because it didn't help, but i'm
wondering if i need to call that out before I do the media player
initialization, etc
|
brack |
but that's all for now, I may check in for tomorrow's hours once i play with threading and separate processes
|
Mark M. |
brack: sounds good!
|
Mark M. |
Sean: my arms are too short to box with Oracle
|
brack |
thanks again. cya later guys
|
Sean S. |
thanks! bye!
|
brack | has left the room |
Sean S. |
a great answer to my last question. I need to realize that myself. take care.
|
Nov 23 | 5:00 PM |
Mark M. |
see ya!
|
Sean S. | has left the room |
Mark M. | turned off guest access |