[android-developers] Digest for android-developers@googlegroups.com - 25 Messages in 9 Topics

Group: http://groups.google.com/group/android-developers/topics

    Dianne Hackborn <hackbod@android.com> Feb 28 05:27PM -0800 ^
     
    What is the bug report? I don't see any link you have posted to it here.
    Nor do I see a self-contained sample I can run to try to repro the problem.
     
    And I have not yet seen you post anything that sounds like it is
    misbehaving. Yes, a service will occasionally get killed if it has not used
    startForeground(). No, it will not get onStartCommand() called when this
    happens, only onCreate().
     
    I have written a lot of documentation as well as a blog post and sample code
    on how the service lifecycle works. Yes, there was a change to this in 2.0
    that turned off the old setForeground() API because applications were
    abusing it too much. Sometimes given a choice between really bad
    application behavior and changing the framework behavior that apps see, the
    latter makes sense.
     
     
    --
    Dianne Hackborn
    Android framework engineer
    hackbod@android.com
     
    Note: please don't send private questions to me, as I don't have time to
    provide private support, and so won't reply to such e-mails. All such
    questions should be posted on public forums, where I and others can see and
    answer them.

     

    Zsolt Vasvari <zvasvari@gmail.com> Feb 28 05:51PM -0800 ^
     
    > It's been a month, and this regression bug still hasn't even been reviewed.
     
    In my experience, no bug report (other than those submitted by Google
    Android team members themselves) ever gets acknowledged or it's status
    updated. That doesn't neccessarily mean that they are not being
    worked on or looked at.

     

    Zsolt Vasvari <zvasvari@gmail.com> Feb 28 05:57PM -0800 ^
     
    My other suggestion would be to run a diff on the 2.2 and 2.3 source
    trees and see where it has been "broken", in your opinion. If you can
    point to an exact piece of code, you may have better luck getting this
    resolved.
     
    Unfortunately, you will forever have to do this workaround (or at
    least as long as you are supporting 2.3 in your app).
     
     
     

     

    rich friedel <rich.friedel@gmail.com> Feb 28 06:21PM -0800 ^
     
    Just wondering...
     
    I have avoided the use of startForeground() due to its issue on HTC devices
    http://code.google.com/p/android/issues/detail?id=9682 &
    http://code.google.com/p/android/issues/detail?id=9663 thus I am only
    utilizing START_STICKY in onStartCommand(). This currently works fine (2.2)
    but with the upcoming release of OS 2.3 on a wider variety of mobile devices
    Mr. Basile's issue concerns me as it will also affect how my application
    works on those devices.
     
    Should I be concerned or am I worrying prematurely?

     

    Dianne Hackborn <hackbod@android.com> Feb 28 06:35PM -0800 ^
     
    Okay, this did indeed break in 3.3. The change was from August of last
    year. This is the change that broke it:
     
    http://android.git.kernel.org/?p=platform/frameworks/base.git;a=commit;h=5474b0f8603ee66413c3e44600ca46f162f3089e
     
    In particular this change here:
     
    - if (si.intent == null && N > 1) {
    + if (si.intent == null) {
     
    I'll get this fixed in the next platform update (post-Android 3.0);
    unfortunately this code has been out in the source tree for a while, and in
    a couple releases now, so we'll need to live with the broken behavior on
    those versions. The service will still have its onCreate() called so you
    can do work there.
     
     
    --
    Dianne Hackborn
    Android framework engineer
    hackbod@android.com
     
    Note: please don't send private questions to me, as I don't have time to
    provide private support, and so won't reply to such e-mails. All such
    questions should be posted on public forums, where I and others can see and
    answer them.

     

    TreKing <trekingapp@gmail.com> Feb 28 08:38PM -0600 ^
     

    > Okay, this did indeed break in *3*.3.
     
     
    Can we assume you meant *2*.3?
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    rich friedel <rich.friedel@gmail.com> Feb 28 06:50PM -0800 ^
     
    On Monday, February 28, 2011 9:38:13 PM UTC-5, TreKing wrote:
     
    > On Mon, Feb 28, 2011 at 8:35 PM, Dianne Hackborn <hac...@android.com>wrote:
     
    >> Okay, this did indeed break in *3*.3.
     
    > Can we assume you meant *2*.3?
     
    Furthermore, can I assume that the START_STICKY behavior won't ever work as
    intended in 2.3? If this is the case what would be the recommended course of
    action to make sure a service stays running or is restarted after the system
    kills it? Again I ask because of the HTC issue...

     

    Dianne Hackborn <hackbod@android.com> Feb 28 07:13PM -0800 ^
     
    Sorry yes I meant 2.3.
     
    This has been out in the code base since the GB code was released, so there
    will be who knows what devices that ship with it.
     
    The problem is *not* that services are not being restarted, just that their
    onStartCommand() is not called with null at that time. The onCreate()
    method is still called. As a work-around, you could probably just post a
    message in onCreate() and set a flag in onStartCommand(); if you haven't
    received an onStartCommand() by the time the message is processed, then you
    probably aren't going to get the null Intent call. (If you need to do this
    at all... generally for things like registering receivers, you really
    really want to do this in onCreate(), since that method is only called
    once.)
     
     
    --
    Dianne Hackborn
    Android framework engineer
    hackbod@android.com
     
    Note: please don't send private questions to me, as I don't have time to
    provide private support, and so won't reply to such e-mails. All such
    questions should be posted on public forums, where I and others can see and
    answer them.

     

    rich friedel <rich.friedel@gmail.com> Feb 28 08:24PM -0800 ^
     
    Sorry to bother you again but I just want to clarify...
     
    So onStartCommand() will in fact always be called at some point after the
    service is restarted when using the START_STICKY flag in 2.3+? Is this
    correct?
     
    I have tested it in the emulator and it seems to work fine (I don't have a
    physical device with 2.3 yet) I am just making sure.
     
    Thank you

     

 Topic: reflection
    Krt <keerthiraois@gmail.com> Feb 28 08:09PM -0800 ^
     
    Hi All,
     
    I am trying reflection in android.
     
    It works fine for classes, say A and B, under same project(same
    process in other words).
     
    It does not work between two different processes.
    i.e. I have
    project A, package name com.ref.classA
    project B, package name com.ref.classB
     
    Can I call from project B, Class.forName("com.ref.classA");
     
    I get exception class not found when I do this.
    Please note I have not imported package of calssA in classB.
     
    Am I missing something? or it is just not possible to do it between
    different processes.
     
    Any input would be of great help.
     
    Regards,
    Krt

     

    oldskool73 <oldskool73@gmail.com> Feb 28 05:46PM -0800 ^
     
    Hi all,
     
    I just got an odd email from a prospective customer...
     
    "So, I have tried to download numerous times from US android phone and
    have card declined. Google account works ffine for other apps is this
    a common issue"
     
    Looking at the checkout it appears his card has been declined
    repeatedly, and he's tried updating the details but to no avail. I'd
    normally assume he'd made some kind of user error or had something up
    with his card, but he states that it's working for other apps.
     
    I've mailed him back to clarify it's actually other purchases that
    work, not just free downloads, but in the mean time has anyone seen
    this happen before and/or know anything I can do to fix it? (App is
    called 'TouchTag' if that helps?)
     
    Thanks,
    Adam

     

    Zsolt Vasvari <zvasvari@gmail.com> Feb 28 05:59PM -0800 ^
     
    I get CC declines all the time. It seems to happen with foreign (non-
    US) buyers for the most part. When I see this, I immeditately cancel
    the purchase and don't wait for them to update their card.
     
     
     

     

    Justin Anderson <magouyaware@gmail.com> Feb 28 09:01PM -0700 ^
     
    *> When I see this, I immeditately cancel the purchase and don't wait for
    them to update their card.*
    I wouldn't recommend that... I have had a couple people actually update
    their information and then the sale goes through.
     
    This problem is less of an Android problem (and there isn't anything that
    can be done from the Android side of things anyway) and more of a Google
    Checkout issue. You might (emphasis on might) have more luck here:
     
    https://checkout.google.com/support/sell/?hl=en_US&ctx=help
     
     

     

    javaxmlsoapdev <vikasdp@gmail.com> Feb 28 07:35PM -0800 ^
     
    Just got a chance to resume this issue. How to search the device for
    the database file? Apparently something really strange is going on or
    I am doing something wrong. Shouldn't databases be private by default?
    I haven't done anything special to make them public. databases aren't
    on the memory card. Any other idea what could have gone wrong and how
    to go about haunting db files on the device to remove (if they exist
    on the device)? Also note, I have always uninstalled these apps from
    the device's "Applications -->Manage Applications-->" option. Is this
    ininstall different than adb uninstall? adb uninstall keeps giving me
    "Failure" message.
     
    Thanks,
     
     

     

    Niket <niket.kapadia@gmail.com> Feb 28 07:25PM -0800 ^
     
    I finally achieved what I wanted.
     
    Here is the code.
     
    Intent myIntent;
    myIntent = new Intent(this, newActivity.class);
    myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    myIntent.addCategory("android.intent.category.LAUNCHER"); //earlier
    I did not add this line.
    myIntent.setAction("android.intent.action.MAIN"); //
    earlier I did not add this line.
    startActivityForResult(myIntent, 10);
     
     
    To debug the issue: i used LogCat log. I checked the difference
    between when activity is started by clicking in home screen and
    started from another activity.
     

     

    Julius Spencer <julius@msa.co.nz> Mar 01 03:53PM +1300 ^
     
    Hi,
     
    I have an IntentService from which I am showing a Toast using:
     
    Toast.makeText(this, errorMessage.toString(), Toast.LENGTH_SHORT).show();
     
    For some reason it's not disappearing. Just wondering if anyone has seen this before or knows what I'm doing wrong. I'm sure it's just something I'm not thinking of but I'm stumped...
     
    Thanks in advance.
     
    Regards,
    Julius.

     

    TreKing <trekingapp@gmail.com> Feb 28 09:15PM -0600 ^
     

    > I'm sure it's just something I'm not thinking of but I'm stumped...
     
     
    You're not calling it over and over again are you?
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    davemac <davemac327@gmail.com> Feb 28 12:38PM -0800 ^
     
    Any update on the <category> question answer please?
     
    - dave
     

     

    Nick Pelly <npelly@google.com> Feb 28 05:54PM -0800 ^
     
    I followed up with Dave off-thread, he is using the emulator with his own
    custom code to mock NFC Tag dispatch, which is why he was seeing the <category>
    tag requirement. This is not a real requirement. You can't simulate NFC tag
    dispatch on the emulator right now, you just have to go buy a Nexus S.
     
    Nick
     

     

    Justin Anderson <magouyaware@gmail.com> Feb 28 04:03PM -0700 ^
     
    None of that matters... It's just a simple matter of etiquette. When asking
    for help you don't have to be rude if you don't like the answer. And if you
    feel it doesn't apply then great... don't apply it!
     
    The OP could just as easily have said "Thanks for the advice Dianne, but in
    my case this doesn't apply because of X, Y, and Z." and then none of the
    backlash would have happened
     
    No reason whatsoever to cop an attitude...
     

     

    TreKing <trekingapp@gmail.com> Feb 28 05:05PM -0600 ^
     

    > Free time? You think she's not getting paid?
     
    Dianne frequently posts on weekends and obscure, late-night hours. I highly
    doubt she's on the clock in those cases.
     
     
    > You did notice the "don't email me privately, cause I don't have time to
    > help you" thing in all her emails, right?
     
    *No one* would have the time to provide private support for the volume of
    email that comes through this list. Plus restricting the conversation in
    that fashion removes the possibility for others to help and learn from the
    questions posed. I've gotten a few direct "support" questions and first
    thing I do is redirect the asker back here.
     
     
    > She answers questions when they are convenient to answer, much like
    > everyone else here.
     
    Which in no one implies she's being paid to do so.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Shane Isbell <shane.isbell@gmail.com> Feb 28 05:44PM -0800 ^
     
    > my case this doesn't apply because of X, Y, and Z." and then none of the
    > backlash would have happened
     
    > No reason whatsoever to cop an attitude...
     
    You guys crack me up. I haven't had this type of backlash since the time I
    said the G1 looked like a brick when it first came out.
     
    Shane

     

    Zsolt Vasvari <zvasvari@gmail.com> Feb 28 05:44PM -0800 ^
     
    Is there even a place where you can send a free-form e-mail for
    support at all???? I can't find it, all I see are prepackaged
    questions.
     
     
     
    On Feb 27, 7:26 pm, "JAlexoid (Aleksandr Panzin)" <jalex...@gmail.com>
    wrote:

     

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment