[android-developers] Digest for android-developers@googlegroups.com - 16 Messages in 12 Topics

Comments: (0)

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

    kypriakos <demetris@ece.neu.edu> Jul 31 10:35PM -0700 ^
     
    Hi all,
     
    I launch an Intent from a servlet once a request for it comes in. The
    Intent launches
    a SnapPic activity that puts the phone into a preview mode and then
    snaps
    a pic and send it back to the requester. This works fine - I am now
    truing to keep
    the phone in the preview mode (I don't call the finish()) on the
    activity and for
    any subsequent requests I am trying to snap more pictures. Can calls
    to methods
    of the launched Activity be made from the servlet? In other words, how
    can one
    app communicate with an activity that it launches? I think this is a
    matter of
    communicating threads so I am wondering if there's an alternative way
    to approach
    this problem.
     
    Thanks

     

    Nikolay Elenkov <nikolay.elenkov@gmail.com> Aug 01 02:52PM +0900 ^
     
    > Can calls to methods
    > of the launched Activity be made from the servlet?
     
    Assuming the servlet runs in a separate thread, no. Not directly
    at least.
     
    > In other words, how can one app communicate with an activity
    > that it launches? I think this is a matter of communicating
    threads so I am wondering if there's an alternative way to approach
    > this problem.
     
    You could launch the activity using the FLAG_ACTIVITY_SINGLE_TOP
    flag. Then when you call startActivity() again, a new instance
    won't be created, the intent will be delivered to onNewIntent().
     
    Alternatively, you could use a Handler to send messages to
    the GUI thread. The hard part may be how to get a GUI-thread
    Handler to your servlet container though. Assuming the whole
    app server is started from the GUI thread, you have to create
    a Handler (on the GUI thread) and find a way to stuff it in a
    globally accessible place (Application static field, etc.)

     

    kypriakos <demetris@ece.neu.edu> Jul 31 11:45PM -0700 ^
     
    Thanks for the response Nikolay ---
     
    > Assuming the servlet runs in a separate thread, no. Not directly
    > at least.
     
    That's what I was afraid of ...
     
    > You could launch the activity using the FLAG_ACTIVITY_SINGLE_TOP
    > flag. Then when you call startActivity() again, a new instance
    > won't be created, the intent will be delivered to onNewIntent().
     
    Worth trying.
     
    > app server is started from the GUI thread, you have to create
    > a Handler (on the GUI thread) and find a way to stuff it in a
    > globally accessible place (Application static field, etc.)
     
    Yes I agree, not sure how I can get the Handler but I will look into
    it. Not a bad idea at all! Thakns

     

 Topic: OnClick error
    mark2011 <androidmark2011@gmail.com> Jul 31 11:28PM -0700 ^
     
    Dear All :
     
    I install eclipse & Android SDK under the Windows/XP successful. If
    I test a program using onClick that I want to click a button, it
    displays an error. But the code is ok on an another pc. Can anyone
    help me?
     
    my code is that :
     
    btnNumberOne.setOnClickListener(new ImageButton.OnClickListener()
    {
    @Override
    public void onClick(View v) { <=====error line
     
    Thanks.
     
    BR,
    mark

     

    Kunju Vava <androidrcn@gmail.com> Aug 01 11:53AM +0530 ^
     
    Hi All
     
    In my App I want to record an audio and play the same record when ever the
    recording is completed...
     
    it is just like the tom cat app in android ...... when the user say
    something to the screen it should be recorded and give the reply at
    suddenlty using the same audio.....
     
     
    Thanks in Advance
     
     
     
     
     
     
     
     
    --
    --
    ωιтн яєgαя∂ѕ
    Ratheesh * *...........

     

 Topic: context menu
    arun kumar <arun.kata987@gmail.com> Aug 01 11:48AM +0530 ^
     
    can any one tell where is error in my code...
     
    Thankyou
    arun

     

    Ankit <ank82del@gmail.com> Jul 31 11:09PM -0700 ^
     
    Hi ,
     
    Thanks for your valuable suggestions.
    Actually we want to know if it is possible using launch modes and task
    affinities basically without changing the System Image.
     
    We want to place our application over other applications, while
    keeping the background application working as normal. Please note our
    application may not be full screen.
    Thus this also creates another problematic scenario:-
    Our android activity stack is having following activity A, B, C. The
    order in which the activities have opened is : C->B->A (with A on top
    of the stack). And activity B, C are full screen but A is not full
    screen.
     
    Now we close activity B by clicking a close button in Activity B which
    finishes the activity (Note activity B is visible as A is not full
    screen).
    Expected behavior :- Activity C and Activity A should be visible. That
    is Activity Stack is A, C (with activity A on top).
    But this not the behavior that is shown.
    Actual Behavior happening :- On closing activity B we see a black
    screen with activity A on top.
     
    Note : Our constraint is that we can't change system image.
     
    Thanks ,
    Ankit
     
    On Jul 29, 12:54 pm, firstName lastName

     

    parag <parag.shetgaonkar@gmail.com> Jul 31 10:43PM -0700 ^
     
    Hi,
     
    we have published an app on market, but its not visible in the market,
    even if isearch the package name of the app name, nothing is visible.
     
    I can see 464 devices supported.
    selected thrioughout the world, and its free, its been 6 hrs and still
    cant c it.
     
    What could be the issue?
     
    please help.
     
    Regards
    Parag

     

    kirti waykole <kirti.carrier@gmail.com> Aug 01 10:50AM +0530 ^
     
    this is main.xml
     
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
     
    <TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="@string/hello"
    />
    <Button
    android:id="@+id/startalarm"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Start"
    />
    <Button
    android:id="@+id/cancelalarm"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Cancel"
    />
    </LinearLayout>
     
     
    this is Androidmenifest.xml
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.exercise.AndroidAlarmService"
    android:versionCode="1"
    android:versionName="1.0">
    <uses-sdk android:minSdkVersion="4" />
     
    <application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".AndroidAlarmService"
    android:label="@string/app_name">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    </activity>
    <service android:name=".MyAlarmService" />
    </application>
    </manifest>
     
    On 7/30/11, narasimha venkat <chandra.narasimharao@gmail.com> wrote:

     

    Mark Carter <mjc1904@googlemail.com> Jul 31 08:01PM -0700 ^
     
    I would recommend this:
     
    For the initially-shown 3 comments: use the 3 most "helpful" comments
    related to the most recent release. If there are less than 3 such comments,
    then regress into earlier releases.
     
    For the "Read All Comments" show all the comments in reverse chronological
    order (as before).

     

    AndroidYourself <money2@2aba.de> Jul 31 09:50PM -0700 ^
     
    It is simple: The user cannot rate with 1-Star!
     
    The last rating have to be the possible range of +1-
     
    So if the first user rate this app with 4, then the next user can only
    rate 5/4/3.
     
    If the 2nd user rate this app with 3 (4+3 /2 = 3.5), then the next
    user can rate this app: 3.5 +/-1: = ( 4, 3.5 or 3 )
     
    ... and so on. Now the problem is solved. Never 1-Star ratings!

     

    nageswara rao rajana <nagu.rajana@gmail.com> Aug 01 09:55AM +0530 ^
     
    Hi,
     
    I developed android application using level 2.1 and tested on device
    samsung galaxy fit its working fine.
    My doubt is if i install the apk in htc wildfire 3.0 will it work
    fine or should i do any changes.
     
    Thanking you,
    Nageswararao.

     

    Jim Graham <spooky130u@gmail.com> Jul 31 09:39PM -0500 ^
     
    Got it working.... There were a few errors. Turns out it was the second
    possible change that Raghav mentioned.... When the first failed, I
    apparently had a temporary brain failure.... Yep,
     
    android:name="BouncingBuckies" needed to be android:name=".BouncingBuckies"
     
    and
    android:name="com.jdgapps.BouncingBuckies.LiveWallpaperSettings"
     
    was just completely hosed.... It also should have been, simply,
     
    android:name=".LiveWallpaperSettings"
     
    Once that one was fixed, the first one was a much more obvious error
    message in logcat..... Now I just need to pick up where I left off,
    and get it working the right way ... as opposed to just functioning
    properly (i.e., aesthetics, on return from prefs, destroy and re-start
    with the new prefs, and so on)...but that can wait until tomorrow.
     
    Thanks,
    --jim
     
    --
    73 DE N5IAL (/4) | "Now what *you* need is a proper pint of
    spooky130u@gmail.com | porter poured in a proper pewter porter
    < Running FreeBSD 7.0 > | pot.."
    ICBM / Hurricane: | --Peter Dalgaard in alt.sysadmin.recovery
    30.44406N 86.59909W |

     

    Nick Risaro <nrisaro@gmail.com> Aug 01 12:23AM -0300 ^
     
    Glad to hear that :)

     

    Jim Graham <spooky130u@gmail.com> Jul 31 09:31PM -0500 ^
     
    On Sun, Jul 31, 2011 at 06:08:45PM -0500, Jim Graham wrote:
    > now) to change the settings via "PREFERENCES".... Of course, any attempt
    > to do so results in an immediate force-close, since there isn't any code
    > for that....
     
    Never mind...got the prefs code working.
     
    --
    73 DE N5IAL (/4) | "Now what *you* need is a proper pint of
    spooky130u@gmail.com | porter poured in a proper pewter porter
    < Running FreeBSD 7.0 > | pot.."
    ICBM / Hurricane: | --Peter Dalgaard in alt.sysadmin.recovery
    30.44406N 86.59909W |

     

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

    ndiiie 90 <rndyon@gmail.com> Aug 01 08:27AM +0700 ^
     
    HI guys,
     
    this is a random question in my mind. Does Android support for motion sensor
    like Microsoft Kinect does?
     
     
    Thanks,

     

    jotobjects <jotobjects@gmail.com> Jul 31 05:44PM -0700 ^
     
    Is there a way to tell when the dropdown list is open for a Spinner
    widget? There doesn't seem to be a hook for this.

     

    lb <lakshman.bana@gmail.com> Jul 31 04:35PM -0700 ^
     
    Hi All,
     
    I see the following log in my HTC phone. Could someone suggest what am
    I missing please?
    My public ip(a.b.c.d) and port(8080) is reachable but somehow "No
    route to host" is seen in the logs. This error I get especially when a
    phone call is in ringing state. If WiFi is enabled then I do not see
    the error.
     
    Is there any restrictions on MediaPlayer when Call is Ringing or
    Dialing in 3G/4G network?
     
    Thanks in advance
    lb.
     
    I/LockUtil(14470): 06021143 - release PowerLock: DP_NETWORK_CHANGE
    I/ActivityManager( 127): No longer want com.google.android.apps.maps
    (pid 13854): hidden #16
    I/LockUtil(14470): 06021143 - acquire PowerLock - PARTIAL_WAKE_LOCK:
    DP_NETWORK_CHANGE
    V/AgentService_J( 307):
    Action[36752]:com.htc.android.iqagent.action.ui15
    I/HTC_SUBMITTER_C( 307): (0) submitUI15:40719148,0
    V/AgentService_J( 307): (0)ui15_dwAppID:40719148,ui15_shStatus:0
    D/EASDirectpush(14470): 06021143 MSG_NETWORK_STATE_CHANGED
    D/EASDirectpush(14470): 06021143 NetworkInfo: type: WIFI[], state:
    DISCONNECTED/DISCONNECTED, reason: (unspecified), extra: (none),
    roaming: false, failover: false, isAvailable: true, if: eth0
    D/EASDirectpush(14470): 06021143 NetworkInfo: type: mobile[CDMA -
    1xRTT], state: SUSPENDED/SUSPENDED, reason: 2GVoiceCallStarted, extra:
    (none), roaming: false, failover: true, isAvailable: true, if: rmnet0
    D/EASDirectpush(14470): 06021143 MSG_NETWORK_STATE_CHANGED - Not
    schedule as directpush, Stop service
    I/LockUtil(14470): 06021143 - release PowerLock: DP_NETWORK_CHANGE
    D/WimaxStateTracker( 127): GetAvailableMs
    V/MediaPlayerService( 70): [519] isPlaying: 1
    V/MediaPlayer( 328): isPlaying: 1
    I/HTTPStream( 70): back from connect_nonb
    E/HTTPStream( 70): connect_nonb error (113): No route to host
    E/HTTPStream( 70): HTTPStream::connect(a.b.c.d, 8080) failed.
    res(-1)
    E/NuHTTPDataSource( 70): connect() failed, err=-1
    I/AwesomePlayer( 70): mConnectingDataSource->connect() returned -1
    V/MediaPlayerService( 70): [520] notify (0x8a2b8, 100, 1, -1)
    V/MediaPlayer(12752): message received msg=100, ext1=1, ext2=-1
    E/MediaPlayer(12752): error (1, -1)
    V/MediaPlayer(12752): signal application thread
    V/MediaPlayer(12752): prepare complete - status=1

     

    gjs <garyjamessilva@gmail.com> Jul 31 04:15PM -0700 ^
     
    Hi,
     
    >I theorize that if I process the location update in <<1 second,
    >everything's good,
     
    Try it & less us know the results.
     
    Regards
     
    On Jul 29, 12:21 pm, Nathan <critter...@crittermap.com> wrote:

     

    Jim Graham <spooky130u@gmail.com> Jul 31 06:08PM -0500 ^
     
    I removed the force-close causing preference code from my AndEngine-based
    live wallpaper, but the LWP Preview is still inviting the user (me, for
    now) to change the settings via "PREFERENCES".... Of course, any attempt
    to do so results in an immediate force-close, since there isn't any code
    for that....
     
    Does anyone know what could be causing that? I've gone through all XML,
    all Java, and even removed all commented code that had anything to do with
    prefs.... I did some fgreps (using Zsh) from the top of the build path to
    double-check:
     
    fgrep -i prefs **/*.xml **/*.java
    fgrep -i preferences **/*.xml **/*.java
    fgrep -i settings **/*.xml **/*.java
     
    No matches found for any of these.
     
    I deinstalled and reinstalled from my device to make sure some shared
    prefs hadn't been initialized that were causing this...no change. Then
    I remembered that before I even added the prefs code, it still showed
    then, too.
     
    I don't like the idea of someone buying my little $0.99 app and getting
    a force-close when they try to access preferences that aren't there....
    Not good. Definitely not good.
     
    Suggestions?
     
    Thanks,
    --jim
     
    --
    73 DE N5IAL (/4) MiSTie #49997 < Running FreeBSD 7.0 >
    spooky130u@gmail.com ICBM/Hurricane: 30.44406N 86.59909W
     
    Do not look into waveguide with remaining eye!

     

    Joan Pujol <joanpujol@gmail.com> Jul 31 12:37PM -0700 ^
     
    Hi,
     
    It's posible to use refunds to give free managed items to some users?
    For example users who help me as betatesters?
     
    I supose I only have to treat refunds as purchases, but some one is using
    that?
    Are cancel and refund options always available? And are the refunds also
    managed if user reinstalls?
     
    A lot of thanks in advance,
    ---
    Joan Pujol Espinar
    www.joanpujol.cat

     

    Kostya Vasilyev <kmansoft@gmail.com> Aug 01 12:03AM +0400 ^
     
    Yes, it's possible.
     
    Beware of the difference between canceled and refunded orders.
     
    An order has to be fully charged before you can refund the money without
    canceling the order (takes a few days). At this time, the link to refund
    in the Checkout console becomes available, until then, there is just the
    link to cancel the order.
     
    This requires your users to have a certain amount of faith, because they
    will be required to make the purchase first, and then wait a few days
    for their refund, but other than that, it works.
     
    -- Kostya
     
    31.07.2011 23:37, Joan Pujol пишет:
     
    --
    Kostya Vasilyev

     

    Joan Pujol <joanpujol@gmail.com> Jul 31 01:29PM -0700 ^
     
    That's nice. One good thing of In-app billing :)
    And I suppose that in any case no comission is aplied, isn't it?
     
    Cheers,

     

    Kostya Vasilyev <kmansoft@gmail.com> Aug 01 12:36AM +0400 ^
     
    It's a full refund, the user gets their full amount back.
     
    The infrastructure will send you REFUNDED purchase state, and then
    it's up to your code to handle it as needed: so that the premium
    features keep working.
     
    If your code is based on the Dungeons sample, it's in there somewhere,
    commented as being "nice for the user" (with which I agree).
     
    This was a real life-saver for me during the month of July, when a
    significant number of users couldn't activate, due to a bug on
    Google's side.
     
    -- Kostya
     

     

    deepak subramanian <deepak.subu@gmail.com> Jul 31 01:03PM -0700 ^
     
    Hi all,
     
    So I got the Proximity Alerts working but I had to use the
    PendingIntent.getActivity(HaiMap.this, i, newIntent,
    PendingIntent.FLAG_CANCEL_CURRENT);
     
    Does anyone have an idea on why this is not working on a Broadcast receiver.
    I have seen many previous threads and all of them point to an issue with
    Pending intents behaviour.
     
    It sucks that Google cannot come up with better documentation on it. If
    anyone has got Broadcast intents working for multiple proximity alerts then
    it would be really good to know
     
    Otherwise I will have to clobber my app to use an Activity to behave as just
    a broadcast receiver.
     
    The closest that anyone got seems to be in the below thread. I used the same
    pattern as mentioned there but its not working now.
     
    http://groups.google.com/group/android-developers/browse_thread/thread/e61ec1e8d88ea94d/8bdcec373c45f5b4
     
     
    Regards,
    Deepak
     
     
     
     
     
    On Thu, Jul 28, 2011 at 12:35 AM, deepak subramanian

     

    Marcin Orlowski <webnet.android@gmail.com> Jul 31 08:50PM +0200 ^
     

    > http://code.google.com/p/android/issues/detail?id=18359
     
    you mean .bat change? did not worked for me (plus afaik it's wrong
    approach). still it's worth updating proguard anyway - 4.4 is dated
    february, and 4.6 is lastest

     

    Kostya Vasilyev <kmansoft@gmail.com> Jul 31 11:07PM +0400 ^
     
    Yep, a .bat file change fixed it for me (I also banged my head against
    the desk for a while, too - not sure if that had any effect).
     
    I actually used to use ProGuard 4.6, installed separately, but ADT 12
    seems to always use its own version 4.4 (ignoring "proguard.dir" in
    local.properties).
     
    So, one problem, two possible fixes - that's better than the other way
    around.
     
    -- Kostya
     
    31.07.2011 22:50, Marcin Orlowski ?????:
     
    --
    Kostya Vasilyev

     

    guruk <ilovesinai@gmail.com> Jul 31 12:00PM -0700 ^
     
    Thanks for the Link. I wrote google now. At the end he may 'just' violated
    my copyright by coping my text and trademark from the Name. I would not said
    anything if he takes my app as model for his own app and make something new.
    There are many other "Period & Ovulation" Apps now in the market, who took
    inspirations from my app (just because i was the first on android with a
    calendar.. -not the first app-) . the point they used their own creativity
    and made really something new... and not just coping whole chapters from a
    description and using the name nearly 1:1, thats quiet cheap :(

     

    Ali Chousein <ali.chousein@gmail.com> Jul 31 11:52AM -0700 ^
     
    I didn't read your long message, but the title is really original and
    made me roll on the ground laughing :D
     
    -Ali

     

    usafrmajor <usafrmajor@gmail.com> Jul 31 11:40AM -0700 ^
     
    Great for understanding what is happening. Just wondering if you, or anyone
    else, knows of any good android code examples on how to overlay the result
    on a map generated within an application. thanks

     

    nadam <adam@anyro.se> Jul 31 11:01AM -0700 ^
     
    Using drawable-xlarge is probably a bad idea. It might work for the
    current wave of 1280x800 10" tablets, but what about xlarge tablets
    with other resolutions?
     
    Android is not designed to simply scale up the user interface. Your
    dialogs probably look just fine one a real tablet. You can compare
    this with the message dialogs on a normal laptop.
     
    Tablets have a larger screen and the normal way to deal with that is
    to show more information at the same time. Sometimes this just works
    and sometime you have to adjust the layouts, specify layout-xlarge or
    rethink the UI completely (like the Android Market app). But this
    obviously depends on what kind of app you have.
     
     

     

    Kostya Vasilyev <kmansoft@gmail.com> Jul 31 09:23PM +0400 ^
     
    31.07.2011 21:20, Nick Risaro пишет:
    > Is LiveWallpaperSettings an inner class? I think that you can't put an
    > activity as an inner class. Try moving that to a "normal" class.
     
    You can, as long as:
     
    - It's static ("public static class Inner { ... }");
    - It's properly referenced in the manifest as "Outer$Inner".
     
    Same with services, receivers, etc.
     
     
    --
    Kostya Vasilyev

     

    Jim Graham <spooky130u@gmail.com> Jul 31 12:25PM -0500 ^
     
    On Sun, Jul 31, 2011 at 02:20:31PM -0300, Nick Risaro wrote:
    > Is LiveWallpaperSettings an inner class? I think that you can't put an
    > activity as an inner class. Try moving that to a "normal" class.
     
    I followed the AndEngine live wallpaper template designed for use with
    the live wallpaper extension. That's how they set it up.
     
    Later,
    --jim
     
    --
    73 DE N5IAL (/4) | "This 'telephone' has too many
    spooky130u@gmail.com | shortcomings to be seriously considered
    < Running FreeBSD 7.0 > | as a means of communication. The device
    ICBM / Hurricane: | is inherently of no value to us."
    30.44406N 86.59909W | (Western Union internal memo, 1876)

     

    Nick Risaro <nrisaro@gmail.com> Jul 31 02:29PM -0300 ^
     

    > - It's static ("public static class Inner { ... }");
    > - It's properly referenced in the manifest as "Outer$Inner".
     
    > Same with services, receivers, etc.
     
    Thanks for the clarification!

     

    TreKing <trekingapp@gmail.com> Jul 31 12:23PM -0500 ^
     

    > Which sdk should I be compiling against?
    > Should I always choose the latest version?
    > Which sdk should I set as the 'android:targetSdkVersion' ?
     
    Should it always be the one I am compiling against?
     
    I compile against the latest SDK and target the one I have a device for and
    can actually legitimately test. Works for me.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

 Topic: Curious NPE
    Indicator Veritatis <mej1960@yahoo.com> Jul 31 12:47AM -0700 ^
     
    But one of the main points of Eckel's rather negative analysis of the
    checked/unchecked distinction is -precisely- that it lends itself to
    the abuse you mention. That is WHY no language since Java's invention
    has chosen to repeat the experiment. And sure enough, the problem
    really is not as bad in Python or Ruby as it is still in Java.
     

     

    Zsolt Vasvari <zvasvari@gmail.com> Jul 31 01:41AM -0700 ^
     
    > But I am curious why you're serializing to JSON but not sending or
    > saving it anywhere, unless I'm misunderstood your previous message?
     
    I am storing JSON encoded objects in the Activity state in
    onSaveInstanceState(). It's used by Android to restore the state of
    the Activity if it was removed from memory for whatever reason.
     
     
     
     

     

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

Comments: (1)

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

    Jim Graham <spooky130u@gmail.com> Jul 31 11:08AM -0500 ^
     
    I am working on a live wallpaper using AndEngine, and am seeing an
    annoyingly-persistent problem; I'm hoping someone here can see what
    I, and one other dev with a good deal more experience than I have,
    are not seeing.
     
    Before I added some preferences, it worked fine...but because the
    touch event code and the accelerometer code isn't currently working
    in the AndEngine LWP extension, without some configurable options,
    it was rather limited.... Cool-looking, but limited.
     
    As soon as I started adding prefs, and since that time, it will run
    in the preview all day, as long as you don't try to access the
    preferences screen. Once you do, it immediately force-closes.
     
    If anyone can see what might be happening from the following, please
    point me in the right direction....
     
    Here's the LogCat output---nothing I've tried has significantly changed
    this (except for time of day, process ID numbers):
     
    --------------------------- CUT HERE ---------------------------
     
    WARN/dalvikvm(12753): threadid=1: thread exiting with uncaught exception (group=0x400208b0)
    ERROR/AndroidRuntime(12753): FATAL EXCEPTION: main
    ERROR/AndroidRuntime(12753): java.lang.IllegalStateException: Could not execute method of the activity
    ERROR/AndroidRuntime(12753): at android.view.View$1.onClick(View.java:2072)
    ERROR/AndroidRuntime(12753): at android.view.View.performClick(View.java:2408)
    ERROR/AndroidRuntime(12753): at android.view.View$PerformClick.run(View.java:8824)
    ERROR/AndroidRuntime(12753): at android.os.Handler.handleCallback(Handler.java:587)
    ERROR/AndroidRuntime(12753): at android.os.Handler.dispatchMessage(Handler.java:92)
    ERROR/AndroidRuntime(12753): at android.os.Looper.loop(Looper.java:143)
    ERROR/AndroidRuntime(12753): at android.app.ActivityThread.main(ActivityThread.java:4717)
    ERROR/AndroidRuntime(12753): at java.lang.reflect.Method.invokeNative(Native Method)
    ERROR/AndroidRuntime(12753): at java.lang.reflect.Method.invoke(Method.java:521)
    ERROR/AndroidRuntime(12753): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
    ERROR/AndroidRuntime(12753): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
    ERROR/AndroidRuntime(12753): at dalvik.system.NativeStart.main(Native Method)
    ERROR/AndroidRuntime(12753): Caused by: java.lang.reflect.InvocationTargetException
    ERROR/AndroidRuntime(12753): at com.android.wallpaper.livepicker.LiveWallpaperPreview.configureLiveWallpaper(LiveWallpaperPreview.java:113)
    ERROR/AndroidRuntime(12753): at java.lang.reflect.Method.invokeNative(Native Method)
    ERROR/AndroidRuntime(12753): at java.lang.reflect.Method.invoke(Method.java:521)
    ERROR/AndroidRuntime(12753): at android.view.View$1.onClick(View.java:2067)
    ERROR/AndroidRuntime(12753): ... 11 more
    ERROR/AndroidRuntime(12753): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.jdgapps.BouncingBuckies/com.jdgapps.BouncingBuckies}; have you declared this activity in your AndroidManifest.xml?
    ERROR/AndroidRuntime(12753): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1404)
    ERROR/AndroidRuntime(12753): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
    ERROR/AndroidRuntime(12753): at android.app.Activity.startActivityForResult(Activity.java:2847)
    ERROR/AndroidRuntime(12753): at android.app.Activity.startActivity(Activity.java:2953)
    ERROR/AndroidRuntime(12753): ... 15 more
     
     
    --------------------------- CUT HERE ---------------------------
     
    And since it's asking if I've defined all of this in the Manifest, here
    it is:
     
    --------------------------- CUT HERE ---------------------------
     
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.jdgapps.BouncingBuckies"
    android:versionCode="1"
    android:versionName="1.0">

    <uses-sdk android:minSdkVersion="7" />

    <uses-feature android:name="android.software.live_wallpaper" />

    <application android:icon="@drawable/icon" android:label="@string/app_name">
    <!-- Live Wallpaper Service -->
    <service
    android:name="BouncingBuckies"
    android:enabled="true"
    android:icon="@drawable/icon"
    android:label="@string/app_name"
    android:permission="android.permission.BIND_WALLPAPER">
    <intent-filter>
    <action android:name="android.service.wallpaper.WallpaperService" />
    </intent-filter>
    <meta-data
    android:name="android.service.wallpaper"
    android:resource="@xml/wallpaper" />
    <uses-permission android:name="android.permission.SET_WALLPAPER" />
    </service>

    <!-- Live Wallpaper Settings Activity -->
     
    <activity android:name="com.jdgapps.BouncingBuckies.LiveWallpaperSettings" android:label="@string/app_name"
    android:theme="@android:style/Theme.Light.WallpaperSettings"
    android:exported="true">
    </activity>
    </application>
    </manifest>
     
    --------------------------- CUT HERE ---------------------------
     
    Does anyone see anything here that might be causing the force-close?
     
    Thanks,
    --jim
     
     
    --
    73 DE N5IAL (/4) MiSTie #49997 < Running FreeBSD 7.0 >
    spooky130u@gmail.com ICBM/Hurr.: 30.44406N 86.59909W
     
    Saw something on TV about Psych-os.
    Hmmmm, Psych OS. Perhaps the next freeware OS.... --me

     

    Kostya Vasilyev <kmansoft@gmail.com> Jul 31 08:14PM +0400 ^
     
    Jim,
     
    Your settings activity is called:
     
    com.jdgapps.BouncingBuckies.LiveWallpaperSettings
     
     
    And the error message is about being unable to find:
     
    com.jdgapps.BouncingBuckies
     
     
    Not quite the same thing is it?
     
    I don't know where a Live Wallpaper settings activity is declared - is
    it in the xml/wallpaper.xml meta-info file? If so, check the file to
    make sure it has the correct settings activity name.
     
    -- Kostya
     
    31.07.2011 20:08, Jim Graham пишет:
     
    --
    Kostya Vasilyev

     

    Jim Graham <spooky130u@gmail.com> Jul 31 11:35AM -0500 ^
     
    On Sun, Jul 31, 2011 at 09:50:15PM +0530, Raghav Sood wrote:
    > android:name="android.permission.SET_WALLPAPER" /> I meant to add it between
    > in the <manifest> element. You don't add permission elements inside service
    > ones.
     
    Yeah, I had it outside before. By the time I moved it, I was willing to
    at least TRY anything.... :-(
     
    I moved it back where it normally goes. :-)
     
    > I have been thinking over it a little more and also suggest
    > changing android:name="BouncingBuckies" to android:name=".BouncingBuckies"
    > or android:name="com.jdgapps.BouncingBuckies.BouncingBuckies".
     
    Well, it does change thing.... Now it force-closes the instant you
    select it in the preview.
     
    Thanks,
    --jim
     
    --
    73 DE N5IAL (/4) MiSTie #49997 < Running FreeBSD 7.0 >
    spooky130u@gmail.com ICBM/Hurr.: 30.44406N 86.59909W
     
    Seen in alt.sysadmin.recovery: "Priceless; that's better than telling
    him to use the Read Manual command with the Real Fast option."

     

    Nick Risaro <nrisaro@gmail.com> Jul 31 02:20PM -0300 ^
     
    Is LiveWallpaperSettings an inner class? I think that you can't put an
    activity as an inner class. Try moving that to a "normal" class.

     

    guruk <ilovesinai@gmail.com> Jul 31 09:45AM -0700 ^
     
    Dear Colleges in Developing.
     
    I am the Developer from the app:
     
    "My Days - Period & Ovulation"
    com.chris.mydays
    Christian Albert Mueller
    (3 Years in the Android Market)
     
    Today I had to find out that many of
    my creative work came copied by:
     
    "My Days (Period & Ovulation)
    iac.health.mydays
    Health Team
    desirmpokty @ gmail.com
     
    First I thought its just the similar Name
    that I don't like. but at near investigation I had to found out
    he copied 90% from my "About" Page in his app.
    You will find even more similar functions he just took 1:1.
    You can compare yourself while downloading both apps.
     
    I am sure you are not interested to support such creativity theft
    and don't like similar happen to you
     
    Please *compare BOTH apps yourself* and than make your comment!
    *Especially check the ABOUT page (press MENU) on both apps.*
     
    Should u like to talk to that copycat developer himself your opinion, you
    are free to do so.
    Thats his only contact i found: desirmpokty @ gmail.com . He does not
    offer even a
    support page in the market for his app.
     
    As I know you don't have to do anything, I would appreciate any of your
    activities
    from a serious developer to another.
     
    Such people, who only copy/paste other devs work should not benefit from
    that.
     
    Finest Regards and wish you all the best
    Yours
    Chris

     

    Jim Graham <spooky130u@gmail.com> Jul 31 11:51AM -0500 ^
     
    On Sun, Jul 31, 2011 at 09:45:19AM -0700, guruk wrote:
     
    And with that,
     
    added to my .procmailrc:
     
    :0:
    * ^From.*ilovesinai@gmail.com
    /dev/null
     
    Bye....
     
    PS: What an appropriate random .signature.....
     
    --
    73 DE N5IAL (/4) MiSTie #49997 < Running FreeBSD 7.0 >
    spooky130u@gmail.com ICBM/Hurr.: 30.44406N 86.59909W
     
    My policy on spammers:
    "Castrate first, ask questions later."

     

    guruk <ilovesinai@gmail.com> Jul 31 09:59AM -0700 ^
     
    I am sorry , i had changed the mail twice and deleted the original, as i
    could not change it! So i forgot you may got it by email... Sorry about
    that.

     

    TreKing <trekingapp@gmail.com> Jul 31 12:14PM -0500 ^
     

    > Any idea how can i resolve this issue?
     
    1 - Don't hard code SD card paths like that - use
    Evironment.getExternalStorageDirectory().
    2 - Debug your app to figure out why your app is crashing.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Nick Risaro <nrisaro@gmail.com> Jul 31 01:58PM -0300 ^
     
    Try moving your SDK to a path without blanks.

     

 Topic: image view
    Kostya Vasilyev <kmansoft@gmail.com> Jul 31 08:51PM +0400 ^
     
    If you are confident that this new app is a copy of yours (with some
    changes, btw, its size is twice of yours - advertising?), you can file a
    DMCA takedown notice with Google, and they will remove the offending
    application.
     
    http://www.google.com/support/bin/request.py?contact_type=lr_dmca&product=androidmarket
     
    ( they made it even easier since when I had to use it a year ago )
     
    This page is a legal document, so you should be really sure that this
    new app is a copy of yours. If you are, that's a good way to resolve the
    issue.
     
    -- Kostya
     
    31.07.2011 20:38, guruk ?????:
     
    --
    Kostya Vasilyev

     

 Topic: context menu
    Nick Risaro <nrisaro@gmail.com> Jul 31 01:51PM -0300 ^
     
    Put a break point in the line
     
    if (item.getItemId() == 1) {
     
     
    And check with the debuger what's happening step by step.

     

    guruk <ilovesinai@gmail.com> Jul 31 09:42AM -0700 ^
     
    Dear Colleges in Developing.
     
    I am the Developer from the app:
     
    "My Days - Period & Ovulation"
    com.chris.mydays
    Christian Albert Mueller
    (3 Years in the Android Market)
     
    Today I had to find out that many of
    my creative work came copied by:
     
    "My Days (Period & Ovulation)
    iac.health.mydays
    Health Team
     
    desirmpokty @ gmail.com
     
     
    First I thought its just the similar Name
     
    that I don't like. but at near investigation I had to found out
     
    he copied 90% from my "About" Page in his app.
     
    You will find even more similar functions he just took 1:1.
     
    You can compare yourself while downloading both apps.
     
     
    I am sure you are not interested to support such creativity theft
     
    and don't like similar happen to you
     
     
    Please *compare BOTH apps yourself* and than make your comment!
     
     
    Should u like to talk to that copycat developer himself your opinion, you
    are free to do so.
     
    Thats his only contact i found: desirmpokty @ gmail.com . He does not
    offer even a
     
    support page in the market for his app.
     
     
    As I know you don't have to do anything, I would appreciate any of your
    activities
     
    from a serious developer to another.
     
     
    Such people, who only copy/paste other devs work should not benefit from
    that.
     
     
    Finest Regards and wish you all the best
     
    Yours
     
    Chris

     

    guruk <ilovesinai@gmail.com> Jul 31 09:41AM -0700 ^
     
    Dear Colleges in Developing.
     
    I am the Developer from the app:
     
    "My Days - Period & Ovulation"
    com.chris.mydays
    Christian Albert Mueller
    (3 Years in the Android Market)
     
    Today I had to find out that many of
    my creative work came copied by:
     
    "My Days (Period & Ovulation)
    iac.health.mydays
    Health Team
     
    desir...@gmail.com
     
     
    First I thought its just the similar Name
     
    that I don't like. but at near investigation I had to found out
     
    he copied 90% from my "About" Page in his app.
     
    You will find even more similar functions he just took 1:1.
     
    You can compare yourself while downloading both apps.
     
     
    I am sure you are not interested to support such creativity theft
     
    and don't like similar happen to you
     
     
    Please *compare BOTH apps yourself* and than make your comment!
     
     
    Should u like to talk to that copycat developer himself your opinion, you
    are free to do so.
     
    Thats his only contact i found: desirmpokty @ gmail.com . He does not offer
    even a
     
    support page in the market for his app.
     
     
    As I know you don't have to do anything, I would appreciate any of your
    activities
     
    from a serious developer to another.
     
     
    Such people, who only copy/paste other devs work should not benefit from
    that.
     
     
    Finest Regards and wish you all the best
     
    Yours
     
    Chris

     

    guruk <ilovesinai@gmail.com> Jul 31 09:38AM -0700 ^
     
    Dear Colleges in Developing.
     
    I am the Developer from the app:
     
    "My Days - Period & Ovulation"
    com.chris.mydays
    Christian Albert Mueller
    (3 Years in the Android Market)
     
    Today I had to find out that many of
    my creative work came copied by:
     
    "My Days (Period & Ovulation)
    iac.health.mydays
    Health Team
     
    desirmpokty@gmail.com
     
     
    First I thought its just the similar Name
     
    that I don't like. but at near investigation I had to found out
     
    he copied 90% from my "About" Page in his app.
     
    You will find even more similar functions he just took 1:1.
     
    You can compare yourself while downloading both apps.
     
     
    I am sure you are not interested to support such creativity theft
     
    and don't like similar happen to you
     
     
    Please *compare BOTH apps yourself* and than make your comment!
     
     
    Should u like to talk to that copycat developer himself your opinion, you
    are free to do so.
     
    Thats his only contact i found: desirmpokty@gmail.com He does not offer
    even a
     
    support page in the market for his app.
     
     
    As I know you don't have to do anything, I would appreciate any of your
    activities
     
    from a serious developer to another.
     
     
    Such people, who only copy/paste other devs work should not benefit from
    that.
     
     
    Finest Regards and wish you all the best
     
    Yours
     
    Chris

     

    guruk <ilovesinai@gmail.com> Jul 31 09:40AM -0700 ^
     
    Dear Colleges in Developing.
     
    I am the Developer from the app:
     
    "My Days - Period & Ovulation"
    com.chris.mydays
    Christian Albert Mueller
    (3 Years in the Android Market)
     
    Today I had to find out that many of
    my creative work came copied by:
     
    "My Days (Period & Ovulation)
    iac.health.mydays
    Health Team
     
    desir...@gmail.com
     
     
    First I thought its just the similar Name
     
    that I don't like. but at near investigation I had to found out
     
    he copied 90% from my "About" Page in his app.
     
    You will find even more similar functions he just took 1:1.
     
    You can compare yourself while downloading both apps.
     
     
    I am sure you are not interested to support such creativity theft
     
    and don't like similar happen to you
     
     
    Please *compare BOTH apps yourself* and than make your comment!
     
     
    Should u like to talk to that copycat developer himself your opinion, you
    are free to do so.
     
    Thats his only contact i found: desirmpokty@gmail.com . He does not offer
    even a
     
    support page in the market for his app.
     
     
    As I know you don't have to do anything, I would appreciate any of your
    activities
     
    from a serious developer to another.
     
     
    Such people, who only copy/paste other devs work should not benefit from
    that.
     
     
    Finest Regards and wish you all the best
     
    Yours
     
    Chris

     

    nexbug <gsukumar@gmail.com> Jul 31 08:51AM -0700 ^
     
    I really hope google is watching.. the value of market comments cannot be understated. Done wrongly as now , it can hurt good apps and boost bad ones.

     

    JRock <developer@earthblood.com> Jul 31 07:34AM -0700 ^
     
    Interesting. So you are saying that is ok to compile against api 4 and
    target api 11? That is so confusing - I would never have thought of
    doing such a thing.
     
    Thanks a lot
     

     

    Mark Murphy <mmurphy@commonsware.com> Jul 31 09:57AM -0400 ^
     
    > I know it's 32bit, but using a signed int to hold a value higher that 0x7FFFFFFF
    > seems like perverting the sign bit IMO. It can lead to subtle bugs.
     
    That ship sailed about two decades ago.
     
    http://stackoverflow.com/questions/430346/why-doesnt-java-support-unsigned-ints
     
    > Maybe it's a
    > common case for Java programmers but it would be cleaner to use a long I think,
    > since there is no unsigned integers available.
     
    A long will perform worse than an int, except on 64-bit CPUs, none of
    which power Android devices AFAIK.
     
    Java developers have survived this long having to deal with this, and
    it's not like the Internet has brok.........CARRIER LOST

     

    Olivier Guilyardi <list@samalyse.com> Jul 31 04:10PM +0200 ^
     
    On 07/31/2011 03:57 PM, Mark Murphy wrote:
    >> seems like perverting the sign bit IMO. It can lead to subtle bugs.
     
    > That ship sailed about two decades ago.
     
    > http://stackoverflow.com/questions/430346/why-doesnt-java-support-unsigned-ints
     
    I don't see anyone argumenting in favor of storing an unsigned value into a
    signed int on this thread. I mean, I'm all for removing unsigned types if that
    simplify the language, but then you have to play nice with the rules, as
    @starblue mentions "If your values are somewhat arbitrary size and don't fit
    into int, use long."
     
    >> since there is no unsigned integers available.
     
    > A long will perform worse than an int, except on 64-bit CPUs, none of
    > which power Android devices AFAIK.
     
    But it's just a color value, I don't see how that's involved in heavy
    computations. It's just storage, it's like like using two ints, which is still
    lighter than say a dedicated class.
     
     
    > Java developers have survived this long having to deal with this, and
    > it's not like the Internet has brok.........CARRIER LOST
     
    lol ;)
     
    Ok, yet another good reason to port my Java code to C++ :p
     
    --
    Olivier

     

    Olivier Guilyardi <list@samalyse.com> Jul 31 04:23PM +0200 ^
     
    On 07/31/2011 03:40 PM, Marcin Orlowski wrote:
    > just matter of *interpretation* of the value. All bits of 0xFFFFFFFF are
    > the same no matter if you *treat* it as signed or unsigned int and this
    > is what matters.
     
    Ok, thanks, let's call that a subtlety then.
     
    --
    Olivier

     

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

Comments: (0)

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

    Olivier Guilyardi <list@samalyse.com> Jul 31 03:13PM +0200 ^
     
    Hi,
     
    How comes Resources.getColor() returns an int? This can't hold the maximum value
    of 0xFFFFFFFF because Java int is signed.
     
    --
    Olivier

     

    Mark Murphy <mmurphy@commonsware.com> Jul 31 09:33AM -0400 ^
     
    > How comes Resources.getColor() returns an int? This can't hold the maximum value
    > of 0xFFFFFFFF because Java int is signed.
     
    An int can hold 0xFFFFFFFF, because an int is 32 bits, and 0xFFFFFFFF
    is a 32-bit value. From a mathematics perspective, 0xFFFFFFFF is a
    negative number in Java.
     
    --
    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!

     

    Marcin Orlowski <webnet.android@gmail.com> Jul 31 03:40PM +0200 ^
     
    On 31 July 2011 15:13, Olivier Guilyardi <list@samalyse.com> wrote:
     
    How comes Resources.getColor() returns an int? This can't hold the maximum
    > value
    > of 0xFFFFFFFF because Java int is signed.
     
    Java does not offer "unsigned" so you're right, you will get negative value
    if you i.e. Log.i(() it, but that's not really important as it's just matter
    of *interpretation* of the value. All bits of 0xFFFFFFFF are the same no
    matter if you *treat* it as signed or unsigned int and this is what matters.
     
    PS: but if you want example of how to incorrectly cope with such case see
    android:versionCode - it's int and Market will complain if you set it to
    i.e. "201107311521", which is kinda lame.
     
    Regards,
    Marcin Orlowski
     
    *Tray Agenda <http://bit.ly/trayagenda>* - keep you daily schedule handy...
    *Date In Tray* <http://bit.ly/dateintraypro> - current date at glance...
    WebnetMobile on *Facebook <http://webnetmobile.com/fb/>* and
    *Twitter<http://webnetmobile.com/twitter/>
    *

     

    Olivier Guilyardi <list@samalyse.com> Jul 31 03:45PM +0200 ^
     
    On 07/31/2011 03:33 PM, Mark Murphy wrote:
     
    > An int can hold 0xFFFFFFFF, because an int is 32 bits, and 0xFFFFFFFF
    > is a 32-bit value. From a mathematics perspective, 0xFFFFFFFF is a
    > negative number in Java.
     
    I know it's 32bit, but using a signed int to hold a value higher that 0x7FFFFFFF
    seems like perverting the sign bit IMO. It can lead to subtle bugs. Maybe it's a
    common case for Java programmers but it would be cleaner to use a long I think,
    since there is no unsigned integers available.
     
    --
    Olivier

     

    Ali Chousein <ali.chousein@gmail.com> Jul 31 06:02AM -0700 ^
     
    Hi,
     
    I have a little confusion with setting an alarm. If anyone could give
    feedback or some hints it'll be greatly appreciated. In summary here
    is my situation:
     
    Inside my application I set an alarm:
     
    ////////////////////////
    // Set an alarm
     
    // Actually I set a unique id here. The hardcoded value is for
    simplicity only.
    int id = 123454321;
     
    Intent intent = new Intent(context, MyAlarm.class);
    PendingIntent sender = PendingIntent.getBroadcast(context, id, intent,
    0);
     
    long firstTime = SystemClock.elapsedRealtime();
    firstTime += 10*1000;
     
    AlarmManager am =
    (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
    am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime,
    15*1000, sender);
     
    ////////////////////////
     
     
    ////////////////////////
    // MyAlarm implementation
     
    public class MyAlarm extends BroadcastReceiver
    {
    @Override
    public void onReceive(Context context, Intent intent)
    {
    // Do some periodic work here
    }
    }
     
    ////////////////////////
     
    When I set the alarm everything is fine and good. I can see my alarm
    when I use the command:
     
    adb shell dumpsys alarm
     
    I can see the alarm even when my application goes to the background.
     
    Next I manually kill my application through
     
    Settings - Applications - Manage applications - <MyApp> - Force stop
     
    When I re-issue the command "adb shell dumpsys alarm" I see that my
    alarm is gone. This makes me think that when my application goes into
    the background and the framework kills it to free resources, my alarm
    will also be killed. However, I would like to have an alarm which will
    live independent of whether the application is running or not. Does
    anybody have hints how to do this?
     
    Thank you in advance guys,
    -Ali

     

    Mark Murphy <mmurphy@commonsware.com> Jul 31 09:10AM -0400 ^
     

    > Settings - Applications - Manage applications - <MyApp> - Force stop
     
    > When I re-issue the command "adb shell dumpsys alarm" I see that my
    > alarm is gone.
     
    Correct. Force-stop removes alarms, as do task killers (at least
    pre-2.2). The application is in a semi-disabled state until the user
    launches an activity again.
     
    > This makes me think that when my application goes into
    > the background and the framework kills it to free resources, my alarm
    > will also be killed.
     
    I don't think so. More accurately, AFAIK, a force-stop does not
    reproduce what the OS does when it stops a service to free up RAM or
    due to old age.
     
    --
    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!

     

    Ali Chousein <ali.chousein@gmail.com> Jul 31 06:19AM -0700 ^
     
    Thank you for the information Mark, that's very helpful. Apparently
    simulation the OS behavior is not straightforward in this case.
     
    -Ali

     

    "Jonas Petersson" <jonas.petersson@xms.se> Jul 31 03:40PM +0200 ^
     
    On 2011-07-31 15:27, Mark Murphy wrote:
    >> Thank you for the information Mark, that's very helpful. Apparently
    >> simulation the OS behavior is not straightforward in this case.
     
    > Other than waiting for the OS to do its thing.
     
    In my experience, starting the web browser and surfing to a major news
    site's ordinary page will cut down the waiting time drastically... - at
    least for phones with limited memory.
     
    Best / Jonas

     

    JRock <developer@earthblood.com> Jul 31 06:17AM -0700 ^
     
    I develop an app that has the minimum sdk set to:
    android:minSdkVersion="4" and does not require any special features
    specific to any particular sdk above 1.6. I simply want this app to
    work on as many devices as possible.
     
    Which sdk should I be compiling against?
    Should I always choose the latest version?
    Which sdk should I set as the 'android:targetSdkVersion' ? Should it
    always be the one I am compiling against?
     
    Thanks for any advice you can give.

     

    Mark Murphy <mmurphy@commonsware.com> Jul 31 09:30AM -0400 ^
     
    > specific to any particular sdk above 1.6. I simply want this app to
    > work on as many devices as possible.
     
    > Which sdk should I be compiling against?
     
    IMHO, compile against the highest SDK whose API you are using
    directly. It sounds like in this case, that's API Level 4.
     
    > Which sdk should I set as the 'android:targetSdkVersion' ? Should it
    > always be the one I am compiling against?
     
    If you want your application to adopt the Honeycomb look-and-feel
    (e.g., action bar, holographic theme) when run on a Honeycomb device,
    choose 11.
     
    --
    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!

     

    Marcin Orlowski <webnet.android@gmail.com> Jul 31 03:21PM +0200 ^
     
    Conclusion: if you face this, blame proguard that comes with r12 tools
    (v4.4). Simplest solution is to grab v4.6 from proguard website and just
    replace files in <SDK>\tools\proguard\lib from these found in 4.6 archive.
     
    Regards,
    Marcin Orlowski
     
    *Tray Agenda <http://bit.ly/trayagenda>* - keep you daily schedule handy...
    *Date In Tray* <http://bit.ly/dateintraypro> - current date at glance...
    WebnetMobile on *Facebook <http://webnetmobile.com/fb/>* and
    *Twitter<http://webnetmobile.com/twitter/>
    *

     

    falvick <falvick@gmail.com> Jul 31 05:45AM -0700 ^
     
    Hi, I tried your solution in my app and it doesn't work properly. I still
    get null pointer exception because ContextMenuInfo object passed as an
    argument to the function is null. When I remove fetching info
    from ContextMenuInfo context menu appears but after second long click (not
    the first one). I use Android 2.2 version. Does anyone know how solve this
    problem? Thanks in advance!

     

    H <me@howardb.com> Jul 31 04:40AM -0700 ^
     
    You simply call "getSupportLoaderManager()" which you inherit from
    FragmentActivity.

     

    H <me@howardb.com> Jul 31 04:23AM -0700 ^
     
    Alternatively, just edit the "default.keyset" file in the root of the
    .android folder. This holds the mappings for keys to functions. If the
    laptop doesn't support various key combos, you can change them in here and
    they take effect the next time you start an emulator. Since it's got
    "default" in the name, I guess it's possible you could put a different named
    file in the avd folder to override the default as well, if need be.
     
    Just tried this and remapped the Ctrl-F12 to F10, bounced the avd and now
    the screen rotates when I press F10.
     
    HTH.

     

    Mark Murphy <mmurphy@commonsware.com> Jul 31 07:33AM -0400 ^
     
    > file in the avd folder to override the default as well, if need be.
    > Just tried this and remapped the Ctrl-F12 to F10, bounced the avd and now
    > the screen rotates when I press F10.
     
    Now *that* is a fascinating solution, causing me to take a quick trip
    to the docs.
     
    The class in question is over -- we determined the problem was general
    (i.e., the keys didn't work in Eclipse either), and she didn't seem
    that interested in trying to figure out how to reconfigure her
    notebook, so she let it drop.
     
    If you launch the emulator from the command line, you can create your
    own keyset file, apparently, if you do not wish to mess with the
    current one. Run emulator -help-keyset-file for more.
     
    Heck, you can even use this to do something with those SysRq and
    ScrollLock keys that nobody doe anything with... :-)
     
    Many thanks!
     
    --
    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!

     

    perumal316 <perumal316@gmail.com> Jul 31 04:20AM -0700 ^
     
    Hi,
     
    Basically I am trying to invoke the video camera using
    ACTION_VIDEO_CAPTURE intent and save the subsequent recorded video in
    a particular directory and name. but my app keeps in crashing, even
    though the video do get saved. The code I used is as follow:
     
    filepath = "/sdcard/testfolder/testvid.mp4";
    File vidfile = new File(filepath);
    Uri viduri = Uri.fromFile(vidfile);
    Intent i = new
    Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE);
    i.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, viduri);
    startActivity(i);
     
    Any idea how can i resolve this issue? I want to save the video using
    a particular name and not the default name. I am not sure how to use
    onActivityResult to do this. is it possible?
     
    Thanks In Advance,
    Perumal
     

     

    Indicator Veritatis <mej1960@yahoo.com> Jul 30 11:18PM -0700 ^
     
    The exact text of the error message is "Location of the Android SDK
    has not been setup in the preferences", which is simply false: it HAS
    been setup. But when I go to Window>Preferences to verify this, I see
    another error message, which appears to be the real problem: it is
    "Could not find <path>\tools\adb.exe!" where <path> expands to my
    Location of the SDK, which really does have the 2.2 SDK in it, C:
    \cygwin\home\Matthew Johnson\andSDK\android-sdk-windows.
     
    I got into this mess by trying to upgrade, using the same Android SDK
    and AVD manager, to Tools 12. I rebooted just like the directions
    said, and now I get this error message, with no obvious workaround or
    any other way forward.
     
    BTW: adb.exe is on the system, but in a surprising location, I am not
    sure how it got put there, it must have been done during the upgrade
    attempt: it is in <path>\temp\ToolPackage.old01\adb.exe.
     
    Did he SDK & AVD manager create this directory?
     
    I am running the Eclipse Galileo IDE under Win7, where I include
    Cygwin for convenience.
     
    So what am I supposed to do now? I don't see any other way to update
    the ADT other than the manager, and I can't run that without running
    up against this error message.

     

    Nikolay Elenkov <nikolay.elenkov@gmail.com> Jul 31 03:53PM +0900 ^
     
    > sure how it got put there, it must have been done during the upgrade
    > attempt: it is in <path>\temp\ToolPackage.old01\adb.exe.
     
    > Did he SDK & AVD manager create this directory?
     
    Upgrading on Windows is messy. Did you get any 'file in use'
    errors? The upgrade process creates and renames/deletes those
    directories. If all goes well they should be gone by the time
    it finishes.
     
     
    > So what am I supposed to do now? I don't see any other way to update
    > the ADT other than the manager, and I can't run that without running
    > up against this error message.
     
    adb.exe now lives in platform-tools/ so maybe that is the problem.
    You can try running the SDK update directly (not from within Eclipse),
    to make sure it's properly updated. Then update the ADT from Eclipse
    Help->Check for updates.

     

    Indicator Veritatis <mej1960@yahoo.com> Jul 31 12:33AM -0700 ^
     
    Hi, Nikolay
     
    Thanks for the quick response. While I was waiting, however, I appear
    to have got further by copying adb.exe to the directory it was looking
    for it in, which was NOT 'platform-tools'. Yet I already had 2.2: they
    switched between 'tools' and 'platform-tools' further back than that.
     
    Anyway: I can't remember how I got the AVD manager to launch again, I
    had to do more flailing before I got that to work; I do remember
    having to restart Eclipse more often than I thought I should need to,
    and I updated the ADT via Eclipse>Help rather than using the manager.
     
    I still have some error messages, but am finally able to update things
    through the manager again. I am in the middle of downloading SDK Tools
    12 again, and then SDK Platform Tools rev 6 and SDK Platform Android
    3.0 API 11 (which is the level I need).
     
    So I am further than I was, but not sure I am "out of the woods" just
    yet. But I do need to ask: how -do- you go about "running the SDK
    update directly (not from within Eclipse)?". I see no direction for
    that in the online updating directions, nor does 'android' work in a
    command window, as one old post suggested it should.
     
    On Jul 30, 11:53 pm, Nikolay Elenkov <nikolay.elen...@gmail.com>
    wrote:

     

    Nikolay Elenkov <nikolay.elenkov@gmail.com> Jul 31 08:06PM +0900 ^
     
    > update directly (not from within Eclipse)?". I see no direction for
    > that in the online updating directions, nor does 'android' work in a
    > command window, as one old post suggested it should.
     
    You may have found it by now, but on Windows there is a
    'SDK Setup.exe' under android-sdk-windows. You can update
    your SDK packages from there without running Eclipse.
    android-sdk-windows/tools/android.bat should work as well,
    I think.

     

 Topic: SVG Library
    rael_yoni <yoni.stoffman@gmail.com> Jul 30 11:25PM -0700 ^
     
    I might be missing something altogether, is there alternative to SVG that
    android support natively? With all the hard work that android dev tools puts
    into supporting different form factors and resolutions there suppose to be a
    simple 2D vector library?!

     

    Mark Murphy <mmurphy@commonsware.com> Jul 31 07:01AM -0400 ^
     
    > I might be missing something altogether, is there alternative to SVG that
    > android support natively?
     
    ShapeDrawable, but it is a tiny subset of SVG.
     
    > With all the hard work that android dev tools puts
    > into supporting different form factors and resolutions there suppose to be a
    > simple 2D vector library?!
     
    Android is designed to run on devices an order of magnitude slower
    than the current crop of smartphones. They deemed that vector graphics
    would be too slow to render.
     
    Bear in mind that Google has released an SVG library for Android:
     
    http://code.google.com/p/svg-android/
     
    --
    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!

     

    Zwiebel <hunzwiebel@gmail.com> Jul 31 03:47AM -0700 ^
     
    I tried this code, but it didn't do anything, with my phone:
     
    import android.app.Activity;
    import android.graphics.Bitmap;
    import android.graphics.BitmapFactory;
    import android.graphics.Canvas;
    import android.hardware.Camera;
    import android.hardware.Camera.PictureCallback;
    import android.os.Bundle;
    import android.view.View;
    import android.widget.Button;
    import android.widget.FrameLayout;
     
     
    public class camera_surface extends Activity {
     
    @Override
    protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.camera_surface);
     
     
    Button scan_it = (Button)
    findViewById(R.id.camera_button);
    scan_it.setOnClickListener(new View.OnClickListener() {
     
    FrameLayout fl = (FrameLayout)
    findViewById(R.id.preview);
    @Override
    public void onClick(View v) {
    // TODO Auto-generated method stub
    takePicture();
    }
     
    private void takePicture() {
    // TODO Auto-generated method stub
    Camera camera = Camera.open();
    Camera.Parameters parameters =
    camera.getParameters();
    parameters.setPictureFormat(PixelFormat.JPEG);
    camera.takePicture(null, rawCallback, null);
    camera.release();
    }
     
    PictureCallback rawCallback = new PictureCallback() {
    public void onPictureTaken(byte[] data, Camera
    camera) {
    // TODO Do something with the image RAW data.
    byte[] picture;
     
    picture = data;
     
    Bitmap pic = BitmapFactory.decodeByteArray(data,
    0, data.length);
    Canvas c = new Canvas(pic);
    fl.draw(c);
    }
     
    };
    });
    }
    }
     
    Thanks for any reply,

     

 Topic: Curious NPE
    Doug <beafdefx@gmail.com> Jul 31 12:12AM -0700 ^
     
    > JSONException on put* operations as it will check the arguments to be
    > NULL's and if they are, it throws the JSONException instead of just a
    > NPE.
     
    Right, and this is kind of my point. The gap between checked/
    unchecked exceptions themselves are not the problem. It's the abuse
    of the system that's the problem. Wrapping a NPE inside a checked
    exception is subverting the purpose of an unchecked NPE, specifically,
    to point out a programmer error.
     
    You said in your last post that you're "Not sure how the system
    implements that, it may save it to a file, I don't know, I don't
    care." I think this abuse of the exception system has got you
    confused about which exceptions you need to catch and which not.
    These abuses are giving checked exceptions a bad name.
     
    Suggesting that checked suggestions should be banned is, to me, kind
    of like saying that prohibition of alcohol is a good idea because it
    keeps people from doing stupid things after they abuse the substance.
    People are always going to do stupid stuff in their software if
    they're not disciplined or understand how things can best work.
     
    Checked exceptions have their place in the world, and it's up to the
    engineer to figure out how best to use them. The JSON serialization
    components that Android has included seem to violate best practices
    here. (Incidentally, the Android JSON stuff comes from
    https://github.com/douglascrockford/JSON-java. Douglas Crockford is
    supposed to be one of those really smart guys that we pay attention
    to. Maybe he should stick to JavaScript?). The offending code in
    JSONObject conveniently checks for null on the key and throws a
    checked exception, which is bad. It would have been better if it just
    threw unchecked NPE, or even better, unchecked
    IllegalArgumentException, because it's just writing to a map. But it
    was Free Software, so maybe you got what you paid for. :-(
     
    Sorry you've been troubled by this questionable engineering. At least
    you're free to choose another JSON serialization library.
     
    But I am curious why you're serializing to JSON but not sending or
    saving it anywhere, unless I'm misunderstood your previous message?
     
    Doug

     

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