[android-developers] Digest for android-developers@googlegroups.com - 18 Messages in 11 Topics

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

    Numair Qadir <numair.qadir@gmail.com> Feb 28 12:02PM +0500  

    Yeah.. Thanks. I did it.. I was wondering how to do it..
     
     
     

     

    LostDev <byron.kidd@gmail.com> Feb 27 08:34PM -0800  

    We've developed a library to hide the finer details of In App Billing in
    Version 2 from client applications. Now we're planning to upgrade to
    Version 3 and I've hit a snag.
     
    Currently the application (Activity) using the library creates an instance
    of the library object and calls methods to get products available for sale,
    and purchase products etc. When purchasing products the library handles
    verifying receipts via a secure server and provisioning the purchased
    products etc., there is quite a bit going on behind the scenes. The library
    has no UI, instead it returns data to the calling application which handles
    all the UI operations such as listing products and displaying dialogs using
    response coded from our library.
     
    There is a clear line between the application, and the library.
     
    Now looking at Version 3 I discover this comment in iabHelper for
    launchPurchaseFlow:
     
    Initiate the UI flow for an in-app purchase. Call this method to initiate
    an in-app purchase,
    which will involve bringing up the Google Play screen. The calling activity
    will be paused while
    the user interacts with Google Play, and the *result will be delivered via
    the activity's*
    *{@link android.app.Activity#onActivityResult}* method, at which point you
    must call
    this object's {@link #handleActivityResult} method to continue the purchase
    flow. *This method*
    *MUST be called from the UI thread of the Activity.*
     
    Does this mean the calling activity MUST implement the onActivityResult
    method?
     
    Also can we launchPurchaseFlow from the library object (which is not an
    activity)?
     
    Is there any easy way to maintain separation between the application and
    our billing library?
     
    Any tips or ideas greatly appreciated.
     
    Thanks,
     
    Lost

     

    Nikolay Elenkov <nikolay.elenkov@gmail.com> Feb 28 02:18PM +0900  


    > Is there any easy way to maintain separation between the application and our
    > billing library?
     
    Require the client activity to implement some interface and pass it as a
    parameter to your library's method's as needed. It doesn't really matter
    where you launch stuff from as long as it is using the right thread
    (UI thread) and context (the activity's).
     
    Additionally, you don't really need to use IabHelper at all, you can see
    what it does (basically connect to a remote service and call its methods,
    sometimes in a worker thread) and implement something similar. You
    can't skip the onActivityResult() part though.

     

    Nikolay Elenkov <nikolay.elenkov@gmail.com> Feb 28 03:31PM +0900  


    > Rather than change the architecture of the library, is it possible to run
    > launchPurchaseFlow on the UI thread (from the library thread)? I recently
    > discovered runOnUiThread() but am unsure if it is appropriate in this case.
     
    I haven't tried it, but probably. You can also use a Handler created on the
    UI thread to achieve the same thing.

     

    Arun Kumar K <arunkumar.k@npcompete.net> Feb 28 11:57AM +0530  

    Hi Guys,
     
    I want to show only year and month in datepicker how can i do that one
     
    --
    *Thanks & Regards*
    *K.Arun Kumar*

     

    Aman <aman624@gmail.com> Feb 27 10:25PM -0800  

    Hi,
     
    I have a tablet running Android 4.2 with multiple users. I want to install
    certificates which can be accessed by the secondary user (basically I want
    to configure an Email account in the secondary user which requires
    certificates). I installed certificates in the primary user. But, when I
    try to access them in the secondary user, the dialog doesn't display the
    installed certificates.
     
    I also tried modifying the Settings application to show the "Install
    certificates" option in the secondary user. But, clicking that option shows
    a toast that "Only owner can install certificates". I went a step further
    and changed CertInstaller to allow secondary users to install certificates.
    But, it fails when Android attempts to write the certificates to
    /data/misc/keychain directory.
     
    My question is that, is /data/misc/keychain directory only accessible
    (read/write access) to applications running inside the primary user
    (owner). If yes, the how the access control is enforced?
     
    Regards
    Aman

     

    dashman <erjdriver@gmail.com> Feb 27 06:17PM -0800  

    What's the recommended api for doing http/https in Android.
     
    I think there's 2-3 of them.

     

    Kristopher Micinski <krismicinski@gmail.com> Feb 27 09:29PM -0500  

    Just the org.apache ones...?
     
    Kris
     

     

    bob <bob@coolfone.comze.com> Feb 27 03:29PM -0800  

    Here's the code for it:
     
    /**
    * Return whether the state matches the desired stateSpec.
    *
    * @param stateSpec an array of required (if positive) or
    * prohibited (if negative) {@link android.view.View} states.
    * @param state a {@link android.view.View} state
    */
    public static boolean stateSetMatches(int[] stateSpec, int state) {
    int stateSpecSize = stateSpec.length;
    for (int i = 0; i < stateSpecSize; i++) {
    int stateSpecState = stateSpec[i];
    if (stateSpecState == 0) {
    // We've reached the end of the cases to match against.
    return true;
    }
    if (stateSpecState > 0) {
    if (state != stateSpecState) {
    return false;
    }
    } else {
    // We use negative values to indicate must-NOT-match states.
    if (state == -stateSpecState) {
    // We matched a must-not-match case.
    return false;
    }
    }
    }
    return true;
    }
     
     
     
    On Wednesday, February 27, 2013 4:05:39 AM UTC-6, skink wrote:

     

    Boyd Speer <bspeer@shaw.ca> Feb 27 04:42PM -0700  

    How can I schedule a daily popup dialog box (that appears to remind the user to do something) that remains visible until it is manually closed by the user?
     
    Would a service be utilized? If so how? Or would an alarm be the best solution. If the app is killed or restarted can the popup still be scheduled to happen?
     
    Thanks for your suggestions.
     
    - Boyd

     

    TreKing <trekingapp@gmail.com> Feb 27 10:29PM -0600  

    > solution. If the app is killed or restarted can the popup still be
    > scheduled to happen?
     
    > Thanks for your suggestions.
     
    Use AlarmManager to schedule a PendingIntent that starts an Activity that
    has a dialog theme.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    dashman <erjdriver@gmail.com> Feb 27 06:15PM -0800  

    Is there any way to detect whether an activity was started by the
    Android os launcher as opposed to another activity.
     
    Or put another way - is there wa way to force an activity not
    be launchable (sp?) by another activity.

     

    Kristopher Micinski <krismicinski@gmail.com> Feb 27 10:57PM -0500  

    What happens when users install a different launcher...?
     
    Kris
     

     

    niksbin <niksbin@gmail.com> Feb 27 06:56PM -0800  

    Hi Everyone,

    I wanted to let you know that I have created 3 discussion groups for using
    and developing for the Samsung Galaxy Note series of devices. The new
    discussion groups are created specifically for utilizing and developing
    apps using Samsung's S-Pen functionality.

    Please feel free to join the groups. The groups are:

    - S-Pen App Discussion
    - S-Pen App Development - Beginners
    - S-Pen App Development-Advanced

    Happy Coding!

    - Nikhil Kulkarni

     

    Jonathan S <xfsunoles@gmail.com> Feb 27 02:16PM -0800  

    android.support.v13 is for API Level 13+ only
     
    If you are doing Minimum API Level 8, you have to remove
    android.support.v13
     
    On Wednesday, February 27, 2013 10:43:48 AM UTC-5, Manas wrote:

     

    bob <bob@coolfone.comze.com> Feb 27 01:00PM -0800  

    Make sure you are sending the variables via the POST method and not the GET
    method.
     
    On Wednesday, February 27, 2013 7:28:51 AM UTC-6, Ines wrote:

     

    RichardC <richard.critten@googlemail.com> Feb 27 11:34AM -0800  

    That thread is all the information we have - the ability to reply to users
    is by invitation only for the moment.
     
    It would be better to continue this discussion in the above thread
    (discussion group) rather than in this the SDK group.
     
     
    On Wednesday, February 27, 2013 6:59:20 PM UTC, Tolriq wrote:

     

You received this message because you are subscribed to the Google Group android-developers.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.

--
--
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
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment