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

Comments: (0)

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

    Moto <medicalsounds@gmail.com> Jul 31 07:26PM -0700 ^
     
    This might be a simple question but I'm seeing the super call at the
    end of the overwritten function and also at the start of the
    function. What is recommended? any differences on this?
     
    I feel very beginner with this question... :P
     
    i.e.
     
    @Override
    protected void onCreate)
    {
    super.onCreate();
    // some code
    }
     
    or
     
    @Override
    protected void onCreate()
    {
    // some code
    super.onCreate();
    }
     
    -Moto

     

    Satya Komatineni <satya.komatineni@gmail.com> Jul 31 10:50PM -0400 ^
     
    Probably there are exceptions to every rule.
     
    In this particular instance I would probably have the base class
    complete its work before I do the work of the derived. May be a poor
    parallel, but if I am constructing a multi-story house, I would want
    to finish the base floors and move on to the upper floors.
     
    Another thought is, a derived class comes later in conception than the
    base class. So a derived class can anticipate what a base class does
    on the otherhand baseclass designers would not have known what the
    derived class would have done.
     
    In case of a constructor, the compiler will tell you that you have to
    call the super first.
     
    However if I know that I am not altering the state of the base class,
    such as logging a message, I could put that method either before or
    after.
     
    Also if you want the behavior of the base class to be a default one
    after you have exhausted your options such as attending to menus, then
    you want to call the base super last.
     
    In the particular case of "onCreate", as it resembles construction, I
    go with calling the "super" first.
     
    Hope this reflection helps
     
    Satya Komatineni
    http://www.satyakomatineni.com
    http://www.androidbook.com
     
     
    --
    Satya Komatineni
    http://www.satyakomatineni.com
    http://www.androidbook.com

     

    Chris Stewart <cstewart913@gmail.com> Jul 31 10:40PM -0400 ^
     
    An application I'm working on has a use for a home screen like the ones in
    the Twitter and Facebook Android clients. Something like a 2 by 3 grid view
    that adjusts when viewed in either orientation. I'm nothing short of awful
    when it comes to design and I've yet to work out a design in my layout that
    resembles what I'm after. I'm curious to see if anyone has run across a
    tutorial in their time researching across the web.
     
    Chris Stewart
    cstewart913@gmail.com
    http://www.androidsdkforum.com

     

    James Wang <jameswangcnln@gmail.com> Jul 31 07:30PM -0700 ^
     
    @TreKing
    Thanks for your replies. We do have some reasons to call finish
    because Android did not finish one when another is shown before it.
    >Probably, but with your code, not Android.
    Document does not say finish is not allowed to be called at onStop.
    How to explain there is no problem with calling finish just after
    startActivity.
     
    @Dianne
    Thanks for your replies. We do believe it is a problem with framework.
    WindowManagerService.java:
     
    private int dispatchPointer(QueuedEvent qev, MotionEvent ev, int
    pid, int uid) {
    if (DEBUG_INPUT || WindowManagerPolicy.WATCH_POINTER)
    Log.v(TAG,
    "dispatchPointer " + ev);
     
    if (MEASURE_LATENCY) {
    lt.sample("3 Wait for last dispatch ", System.nanoTime() -
    qev.whenNano);
    }
     
    Object targetObj = mKeyWaiter.waitForNextEventTarget(null,
    qev,
    ev, true, false, pid, uid);
     
    When calling finish() after startActivity,
    mKeyWaiter.waitForNextEventTarge returns activity A. And after
    checking A.isVisibleLW(), the key up event is discarded successfully.
     
    When calling finish() at onStop, ANR happens in
    mKeyWaiter.waitForNextEventTarge and it is seems never get out.
     
    James

     

    James Wang <jameswangcnln@gmail.com> Jul 31 07:20PM -0700 ^
     
    Hi Dianne, thanks for your answer.
    Can you tell us how to avoid this error if we have to put A and B in
    the same process?

     

    TreKing <trekingapp@gmail.com> Jul 31 09:11PM -0500 ^
     
    On Sat, Jul 31, 2010 at 5:09 PM, sblantipodi
     
    > I'm sorry for my rude and really not too much kind speaking,
    > but I can't belive that android doesn't support preprocessor.
     
    Why so surprised? The main Android SDK is Java-based, which does not have
    preprocessor. Whatever you've used with other platforms are exceptions, not
    the norm. I would actually be surprised if it DID have one.
     
    I can't think on mobile programming without preprocessor,
     
    Well you better learn real fast =)
     
     
    > too many different configurations,
     
    Too many configurations of what?
     
     
    > think only to LVL and android market and preprocessor could be useful...
     
    Haven't played with LVL yet, so don't know about that.
    Useful? Maybe. Necessary? Doubtful.
     
    Ok we can live without it, but codes becomes really unelegant...
     
    One could argue that preprocessor macros makes code much worse.
     
     
    > Sincerely I really don't like the non preprocessor way
    > but unfortunantly, masses told that android is good and I need to develop on
    > it :)
     
    Do you always do what the masses tell you? =P
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Tim <tdhutt@gmail.com> Jul 31 06:08PM -0700 ^
     
    On Jul 31, 5:26 pm, "Adriano B. Godinho" <adri...@godinho.eng.br>
    wrote:
    >                   android:label="@string/app_name"
    >                   android:launchMode="singleTask"/>
     
    > More details:http://developer.android.com/guide/topics/fundamentals.html#lmodes
     
    Fantastic, thanks! :-)

     

    Loki117 <thomas.shepparduk@gmail.com> Jul 31 06:01PM -0700 ^
     
    Anyone else on here use Mobclix for Ad serving? I have seen my revenue
    drop from $15 to $9 as in they have removed $6 of revenue! Also they
    are not giving impression counts for Ads which I know are being
    displayed! Is anyone else seeing these issues with Mobclix?

     

    Indicator Veritatis <mej1960@yahoo.com> Jul 31 05:23PM -0700 ^
     
    Eric-
     
    You are basing your entire post on the fallacious assumption that it
    is only "non-technical people" who download the task killers. I am
    very technical, and I downloaded one. Nor am I alone.
     
    Nor is it that "people ar very bad at shifting". Rather, the recent
    trend in the mobile OS industry (not just Google) of forcing it on
    people is obnoxious, and has inspired a reaction.
     

     

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

