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

Comments: (0)

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

    Abhishek Talwar <r.o.b.i.n.abhishek@gmail.com> Nov 30 10:18PM -0800 ^
     
    Hi guys
    I have two queries which should be really simple for you to handle :-
     
    1. All the applications are stored in workspace. I want to call one
    application from another applications button on click listener. Is
    this possible using intents?
     
    2. How can i pass data from one activity to another. I was making
    object of the activity but could not pass the data.
    I think there is something called Bundle which is to be added to
    intent.

     

    Shalini <coolcool.shalini@gmail.com> Nov 30 08:33PM -0800 ^
     
    Hi
     
    I have created an android app and i want to add review option inside
    the app. user need not to go to market ti rate the app. Can anyone
    please tell me how to do that.

     

    Kumar Bibek <coomar.101@gmail.com> Dec 01 10:34AM +0530 ^
     
    I don't think it's possible, if you are thinking that the in-app review
    should reflect the reviews on the Android market as well.
     
    Kumar Bibek
    http://techdroid.kbeanie.com
    http://www.kbeanie.com
     
     
     

     

 Topic: Array Adapter
    TreKing <trekingapp@gmail.com> Nov 30 11:01PM -0600 ^
     

    > Im assuming the array adapter or adapterView parent
    > is like a basic array that creates an array of textviews if thats what
    > you want to create with your listviews.
     
    That's the gist of it.
     
     
    > I'm just checking if thats right becuase my main questions is how to access
    > the seperate textviews in the array.
     
    Generally, you don't - at least not until you need to. When they're going to
    be drawn, you'll have this method called on your adapter:
     
    http://developer.android.com/reference/android/widget/Adapter.html#getView%28int,%20android.view.View,%20android.view.ViewGroup%29
     
    There you create or update the view as necessary.
     
     
    > i got this method from the android library getDropDownView but im not sure
    > if thats the method i want to use for this instance.
     
    Probably not.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Dianne Hackborn <hackbod@android.com> Nov 30 08:34PM -0800 ^
     
    There would be no purpose in showing an animation when your size doesn't
    change, because what is happening is the IME is opening in full-screen mode
    and completely covering your app.
     
     
    --
    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.

     

    "droidin.net" <droid@hireadroid.com> Nov 30 08:21PM -0800 ^
     
    Anyone? This is really makes my life miserable where's my Google
    knight in shiny armor?
     

     

    Milind Bhusari <milindbhusari86@gmail.com> Dec 01 09:43AM +0530 ^
     
    Hi,
    While mediaplayer playing rtsp stream if user press lock button and then
    he press menu(unlock) mediaplayer shows blank screen. I want to know how to
    capture this unlock event inside activity so that i can resume mediaplayer.

     

    Kakyoin <lgmcben@gmail.com> Nov 30 07:54PM -0800 ^
     
    Hi.
     
    I've checked the doc here:
    http://developer.android.com/guide/topics/manifest/uses-feature-element.html
     
    and found 2 most relevant features:
     
    1) android.hardware.sensor.accelerometer
     
    2) android.hardware.sensor.compass
     
    Which one do I need to specify in my manifest? Or both?
     
    Yes, I'm sure I'm using the accelerometer. But the Accelerometer and
    Magnetic Field values are also used to calculate "Direction" (which
    also means I'm using android.hardware.sensor.compass ??)
     
    Here's my code:
     
    @Override
    public void onSensorChanged(SensorEvent event) {
    int type = event.sensor.getType();
     
    switch (type) {
    case Sensor.TYPE_MAGNETIC_FIELD:
    mags = event.values.clone();
    break;
    //I'm using Accelerometer here
    case Sensor.TYPE_ACCELEROMETER:
    accels = event.values.clone();
    break;
    }
    SensorManager.getRotationMatrix(rotationMat,
    I, accels, mags);
    SensorManager.getOrientation(rotationMat, calculatedOrients);
     
    //I also get direction here, So do I need to specify
    android.hardware.sensor.compass in <uses-feature> ?
    azimuthZ = (float) Math.toDegrees(calculatedOrients[0]);
    pitchX = (float) Math.toDegrees(calculatedOrients[1]);
    rollY = -(float) Math.toDegrees(calculatedOrients[2]);
    }
     
    Thank you in advance!

     

    TreKing <trekingapp@gmail.com> Nov 30 05:26PM -0600 ^
     

    > Does anyone know how I can overcome this apparent addressability problem?
     
    You haven't provided much of any information to help you. A stack trace of
    this force close problem might be a good start.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

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

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

Comments: (0)

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

    Zsolt Vasvari <zvasvari@gmail.com> Nov 30 07:50PM -0800 ^
     
    Never mind, I got it to work.
     
    Thanks everybody for their help.
     

     

    aad <gsa.wrk@gmail.com> Nov 30 07:49PM -0800 ^
     
    Sure, will post there too.
    But. I guess, DNS is not the problem as ping works?
     

     

    TreKing <trekingapp@gmail.com> Nov 30 05:24PM -0600 ^
     

    > I am trying to connect to Google Docs from an Android application using the
    > Google Document List Data API (v 2.0) Protocol Guide.
     
    Seems a like a question better suited for a forum dedicated to that API.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    GJTorikian <gjtorikian@gmail.com> Nov 30 07:40PM -0800 ^
     
    I suggest you investigate the code of MyTracks: http://code.google.com/p/mytracks/
     
    They have a pretty well documented set of Java files that rely on
    accessing the Google Documents API.
     

     

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

    > I thought there could be a small speed improvement doing the L2 caching on
    > the internal memory but certainly can't feel any difference.
     
    Profile both methods. You're not going to be able to "feel" a difference for
    anything but the most sluggish of computations.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Dianne Hackborn <hackbod@android.com> Nov 30 07:25PM -0800 ^
     
    It varies so widely between different SD cards and different devices, that
    nothing definitive can be said. Whatever you profile on your own device may
    have speed relationships that are completely different than another device.
     
     
    --
    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.

     

    kiran <saikiran.22n@gmail.com> Nov 30 06:45PM -0800 ^
     
    .
    In the same device i run some apk which is showing google maps.
    I don't know what code they were using in the apk.
    You mean to say that should i test with wifi instead of GPS
     

     

    kiran <saikiran.22n@gmail.com> Nov 30 06:46PM -0800 ^
     
    Can we start Geocoding server through application
     

     

    Kumar Bibek <coomar.101@gmail.com> Dec 01 08:51AM +0530 ^
     
    That's not under your control
     
    On 01-Dec-2010 8:16 AM, "kiran" <saikiran.22n@gmail.com> wrote:
     
    Can we start Geocoding server through application
     
     
    --
    You received this message because you are su...

     

    Vinay <vinaykutsa@gmail.com> Nov 30 07:06PM -0800 ^
     
    Thank you Kumar.
     
    I will corss check that property of Scaletype.
     
    Actually I dont have problem with the emulator. Things work very fine
    with the different type of emulator (small, medium, large). I have
    ported android to fsl-imx51 board which inturn is connected to a 17"
    monitor. It is, with this monitor where I see that images are not
    scaled to fit the screen size. As i said earlier, android is
    considering the images present in the folder mdpi for this display.
    Which means that this display(17" monitor) is registering itself as
    "medium".
     
    Now, I wonder why is this display (17" monitor) registering as
    "medium". Further the images in the folder mdpi should have been
    scaled to fit the screen which actually is not happening.
     
    Vinay.
     
     
     

     

    tang ke <tangk@lemote.com> Dec 01 10:26AM +0800 ^
     
    hi guys.
     
    how to get the SoftInputView is shown? I get the answer is:
     
    (InputMethodManager) m =
    (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
    Log.v(TAG, "softkey view is active:" + String.valueOf(m.isActive());
     
    but it' only return false.
     
    so I see the
    framework/base/core/java/android/view/inputmethod/InputMethodManager.java,
    and add a boolean mSoftInputShown.
     
    so I change the code :
    (InputMethodManager) m =
    (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
    Log.v(TAG, "softkey view is active:" + String.valueOf(m.isSoftInputShown());
     
    and I add the debug code with InputMethodManager.java, and see the
    mSoftInputShown is changed.
     
    why m.isSoftInputShown() is only return false. maybe the process address
    problem?
     
     
    thanks in advance.

     

    "fykcee1@gmail.com" <fykcee1@gmail.com> Dec 01 10:32AM +0800 ^
     
    Curious too.
     
    2010/12/1 tang ke <tangk@lemote.com>
     
     
    --
    Regards,
     
    - cee1

     

    gjs <garyjamessilva@gmail.com> Nov 30 06:12PM -0800 ^
     
    Hi,
     
    'What' I mean is, *assuming* I can pack my integrated phone and tv app
    into a single apk, which needs touchscreen for the phone, would the
    app be excluded by the market for tv devices because they don't have
    touchscreens ?
     
    Yes until the tv sdk is released I won't know.
     
    I am hoping to avoid the potential user confusion situation for an
    integrated (tv and phone) app of having to release two separate
    versions requiring two separate downloads/installs - one for the phone
    the other for the tv. I am hoping the user can download the same apk
    to either or both the tv and the phone and it will just work, eg
    standalone or integrated based on proximity of the phone to the tv.
     
    Realistically I can accept/expect that I will have to make two
    separate apks for an integrated app, one for the phone, the other for
    the tv. It will just be a user education issue.
     
    It is probably already obvious to many, but I think there is going to
    be huge opportunities for integrated phone & tv apps, eg controllers,
    syncing etc etc...
     
    Regards
     

     

    GJTorikian <gjtorikian@gmail.com> Nov 30 05:28PM -0800 ^
     
    Is it possible to submit a doc fix through gerrit?
     
    I have git set up and the source tree(s) on my machine. However I
    can't find the location of any of the API documentation.

     

    Hal <dsheppard2k@gmail.com> Nov 30 05:24PM -0800 ^
     
    I would use a realistic approach that they can relate to and
    understand. I would use the Lego analogy
    The following would be the basic elements:
     
    Components - Building block (black boxes to do something). For
    instance
    a component that add numbers.
     
    Messaging - A way of communication between components (like in the
    real world).
    You need to pass a message (2 numbers) to the component above in order
    to get the correct answer.
     
    You may wan to check the following paper for additional information
    about
    the messaging/realistic approach:
     
     
    b) Messaging Design Pattern (MDP) and pattern implementation -
    Published in the 17th conference on Pattern Languages of Programs
    (PLoP 2010).
    https://jt.dev.java.net/files/documents/5553/150311/designPatterns.pdf
     
    c) Messaging Design Pattern and a distributed Component/Service Model
    https://jt.dev.java.net/files/documents/5553/149793/MDPdistributedModel.pdf
     
    The IDE is mainly a tool (there are many) to "build the black boxes
    and glue them together".
     
    In my opinion some of the main elements are the object oriented
    paradigm and
    messaging. It would be nice if they realize that they are able to
    build
    their cell phone applications by taking the components (lego) pieces
    and putting them together.
    I would also try to avoid "too much abstraction" as part of the
    session. .... Just a thought
     
     

     

    Brad Gies <rbgies@gmail.com> Nov 30 05:21PM -0800 ^
     
    My apps all use GPS... so I would guess that it's a check the Market
    Team put in...
     
    Good to see they haven't totally forgotten about upgrading the Market... :)
     
    Sincerely,
     
    Brad Gies
    -----------------------------------------------------------------------
    Bistro Bot - Bistro Blurb
    http://bgies.com http://nocrappyapps.com
    http://bistroblurb.com http://forcethetruth.com
    http://ihottonight.com
    -----------------------------------------------------------------------
    Everything in moderation, including abstinence (paraphrased)
     
    Every person is born with a brain... Those who use it well are the successful happy ones - Brad Gies
     
    Adversity can make or break you... It's your choice... Choose wisely - Brad Gies
     
    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
     
     
    On 30/11/2010 1:05 PM, Ken H wrote:

     

    Robert Green <rbgrn.net@gmail.com> Nov 30 03:12PM -0800 ^
     
    Has anyone had this issue resolved yet? My company has a total of 13
    published apps but I can only see 8 still with no pagination links or
    any of that. The age ratings showed up today but I still have to
    punch in package names in URLs to edit apps.
     
    Thanks

     

    cicikaka2009 <cicikaka2009@gmail.com> Dec 01 09:21AM +0800 ^
     
    The same thing here. Missed a lot of my apps...
     
     
    --
    Best regards,
    MTM
    Contacts GroupU - Group your Android Contacts
    http://droidhenapps1.appspot.com/

     

    Funksta <geoff.simons@gmail.com> Nov 30 04:30PM -0800 ^
     
    I have also noticed this same problem. When I register just the
    NETWORK_PROVIDER for updates, I never see them come in. When I try to
    use getLastKnownLocation(NETWORK), I get a null location. It seems
    like the network provider just isn't working on my phone. I have
    checked my settings and stopped/started the network location.
     
    I have a MyTouch 3G that recently was upgraded to 2.2.1
     
    Is this a bug just on my phone? Is it a 2.2.1 problem? Somebody please
    help illuminate the situation.
     
    I can register for updates with GPS fine, it's just network that has
    the problem.
     
    -Geoff
     

     

    Funksta <geoff.simons@gmail.com> Nov 30 04:52PM -0800 ^
     
    Ok, I turned on my wifi connection, and now it got the location. I
    then turned off my wifi connection and it still works. So I suspect
    that by enabling wifi, it somehow allowed the network location to get
    cached. Why doesn't it get set when I'm on 3G (or other cell based)
    network connections?
     
    -Geoff
     

     

    burton miller <burton.miller@gmail.com> Nov 30 04:41PM -0800 ^
     
    Anybody know how to get to the system font files programatically?
     
    I am building an app that needs the files to render it's own bitmaps,
    and I want access to whatever is installed on the device by default
    (in addition to some fonts that i will package with it).
     
    I know I get the ones from the SDK, but my app is already fairly
    large, and font files are heavy - plus, this doesn't help for
    localized fonts...

     

    Peter Webb <r.peter.webb@gmail.com> Nov 30 03:56PM -0800 ^
     
    It is not anything specifically to do with Microsoft:.
     
    http://en.wikipedia.org/wiki/Mojibake
     
    Double quote marks and apostrophes are frequent offenders. This is
    because ASCII contains only a single character for each, but different
    characters are used for the start and end quote marks. Short and long
    hyphens are another place where ASCII has only a single code for two
    different characters.
     
    You need to somehow specify that the HTML string is using UTF8.

     

    TreKing <trekingapp@gmail.com> Nov 30 05:39PM -0600 ^
     

    > first im trying to show all available location providers and its not
    > working
     
    What does "its not working" mean?
     
     
    > and 2nd when ever i run the it i don't get any location information from
    > the best available provider (i have my wifi and network providers on)
     
    Sing you're specifying FINE_LOCATION, the best provider is probably GPS,
    which only really works outdoors. Are you outdoors when you run this code?
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    TreKing <trekingapp@gmail.com> Nov 30 05:35PM -0600 ^
     

    > Why does this happen?
     
     
    Not using any layout parameters for the scroll view and using FILL_PARENT
    for the height of the footer might be a factor.
     
    Why don't you just do this in XML?
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    TreKing <trekingapp@gmail.com> Nov 30 05:31PM -0600 ^
     

    > i need to launch the whole stand alone application picasa from my
    > application using some intents and/or some API's
     
    If you installed the app on the emulator, you probably know the package
    name, which you can probably use to explicitly launch it.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

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

Comments: (0)

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

    ip332 <iprilepov@gmail.com> Nov 30 11:52AM -0800 ^
     
    Michael
     
    Here are some suggestions:
    1. Additional logging: mCoarseLocationListener details, WiFi status,
    cell signal status (may be in those 5% cases users don't have any
    signal?)
    2. Get details from users about phone models, running applications and
    Android versions. Recently I found interesting "feature" on Motorola
    phone: sensors do not report events unless the values have been
    changed - this is a violation of the Android API. May be somewhat
    similar happens with respect to the network location on some phones.
    3. Add "listener restart" logic after a certain timeout, i.e. if you
    didn't get onLocationChanged() after a certain time stop the listener,
    create and start it again.
    4. Get Android source code and study the LocationManager hierarchy.
    Probably the most complicated approach but I would start from here.
     
    Best regards
    Igor
     

     

    ip332 <iprilepov@gmail.com> Nov 30 11:57AM -0800 ^
     
    One more thing: check how and when do you remove listener.
     

     

    michael <michael.d.pedersen@googlemail.com> Nov 30 02:01PM -0800 ^
     
    Hi again Igor,
     
    Thanks for your excellent suggestions, I will work on it over the next
    couple of days.
     
    As another curiosity, I am experiencing a very small number of cases
    where LocationManager.getProvider(LocationManager.NETWORK_PROVIDER)
    returns null. Apparently some phones do not have this capability.
     
    Best,
    Michael.
     

     

    ip332 <iprilepov@gmail.com> Nov 30 02:53PM -0800 ^
     
    IMHO getProvider(LocationManager.NETWORK_PROVIDER) should return null
    only in two cases:
    1. AIRPLANE mode.
    2. In case of GSM phone when SIM card is missing and WiFI is disabled
    However I tested both cases on Milestone phone (Android 2.1-update1)
    and always got some not-null result :(
    The only possibility left is that user uses "hacked" phone, i.e. some
    app which disables Network provider or LocationService removed at
    all.
    Mistery :)
     

     

    Zsolt Vasvari <zvasvari@gmail.com> Nov 30 02:47PM -0800 ^
     
    Thanks!
     
    I see there is a EXTRA_DONT_KILL_APP flag.
     
    The doc says "EXTRA_DONT_KILL_APP containing boolean field to override
    the default action of restarting the application"
     
    Does anybody know what this means? Is the system telling me something
    or am I telling the system something?
     
    Thanks.
     
     

     

    "A. Elk" <lancaster.dambusters@gmail.com> Nov 30 02:46PM -0800 ^
     
    I'm not sure that the discouragement of "exit" is in any written
    guidelines. I just know that exiting applications is both discouraged
    and unnecessary.
     
    I did not say that *finish()* is disallowed. You certainly can use it
    to close an Activity that is done with its work. It's not normally
    used for the "main" Activity of an application, because it's assumed
    that this Activity is always waiting around for something to do.
     
    I can't say more without knowing more about your code. Your design
    seems to be this: You display Terms and Conditions dialog. If the user
    does not accept them, you want to go away from the application. I
    would design this so that the dialog returns to the Activity that
    called it. That Activity would then call finish(). Leave it up to the
    user to uninstall the application. You are free to leave the app
    installed and "present" (loaded but not doing anything).
     
    You shouldn't be having a problem with SharedPreferences. In Android
    unit tests, it's common for a test method to set up SharedPreferences
    with the necessary dependencies before running the actual test. If
    possible, you should put this part of the test into setUp(), so that
    it's clear that it's part of the fixture. This also isolates the
    dependency. In a perfect world, the stuff in SharedPreferences would
    be injected as a mock dependency, but in Android this is not easy to
    do. Within the "scope" of a single test method in a test case,
    however, SharedPreferences should not change.
     
    I don't rely on SharedPreferences maintaining its state across tests.
    In fact, you can run into trouble because of the subtleties of
    SharedPreferences. It's not totally clear in the documentation, but a
    single "instance" of SharedPreferences is shared by all of the
    instances of an application.
     
    In the Android 2.2 documentation, there's a tutorial on Activity
    testing. It's under the Resources Tab, under Tutorials > Activity
    Testing. The sample test package for that tutorial demonstrates how to
    test saving preferences when an application is completely stopped
    using finish() and then re-started.
     

     

    Juhani <pleafhill@gmail.com> Nov 30 02:46PM -0800 ^
     
    Thank you for the tip. Unfortunately it doesn't seem to work. Whatever
    I try I cannot get the onConfigurationChanged events. Neither in
    Application or in Activity. I have tried different combinations in
    manifefest file's configChanges but nothing I put there seems to make
    any difference.
     
    Only event that I can get my hands on when the OSK is shown/hidden is
    onLayout. That doesn't give enough information though as none of the
    sizes actually change even in my Activity's content view. I could
    solve this if I knew if the keyboard is visible or not after this
    event is triggered but I don't seem to be able to find any way to
    figure that one out either. Isn't there really a simpler API for this?
    I would imagine that this would be pretty common problem.
     
     
    Thanks!
     
     
     

     

    TreKing <trekingapp@gmail.com> Nov 30 04:37PM -0600 ^
     

    > I need to get some Image urls from a xml file on the web and load those
    > images to a grid view.
    > please explain me, how to do this.
     
    How to do what? Your one sentence covers at least four major tasks.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    ip332 <iprilepov@gmail.com> Nov 30 01:04PM -0800 ^
     
    "Geocoding" has nothing in common with GPS but it requires complete
    map DB (to search cities and streets)
    As we know Google map is stored on the web therefore you must have 3G,
    Edge or WiFi channels enabled in order to use Geocoding.
     
     

     

    TreKing <trekingapp@gmail.com> Nov 30 04:23PM -0600 ^
     

    > As we know Google map is stored on the web therefore you must have 3G, Edge
    > or WiFi channels enabled in order to use Geocoding.
     
    Also, even if you have a perfect connection, the actual geo-coding server
    has to actually be running.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

 Topic: Threads
    TreKing <trekingapp@gmail.com> Nov 30 04:30PM -0600 ^
     

    > Why is that the case, I am getting really desperate, can anybody help
    > please!?!?
     
    Log each time the variable is assigned to - maybe you're resetting it to
    false somewhere.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Phil Endecott <spam_from_google@chezphil.org> Nov 30 02:29PM -0800 ^
     
    On Nov 29, 11:15 pm, Phil Endecott <spam_from_goo...@chezphil.org>
    wrote:
     
    > I have just discovered that the Android Market limits apps to a
    > maximum size of 25 MB. Is that really true?
     
    > - Download the data when the app first runs.
     
    Well I've now found the example code here:
    http://code.google.com/p/apps-for-android/source/browse/trunk/Samples/Downloader/README.txt
    and this seems to do what I need, albeit in a rather clunky fashion.
     
    I would be interested to hear about how others have dealt with this.
     
     
    Phil.

     

    Ken H <hunt1962@gmail.com> Nov 30 01:05PM -0800 ^
     
    Yeah, what's up with that? It's enabled on some of my apps, but
    disabled on others.
     
    Ken

     

    "Maps.Huge.Info (Maps API Guru)" <coryat@gmail.com> Nov 30 01:51PM -0800 ^
     
    If you use location services, you're minimum is pre-teen. That was
    explained in the e-mail I believe.
     
    -John Coryat

     

    Ken H <hunt1962@gmail.com> Nov 30 02:28PM -0800 ^
     
    On Nov 30, 1:51 pm, "Maps.Huge.Info (Maps API Guru)"
    > If you use location services, you're minimum is pre-teen. That was
    > explained in the e-mail I believe.
     
    Actually it was in the detailed page link included in the
    email...guess I should start reading that stuff.
     
    Ken

     

    Rustam Kovhaev <rkovhaev@gmail.com> Dec 01 12:07AM +0300 ^
     
    How do I listen for GPS location changes for lets say 5 minutes?
    and if It don't get a single gps fix it removes listener(removeUpdates())
     
    --
    Regards,
    Rustam Kovhaev
    http://libertadtech.com

     

    ip332 <iprilepov@gmail.com> Nov 30 01:49PM -0800 ^
     
    Rustam
     
    Location listener doesn't have timing constraint.
    Therefore you need to enable listener as usual and create an
    asynchronous thread or a timer or something else to check GPS status
    after a certain time.
    Below is a simple code which does checks GPS fix after 60 seconds.
     
    Best
    Igor
     
    // code fragment starts:
    private Handler mHandler = new Handler();
     
    private void Start() {
    // invoke mGPScheckTask handler (see below) after 60 seconds
    interval
    mHandler.postDelayed(mGPScheckTask, 60 * 1000);
    }
     
    private void Stop() {
    mHandler.removeCallbacks(mGPScheckTask);
    }
     
    private Runnable mGPScheckTask = new Runnable() {
    public void run() {
    if( GPSfix )
    // do something
    else
    // do something else
    // remove GPS listener here
    };
     
     

     

    Rustam Kovhaev <rkovhaev@gmail.com> Dec 01 01:10AM +0300 ^
     
    understood, thanks
     
    2010/12/1 ip332 <iprilepov@gmail.com>
     
     
    --
    Regards,
    Rustam Kovhaev
    http://libertadtech.com

     

    A Curious Developer <imdb666@yahoo.com> Nov 30 01:43PM -0800 ^
     
    Has anyone used this for testing their applications? (I know it isn't
    a phone, but my application does not need phone features.)
     
    Over the past few months I have been hoping to find *any* reasonably-
    priced platform to test on - this is one of the few affordable ones I
    have seen.

     

    Ken H <hunt1962@gmail.com> Nov 30 01:38PM -0800 ^
     
    > anyone out there got any ideas?
     
    Use your other sensors like the accelerometer...shake it awake.
     
    Ken

     

    Kostya Vasilyev <kmansoft@gmail.com> Nov 30 10:04PM +0300 ^
     
    This works for my own package, you can try for others:
     
    try {
    packageInfo = packageManager.getPackageInfo(packageName,
    PackageManager.GET_META_DATA);
     
    int versionCode = *packageInfo.versionCode*;
    } catch (NameNotFoundException x) {
    }
     
    -- Kostya
     
    30.11.2010 22:01, Nathan ?????:
     
    --
    Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

     

    Nathan <crittermap@crittermap.com> Nov 30 12:50PM -0800 ^
     
    Thanks to both.
     
    The PackageInfo was what I needed. I was looking at ApplicationInfo by
    mistake.
     
    The discus information, though, wasn't what I was looking for. ;)

     

    Dianne Hackborn <hackbod@android.com> Nov 30 12:41PM -0800 ^
     
    >> which allows the user to change the screen brightness. I implemented
    >> it by using the Settings.System class (putInt / getInt methods).
     
    > http://tinyurl.com/3486vs3
     
    Actually that's a funny search. The top link is using private APIs, which
    don't work today, and only sometimes worked in the past:
    http://www.tutorialforandroid.com/2009/01/changing-screen-brightness.html
     
    The correct approach can be found farther down:
    http://androidforums.com/application-development/10993-change-brightness-donut.html
     
    This person however is complaining that it doesn't work... but it certainly
    does on the base platform.
     
    --
    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.

     

    Dianne Hackborn <hackbod@android.com> Nov 30 12:36PM -0800 ^
     
    If you don't know why a remote service would be useful to you, don't use it.
    You'll know when you need one, because your local service won't work.
    (Basically if you get into a situation where another process needs to bind
    to your service.)
     
     
    --
    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.

     

    Eyvind Almqvist <eyvind@mobile-visuals.com> Nov 30 11:25AM -0800 ^
     
    The only object I create in onCreate() is the view. I do this with
     
    mView = (MView) findViewById(R.id.mid);
     
    I found one thing with the drawing loop and the setRunning() method
    that maybe causes the problem. I can't test on my Samsung device,
    since I can't reproduce the problem there, but I will send a new
    version of the app to SonyEricsson tomorrow so they can test it. Hope
    it works out this time....
     

     

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

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

Comments: (0)

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

    Nathan <crittermap@crittermap.com> Nov 30 11:01AM -0800 ^
     
    This is probably obvious to the rest of you, but I'm getting a bit
    lost.
     
    I've been using the PackageManager to check whether another app is
    installed.
     
    Can I use it to check the version number of that other app?
     
    Thanks for any tips.
     
    Nathan

     

    Kevin Anthony <kevin.s.anthony@gmail.com> Nov 30 02:05PM -0500 ^
     
    discus is just a fancy way of saying disc
     
    i wonder about discden
     
    Kevin
     
     
    --
    Thanks
    Kevin Anthony
    www.NoSideRacing.com
    732.793.3473

     

    Tommy <droidap@gmail.com> Nov 30 09:57AM -0800 ^
     
    Hi everyone.
     
    I have a relative layout that I want to change the background
    according to a set of features. For some reason when I try to change
    the background image I get a null pointer exception. Currently in the
    onStart method I call a function the handles valedating then determins
    what background image should show. The code for the image change I
    have is below:
     
    RelativeLayout background =
    (RelativeLayout)findViewById(R.id.currentWeatherBackground);
    background.setBackgroundResource(R.drawable.blue_background);
     
     
    blue_background is in my resource folder and I can use it just fine if
    I type it into the XML.
     
    Could anyone please shed some light on what I am doing wrong?
     
    Thank you for your time and help,
     
    Tommy

     

    Kostya Vasilyev <kmansoft@gmail.com> Nov 30 09:33PM +0300 ^
     
    Post your logcat output and the part of your layout xml file where you
    declare the RelativeLayout.
     
    I would guess that you either didn't assign an android:id to the
    relative layout, or using the wrong id with findViewById. Because of
    this, the value of "background" is null.
     
    -- Kostya
     
    30.11.2010 20:57, Tommy пишет:
     
    --
    Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

     

    "Tommy" <droidap@gmail.com> Nov 30 02:07PM -0500 ^
     
    Ah, I see where my problem is. The layout im calling is actually inside a viewflipper so it wasn't being seen. I fixed it. Thanks you!
     
    -----Original Message-----
    From: android-developers@googlegroups.com [mailto:android-developers@googlegroups.com] On Behalf Of Kostya Vasilyev
    Sent: Tuesday, November 30, 2010 1:34 PM
    To: android-developers@googlegroups.com
    Subject: Re: [android-developers] Change Relative layout background dynamically Issues
     
    Post your logcat output and the part of your layout xml file where you declare the RelativeLayout.
     
    I would guess that you either didn't assign an android:id to the relative layout, or using the wrong id with findViewById. Because of this, the value of "background" is null.
     
    -- Kostya
     
    30.11.2010 20:57, Tommy пишет:
     
    --
    Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
     
    --
    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

     

    cindy <ypu01720@yahoo.com> Nov 30 10:52AM -0800 ^
     
    Where could I find the source code of UI component of Android, such as
    button, spinner, progressbar, etc?
     
    Thanks!
     
    Cindy

     

    TreKing <trekingapp@gmail.com> Nov 30 12:58PM -0600 ^
     

    > Where could I find the source code of UI component of Android, such as
    > button, spinner, progressbar, etc?
     
    http://source.android.com/
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    TreKing <trekingapp@gmail.com> Nov 30 11:52AM -0600 ^
     

    > am using the following code to get the preview for my camera , but my app
    > getting force closed, dont know y, can anyone help me on this.
     
    A stack trace would help.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    TreKing <trekingapp@gmail.com> Nov 30 12:01PM -0600 ^
     

    > How do I install the Android USB driver if the "Hardware Update Wizard"
    > doesn't start?
     
    When you have something connected via USB, it shows up in the notification
    area of the task bar. Click that to bring up a "Safely Remove Hardware"
    window.
    In there should list your Android device. Select that and "Properties" to
    open a new window and select the "Driver" tab. Select "Update Driver...".
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Isaac Wagner <isaacewagner@gmail.com> Nov 30 01:01PM -0500 ^
     
    I've been reading Mark Murphy's books about Android programming and I
    am having trouble understanding some things about services. As I
    understand it there are "local" and "remote" services that I can
    create. However, what I don't understand are the use cases for when
    you would use one over the other. Here's basically what I need to do
    and I'm not sure about which service type to use. I want to create an
    application and a homescreen widget that both get data from a service.
    I had in mind a service where the application and the widget could
    register a callback with the service to get data updates. Is that
    best done by a remote or a local service, or does it matter? Can
    either one be used? Any hints or tips would be great. Oh, if it
    matters the app, widget, and service will be in a single apk. Thanks.

     

    "Tommy" <droidap@gmail.com> Nov 30 01:06PM -0500 ^
     
    I think a local service would work fine. Basically create another class in
    your android project, extend Service, do your stuff, then send a broadcast
    from your service. In your activity you will want to register a broadcast
    receiver that listens for that broadcast from the service. In the onReceive
    event of the Broadcast Receiver execute whatever code you need to once the
    service responds. You can set the service up to send different broadcasts
    for different actions.
     
    -----Original Message-----
    From: android-developers@googlegroups.com
    [mailto:android-developers@googlegroups.com] On Behalf Of Isaac Wagner
    Sent: Tuesday, November 30, 2010 1:01 PM
    To: android-developers@googlegroups.com
    Subject: [android-developers] Question about services
     
    I've been reading Mark Murphy's books about Android programming and I am
    having trouble understanding some things about services. As I understand it
    there are "local" and "remote" services that I can create. However, what I
    don't understand are the use cases for when you would use one over the
    other. Here's basically what I need to do and I'm not sure about which
    service type to use. I want to create an application and a homescreen
    widget that both get data from a service.
    I had in mind a service where the application and the widget could register
    a callback with the service to get data updates. Is that best done by a
    remote or a local service, or does it matter? Can either one be used? Any
    hints or tips would be great. Oh, if it matters the app, widget, and
    service will be in a single apk. 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

     

    TreKing <trekingapp@gmail.com> Nov 30 11:57AM -0600 ^
     

    > I am trying to implement a functionality in one of my application
    > which allows the user to change the screen brightness. I implemented
    > it by using the Settings.System class (putInt / getInt methods).
     
    http://tinyurl.com/3486vs3
     
    However, I don't find any changes in my screen's brightness. I have
    > given appropriate permissions to my app (WRITE_SETTINGS), but the log
    > details shows the following warning:
     
    > WARN/BackupManagerService : data changed but no participant.
     
    The log shows a lot of stuff. I highly doubt a backup manager warning has
    anything to do with your brightness not working.
     
     
    > Also do kindly let me know as to would I be able to see the brightness
    > changes on the emulator?
     
    Seems like something "emulatable".
     
     
    > Any help related to this as well as the BackupManagerService class would be
    > a great help.
     
    I love how you just threw that in there at the end.
    http://developer.android.com/reference/android/app/backup/BackupManager.html
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    TreKing <trekingapp@gmail.com> Nov 30 11:50AM -0600 ^
     

    > Here are all the classes i made along with manifest
     
     
    I think you'll find that most people do not have the time or patience to
    parse through foreign, unformatted code.
     
    Someone please help me out..
     
    If you want help, please narrow the scope of your problem down, better
    explain what you're trying to do and what's not working, and post s SHORT
    snippet of code related to what you're doing.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    warunsl <warunsl@gmail.com> Nov 30 09:47AM -0800 ^
     
    Hello everyone
     
    I see it documented that for tab widget the layout for the tabs should
    have the <TabHost> as the root. But i have seen many applications (eg
    Facebook app) where tabs are below a edit text widget. I am not sure
    how to achieve that. If i do something like below, i just see the
    EditText widget and the tabs disappear. Any help is appreciated.
     
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
    android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <EditText xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="wassup">
    </EditText>
    <TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="100sp">
    <LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="5dp">
    <TabWidget
    android:id="@android:id/tabs"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" />
    <FrameLayout
    android:id="@android:id/tabcontent"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="5dp" />
    </LinearLayout>
    </TabHost>
    </LinearLayout>
     
     
    Thanks

     

    Kelo <mcacace@gmail.com> Nov 30 09:45AM -0800 ^
     
    Hi,
    I'm just starting on Android and trying to launch Hello Android,
    this error comes up:
     
    !ENTRY com.android.ide.eclipse.adt 4 0 2010-11-30 13:05:15.914
    !MESSAGE No command output when running: 'am start -n
    com.example.helloandroid/com.example.helloandroid.HelloAndroid -a
    android.intent.action.MAIN -c android.intent.category.LAUNCHER' on
    device emulator-5554
    !STACK 0
    com.android.ddmlib.ShellCommandUnresponsiveException
    at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:
    408)
    at com.android.ddmlib.Device.executeShellCommand(Device.java:277)
    at
    com.android.ide.eclipse.adt.internal.launch.ActivityLaunchAction.doLaunchAction(Unknown
    Source)
    at
    com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launchApp(Unknown
    Source)
    at
    com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.clientChanged(Unknown
    Source)
    at
    com.android.ddmlib.AndroidDebugBridge.clientChanged(AndroidDebugBridge.java:
    861)
    at com.android.ddmlib.Device.update(Device.java:399)
    at com.android.ddmlib.Client.update(Client.java:834)
    at com.android.ddmlib.HandleAppName.handleAPNM(HandleAppName.java:90)
    at com.android.ddmlib.HandleAppName.handleChunk(HandleAppName.java:
    64)
    at com.android.ddmlib.MonitorThread.callHandler(MonitorThread.java:
    414)
    at
    com.android.ddmlib.MonitorThread.processClientActivity(MonitorThread.java:
    322)
    at com.android.ddmlib.MonitorThread.run(MonitorThread.java:263)
     
    with:
    XP SP2
    Eclipse Helios
    JDK 1.6.0_22
    Android SDK r07
    ADT plugin 0.9.9
     
    Please, I would like someone replies my post.
    Thanks in advance.

     

    Dirk <dirkbade@googlemail.com> Nov 30 09:34AM -0800 ^
     
    Hi,
    I think Androids should dream of rule engines !
     
    I am working on global event distribution and event processing at the
    network's edge (e.g. a mobile phone) and I recently ported several
    existing middlewares to Android. One of these is "Esper", a complex
    event processing runtime. I do not know that much about rule engines,
    but a colleague of mine recently evaluated the suitability of complex
    event processing engines and rule engines for protocol verifications.
    Therefore, I assume there are scenarios in which both approaches are
    reasonably suited. In my case, I use a complex event processing engine
    to deal with the multitude of events coming from an Android device's
    physical (gps, acceleration, etc.) as well as virtual sensors
    (application specific sensors). The same could be achieved with rule
    engines as well. This is my reason 1 why Androids should dream of rule
    engines.
     
    Reason 2 is based on my efforts for porting "Jadex Active Components"
    to Android. Using Jadex one may modularize applications into self-
    contained "agents", "processes", etc. A very nice paradigm. Until now,
    I only managed to port the so called "Jadex MicroAgents" as well as
    "BPMN-based Agents", but Jadex also supports the development of
    intelligent "BDI Agents" (BDI = Belief, Desire, Intention), which are
    able to reason about the world and what they should do therein. Such a
    reasoning process is in most agent systems based on a rule engine (in
    case of Jadex it is "Jadex Rules"), which sorts out what plan an agent
    should follow to reach its goals. Unfortunately, this has not been
    ported yet. Therefore, no BDI agents on Android, which is really a
    pitty, as agent-oriented software engineering offers a multitude of
    nice concepts for building distributed applications ... and mobile
    devices are right on the way to play an active role in distributed
    systems.
     
    To cut a long story short: it's time that more heavy-weight components
    (like rule engines) are finally supported by mobile platforms, because
    this allows developers to benefit from established desktop concepts
    even in the mobile world.
     
    Cheers,
    Dirk
     
    ps: sorry for being verbose
     
     
     

     

    Yahel <kayenko@gmail.com> Nov 30 09:33AM -0800 ^
     
    Ok that's weird.
    If you have nothing in your onStart and your onResume sets the loop as
    running for your drawing loop, then that is where you should have a
    look.
     
    My guess would be that the restarting of your looping via setRunning
    doesn't do what you think and that it is just not restarting at all so
    that you don't have any drawing going on.
     
    Or maybe you are creating objects in your onCreate method that get
    destroyed when your apps looses focus and that are never recreated
    again because onCreate is only called the very first time you launch
    your activity.
     
    First thing would be to Log.e("drawing","I'm drawing") in your thread
    drawing loop.
     
    Yahel
     
    On Nov 30, 10:50 am, Eyvind Almqvist <eyv...@mobile-visuals.com>
    wrote:

     

    Frank Weiss <feweiss@gmail.com> Nov 30 09:27AM -0800 ^
     

    > I want my application to not having the option of exiting or switching
    > to other application.... Is it possible in web application. If yes
    > how??
     
    The Android SDK is speciifaclly designed to NOT allow such behavior. I think
    the only way to do that is by changing the device's firmware.

     

    TreKing <trekingapp@gmail.com> Nov 30 10:36AM -0600 ^
     

    > Parcelable is not such a headache once you get the boilerplate code out of
    > the way.
     
    It's not only the repetitive "CREATOR" stuff. I found that if I send a
    custom parcelable to a Service which was to start after my main Activity had
    gone away, loading my object would fail (class loader not available or
    something ... there was a thread or two about it a while ago). This was my
    major motivation for ditching parcelable.
     
    Parcelable is an advantage if you need to pass arrays of such objects
    > around. You can't attach arrays of Bundles to intents without your own
    > mechanisms.
     
    Sure you can. Bundle extends parcelable, so you can attach an array of
    parcelables that are Bundles.
    Or, better yet, you can pass an ArrayList of Bundles with
    putParcelableArrayListExtra(), which takes advantage of the generics
    interface.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Kumar Bibek <coomar.101@gmail.com> Nov 30 08:53AM -0800 ^
     
    1. Have you taken care of "Adding multiple screen size support"?
    2. Do you use Copy protection?'
    3. Do you filter your apps by country? (Least possible)
     
     
     

     

    Kostya Vasilyev <kmansoft@gmail.com> Nov 30 03:39PM +0300 ^
     
    Not sure what "invoked by default" is.
     
    It sure seems like at the time your code runs, DNS is not properly set
    up yet.
     
    Since you are customizing the platform, this group is a better match:
     
    http://groups.google.com/group/android-platform
     
    -- Kostya
     
    30.11.2010 15:05, aad пишет:
     
    --
    Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

     

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