[android-developers] Digest for android-developers@googlegroups.com - 15 Messages in 10 Topics

Comments: (0)

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

    limtc <thyechean@gmail.com> Aug 31 07:20PM -0700 ^
     
    Hi,
     
    How does the "Allow automatic updating" works? I notice that my apps
    have "A manual update is required." when I try to enable it.
     
    Is it anything I need to do in my codes to enable this to work? Or is
    it depending on the permissions required by the apps?

     

    TreKing <trekingapp@gmail.com> Sep 01 12:08AM -0500 ^
     

    > How does the "Allow automatic updating" works?
     
    Users can opt to allow an app to be auto-updated by the Market.
    However, if the permissions for the app have changed, it does not work. The
    user must manually update and agree to the new permissions. After that, it
    will continue to auto-update.
     
    That's pretty much it, AFAIK.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    limtc <thyechean@gmail.com> Aug 31 10:52PM -0700 ^
     
    Thanks!
     
    That's very helpful to know that it is not developer-enabled feature.
     

     

    Chris Stratton <cs07024@gmail.com> Aug 31 07:42PM -0700 ^
     
    I'm not seeing any obvious reason why the free version can't just
    query the license server about the unlocker by itself, but maybe I'm
    overlooking something.
     

     

    TreKing <trekingapp@gmail.com> Sep 01 12:18AM -0500 ^
     

    > Launch Free App->Launch Unlocker App->Run LVL->Return Result->Parse Result
    > in Free App
     
    That was the gist of it, yes.
     
    On Tue, Aug 31, 2010 at 9:42 PM, Chris Stratton <cs07024@gmail.com> wrote:
     
    > I'm not seeing any obvious reason why the free version can't just query the
    > license server about the unlocker by itself, but maybe I'm overlooking
    > something.
     
    Not sure what you mean by the free version querying the license server about
    the unlocker app. Maybe that would work too, I haven't toyed with the LVL to
    know for sure. From discussions I've read, though, it sounds like it's code
    you have to build into the app itself to validate that app, so the app that
    actually has the licensing would have to run to execute it. In which case
    the paid unlocker app would have the licensing and be required to run in
    order to do the validation. I could be completely wrong on this though =)
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    TreKing <trekingapp@gmail.com> Sep 01 12:12AM -0500 ^
     

    > just wondered what the member variable in Activity is that stores it - we
    > are after all, extending from it - so we could directly access it unless it
    > is private.
     
    What makes you think there is a member variable that stores the current
    state?
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    ecforu <ecforusers@gmail.com> Aug 31 11:08PM -0400 ^
     
    I was wondering, is there a way to display a menu all the time instead of
    when the menu button is pressed.
     
    The reason being is a I have an activity that has a list view, but I want to
    display a "New" button so that the user can add to the list. I don't know
    where to put the button, and I would rather not hide the new button in the
    normal menu. I was hoping I could display something like the menu all the
    time.
     
    The other option is to add a new item selection to the list. However I am
    using a simple cursor adapter to fill the list and I'm not sure how to add
    to this list after its populated from the cursor.
     
    Thanks

     

    TreKing <trekingapp@gmail.com> Sep 01 12:10AM -0500 ^
     

    > I want to display a "New" button so that the user can add to the list.
     
     
    So add a "New" button to the bottom or your screen or as the "Footer" of
    your ListView.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    TreKing <trekingapp@gmail.com> Sep 01 12:07AM -0500 ^
     
    > an unused warning. If it was in a different class, of course, that's no
    > help as the compiler doesn't check for unused package private functions,
    > even though it could.
     
    Yeah, no, it was a separate class with a static clearCache method that's
    used elsewhere as well. I normally do get the unused warning and really
    appreciate it for trimming down unnecessary code.
     
    Funny story, BTW, turns out I WAS calling the cache clearing function (I
    looked at the diff wrong, I'm way off my game), but it had a bug where it
    wasn't clearing the correct cache files. Not as stupid as removing a line of
    code, but still pretty stupid.
     
    Released my fix and anxiously await to see what kind of comments I wake up
    to!
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Agus <agus.santoso@gmail.com> Aug 31 09:19PM -0700 ^
     
    What is the class name of media scanner service?

     

    nick <nikolay.elenkov@gmail.com> Aug 31 08:45PM -0700 ^
     
    Hi,
     
    I have an activity with three tabs, the content is all in the same
    activity. Here's how I setup the tabs:
     
    tabHost.addTab(tabHost.newTabSpec("tab1").setIndicator(
    getResources().getText(R.string.tab1),
    getResources().getDrawable(R.drawable.ic_tab1))
    .setContent(R.id.tab1Content));
     
    When I start the application the first tab is selected and touching
    views works just fine. After I select the second tab, and afterwards
    go to the first, selecting with touch no longer works. If I use the
    trackball, selection works. If I select the third tab, touch selection
    in tab1 and tab2 doesn't work anymore (trackball is OK). Touch
    selection in the third tab works fine. I've tested this on my device
    (Nexus One) and the emulator and the behaviour is the same. In Eclair/
    Donut selection works fine.
     
    Any ideas what might be causing this and how can I work around it if?

     

 Topic: XMLRPC
    "Maps.Huge.Info (Maps API Guru)" <coryat@gmail.com> Aug 31 07:25PM -0700 ^
     
    Why don't you test it on your own device? That will certainly answer
    your question. I believe the answer is it won't be a problem but it
    could mean your users have to uninstall and reinstall, which means any
    data the app has collected on the device could be lost.
     
    -John Coryat

     

    "cool.manish" <mannishgarg2@gmail.com> Aug 31 09:07AM -0700 ^
     
    What is context. We always pass an argument context in the intent or
    manageQuery etc. What is it and what is the use of it?
    does it have the information about the process stack?

     

--
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

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

Comments: (0)

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

    GJTorikian <gjtorikian@gmail.com> Aug 31 06:52PM -0700 ^
     
    So:
     
    Launch Free App->Launch Unlocker App->Run LVL->Return Result->Parse
    Result in Free App
     
    ?
     

     

    Anil <anil.rita@gmail.com> Aug 31 06:47PM -0700 ^
     
    One can override the different OnX() methods and update state
    (foreground, paused, stopped, destroyed) but just wondered what the
    member variable in Activity is that stores it - we are after all,
    extending from it - so we could directly access it unless it is
    private.
    background: wanted a service to know whether its UI Activity is active
    or not. Yes, I can update the state but so much simpler if there were
    a getState().
     
    Anil

     

    Laxs <oum.larry@googlemail.com> Aug 31 04:19PM -0700 ^
     
    Hi,
     
    I got a problem, I want to call a method every X minutes, if my method
    got a result it ´should inform the user by vibrating or showing a
    alertbox. if the method doesn't get a result it should wait for X
    minutes and restart.
    What is important, this should also work when the phone turns to
    sleep. Which means I want to wake the phone from sleep to run my
    method.
     
    Actualy I can activate my method via a Button, and it is working like
    I want it to be except the background loop thing.
     
    I already searching for a solution here in the group or also on google
    but I think I don't got the right search terms to find a solution for
    my problme.
     
    I already read about the AlarmManager and broadcast receiver but I'm
    not sure if this is right for my problem.
     
    I hope you could help me.

     

    "Maps.Huge.Info (Maps API Guru)" <coryat@gmail.com> Aug 31 05:36PM -0700 ^
     
    If your "result" is something a server knows about, you could use the
    C2DM thing to wake up your app instead of polling every x minutes.
     
    -John Coryat

     

    JP <joachim.pfeiffer@gmail.com> Aug 31 05:47PM -0700 ^
     
    A partial wake lock will do the trick, except in that it places a
    burden on the battery beyond normal operation.
    Also heads-up that the System seems to like killing Services that
    snooze.
     
     
     
     

     

    Joao Luis <jecluis@gmail.com> Aug 31 05:44PM -0700 ^
     
    > The matrix returned by the Canvas is the sum of all transformations to
    > the point your view is being drawn. There's a single Canvas for all
    > Views on screen.
     
    Thing is, I'm drawing directly on the onDraw() method of my custom
    View, the only View used by my activity and directly set on screen by
    the 'setContentView()' method on the activity.
     
    There is no other view being drawn.
     
    I may have misunderstood you, but in this case the transformation
    matrix should have its Y-axis translation nullified. Is it not so?
     
     
    --J

     

    Stephen Morrison <srmorrisonjit@gmail.com> Aug 31 08:35PM -0400 ^
     
    Ok, thanks. Sounds good. I guess I have to decide if I will loose more users
    by being scared away by a permission that allows the app access to their
    location or if I will loose more because it is too much hassle to update the
    app manually.
    -Stephen
     
     
     
     

     

    Flying Coder <av8r.steve@gmail.com> Aug 31 03:49PM -0700 ^
     
    I agree with Frank & Mark: you don't need to detect the HOME key to
    do what you want. Simply doing the check as part of the activity life
    cycle should be sufficient.
     
    However, I think you can detect when the HOME key is pressed by
    overriding onUserLeaveHint. I haven't yet had a reason to use it, but
    according to the docs it will only be called if the user put the app
    in the background (e.g., by pressing HOME).
     
    Cheers,
    Steve
     
     

     

    San <saneeshcs@gmail.com> Aug 31 04:15PM -0700 ^
     
    You are right Flying Code.
    I checked this somedays before. onUserLeaveHint() getting called as
    soon the Home key is pressed.
    I checked other interruptions like pressing search key, incoming call
    etc.
    But this method only called when i press the HOME key.
    (I tested on a 2.1 phone)
     
     

     

    Zsolt Vasvari <zvasvari@gmail.com> Aug 31 02:35PM -0700 ^
     
    Note sure, I would go with Kostya's suggestion and try converting your
    LinearLayout to a RelativeLayout. It know it looks daunting at first,
    but it's fairly easy to use and you don't seem to get the gravity
    weirdess, as you don't need to use (or even can?) layout_gravity at
    all. It also appears to be more efficient memory-wise.
     
     
     
    On Aug 31, 7:32 am, William Ferguson <william.ferguson...@gmail.com>
    wrote:

     

    Mark Carter <mjc1904@googlemail.com> Aug 31 03:18PM -0700 ^
     
    LinearLayout is for when you want a continuous sequence of children in
    a line, one after another. From your description, that is not what you
    want (e.g. there may be a gap between the buttons depending on their
    sizes and the size of the parent).
     
    So a LinearLayout is not what you should be using.
     
    Your requirements show that the buttons need to be placed relative to
    the parent, so (like others have said) a RelativeLayout is the best
    option, using attributes like layout_alignParentRight and
    layout_centerHorizontal.
     
    On Aug 31, 5:42 am, William Ferguson <william.ferguson...@gmail.com>
    wrote:

     

    William Ferguson <william.ferguson.au@gmail.com> Aug 31 03:54PM -0700 ^
     
    Thanks Mark, I think you managed to clarify for me why it's not
    working.
    And yes, I'm now convinced that RelativeLayout is the correct option
    in this case.
     
    I believe that layout_gravity (for LinearLayout) probably only has an
    effect if it specifies a direction that is orthogonal to the
    orientation of the layout.
    Ie if the LinearLayout orientation is horizontal then the only
    acceptable layout_gravity options fors its children are top, bottom
    etc (and NOT left, right, center_horizontal).
     
    Happy now. Thanks everyone.
     

     

    San <saneeshcs@gmail.com> Aug 31 03:56PM -0700 ^
     
    As Havlicek said, create the textview using findViewByID and set the
    text when button is clicked.
     
    Sample code:
     
    tv = (TextView) findViewById(R.id.TextView01);
    tv.setText("This is sample.");
    Button button = (Button) findViewById(R.id.Button01);
    button.setOnClickListener(new OnClickListener() {
    public void onClick(View v) {
    tv.setText("Button Clicked");
    }
    });
     
     
     
     
     
     

     

 Topic: Sim Contacts
    William Ferguson <william.ferguson.au@gmail.com> Aug 31 03:57PM -0700 ^
     
    Anyone? One of the Google engineers perhaps?
     
     
    On Aug 30, 7:37 am, William Ferguson <william.ferguson...@gmail.com>
    wrote:

     

    San <saneeshcs@gmail.com> Aug 31 03:35PM -0700 ^
     
    Are you facing this problem always? Or is this happening only when you
    try to delete
    a message as soon as you receive it.
     
     

     

    San <saneeshcs@gmail.com> Aug 31 03:14PM -0700 ^
     
    Account[] allAccounts =
    AccountManager.get(getApplicationContext()).getAccounts();
    for(Account account : allAccounts)
    {
    String emailAccName = account.name;
    String emailAccType = account.type;
    }
     
    Dont forget to add <uses-permission
    android:name="android.permission.GET_ACCOUNTS" /> in manifest

     

    San <saneeshcs@gmail.com> Aug 31 03:16PM -0700 ^
     
    Account[] allAccounts =
    AccountManager.get(getApplicationContext()).getAccounts();
    for(Account account : allAccounts)
    {
    String emailAccName = account.name;
    String emailAccType = account.type;
    }
     
    Dont forget to add
    <uses-permission android:name="android.permission.GET_ACCOUNTS"/>
    in the manifest

     

    Zsolt Vasvari <zvasvari@gmail.com> Aug 31 02:30PM -0700 ^
     
    > removed was a simple static helper function that used the current context to
    > delete all files in the cache directory. Removing it had no effect on the
    > surrounding code.
     
    Yes, but if you declared the helper function private, you may have
    gotten an unused warning. If it was in a different class, of course,
    that's no help as the compiler doesn't check for unused package
    private functions, even though it could.

     

    fba <chsoftworks@gmail.com> Aug 31 02:49PM -0700 ^
     
    (Robert Nekic) Have you tried to generate a CSR with BC in your app?
    I seem to be able to do a lot of different certificate related things,
    but hit the ClassCastException when I try to generate a CSR.
     
    The other route I have looked at is CoDec, but the license listed on
    SourceForge doesn't match the license in the code. I have contacted
    the developers who have said they will get back to me, but I am
    looking for a mitigation route if the license doesn't pan out how I
    would hope.
     
    Does anyone know of any other libraries that would work for
    certificate manipulation? The java.security.cert classes don't have
    any obvious way to generate a CSR, so I am not sure that will work.
    Also, I don't need to be able to actually generate SSL sessions using
    the certificates, since they are fed in to another program that
    handles all of that. I just need to be able to work with the
    certificates.
     

     

    Connick <oconnick@gmail.com> Aug 31 06:02PM -0400 ^
     
    Hi folks,
     
    I'm launching a wizard as a series of views. (dialog theme) I need the user
    to be able to step back and forth through the series of views. When the
    final step is completed I'd like to return the to the original view that
    launched this new task. (i.e. close the series of dialogs) The only way I've
    gotten this to work is to call finish() on each dialog before starting the
    activity of the next step. (that rules out being able to navigate back)
     
    I've tried launching the initial intent with Intent.FLAG_ACTIVITY_NEW_TASK
    as well as setting a taskAffinity for the views involved to no avail.
     
    Any insight appreciated,
    Stace

     

    DanH <danhicks@ieee.org> Aug 31 02:27PM -0700 ^
     
    Actually, several sources recommend their use.
     

     

    cindy <ypu01720@yahoo.com> Aug 31 02:36PM -0700 ^
     
    I have create a listview . When listview is created I used
    setSelection(0) to set it to first listitem.
     
    But there is no visual effect, the selected listitem is not changed
    to listed color.
     
    In my application, I want to high light the first listItem by default.
    Does anyone know how to do that?
     
    Thanks!
     
    Cindy

     

--
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

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

Comments: (0)

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

    chetan <chetanchauhan10@gmail.com> Aug 30 11:02PM -0700 ^
     
    Hi All,
    I am creating an App in which i need to add a timer for
    postpone the one event for 1 hr and start same event after 1 hr , so i
    want to know how i can implement the same. Are there any Timer api's
    and handling of them in android.
     
    Thanks
    Chetan Chauhan

     

    Mark Carter <mjc1904@googlemail.com> Aug 31 07:56AM +0200 ^
     
    As a side note, I'm amazed at your conversion rate from Lite to Pro. I have
    50% as many Lite downloads but only 5% as many Pro downloads. My Lite
    version gets a 4.5 rating, Pro gets 4.9. Looks like I need to look into
    those Video and Social Sharing strategies.
     
    Currently I just pop up a dialog box "advert" every so often (with a link
    into the Market). Looks like that's not enough.
     
    Thanks for the tips.
     
    Back to the main topic, the data does not show that "piracy is indeed a
    significant problem", but shows that many non-paying users are using your
    app. The big question is would they have paid for your had they not been
    able to get hold of the pirate version. That's a very difficult question to
    answer.
     

     

    Vaishnavi <vaishnugs@gmail.com> Aug 30 10:55PM -0700 ^
     
    Hi i am trying to port opencv onto android using ndk. I am always
    getting an error like this:
     
    jni warning: method declared to return 'b' returned 'z'.Can anyone
    help me with the same

     

    Ajay <ajayld@gmail.com> Aug 30 10:47PM -0700 ^
     
    Hi,
    If I include it in the "raw" folder, under the resources folder,
    will it get installed? Also, where does it get installed?
     
    Thank you,
    AJ
     
    On Aug 27, 8:48 pm, Jake Radzikowski <radzikowski.j...@gmail.com>
    wrote:

     

    GodsMoon <godsmoon@gmail.com> Aug 30 09:04PM -0700 ^
     
    Anybody else find it weird that OnSeekBarChangeListener has a
    onStartTrackingTouch and a onStopTrackingTouch method but no
    corresponding non-touch methods?
    I have a SeekBar that acts as the volume control of the phone. When I
    slide it I want to play a sound. I only want to play a sound when it
    stops tacking.
    I think this is a very common use case for adjusting volume.
    It works great for touch events; doesn't work at all for tackball
    events. That's strange.
     
    Thanks,
    David Shellabarger
    http://www.nightshadelabs.com

     

    William Ferguson <william.ferguson.au@gmail.com> Aug 30 08:42PM -0700 ^
     
    OK, I'm obviously missing something fundamentally simple here.
    I have a LinearLayout containing 2 buttons.
    I've coloured the layout background red so I can see that it has
    expanded to fill its parent.
    I wanted the BooButton to center horizontally within the layout and
    the OtherButton to be right justified.
    But both buttons are on the left of the layout.
     
    What have I done wrong?
     
    <LinearLayout android:id="@+id/buttonBlock"
    android:orientation="horizontal"
    android:background="#ff0000"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
     
    <Button android:id="@+id/booButton"
    android:text="Boo"
    android:layout_gravity="center_horizontal"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"/>
     
    <Button android:id="@+id/otherButton"
    android:text="Other"
    android:layout_gravity="right"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"/>
    </LinearLayout>

     

    grace <grace.asha@wipro.com> Aug 30 08:53PM -0700 ^
     
    add android:gravity="center_horizontal" in the linear layout
     
    On Aug 31, 8:42 am, William Ferguson <william.ferguson...@gmail.com>
    wrote:

     

    Floaters <puhao7117441@gmail.com> Aug 31 11:56AM +0800 ^
     
    Maybe you can try RelativeLayout...
     
    2010/8/31 William Ferguson <william.ferguson.au@gmail.com>
     

     

    William Ferguson <william.ferguson.au@gmail.com> Aug 30 10:34PM -0700 ^
     
    That centers both buttons, so I still can't get the OtherButton right
    justified.
     

     

    William Ferguson <william.ferguson.au@gmail.com> Aug 30 10:42PM -0700 ^
     
    Thanks! that worked.
    Still don't understand why its not working with a LinearLayout.
     

     

    Hotouch <hotouch@gmail.com> Aug 30 10:36PM -0700 ^
     
    Hello John,
     
    i got a pretty good example from your link http://code.google.com/p/androidsmsphonelocator/
     
    and i am going to use this one and i hope to get more resource if any
    one have.
     
    Regards
     

     

    Tommy <droidap@gmail.com> Aug 30 10:21PM -0700 ^
     
    Hi everyone,
     
    I am wanting to have one of my Activities utilize some animation. I
    want to be able to slide the screen left and right and have it change
    the Layout of the page to a different RelativeLayout in the same xml
    file and the same activity. Would I use the same techniques that would
    be used to slide something like a TextView on and off the screen?
     
    Thank you for your time and input,
     
    Tommy

     

    Nithin <nithin.warier@gmail.com> Aug 30 08:21PM -0700 ^
     
    If you change package name in manifest file, you can create two apk
    with same or different icon..
     
    Nithin
     

     

    "Maps.Huge.Info (Maps API Guru)" <coryat@gmail.com> Aug 30 05:41PM -0700 ^
     
    I noticed a bug that you may be able to exploit. If the webview has
    any active elements, like a JavaScript setInterval, the webview will
    continue processing like it is in the forefront. Perhaps if you put in
    a setInterval, it would act like it never went to "sleep."
     
    I've flagged this as a bug, so this behavior might not continue
    forever.
     
    -John Coryat

     

    GJTorikian <gjtorikian@gmail.com> Aug 30 09:16PM -0700 ^
     
    I downloaded the Motorla AVD for the Milestone, as this was the
    closest I could get to the Droid/Sholes. Unfortunately, the screen on
    the emulator doesn't fade out, so I am unable to test if that is the
    issue.
     
    But I have looked over my logs, and it is always the sholes device
    that is throwing the NPE. If I could find an appropriate place to
    place a try / catch, that would be fine:
     
    @Override
    public void onWindowFocusChanged(boolean hasFocus) {
    try {
    super.onWindowFocusChanged(hasFocus);
    } catch (NullPointerException npe) { }
    }
     
    Maybe?
     

     

--
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

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

Comments: (0)

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

    tony obrien <tobsourcecodellc@gmail.com> Aug 30 05:48AM -0700 ^
     
    Hi,
     
    I have an app that uses Runnables, GPS, Sensors, the AudioManager,
    MapView, Shared Preference storage; in effect ---all manner of the
    phone's capabilities.
     
    When I run this app on my Motorola DROID, it functions consistently
    --- all activities operate as expected -- all dialog popups POPUP
    when they are supposed to, all sounds are delivered when they are
    supposed etc etc etc.
     
    When a beta tester I have (with a new LG Ally) downloads and runs the
    App -- the results are all over the map (PUN intended ;<>)
     
    Most times, it just seems to die BUT without any "this application has
    terminated unexpectedly" dialog.
    The App will stop at various places inside my "activities." Again,
    without any indication it has done so.
    And even stranger, the app will not "do" the things it supposed to be
    doing even though it IS still running.
     
    And ***worse yet***, sometimes, it seems to work fine ... Until maybe
    the next time it is launched (in other words, it was NOT re-Installed
    or anything so severe.)
     
    I am loathe to start adding all kinds of "log output" turning this
    into a bloatware science experiment (but will if forced.)
     
    Has anyone else had this kind of experience?
     
    I am developing on NETBEANS, targeting Android 2.x -- and the LG Ally
    meets these requirements.

     

    Kostya Vasilyev <kmansoft@gmail.com> Aug 30 05:33PM +0400 ^
     
    30.08.2010 16:48, tony obrien пишет:
    > I am loathe to start adding all kinds of "log output" turning this
    > into a bloatware science experiment (but will if forced.)
    Before you start doing that, I'd ask the user to download and install
    one of the many applications that can display logcat output, run it, and
    email the log to you.
     
    You might see something interesting that's worth fixing.
     
    --
    Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

     

    tony obrien <tobsourcecodellc@gmail.com> Aug 30 07:44AM -0700 ^
     
    So LOGCAT operate on the device as well??
     
    Do I need to ENABLE anything in my app?
    Does the LOGCAT have all of the device's activities in it, including
    those NOT from my app?
    Does the device automagically wrap the logcat (it can't grow
    forever) ?
     
     

     

    Kostya Vasilyev <kmansoft@gmail.com> Aug 30 07:11PM +0400 ^
     
    30.08.2010 18:44, tony obrien пишет:
     
    > Do I need to ENABLE anything in my app?
    > Does the LOGCAT have all of the device's activities in it, including
    > those NOT from my app?
     
    Logcat doesn't have to be specifically enabled. It does show info from
    every application, including "the system", even if the phone is not
    connected to adb for debugging.
     
    > Does the device automagically wrap the logcat (it can't grow
    > forever) ?
     
    It does, although I don't know the exact size. It is quite large, though.
     
     
    --
    Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

     

    "Maps.Huge.Info (Maps API Guru)" <coryat@gmail.com> Aug 30 08:41AM -0700 ^
     
    A good log app is called (strangely enough) "Sendlog" - it's fairly
    lightweight and just asks the user to enter an e-mail address. Select
    "detailed" logs for the best result.
     
    As for adding logging statements all over the place. That's a very
    good idea with one caveat. Add a logging variable like this to the top
    of your source:
     
    static final boolean DOLOG = false ;
     
    Then preface all your logging statements with a test:
     
    if ( DOLOG ) Log.v("Foo","Logging message") ;
     
    When you create your beta, set DOLOG = true. That will include the
    logging messages. When you create your production version, set it to
    false. The "compiler" will exclude all those logging statements
    because they will never execute. The compiler is smart enough to know
    this, so your production code will be streamlined without physically
    removing (yourself) the logging statements from the code. I believe
    this is the preferred method of coding your logging statements.
     
    -John Coryat

     

    sazilla <sazilla@gmail.com> Aug 30 07:58AM -0700 ^
     
    Hi guys,
     
    is there any way to retrieve the data type of a contact's photo? (e.g.
    "image/png" or "image/jpeg")
    Using the Contacts Provider I can read the photo byte array only. In
    this case can we get the image type from the image stream?
     
    Thanks in advance
     
    Carlo

     

    mort <mort@sto-helit.de> Aug 30 06:56AM -0700 ^
     
    > well).  By having you link their code into your app, you are required to
    > take responsibility for their permissions.  Yet it is their code, you don't
    > have control over it, so why should you?
     
    I agree in this case. But what about AdMob? Shouldn't Google do it
    better?
    However, there's another pitfall: What if AdMob/Bumb/whatever isn't
    installed? Some might say "no matter, I can do without", but others
    certainly don't want to do without the ad income, or some external
    "library" is vital to functionality...
     
    Btw, AdMob is a good example for optional permissions itself. The
    AdMob library makes usage of ACCESS_FINE_LOCATION optional for local
    ads. Now, as a separate .apk, this would be mandatory, and I for one
    wouldn't install it (like all those apps that require it). Every ad
    supported app would drain my battery (GPS), not to mention privacy
    concerns.
     
    I also agree with niko20. I've got a simple music player that requires
    "Identify call state..." to pause during a call and "internet" for
    ads. I regulary get queries as to why my app wants to send identified
    callers to some hideous server, and I don't know how many just don't
    install it without comment.
    While the "internet" permissin in my case could be removed if there'd
    be a separate AdMob app, there are other players that need it for
    other ends, like downloading covers, streaming, etc.
     
    Also, in my experience, there are three kinds of users:
    1. Permissions are technical stuff they don't understand and care
    about, so they just ignore it.
    2. Paranoids who wouldn't install a contact manager that requires
    reading of their contacts.
    3. Those who actually try to make sense of the required permissions.
    But even they can't tell whether an app really needs those permissions
    or will misuse them. My music player actually *could* collect the
    phone numbers and send them to any server...
     
    So the current permission system would only "help" the first two kinds
    of users (type 1 aren't disturbed by them, type 2 can panic of "will
    read my contact data"), while sensible people often are just confused.
    Is Evernote "potentially evil" because it wants access to my contacts
    and internet, or isn't it? I can't check why it wants those
    permissions without installing and testing it. By then, the harm could
    be done.
    A solution like Mart Murphy proposed sure would help in some cases.
    It's like "if you allow me to do this, I can do that".
    But also a simple explanation option in the Market would help: Look,
    dear user, I need call state to pause during calls, and internet for
    ads. In the end, it's all about transparency why the app wants which
    permission.
    Of course, one could still misuse granted permissions, but there's not
    much that could be done about that, except for checking the code of
    every uploaded app...

     

    Chris Stratton <cs07024@gmail.com> Aug 30 08:11AM -0700 ^
     
    I think its going to be very difficult to prevent applications without
    network or sms permissions from leaking any data they can obtain to
    the outside world by means of another application that does have those
    permissions.
     
    Its even possible for an application without network permissions to
    infrequently upload quite a bit of data via the default web browser.
    On install they can just send an intent to view a webpage containing
    something innocent like a welcome, help, or changelog web page for
    their app, while quietly shoving 100+ lines of whatever through extra
    post data for older android releases or extra header data for newer
    ones.
     
    Its not immediately apparent how one would detect this, unless it
    happens on wifi and you log http traffic or your mobile provider is
    inspecting packets.
     

     

    Rootko <rootko@gmail.com> Aug 30 08:11AM -0700 ^
     
    Thanks for pointing me into the right direction, it worked :D
    Rudo
     

     

    Anil <anil.rita@gmail.com> Aug 30 07:18AM -0700 ^
     
    Is there (or should there be), a generateId() method for dynamically
    generated Views?
    Take the RadioGroup example in APIDemos|App|Views. Radio buttons are
    added dynamically.
    For each button, you have to call setId().
    To be notified when a radio button is selected, you register a
    onCheckedChange listener on RadioGroup and the callback method is
    oncheckedChange(RadioGroup, int checkedId).
    Since we are notified only the id of the checked view, shouldn't there
    be a way to uniquely generate the id? Say, a View.generateId()
    method...
    In the example, the ids are statically defined in ids.xml. However
    this limits the number of radio buttons.
    I have a real world example too: a Radiogroup with each choice
    representing a Wifi hotspot. So one cannot know in advance the number
    of hotspots.
    -
    Anil

     

    Mark Murphy <mmurphy@commonsware.com> Aug 30 10:45AM -0400 ^
     
    > Is there (or should there be), a generateId() method for dynamically
    > generated Views?
     
    Addition seems to be sufficient.
     
    > Since we are notified only the id of the checked view, shouldn't there
    > be a way to uniquely generate the id? Say, a View.generateId()
    > method...
     
    Why not radioButtonId++?
     
    > In the example, the ids are statically defined in ids.xml. However
    > this limits the number of  radio buttons.
     
    IMHO, if you are concerned about the number of radio buttons, you
    should be using a ListView.
     
    --
    Mark Murphy (a Commons Guy)
    http://commonsware.com | http://github.com/commonsguy
    http://commonsware.com/blog | http://twitter.com/commonsguy
     
    Warescription: Three Android Books, Plus Updates, One Low Price!

     

    Kostya Vasilyev <kmansoft@gmail.com> Aug 30 06:54PM +0400 ^
     
    It's also not quite correct that a radio button is only identified by
    its viewId.
     
    Using View.setTag (two versions), you can associate your own data item
    (s) with a view.
     
    However, I agree with Mark that using a ListView is quite likely to be a
    better solution.
     
    -- Kostya
     
    30.08.2010 18:45, Mark Murphy пишет:
     
    --
    Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

     

    tatebn <brandonntate@gmail.com> Aug 30 07:52AM -0700 ^
     
    I'm using a ListAction and I'm having some trouble with my listeners.
    I'm using onListItemClick to catch any item clicks, which works fine
    unless I add an OnLongClickListener to the list items. In that case
    the long click works but the short click doesn't register. I've tried
    adding an OnClickListener to the items individually as I had done with
    the long click. This works, but the regular click fires every time
    the long click does. How do I keep these things separate?
     
    Thanks,
    Brandon

     

    pawpaw17 <georgefrazier@yahoo.com> Aug 30 07:32AM -0700 ^
     
    Guys,
     
    This happened once before in December 2009. When I released an update
    on Friday, my install percentage dropped about 6%.
    My install percentage usually goes up when I release an update. Anyone
    notice something similar? I'm wondering if it is a problem
    with the market stats?
     
    Thanks,
     
    pawpaw17

     

    Alexandre Ferrieux <alexandre.ferrieux@gmail.com> Aug 30 07:29AM -0700 ^
     
    Hello,
     
    I'm using the H264 encoder on a Froyo HTC Desire. Parsing the
    generated 3GP stream allows to identify individual frames, and their
    timing.
     
    Now it turns out that:
     
    (1) MediaRecorder.setVideoFrameRate() doesn't affect the average
    frame rate, which is always close to 17fps, regardless of the asked
    rate from 4 to 30 fps.
     
    (2) In the logs I get contradictory messages (example for an asked
    rate of 15 fps):
     
    08-30 16:07:48.198 E/VENC_ENC( 68): VENC_ERROR
    update_param_port_def::1651 Frame rate is for input port (refer to OMX
    IL spec)
    but also:
    08-30 16:07:48.602 E/VENC_ENC( 68): ven_print_config::348 config
    frame_numerator=15, fps_denominator=1, bitrate=420000
     
    (3) By parsing the H264 NALU types, I do see the effect of varied
    MediaRecorder.setVideoFrameRate() values: they affect the IDR relative
    rate (~GOP size):
     
    - asked value 4: one IDR frame for 3 non-IDR frames
    - asked value 15: one IDR frame for 14 non-IDR frames
    - asked value 30: one IDR frame for 29 non-IDR frames
     
     
    All this smells like there is a bug while crossing all the API layers,
    passing one parameter for another.
    Of course I cannot say before Froyo, because in 2.1 the H264 encoder
    on the Desire was broken/missing.
     
    Any insight on this ? Workaround ?
     
    -Alex

     

    r2d2Proton <r2d2Proton@live.com> Aug 30 07:05AM -0700 ^
     
    Does WebGL and/or O3D work on DroidX with Android 2.1?
     
    If not, what do I need to do to make this happen?
     
    Thanks.

     

    "{ Devdroid }" <webnet.android@gmail.com> Aug 30 03:55PM +0200 ^
     
    > If I'm understanding your first sentence, I'm at work and cannot test it for
    > myself right now.
    > I'm not sure what you're saying beyond that point.
     
    I am talking about asymmetric key cryptography which is also used to sign
    apps. All you need is you private (secret) key. It's in your keystore
    file (which simply can holds more private keys than one. If you (or
    anyone) can have your private key and know the passphrase s/he
    will be able to sign "on behalf" of you and nobody will catch the
    difference. So you only need the key or keystore copied/moved
    to other machine.
     
    PS: that's why it's important to keep private secure and have strong
    passphrase. Once both leak you're in trouble.
     
    More on wikipedia if you are not familiar with cryptgraphy subjects:
    http://en.wikipedia.org/wiki/Public-key_cryptography

     

    "{ Devdroid }" <webnet.android@gmail.com> Aug 30 03:44PM +0200 ^
     

    > As i mentioned above my app is a system app, it is registered under /
    > data/system/packages.xml with system="true".
     
    But you noticed that every other package is listed in that file too, right?
     
    > Doesn't this mean it's part of the system and it has corresponding
    > rights.
     
    No. In general, if you are "regular" developer (as most here is)
    you won't be able to make any system app on non rooted devices
    just because you wish so

     

    Shashidhar <shashi.zephyr@gmail.com> Aug 30 07:12PM +0530 ^
     
    Hi,
    I am using a custom list adapter with a spinner in each item.
    There is a strange problem with the value the spinner shows.
    For some of the items the spinner always shows the first value in the
    adapter set to the spinner but when I touch on spinner, on the pop up
    selection list it shows the actual value which I have set before. I mean the
    value shown in the spinner and the selected item that is shown in pop list
    of the spinner are some times different.
     
    Please help me and tell me why this happens.

     

    CMF <manfaic@gmail.com> Aug 30 05:02AM -0700 ^
     
    I can upload the image to the server now.
    But what if I need to pass a variable to the php and upload the image
    simultaneously ?
     

     

    CMF <manfaic@gmail.com> Aug 30 04:26AM -0700 ^
     
    Hi , I have fixed the problem by myselft, thanks.
    But I would like to know how to pass a variable from the android to
    the php?
     

     

    Dev Android <devandroid1234@gmail.com> Aug 30 05:14PM +0530 ^
     

     

    Mark Murphy <mmurphy@commonsware.com> Aug 30 08:08AM -0400 ^
     
    >> I have written an application and i want to measure the performance of
    >> each module. Can you please suggest me the good approach to do this.
     
    Use traceview:
     
    http://developer.android.com/guide/developing/tools/traceview.html
     
    >> Currently, i'm following traditional approach by calculating system's
    >> current time.
     
    Use SystemClock and the uptimeMillis() method. Quoting the SystemClock
    documentation:
     
    "This clock is guaranteed to be monotonic, and is the recommended
    basis for the general purpose interval timing of user interface
    events, performance measurements, and anything else that does not need
    to measure elapsed time during device sleep."
     
    --
    Mark Murphy (a Commons Guy)
    http://commonsware.com | http://github.com/commonsguy
    http://commonsware.com/blog | http://twitter.com/commonsguy
     
    Warescription: Three Android Books, Plus Updates, One Low Price!

     

--
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

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

Comments: (0)

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

    Zsolt Vasvari <zvasvari@gmail.com> Aug 30 04:19AM -0700 ^
     
    In my app, which has an about 3% piracy rate (Pirate == Person who
    uninstall is < 20 mins). None of whom are from Australia, even though
    I have about 10 Australian paid users. So by your stat, I'd expect to
    see 9 of those guys (gals) to be pirates.

     

    djauto23 <djauto23@gmail.com> Aug 30 04:18AM -0700 ^
     
    I am developing a game in which there are a couple of on-screen
    buttons
    the user can press to do different things. These work by responding
    to
    onSingleTapConfirmed, and checking if the getX and getY of the event
    are
    within the coordinates of the buttons.
     
    However, the getX and getY coordinates are different when the game is
    played on other screen sizes than the game was developed on.
     
    How is the best way to deal with that? Of course I could call
    getWidth
    and getHeight and do lots of if's on them, but it would be better to
    have a more general way of doing it.
     
    Does anyone know of such a way?
     
    The game is implemented on a GLSurfaceView.
     
    Thanks.

     

    Zsolt Vasvari <zvasvari@gmail.com> Aug 30 04:16AM -0700 ^
     
    > stack trace).
     
    > Clearing the data (or uninstalling / re-installing which clears the data as
    > well) makes the problem go away each and every time.
     
    I think what's happening then is that some kind of race condition
    corrupts your app data, after which the crash will occur every time.
    Of course, clearing the app data will ellivate the problem. But I
    still think that it's red herring:
     
    - It started to happen after you introduced static maps.
    - You admit using such maps in multiple threads
    - java.util.TreeMap is not thread safe.
     
    What I would do is wrap TreeMap around a
    java.util.Collections.syncronizedMap (not 100% about the name) and
    then release an updated app and see if the crashes go away. I know it
    makes your users the testers, but if you cannot duplicate it, there is
    not much to lose.

     

    Alok Kulkarni <kulsuhas@gmail.com> Aug 30 04:29PM +0530 ^
     
    Hi all,in my application I have a class as:
     
    1. public class TouchInterceptor extends ListView
     
    and my main activity class as:
     
     
    1. public class GUIEngine extends Activity
     
     
    in this class i initialize my ListView variable as:
     
     
    1. lView = (ListView) findViewById(R.id.mainList);
     
     
    now i want to set a listener on this lview object which is in my
    TouchInterceptor class, i do that as:
     
     
    1. ((TouchInterceptor) lView).setDropListener(mDropListener);
     
     
    but i get a ClassCastException at this line.....
    what am i doing wrong?
     
    plzz can anyone help.. thank u....

     

    "pramod.deore" <deore.pramod83@gmail.com> Aug 30 12:23AM -0700 ^
     
    Someone knows how to encode large image in Base64 format. Because I
    had tried using creating byte array as large as image size but if
    image it encode image if size of image is upto 800kb, if image is
    greater than 800kb then it throws runtime exception as
    OutofMemoryException. So I had decided use 1kb of byte array, in that
    I encode 1kb of image write to a file after that again encode 1kb of
    image and write to a file ..... The code is like this
     
    public void encodeImage()
    {
    try
    {
    out = new PrintWriter("c:/program1/zzz.txt");
    InputStream inputStream = new FileInputStream
    ("c:/program1/
    tt.jpg");
    OutputStream outputStream = new
    FileOutputStream("c:/program1/
    zzz.txt");
     
    byte[] b = new byte[1024];
     
    while((read= inputStream.read(b))>0)
    {
    System.out.println ("Inside while");
    inputStream.mark(b.length);
    String encoded = Base64.encode(b);
    //System.out.println (encoded);
    out.print(encoded);
    out.flush();
     
    //bas.write(b);
    }
     
    out.close();
     
    }
     
    catch (Exception e)
    {
    System.out.println (e);
    }
     
    }
     
    But when I decode that image here http://www.opinionatedgeek.com/dotnet/tools/base64decode/
    then it says that he input is not a valid Base-64 string.
     
    Please help me to solve this issue.

     

    Kostya Vasilyev <kmansoft@gmail.com> Aug 30 12:04PM +0400 ^
     
    Pramod,
     
    Base64 encoding has end-of-data markers.
     
    http://en.wikipedia.org/wiki/Base64
     
    Your code encodes each 1024-byte chunk of input image data into its own
    Base64 string. Each of those has its own end markers.
     
    Because of this, the receiving side doesn't see one piece of data
    encoded with Base64, rather, it sees multiple pieces of data, which I
    guess is not what it expects.
     
    There are several ways to fix this:
     
    1 - Write your own code to encode partial data pieces, flushing the
    output at the very end. Base64 encoding is not difficult.
     
    2 - Use a ready-made class, like this one:
     
    http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Base64OutputStream.html
     
    It's equivalent is available in Android starting with 2.2:
     
    http://developer.android.com/reference/android/util/Base64OutputStream.html
     
    3 - Change buffer size in your code to 1023 (a multiple of 3). This is a
    hack, but probably the easiest thing to do.
     
    -- Kostya
     
    30.08.2010 11:23, pramod.deore пишет:
     
    --
    Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

     

    "pramod.deore" <deore.pramod83@gmail.com> Aug 30 02:13AM -0700 ^
     
    Hi, Kostya
     
    I can't use second solutions because they are for API level8 and I am
    developing this for APilevel4(1.6), But after changing byte array size
    to 1023 it works perfectly fine, Thanks again Kostya I am working on
    this from last 8 days and today I got the solution.
     
    But still I don't know how it works with 1023 and not with 1024?
     

     

    Kostya Vasilyev <kmansoft@gmail.com> Aug 30 02:23PM +0400 ^
     
    It's magic, man. Pure magic.
     
    :)
     
    Base 64 encoding converts every 3 bytes of input data to 4 bytes of
    output data. If input data size is not a multiple of 3, output is padded
    with "=" characters, which also means end of data.
     
    Your original buffer size, 1024, is not a multiple of 3, so each output
    chunk ended with end-of-data marker.
     
    On the other hand, 1023 *is* a multiple of 3, so no end-of-data padding
    is generated until the very end of data.
     
    -- Kostya
     
    30.08.2010 13:13, pramod.deore пишет:
     
    --
    Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

     

    Alexandre Ferrieux <alexandre.ferrieux@gmail.com> Aug 30 02:11AM -0700 ^
     
    Hello,
     
    I'm using MediaRecorder.setOutputFile(FileDescriptor fd) over a UNIX
    socket, so that local code on the device can see the encoded stream in
    real time (for video streaming out).
     
    What I observed is that the encoder doesn't write encoded frames
    continuously, when they are produced, but by "bursts", exactly one
    second apart. I tried both containers (THREE_GPP and MPEG_4) and all
    three available codecs (MPEG_4_SP, H263, H264), the behavior is always
    the same. This one-second period is notably unrelated to framerate or
    bitrate, so it is not flushing by size; rather, it seems to be
    flushing by time (possibly to mask SD card write overheads ? Bummer, I
    'm not using the SD here !). Is it a known limitation ? Is there a
    known workaround ?
     
    -Alex

     

    Vikram <vikram.bodicherla@gmail.com> Aug 30 02:55AM -0700 ^
     
    I have a custom view A which extends RelativeLayout and internally
    uses 3 instances of custom view B: B1, B2 and B3, which can be 'flung'
    left or right to move to B4, B5 and B6.
     
    I want to resize the whole view based on the orientation. I have
    hardcoded the size of B based on the screen width of 320 (if the view
    is initialized in potrait mode), or 480 (landscape mode), and then use
    the screen density from getDisplayMetrics() to convert them into real
    pixel values to draw my view. Is this is best way to do it?
     
    I was trying to use onSizeChanged to look for orientation changes, but
    this does not work because onMeasure() is called before
    onSizeChanged() and the orientation change does not show up.
     
    Any advice anyone?

     

    guru <guru.naveen@gmail.com> Aug 30 02:45AM -0700 ^
     
    Hi All,
     
    I am not seeing Wif tethering app in my phone. I enabled wifi in froyo
    build. But it is not showing tethering app ?
    What do i need to enable the app?
     
    Thanks
    Gururaja B O

     

    pyleaf <lg.feixiang@gmail.com> Aug 30 05:45PM +0800 ^
     
    Hi, guys!
    Today, I discover PhoneGap.Unluckily, there is no enough docement about it.
    How to you think about the future of PhoneGap?
    Thank you!
     
    --
    Believing is Everything.

     

    Vinay S <s.vinay.rao@gmail.com> Aug 30 02:24AM -0700 ^
     
    hi,
     
    As I know you get the event onCellLocationChanged when there is change
    in Cell Tower connectivity..
     
    To stop this event you need to stop listing to this update. Look for
    listen method in Telephonymanager (URL:
    http://developer.android.com/reference/android/telephony/TelephonyManager.html).
     
    I am not aware of the other event.
     
     

     

    Rootko <rootko@gmail.com> Aug 30 01:18AM -0700 ^
     
    Hi fellow developers,
     
    I'm searching the web for endless hours now and I cannot find it
    anywhere. How can I add a watermark in the picture (.jpeg)? I have
    this project in mind where I'd like to have such feature - to take a
    picture using the camera (already developed this) and then make it
    watermarked. So basically just take the .jpeg file and then blend it
    with some .png file that is semi transparent.
     
    But I could not find anything how to achieve this :( Can you please
    help me? At least some principal points that would send me into right
    direction - how can I do something like that in Android.
     
    Thanks a lot,
    Rudo

     

    Yahel <kayenko@gmail.com> Aug 30 02:16AM -0700 ^
     
    >to take a
    > picture using the camera (already developed this) and then make it
    > watermarked.
     
    Look into Canvas.drawBitmap with alpha channel.
     
    Good luck.
     
    Yahel

     

    Ed <edschache@gmail.com> Aug 30 12:53AM -0700 ^
     
    Hi all,
     
    Found a bit of a weird one which might be related to this post -
    http://groups.google.com/group/android-developers/browse_thread/thread/b0e2048495d61e0c
     
    I've check the public issue tracker for android and can't see anything
    related to this.
     
    Basically I'm setting an icon in a menu, getting a mutable copy of the
    icon, drawing some text on it to create a menu item that reflects the
    current state of the thing the menu item links to.
     
    This works all well and good when I use a resource that is in /
    drawble/ but if I put the same resource into /drawable/hdpi/ (with
    relevant resizes in ldpi and mdpi) it blows up saying that it is not
    mutable... even though it's using the same code and the same image
    format (exactly the same file):
     
    Drawable d = mi.getIcon().mutate();
    Canvas c = new Canvas(((BitmapDrawable) d).getBitmap());
    //draw on canvas
    d.draw(c);
     
    I wish to use the different dpi graphics as appropriate rather than
    scaling at runtime or implementing my own dpi image selector. Is this
    a known limitation? If so is there documentation about it?
     
    Cheers,
     
    Ed

     

    Romain Guy <romainguy@android.com> Aug 30 02:05AM -0700 ^
     
    Mutating a drawable does not making the Bitmap it may contain mutable.
    You have to check whether the Bitmap you get is mutable. Bitmaps
    loaded from resources are never mutable, you must create a mutable
    copy first (see the Bitmap.create/copy documentation.)
     
     
    --
    Romain Guy
    Android framework engineer
    romainguy@android.com
     
    Note: please don't send private questions to me, as I don't have time
    to provide private support.  All such questions should be posted on
    public forums, where I and others can see and answer them

     

    mayank bisht <mayank.anddev@gmail.com> Aug 30 01:28AM -0700 ^
     
    I am developing an app for android in which i have to initiate my app
    whenever an entry will be done in calendar.How to get notification on
    calendar entry ?

     

    Mark Murphy <mmurphy@commonsware.com> Aug 30 04:34AM -0400 ^
     
    > I am developing an app for android in which i have to initiate my app
    > whenever an entry will be done in calendar.
     
    There is no calendar in the Android SDK.
     
    You are welcome to contact the developers of calendar applications to
    see how best to integrate with them. Not all such applications will
    have such integration options. For example, the Calendar application
    in the Android open source project does not have any documented and
    supported APIs for this sort of integration.
     
    --
    Mark Murphy (a Commons Guy)
    http://commonsware.com | http://github.com/commonsguy
    http://commonsware.com/blog | http://twitter.com/commonsguy
     
    Warescription: Three Android Books, Plus Updates, One Low Price!

     

    "A N K ! T" <ankit.awasthi.1@gmail.com> Aug 30 01:34PM +0530 ^
     
    am trying to get contact detail from an incoming number
     
    while calls come i get the number from phone state Receiver through that
    number am trying to get detail of that number in contacts but not getting
    anything
    due to number format.
    the number i get from phone statelistener is like 998878888
    but number in contact is like 99-887-8888
    how to do it...please someone help me out
     
    --
     
    A N K ! T......

     

    Surfer <kaliki01@yahoo.com> Aug 30 12:58AM -0700 ^
     
    Tnx for the response Dianne.
    As i mentioned above my app is a system app, it is registered under /
    data/system/packages.xml with system="true".
    Doesn't this mean it's part of the system and it has corresponding
    rights.
    Sry, still don't understand why the intent doesn't launch the
    installer.
     

     

    Mark Murphy <mmurphy@commonsware.com> Aug 30 03:22AM -0400 ^
     
    > the other with "internet" permissions to do exactly the same as one
    > malicious app, steal contact info. It might not be obvious to the user at
    > all that the two apps are working together to do something bad.
     
    Agreed. Developers have incentive to make their apps appear less
    scary. Either we give them the tools to do that without compromising
    security or they will find ways that make security worse (e.g., APKs
    that intentionally "leak" secured data/services).
     
    --
    Mark Murphy (a Commons Guy)
    http://commonsware.com | http://github.com/commonsguy
    http://commonsware.com/blog | http://twitter.com/commonsguy
     
    Warescription: Three Android Books, Plus Updates, One Low Price!

     

    William Ferguson <william.ferguson.au@gmail.com> Aug 30 12:09AM -0700 ^
     
    Interesting debate. And from a technical perspective I really like the
    simplicity of delegating responsibility and permissions to separate
    apks that have discretely defined scope. I'm just not sure how
    practical it is.
     
    If you look at the permissions that are most contentious in
    combination : internet and read_contacts.
    I have avoided several apps that appear outwardly to be perfecty ok
    because I could see no good reason for the app to have this combo.
    But internet is often required for one of these (legitimite) reasons:
    1) to report use statistics (eg Flurry)
    2) to request and present ads
    3) to otherwise hit an external server
     
    In an apps description if (3) is required you generally get told about
    it.
    But use of (1) or (2) is typically omitted because either its an
    instant sale killer or the target audience won't understand.
     
    The solution that you are proposing Dianne, would be for separate apks
    for options (1) and (2) and to have an app be able to convince a user
    that it is worthwhile the hassle of downloading (and dealing with
    upgrades) of those apps just to let the current app run.
    I know that if I was presented with that, then unless the app was a
    real beauty I would probably bail about then.
     
    The upside is that once the lbrary apk did get installed, the next app
    that required it would not have the same drama.
     
    However, while any of us could create an AdServer apk in the full
    light of everyone else, only one person can upload it to market. That
    person would then have the opportunity of warping the AdServer apk to
    funnel whatever amount of that Ad revenue into their own account. So
    if we were to collaborate on such a reusable component we would need a
    trusted owner.
     
    This one is close to my heart, because living in Australia, unless I
    get a buddy in the states who is willing to collect any sale revenue
    for me, my only real source of income from Android is via Ad revenue
    or donates.
    At the moment, innovation in some types of apps is being stifled
    because a good portion of the world can't make any income from them.
     
    William
     
     

     

--
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