Comments: (0)

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

    sblantipodi <perini.davide@dpsoftware.org> Jul 31 05:20PM -0700 ^
     
    Hi,
    I have built in the Sample code from LVL and putted it into my main
    activity.
     
    I haven't understood why it always returns LICENSED also if I setted
    UNlicensed from my developer console.
     
    this is the adb logcat output...
     
    I/LicenseChecker( 496): Binding to licensing service.
    I/LicenseChecker( 496): Calling checkLicense on service for
    packageName
    I/LicenseChecker( 496): Start monitoring timeout.
    I/LicenseChecker( 496): Received response.
    I/LicenseChecker( 496): Clearing timeout.
     
    I have no idea on why it gives me always licensed...
     
    Thanks.

     

    Adal <arpia49@gmail.com> Jul 31 10:49PM +0200 ^
     
    I think the user is not always the problem and if it is... we've got a
    problem because we can hardly make people change their behave, what we can
    do is build better apps that don't take resources they don't need. That's a
    developers fault and that's the one developers should focus.
     
    If we keep thinking users are idiots instead of giving them better apps and
    better phones so the realized thinks are evolving we'll see how users go to
    other products.
     
    That's why (some) people root their phones and install some not official
    ROMs, cause vendors what to sell better/newer phones even if the old ones
    could be (sometimes) upgraded.
     
    I think "auto terminate" functions are only as good as the worst app
    installed on your phone.
     
    (I hope my message could be read, my English is far from perfect)
     

     

    Indicator Veritatis <mej1960@yahoo.com> Jul 31 05:19PM -0700 ^
     
    Kostya-
     
    Most of what you say is true, but beside the point. Task killers per
    se do not "interfere with the platform's functionality".
     
    Now yes, some users do have the strong desire you allude to, but that
    is far from proof that the desire for Task Killers IS an example of
    this effect. I do not believe that it is.
     
    On the contrary: I know that the performance of my handset is
    sometimes improved by killing tasks that Google decided to leave
    running even long after I finished with them.
     
    Besides: even your Windows example is not as you would have it. Many
    registry cleaners, especially the free ones or the 'crippleware', are
    junk, but there do exist genuine cleaners that work well. I have often
    resuscitated a sick Windows system by running a high quality registry
    cleaner on it. So again, the problem is not that they serve only a
    psychological need, but rather that some are genuine and many are not.
     
    You should also remember that much of the work these registry cleaners
    do became necesasry only because 3rd party programs fail to clean up
    after themselves when they do an install or uninstall. If every 3rd
    party app behaved exactly according to Microsoft rules, the registry
    cleaner would be unnecessary; but that was a vain expectation, doomed
    to be disappointed.
     
    Why wouldn't the situation be the same with Android Task Killers? The
    one I chose, as I already mentioned, really does improve performance
    at least some of the time. And I do have a strong suspicion that it is
    the 3rd party apps failing to follow Google rules concerning the
    lifecycle that make Task Killers useful. The app I downloaded for
    reading NY Times feeds, for example, fails to show progress, comes up
    with frequent ANRs and occasional crashes.
     

     

    kivy <victoriasarabusse@gmail.com> Jul 31 05:11PM -0700 ^
     
    Hi there,
     
    I just ran into a problem, while trying to populate a ViewStub by
    tapping an ImageButton within a SlidingDrawer (the ViewStub should
    also be part of the drawer), but all I get is a Force Close Error due
    to a Null Pointer Exception. As I am using ViewStubs for the first
    time I am not sure, what may have caused the exception. If someone
    could help me out with this issue, this would be fantastic.
     
    Thank you in advance.
     
    This is the code I use to inflate the ViewStub:
     
    btnExposure.setOnClickListener(new OnClickListener()
    {
    @Override
    public void onClick(View v) {
    importStub = ((ViewStub)
    findViewById(R.id.stub_exposure)).inflate();
     
    }
    });
    This is part of the Sliding Drawer xml file containing the ViewStub:
     
    <ViewStub
    android:id="@+id/stub_exposure"
    android:inflatedId="@+id/exposureview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#77000000">
    </ViewStub>
    This is the exposureview.xml (the inflatedID):
     
    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
    android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <SeekBar
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:thumb="@drawable/seek_thumb"
    android:progress="50"
    android:max="100">
    </SeekBar>
     
    </RelativeLayout>

     

    AUandroid <thevking@gmail.com> Jul 31 12:39PM -0700 ^
     
    Hi All,
     
    I am about to release my first app on the market for free. How should
    I reference or give citations to images I have used in my app. I have
    used two images which are free images available at
    http://commons.wikimedia.org/wiki/Main_Page
     
    thanks,
    -vk

     

    Streets Of Boston <flyingdutchie@gmail.com> Jul 31 03:22PM -0700 ^
     
    One possibility is to have an 'About' screen, reachable from your menu
    or from your settings/preferences activity. Put the references/
    citations in the About screen.
     

     

    AUandroid <thevking@gmail.com> Jul 31 04:22PM -0700 ^
     
    thanks for the tips. As I told you its my first time publishing a app.
    Can anyone please have a look at this image and let me know what I
    must write in my about page.Is it ok? if I just provide this link in
    my about section http://commons.wikimedia.org/wiki/File:Nuvola_apps_important.svg
    or I must specify any license information. I am using it when ever I
    want to alert the user.
     
    Thank you,
    -vk
     
     

     

    Moto <medicalsounds@gmail.com> Jul 31 03:24PM -0700 ^
     
    Hi,
     
    I currently have my application signed using a keystone key I
    generated. Could I use a new keystone to sign my application for the
    next update?
     
    Any issues that could arise if I use a different keystone?
     
    Thanks!
    -Moto

     

    Moto <medicalsounds@gmail.com> Jul 31 03:26PM -0700 ^
     
    keystone = keystore :P
     

     

    Moto <medicalsounds@gmail.com> Jul 31 03:32PM -0700 ^
     
    Oops never mind :( You can't do that...
     
    http://developer.android.com/guide/publishing/app-signing.html
     
    "Application upgrade – As you release updates to your application, you
    will want to continue to sign the updates with the same certificate or
    set of certificates, if you want users to upgrade seamlessly to the
    new version. When the system is installing an update to an
    application, it compares the certificate(s) in the new version with
    those in the existing version. If the certificates match exactly,
    including both the certificate data and order, then the system allows
    the update. If you sign the new version without using matching
    certificates, you will also need to assign a different package name to
    the application — in this case, the user installs the new version as a
    completely new application."
     
     

     

    Doug <beafdefx@gmail.com> Jul 31 03:30PM -0700 ^
     
    Try posting a series of delayed messages or runnables to a handler
    that alter the TextView in sequence as you need.
     

     

    sblantipodi <perini.davide@dpsoftware.org> Jul 31 03:17PM -0700 ^
     
    How can we use ServerManagedPolicy in the emulator and fastly switch
    from licensed to unlicensed to something else?
     
    The first time I got the licensed message, than I'll continue to get
    the licensed
    message also if I set UNLICENSED from my developer console after I
    deleted and reinstalled the app on the emulator.
     
    Thanks.
     

     

    sblantipodi <perini.davide@dpsoftware.org> Jul 31 01:00PM -0700 ^
     
    ah ah... it's incredible...
    I develop on Windows Mobile, JavaME, Bada, Blackberry, Symbian.
    I can use preprocessing on every platform...
    How can you develop on a mobile without preprocessing? Sure android is
    really good for fart app,
    but what else?
     
    I don't want to troll but I really can't understand why I heard many
    developers saying "viva android" when
    google released the first buggy SDK.
     

     

    Kostya Vasilyev <kmansoft@gmail.com> Aug 01 12:15AM +0400 ^
     
    The absence of preprocessor has to do with Java, not Android.
     
    And tlhere is a lot of Java software out there...
     
    --
    Kostya Vasilyev -- http://kmansoft.wordpress.com
     
    01.08.2010 0:00 пользователь "sblantipodi" <perini.davide@dpsoftware.org>
    написал:
     
    ah ah... it's incredible...
    I develop on Windows Mobile, JavaME, Bada, Blackberry, Symbian.
    I can use preprocessing on every platform...
    How can you develop on a mobile without preprocessing? Sure android is
    really good for fart app,
    but what else?
     
    I don't want to troll but I really can't understand why I heard many
    developers saying "viva android" when
    google released the first buggy SDK.
     
     
     
    --
    You received this message because you are su...

     

    sblantipodi <perini.davide@dpsoftware.org> Jul 31 01:27PM -0700 ^
     
    Ok but other java software/platform supports preprocessor on both
    Eclipse/Netbeans/IntelliJ/JDE ecc. ecc...
     

     

    Frank Weiss <feweiss@gmail.com> Jul 31 01:34PM -0700 ^
     
    Here is a long thread on the subject:
    http://groups.google.com/group/android-developers/browse_thread/thread/1c9078176b172e1a/235bae6530ee7e74?show_docid=235bae6530ee7e74
     
    There are Java projects that use various preprocessors. The lack of a
    standard one is a problem. AFAIK Sun's WORA ideology ran against the
    need for a preprocessor, although many developers think that mobile
    platforms have taken a big bite out of WORA. Modern software
    development methodologies, such as refactoring to patterns, tend to
    use other approaches for making software flexible and reusable.
     
    Personally, I'm glad Java does not have a preprocessor. It just seems
    a much cleaner language that way, that is, I have never yet seen Java
    code with ifdefs. But I can understand that it can be very useful
    under certain circumstances.

     

    TreKing <trekingapp@gmail.com> Jul 31 03:58PM -0500 ^
     
    On Sat, Jul 31, 2010 at 3:00 PM, sblantipodi
     
    > How can you develop on a mobile without preprocessing?
     
    Quite easily, actually.
     
     
    > Sure android is really good for fart app, but what else?
     
    Is this is a serious question? Have you browsed through the Android Market
    (as painful as that is)? There's a lot more out there than "fart apps".
     
     
    > I don't want to troll but I really can't understand why I heard
    > many developers saying "viva android" when google released the first buggy
    > SDK.
     
    Probably simply because it's an alternative to iPhone.
     
     
    Now, someone with your experience developing for so many devices can surely
    adapt to not having a preprocessor. It's good for many things but definitely
    not a necessity and will certainly not cripple you when making an Android
    App.
     
    If you're personally that attached to having a preprocessor, no one is
    forcing you to develop on Android.
     
    Good luck.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    sblantipodi <perini.davide@dpsoftware.org> Jul 31 03:09PM -0700 ^
     
    I'm sorry for my rude and really not too much kind speaking,
    but I can't belive that android doesn't support preprocessor.
     
    I can't think on mobile programming without preprocessor, too many
    different configurations,
    think only to LVL and android market and preprocessor could be
    useful...
    Ok we can live without it, but codes becomes really unelegant...
    Sincerely I really don't like the non preprocessor way but
    unfortunantly,
    masses told that android is good and I need to develop on it :)
     
     
     

     

    Streets Of Boston <flyingdutchie@gmail.com> Jul 31 03:16PM -0700 ^
     
    I'm glad to not have to use pre-processors and hash-defines.
    I hated them when i worked in C (and C++) (they tended to get over-
    used, made code unreadable and difficult to debug) and for the last
    decade of Java programming i really never ever needed them.
     
    "How can you develop on a mobile without preprocessing?"
    Easily, no problem.
     

     

    Brian <avalon73@caerleon.us> Jul 31 02:45PM -0700 ^
     
    I've done some testing on this, myself, and it seems that it only
    returns the NOT_MARKET_MANAGED error for an app in the market if the
    version code (the integer form of the version number in the manifest)
    in the copy making the check is higher than the one currently in the
    market. If the version code in the copy of the app making the check
    is less than or equal to the current one in the market, then the
    normal license valid/invalid response is given unless there's another
    error.
     
    That seems acceptable to me, even if it is a bit odd considering the
    docs imply that it indicates only a package name mismatch.

     

    keyeslabs <keyesdav@gmail.com> Jul 31 02:21PM -0700 ^
     
    Speaking as someone who has traveled this road before with my own
    implementation of basically the same approach, obfuscation will be
    critical. With AAL, it took about three days for someone to crack the
    app. The process looks something like this: decompile the apk using
    a freely available open source tool, find the code that invokes the
    licensing check, skip it, recompile and repackage the apk.
    Obsfucation will make this more difficult, but not all that tough
    given the usage of intents for communication between LVL and the
    market tool.
     
    Don't get me wrong, I think that LVL will offer a much needed road
    bump for pirates -- stealing apps will actually require a crack of
    each app. This is a viable approach to license verification and
    that's why I took the same route with AAL months ago. It certainly
    seems like google could have gone further though.
     
    The coverage of this has been very extensive in the press, and I would
    guess the coverage of the first released crack within a week or two
    will also make a fairly big splash, which won't look great for the
    platform.
     
    All told though, I think LVL is a positive step for the platform.
    Speaking as someone that was seeing 90%+ piracy rates before
    implementing something very similar to LVL in my own apps, I'm happy
    to see google addressing the problem.
     
    Dave Keyes
     
     
     
     

     

    RickB <rick.bullotta@comcast.net> Jul 31 01:30PM -0700 ^
     
    Can any version of Android support simultaneous connections on both a
    mobile network (e.g. 3G) and a WiFi network? Here's the requirement:
     
    I want to connect to a local Wifi network of sensors/devices that is
    not connected to the Internet, and be able to transmit data to an
    Internet-connected web server. Obviously quite easy to do on
    virtually any platform in Java, but it seems that Android does not
    allow multiple networks/radios to be active at a time.
     
    Big flaw, IMO. Should be a configurable option to allow that.
     
    With Froyo and mobile hot spot functionality, clearly it is
    *technically* possible to do, but I don't want to be the Wifi "host",
    but rather, a "connected client" to another Wifi network, and then do
    web requests over the 3G network.
     
    Thanks in advance for any suggestions/workarounds.

     

    Connick <oconnick@gmail.com> Jul 31 03:33PM -0400 ^
     
    For anyone looking to dynamically add a header to a sorted cursor in a list,
    Kostya's suggestion worked brilliantly. In getView override check the column
    value you're sorting on of the previous cursor position to determine if you
    need to use a regular row or a view which contains both a header *and* a row
    layout.
     
     

     

    Kostya Vasilyev <kmansoft@gmail.com> Jul 31 11:55PM +0400 ^
     
    (( blush ))
     
    --
    Kostya Vasilyev -- http://kmansoft.wordpress.com
     
    31.07.2010 23:34 пользователь "Connick" <oconnick@gmail.com> написал:
     
    For anyone looking to dynamically add a header to a sorted cursor in a list,
    Kostya's suggestion worked brilliantly. In getView override check the column
    value you're sorting on of the previous cursor position to determine if you
    need to use a regular row or a view which contains both a header *and* a row
    layout.
     
     
     
     

     

    Victoria Busse <victoriasarabusse@gmail.com> Jul 31 08:50PM +0100 ^
     
    That sounds great, but I just read that a ViewSwitcher only works with two
    child views and I have at least 4 :((
     

     

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

Comments: (0)

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

    sasq <jonas.minnberg@gmail.com> Jul 31 12:13PM -0700 ^
     
    Im using a setSelection and setSelectionFromTop to scroll a listview
    to a certain position but it randomly fails to do anything?!
     
    I not calling from another thread. Can it be because I just before
    called notifyDataSetChanged() ? In that case how do I know that that
    event has been handled and it is safe to call setSelection() ?

     

    Danny Shmueli <bittlebottle@gmail.com> Jul 31 12:08PM -0700 ^
     
    I got my C2DM account!
    thank you google
     

     

    sblantipodi <perini.davide@dpsoftware.org> Jul 31 08:25AM -0700 ^
     
    Hi all,
    I noticed that there is no way to use preprocessor in android with
    netbeans using the
    //#ifdef syntax,
     
    is there some sort of preprocessing in eclipse using android?
    I haven't understood if this is a lack of netbeans or it is a lack of
    android.

     

    TreKing <trekingapp@gmail.com> Jul 31 01:22PM -0500 ^
     
    On Sat, Jul 31, 2010 at 10:25 AM, sblantipodi
     
    > is there some sort of preprocessing in eclipse using android?
     
    No.
     
     
    > I haven't understood if this is a lack of netbeans or it is a lack of
    > android.
     
    It's a lack of Java. Preprocessing, specifically the #ifndef notation you
    mention, is a C/C++ thing.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    skooter500 <skooter500@gmail.com> Jul 31 10:56AM -0700 ^
     
    This sounds great, but is completely useless to me as Im in Ireland
    and no paid apps available to my potential users, so I've gone ahead
    and made my own user registration and payment system based around
    PayPal. A complete waste of my time, but what can ya do?
     
    From Reto Meier:
     
    "Unfortunately I can't give you a time-frame for paid app buyer or
    seller support for Ireland either. The team working on that side of
    things have a lot on their plates so getting even a rough estimate for
    any specific country is near impossible."
     
    Interesting that Apple, Microsoft, Paypal, Nokia etc can manage this
    but Google can't even give me date when it might be available. Not
    very professional. :-(
     
    Bryan
     

     

    skooter500 <skooter500@gmail.com> Jul 31 10:50AM -0700 ^
     
    Hi guys
     
    I have a music recognition app (Tunepal) that records 12 seconds of
    audio @ 22KHz (in one second chunks). After each second, the audio is
    copied from a byte array into a float array and eventually I perform
    some DSP on the float array.
     
    My app is available on the Android Marketplace and is selling ok. I
    have tested it on lots of different phones, such as the HTC Desire/
    Hero/Motorola Droid etc and everything is fine.
     
    One of my users has an Lg Ally (running Android 2.1 I believe) and the
    recording is not working. In fact it's crashing the app. I have
    developed a test program that just records some audio and I think I
    have isolated the problem. The test program records audio of various
    durations and sample rates and then plays it back. This is the crucial
    bit of code:
     
    protected Void doInBackground(Void... arg0)
    {
    System.out.println("Recording started");
    audioRecord = null;
    System.gc();
    int totalBytes = bufferSize;
    try
    {
    buffer = new byte[bufferSize];
    audioRecord = new
    AudioRecord(MediaRecorder.AudioSource.MIC, sampleRate,
    AudioFormat.CHANNEL_CONFIGURATION_MONO,
    AudioFormat.ENCODING_PCM_16BIT, totalBytes);
    audioRecord.startRecording();
     
    int bufferReadResult = audioRecord.read(buffer, 0,
    bufferSize);
    if (bufferReadResult ==
    AudioRecord.ERROR_INVALID_OPERATION)
    {
    message = "ERROR_INVALID_OPERATION returned";
    error = true;
    }
    if (bufferReadResult == AudioRecord. ERROR_BAD_VALUE)
    {
    message = "ERROR_BAD_VALUE returned";
    error = true;
    }
    if (bufferReadResult != bufferSize)
    {
    message = "Requested " + bufferSize + " bytes but read
    " + bufferReadResult + " bytes";
    error = true;
    }
    }
    catch (Exception e)
    {
    message = e.getMessage();
    error = true;
    }
     
     
    if (! isCancelled())
    {
    doneRecording();
    }
     
    return null;
    }
     
    This code works fine on my HTC Desire, but on the LG Ally, no matter
    what the buffer size or sample rate is set to, bufferReadResult always
    returns 2048. In other words, the call to:
     
    audioRecord.read(buffer, 0, bufferSize);
     
    Always reads just 1024 samples of audio. Actually I havent tested to
    see if the buffer contains anything useful.
     
    I can possibly get around this in my app with a bit of work, but I was
    wondering if anyone else has encountered this problem and if there is
    a better way to get around it than reading the audio in 2K chunks.
     
    You can try out the test app for yourself here:
     
    http://tunepal.org/tunepal/android/RecordTest.apk
     
    Rotations will screw it up BTW, so keep your phone orientated in
    portrait for the test.
     
    Bryan

     

    Dianne Hackborn <hackbod@android.com> Jul 30 11:31PM -0700 ^
     
    You don't need task killers. Some people like them, and who I am I to argue
    with what people like? ;)
     
     
    --
    Dianne Hackborn
    Android framework engineer
    hackbod@android.com
     
    Note: please don't send private questions to me, as I don't have time to
    provide private support, and so won't reply to such e-mails. All such
    questions should be posted on public forums, where I and others can see and
    answer them.

     

    gcstang <gcstang@gmail.com> Jul 31 09:30AM -0700 ^
     
    If it wasn't for a task killer my phone wouldn't last a day ....mine
    as well be tethered to the wall.
     

     

    a <andjarnic@gmail.com> Jul 31 10:38AM -0700 ^
     
    While I agree with most of the replies, there is one issue that makes task killers useful. Some apps run background tasks or they don't properly terminate threads when they should. These apps will drain ur battery and for this reason alone I use them.
     

     

    André <phacer@hotmail.com> Jul 31 09:27AM -0700 ^
     
    Thanks for a quick answer! Sorry for slow reply!
     
    Nice word, I'll try it!
     

     

    Tim <tdhutt@gmail.com> Jul 31 09:11AM -0700 ^
     
    In a broadcast receiver I want to do the following:
     
    1. See if MyActivity is alive somewhere.
    2. If it is, bring it to the foreground.
    3. Otherwise, start a new MyActivity.
     
    Is this possible?

     

    "Adriano B. Godinho" <adriano@godinho.eng.br> Jul 31 01:26PM -0300 ^
     
    Hi,
     
    You can declare your activity with singleTask launch mode.
     
    <activity android:name=".YourActivity"
    android:label="@string/app_name"
    android:launchMode="singleTask"/>
     
    More details:
    http://developer.android.com/guide/topics/fundamentals.html#lmodes
     
     
    --
    Adriano Godinho

     

    Pent <tasker@dinglisch.net> Jul 31 09:17AM -0700 ^
     
    Continuing my LVL series :)
     
    If I launch my app, the license check starts automatically, then I
    exit the app immediately (which calls LicenceChecker.onDestroy()) I
    get in the log a few seconds afterward the log warnings below.
     
    I suspect they're harmless but pretty untidy, any way to avoid it ?
     
    Thanks,
     
    Pent
     
    W/MessageQueue( 2559): Handler{449e0a68} sending message to a Handler
    on a dead thread
    W/MessageQueue( 2559): java.lang.RuntimeException: Handler{449e0a68}
    sending message to a Handler on a dead thread
    W/MessageQueue( 2559): at
    android.os.MessageQueue.enqueueMessage(MessageQueue.java:179)
    W/MessageQueue( 2559): at
    android.os.Handler.sendMessageAtTime(Handler.java:457)
    W/MessageQueue( 2559): at
    android.os.Handler.sendMessageDelayed(Handler.java:430)
    W/MessageQueue( 2559): at android.os.Handler.post(Handler.java:248)
    W/MessageQueue( 2559): at com.android.vending.licensing.LicenseChecker
    $ResultListener.verifyLicense(LicenseChecker.java:208)
    W/MessageQueue( 2559): at
    com.android.vending.licensing.ILicenseResultListener
    $Stub.onTransact(ILicenseResultListener.java:55)
    W/MessageQueue( 2559): at android.os.Binder.execTransact(Binder.java:
    288)
    W/MessageQueue( 2559): at dalvik.system.NativeStart.run(Native Method)

     

    Pent <tasker@dinglisch.net> Jul 31 08:32AM -0700 ^
     
    It seems that this error code is returned if the versions of the app
    on the device and at the server differ (amongst other times).
     
    What if the user buys on the market, but doesn't get a chance to
    validate before the next version comes out ? With a popular app, this
    will probably happen every update to someone.
     
    Perhaps a separate code would be useful for version codes differing,
    so the user can be prompted to update ?
     
    Pent

     

    WindowsNT <windowssnt@gmail.com> Jul 31 08:21AM -0700 ^
     
    Noone yet knows ?
    I wonder who had the idea to use sql stuff in contacts with URIs...

     

    sblantipodi <perini.davide@dpsoftware.org> Jul 31 07:38AM -0700 ^
     
    Wow, thanks this maked me goes forward to next error :)
    thanks...
     
    Target "package-resources" does not exist in the project
    what does it means, how can I specify package-resources?
     
    Thanks.
     

     

    sblantipodi <perini.davide@dpsoftware.org> Jul 31 07:23AM -0700 ^
     
    Hi,
    I'm using the ServerManagedPolicy implementation from the LVL code
    sample (MainActivity.class) but I haven't understood how it manage
    cache.
     
    The first time application start it needs internet to validate the
    license, if it is validated, how much time should pass before a second
    check is needed?
     
    Thanks.

     

    JoksanCPEN <joksanxfr@gmail.com> Jul 31 07:17AM -0700 ^
     
    Inflate a Dialog with the ListView inside.
     

     

    sblantipodi <perini.davide@dpsoftware.org> Jul 31 07:03AM -0700 ^
     
    ok, thanks for the reply.
     

     

    TreKing <trekingapp@gmail.com> Jul 31 08:46AM -0500 ^
     

    > Does this mean that:
    > 1) It is not possible for the AlertDialog to be made "modal" .
     
    Yes - it's not possible.
     
     
    > 2) My implementation of the AlertDialog is not modal. Solve problem
    > with AlertDialog.IsModal = true; (or something like that)
     
    No, AlertDialog is not meant to be modal, for reasons that have been
    explained in this group before by Google Engineers.
     
     
    > ..........
    > do while buttonPushedFlag = false {
    > }
     
    Definitely no, unless you like blocking your UI thread and having to force
    shut it down.
     
     
    > How do I accomplish what I need, a yes/no confirmation?
     
    Do what I told you in the the first response.
     
    Please read the docs on AlertDialogs and work with some samples. Learn to
    use an API the way it was meant to be used. Don't try to bend it to work the
    way you would like it to work, or you'll cause yourself massive headaches.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Mogimo <mogimogio@gmail.com> Jul 31 06:43AM -0700 ^
     
    Thank you for your information!!
    I will keep watching it out.
     
    By the way, if I changed LocalBinder to a static inner class, does it
    make sense ?
    That means to return back the same binder for all connections?
     
     

     

    zohar lerman <lirazohar@gmail.com> Jul 31 06:44AM -0700 ^
     
    I need to find is it 3G or WIFI connection
     
    -

     

    Mystique <joven.chiew@gmail.com> Jul 30 11:25PM -0700 ^
     
    What is this error in logcat?
    It says "can't create handler inside thread that has not called
    looper.prepare()"
    ...
     

     

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

Comments: (0)

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

    dm1973 <david050173@gmail.com> Jul 31 06:03AM -0700 ^
     
    I have had about a dozen reports (and zero on any other phone) so I
    imagine something screwy is going on but I can't image what. Several
    people have said it only happened after the last OS upgrade
     
    On Jul 31, 12:35 am, "Maps.Huge.Info (Maps API Guru)"

     

    "Maps.Huge.Info (Maps API Guru)" <coryat@gmail.com> Jul 31 06:33AM -0700 ^
     
    The Droid X hasn't had an OS upgrade yet, so perhaps your users are
    either confused (likely) or are reporting the wrong device to you.
     
    -John Coryat

     

    "{ Devdroid }" <webnet.android@gmail.com> Jul 31 03:29PM +0200 ^
     
    Hi,
     
    I tried to build test library and test app howver Eclipse complains on
    each reference I made to library classes.
    This is what I did:
     
    1. created Test Library Android project, marked it as "Library"
    (package name "test.library.lib")
    2. created Test App project (package "test.library.app") and set it to
    use Test Library
    3. Test Library got LibActivity class which simply referes to
    lib_main.xml layout
    4. I defined that activity in Test App manifest file:
     
    <activity android:name="test.library.lib.LibActivity"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.Dialog"
     
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    </activity>
     
    The problem is that Eclipse now compains "Class
    test.library.lib.LibActivity" does not exists".
    I also got same problem when I i.e. create a class in Test App that
    refers to classes
    in library. Import test.library.lib.*; does not help. SDK version is
    recent. Target sdk=3 (tried
    setting to 8, but made no difference)
     
    What am I doing wrong?

     

    cindy <ypu01720@yahoo.com> Jul 31 06:17AM -0700 ^
     
    I have a listActivity which I use ArrayAdapter insider it. When user
    scrolls the scroll ball, one listitem would be focused. How canI
    know itemlist is highlighted?
     
    It looks simple to me at first, however, it takes several days and
    still can't find answer.
     
    Thanks!
     
    April

     

    "{ Devdroid }" <webnet.android@gmail.com> Jul 31 02:27PM +0200 ^
     
    Hi,
     
    Can anyone explaing what Table 1 ("Minimum versions of SDK tools and
    plaforms on
    which you can develop library projects.")'s columns really mean. Table is here:
     
    http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject
     
    I.e.
     
    component: Android 1.5 platform, minimum version: r4 or higher
     
    but
     
    component: Android 2.2 plaftorm, minimum version: r1 (or higer).
     
    Blame my English, but I simply do not get what this minimum version
    really refer to. Thanks in advance

     

    "{ Devdroid }" <webnet.android@gmail.com> Jul 31 02:55PM +0200 ^
     
    > component: Android 1.5 platform, minimum version: r4 or higher
    > but
    > component: Android 2.2 plaftorm, minimum version: r1 (or higer).
     
    Ok, seems I figured out :) That means that to develop library
    targetted for Android 1.5,
    the SDK Platform Android 1.5, revision 4 (or higher) have to be
    installed and to develop
    for Android 2.2, one needs SDK Plaform Android 2.2, revision 1 (or
    higher) And that,
    (and also Android SDK Tools revision) can be checked by launching SDK Setup app
    and checking "Installed Packages" list.

     

    greg <sepesi@eduneer.com> Jul 31 05:56AM -0700 ^
     
    I haven't tried it, but perhaps another listener to detect the x
    coordinate of the click? (The more complicated y coordinate could be
    ignored if the image fills the row height.)
     
     

     

    Sandy <snarra26@gmail.com> Jul 31 05:47AM -0700 ^
     
    Is it possible to animate multiple views at the same time i.e. with
    each child view doing some increment of tween animation? Basically I
    want to apply some transformations to child views but not
    sequentially, they should all do the transition frame by frame. Any
    suggestions on how to achieve this ?
     
    Thanks,
    Sandy

     

    pistol <lava.dome@gmail.com> Jul 31 05:32AM -0700 ^
     
    You are right - I needn't startActivityForResult() - just
    startActivity().
    I still would get the ActivityNotFiundException though.
    ;-(
     
    I just want the Contacts 'view' opened up so the user can look at
    them. Not to pick or return (a specific) one.
     
    I works fine on all my phones and emulators.
     
    Pete
     

     

    mudit <mudit.agar@gmail.com> Jul 31 05:12AM -0700 ^
     
    I am using "javax.microedition.io.HttpConnection" class for making a
    connection and then setting the request method as 'Post'.
     

     

    tarek attia <tarek.m.attia@gmail.com> Jul 31 02:29PM +0300 ^
     
    Hi all,
     
    I have a problem in my code ,runs on the emulator very well,but on my
    T-mobile G1 doesn't time out .Code snippet is below :-
     
    URL myURL = new URL(uriBuilder.toString());
    URLConnection myConnection = myURL.openConnection();
    myConnection.setConnectTimeout(40000);
     
    so when no internet connection it doesn't time out at all !!!!!
     
    any Idea ?
    --
    tarek

     

    tarek attia <tarek.m.attia@gmail.com> Jul 31 02:56PM +0300 ^
     
    I've found the problem but I don't know the Solution .
     
    URLConnection myConnection = myURL.openConnection();
     
    when no internet it doesn't return from this method at all !!!!!!!!!!!!!!
    and dunno what should I do for that....
     
     
    --
    tarek

     

    Brad Gies <rbgies@gmail.com> Jul 31 05:02AM -0700 ^
     
    Sure... check for the internet connection before you bother building the
    URL and trying to connect :).
     
    public boolean IsConnectedToNetwork(Context context)
    {
    ConnectivityManager conManager = (ConnectivityManager)
    context.getSystemService(Context.CONNECTIVITY_SERVICE);
    NetworkInfo[] allNetworkInfo = conManager.getAllNetworkInfo();
    NetworkInfo currNetworkInfo;
    boolean anythingConnected = false;
    for (int i = 0; i < allNetworkInfo.length; i++)
    {
    currNetworkInfo = allNetworkInfo[i];
    if (currNetworkInfo.getState() == NetworkInfo.State.CONNECTED)
    anythingConnected = true;
    }
     
    return anythingConnected;
    }
     
     
     
     
     
    On 31/07/2010 4:29 AM, tarek attia wrote:
    > android-developers+unsubscribe@googlegroups.com
    > For more options, visit this group at
    > http://groups.google.com/group/android-developers?hl=en
     
    --
    Sincerely,
     
    Brad Gies
    -----------------------------------------------------------------------
    Bistro Bot - Bistro Blurb
    http://www.bgies.com
    http://www.bistroblurb.com
    http://www.ihottonight.com
    -----------------------------------------------------------------------
     
    Never doubt that a small group of thoughtful, committed people can
    change the world. Indeed. It is the only thing that ever has - Margaret Mead

     

    "Michał Karnicki" <mkarnicki@gmail.com> Jul 31 03:40AM -0700 ^
     
    Hi,
     
    I tried to createChooser the following way:
     
    Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
    intent.addCategory(Intent.CATEGORY_OPENABLE);
    intent.setType("image/*");
    Intent chooser = Intent.createChooser(intent, "Pick an image");
    startActivityForResult(chooser, 1);
     
    as well as that way:
     
    Intent intent = new Intent(Intent.ACTION_PICK);
    intent.setType(MediaStore.Images.Media.CONTENT_TYPE);
    Intent chooser = Intent.createChooser(intent, "Pick an image");
    startActivityForResult(chooser, 1);
     
    Both take me directly into Pictures gallery. How did Dropbox app
    implement chooser for picking a picture with such result (2 element
    chooser):
    "Pick a picture: //title
    - File browser
    - Photos/Gallery" ?
     
    Both results, for my app and Dropbox example, were tested on the same
    device, HTC Hero.
     
    Thanks,
    Mike

     

    Pent <tasker@dinglisch.net> Jul 31 03:12AM -0700 ^
     
    It was the obfuscation messing up this line in LicenceChecker:
     
    new Intent(ILicensingService.class.getName()),
     
    I changed this to
     
    new Intent(ILicensingService.Stub.getDescriptor()),
     
    and added a correspinding static function in ILicensingService.
     
    Since the docs recommend obfuscation, I think the googlers should
    change
    that line.
     
    Havn't finished testing yet but this has at least fixed the 'can't
    bind' problem.
     
    Pent

     

    steven <117096306@qq.com> Jul 31 03:01AM -0700 ^
     
    I want a Widget to update the number of missed calls,so I use
    ContentObserve to observer the CallLog.Calls,when there is a missed
    call,I can update the Widget in the CotentObserver.onChange(),but I
    find event if I view the missed calls in the dialer application ,the
    missed calls still are the missed calls in the CallLog.Calls.so I want
    to update the Widget the number of missed calls which are not view,and
    there are not the constants in the CallLog.Calls which display whether
    the missed calls are viewed or not. so how can I do?Any other ideas?
    Thank u...

     

    cindy <ypu01720@yahoo.com> Jul 31 02:37AM -0700 ^
     
    I have a android project. I want other applications to use my
    application. AT the same time I don't want to open my source code. So
    shared library doesn't work for me.
     
    I export my project to a jar file including res directory. When I
    include my jar file to a project, there is no problem to compile.
    However, when I run the application, I always get
    "java.lang.verifyError". has any one has done that before?
     
    I notified we have android.jar . So the method should work.
     
    Thank you for the help.
     
     
    Cindy

     

    "Happy C." <taiwanhappiness@gmail.com> Jul 31 02:08AM -0700 ^
     
    Hi Dianne,
    I have the same issue with the froyo.
     
    I use the start service UI as the following code.
     
    //CurrentActivity.java (extend from ListActivity)
    Intent intent_start_service=new
    Intent(CurrentActivity.this,MyRunningService.class);
    intent_start_service.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startService(intent_start_service);
     
    I always get the following log message after starting the service
    around 30 mins~2hours, and the service is not working anymore.
     
    07-31 15:03:00.001: INFO/ActivityManager(85): No longer want
    com.Myapplication (pid 4726): hidden #16
    07-31 15:03:00.091: WARN/ActivityManager(85): Scheduling restart of
    crashed service com.Myapplication/.MyRunningService in 5000ms
    07-31 15:03:05.131: INFO/ActivityManager(85): Start proc
    com.Myapplication for service com.Myapplication/.MyRunningService:
    pid=5045 uid=10077 gids={}
     
    The MyRunningService seems to be killed by the OOM, and the
    notification icon on the status bar with "Ongoing" is also shown to
    the user. Besides, I don't see any message from my customized log
    message in the onDestroy() of this service.
     
    //MyRunningService.java
     
    public void onDestroy()
    {
    Log.e(TAG,"Oh!!MyRunningService was killed ");
    }
    //
     
    The issues:
    1. Why MyRunningService is always killed by the OOM? Can I prevent it
    or can I detect the killing behavior by the service itself and restart
    the service automatically with some good solution?
    2. Is there any way to clean the notification icon as the service is
    been killing ?
     
    Thank you very much!
     
     

     

    Dianne Hackborn <hackbod@android.com> Jul 30 11:30PM -0700 ^
     
    Is the other input method actually enabled by the user?
     
    Also you aren't clear where you are using this, but the API only works from
    within the current input method. It does not work for applications.
     
     
    --
    Dianne Hackborn
    Android framework engineer
    hackbod@android.com
     
    Note: please don't send private questions to me, as I don't have time to
    provide private support, and so won't reply to such e-mails. All such
    questions should be posted on public forums, where I and others can see and
    answer them.

     

    Zsolt Vasvari <zvasvari@gmail.com> Jul 31 01:02AM -0700 ^
     
    JOIN the header and detail tables in single query.
     
    On Jul 31, 1:11 pm, William Ferguson <william.ferguson...@gmail.com>
    wrote:

     

    Brad Gies <rbgies@gmail.com> Jul 31 12:31AM -0700 ^
     
    Why not just use the AlertDialog the way it is meant to be used? Even
    though it's not modal, it looks modal the way it works anyway, and you
    just need code a little differently and put all logic that happens after
    the Dialog closes into the ButtonListeners.
     
    What do you need to do that you think you can't accomplish using it
    properly? For a Yes, No confirmation just setup a listener for the
    positive and negative buttons (the same listener if you want).
     
    Brad
     
     
    On 30/07/2010 7:14 PM, john brown wrote:
     
    >> --
    >> You received this message because you are subscribed to the Google
    >> Groups "Android Developers"...
     
    --
    Sincerely,
     
    Brad Gies
    -----------------------------------------------------------------------
    Bistro Bot - Bistro Blurb
    http://www.bgies.com
    http://www.bistroblurb.com
    http://www.ihottonight.com
    -----------------------------------------------------------------------
     
    Never doubt that a small group of thoughtful, committed people can
    change the world. Indeed. It is the only thing that ever has - Margaret Mead

     

    Zsolt Vasvari <zvasvari@gmail.com> Jul 31 01:00AM -0700 ^
     
    I typically do something like this, this is largely pseudo-code:
     
     
    enum SaveOperationState { CONFIRM, PERFORM, CANCEL }
     
    save(SaveOperationState state)
    {
    switch (state)
    {
    case CONFIRM:
    confirmDialog.show()
    {
    okButtonListenerMethod { save(PERFORM); }
    cancelButtonListenerMethod { save(CANCEL); }
    }
    break;
     
    case PEFROM:
    doSave();
    break;
     
    case CANCEL:
    doWhateverElse();
    break;
    }
    }
     
     
     

     

    WindowsNT <windowssnt@gmail.com> Jul 31 12:34AM -0700 ^
     
    I am trying to add a custom data field to a contact, its UID is known.
     
    I have not yet understood what exactly I should do. I saw and tried
    other code , but to no success.
     
     
    public static final String FORMALITY = "vnd.android.cursor.item/
    some_text";
    public void foo(ContentResolver cr)
    {
    ContentValues values = new ContentValues();
    values.put(ContactsContract.Data.DATA1, "xyz");
    String su = ContactsContract.Data.CONTACT_ID + "=" + uID + " AND " +
    ContactsContract.Data.MIMETYPE + "= '" + FORMALITY + "'";
    int mod =
    cr.update(ContactsContract.Data.CONTENT_URI,values,su, null);
    }
     
    and "mod" is always 0.
     
    What should I do ?
    Thanks.

     

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