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

Comments: (0)

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

    Nando Scheidecker <nando.android@gmail.com> May 31 11:48PM -0600 ^
     
    Are there any examples out there to best work with web service?
     
    I know that there is a port to SOAP stuff in the kSoap implementation.
     
    However, kSoap might be too heavy for me.
     
    Instead I was hopping for the device to be able to talk to RESTful services
    instead.
     
    Is there any good example on a REST client?
     
    Thanks.

     

    rollbak <rollbak@gmail.com> May 31 09:23PM -0700 ^
     
    Hello,
     
    I have recently updated my Motorola Milestone to 2.1 (the official
    upgrade) and i noticed that hierarchyviewer doesn't work anymore (it
    can't start the server).
     
    Someone knows a workaround or how to fix this issue? hierarchyviewer
    was working ok with android 2.0.
     
    Thanks.
     
    Lucas

     

    Romain Guy <romainguy@android.com> May 31 10:43PM -0700 ^
     
    HieararchyViewer is not meant to run on user builds. If it worked
    before, there was an issue and the build was not properly configured.
    This limitation exist for security reasons as HierarchyViewer could
    otherwise give you access to private user data.
     
     
    --
    Romain Guy
    Android framework engineer
    romainguy@android.com
     
    Note: please don't send private questions to me, as I don't have time
    to provide private support.  All such questions should be posted on
    public forums, where I and others can see and answer them

     

    rollbak <rollbak@gmail.com> May 31 10:51PM -0700 ^
     
    I undestand that, but i mean it is not even working with my own on dev
    apps (even with debug enabled in manifest).
     

     

    Romain Guy <romainguy@android.com> May 31 10:53PM -0700 ^
     
    It's not enough unfortunately, the whole device has to use a non-secure build.
     
     
    --
    Romain Guy
    Android framework engineer
    romainguy@android.com
     
    Note: please don't send private questions to me, as I don't have time
    to provide private support.  All such questions should be posted on
    public forums, where I and others can see and answer them

     

    Nando Scheidecker <nando.android@gmail.com> May 31 11:45PM -0600 ^
     
    Hello,
     
    How can I get and connect to the internet Database of the device so that I
    can:
     
    - Obtain the phone number and other carrier information associated with the
    device?
    - Obtain email settings of the device?
     
    Is it possible to change the email settings via an app on the device?
     
    Thanks.

     

    Archana <archana.14nair@gmail.com> May 31 10:00PM -0700 ^
     
    Hi ,thanks for your reply,can you tell me how can i check wedr my app
    is running in
    background.Now I am checking by long press Home key.Is their any other
    way?
    If we give this.finish(),our current activity only getting finish,but
    stil our app is running in background.Right?
    But I cant see my app in running process.
     
     

     

    mike <hasitharandika@gmail.com> May 31 09:13PM -0700 ^
     
    hi Donal,
     
    this is what i have done for sms
     
    protected void listeneNativeInbox() {
    String url = "content://sms/";
    Uri uri = Uri.parse(url);
     

    context.getContentResolver().registerContentObserver(CallLog.Calls.CONTENT_URI,
    true,
    new MyInboxListener(handler));
     
    Uri Sms = Uri.parse("content://sms/inbox");
    Cursor c = context.getContentResolver().query(Sms, null, null, null,
    null);
    }
     
    class MyInboxListener extends ContentObserver {
     
    public MyInboxListener(Handler handler) {
    super(handler);
    // TODO Auto-generated constructor stub
    }
     
    @Override
    public boolean deliverSelfNotifications() {
    // TODO Auto-generated method stub
    return false;
    }
     
    public void onChange(boolean selfChange) {
    // TODO Auto-generated method stub
    Log.v("SMS", "Notification on SMS observer");
     
    Message msg = new Message();
    msg.obj = "xxxxxxxxxx";
     
    handler.sendMessage(msg);
     
    Uri uriSMSURI = Uri.parse("content://sms/");
    Cursor cur = getContentResolver().query(uriSMSURI, null, null,
    null, null);
    cur.moveToNext();
    String protocol = cur.getString(cur.getColumnIndex("protocol"));
    if (protocol == null) {
    Log.d("SMS", "SMS SEND");
    int threadId = cur.getInt(cur.getColumnIndex("thread_id"));
    Log.d("SMS", "SMS SEND ID = " + threadId);
    getContentResolver().delete(
    Uri.parse("content://sms/conversations/" + threadId),
    null, null);
     
    } else {
    Log.d("SMS", "SMS RECIEVE");
    int threadIdIn = cur.getInt(cur.getColumnIndex("thread_id"));
    getContentResolver().delete(
    Uri.parse("content://sms/conversations/" + threadIdIn),
    null, null);
    }
    }
    }
     
    if i'm going to listen for CallLog changes what are the parameters for
    onChange method??
     
    regards,
    Randika

     

    Jiang <websurf@yahoo.cn> May 31 07:04PM -0700 ^
     
    Good, Thanks!!!
     
     
    --- 10年5月31日,周一, Kostya Vasilyev <kmansoft@gmail.com> 写道:
     
    发件人: Kostya Vasilyev <kmansoft@gmail.com>
    主题: Re: [android-developers] How to decrease the space between checkbox?
    收件人: android-developers@googlegroups.com
    日期: 2010年5月31日,周一,下午10:08
     
     
     
     
     


    Actually, looking at the sdk sources, the top/bottom margins are in the
    drawable (the checkbox images).
     
     
     
    I ran into the same problems with spinners, the fix was to create my
    own background images with smaller transparent margins.
     
     
     
    http://kmansoft.wordpress.com/2010/04/19/compact-spinner-widgets/
     
     
     
    -- Kostya
     
     
     
    31.05.2010 17:25, TreKing пишет:
     
    On Sun, May 30, 2010 at 10:18 PM, Jiang <websurf@yahoo.cn>
    wrote:
     
    The
    space between checkboxes in below UI layout is too much, how to
    decrease it?


     
    Try adjusting the various padding parameters on them.
     

     
    -------------------------------------------------------------------------------------------------
     
    TreKing - Chicago transit tracking app for Android-powered devices
     
    http://sites.google.com/site/rezmobileapps/treking
     
    --
     
    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
     
     
     
     
     
    --
    Kostya Vasilev -- 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

     

    Andy Savage <andy@bluewire.net.nz> Jun 01 09:30AM +0800 ^
     
    In my example I am using SIP, so the SDP information is actually exchanged
    this way.
     
    The RTSP is simply for receiving as a hack to Android's built in (arbitrary)
    limitations. So the idea is to take the SDP for receiving and wrap it over
    RTSP.
     
    --
    "The greatest challenge to any thinker is stating the problem in a way that
    will allow a solution"
    - Bertrand Russell
     
    Andy Savage
    Cell Phone: +852 936 34341
    Skype ID: andy_savage
    Linked In: http://www.linkedin.com/in/andysavage
     
     

     

    Bob Kerns <rwk@acm.org> May 31 05:27PM -0700 ^
     
    Just a thought ... does it happen if you are holding a wake lock or
    partial wake lock?
     

     

    Moto <medicalsounds@gmail.com> May 31 02:56PM -0700 ^
     
    I've got the whole project ready to be a library but the link you
    referenced directs to set a check mark that it is a library
    project... I can't find this library check, it's nowhere to be
    found.. :(
     
    I'm working on a windows machine using Eclipse
     
    Next, set the project's Properties to indicate that it is a library
    project:
     
    1. In the Package Explorer, right-click the library project and
    select Properties.
    2. In the Properties window, select the "Android" properties group
    at left and locate the Library properties at right.
    3. Select the "is Library" checkbox and click Apply.
    4. Click OK to close the Properties window.
     
    Thanks!
    -Moto
     

     

    Moto <medicalsounds@gmail.com> May 31 03:16PM -0700 ^
     
    Never mind! Did an update of the tools via Eclipse... Now I have that
    option :)
     

     

    Moto <medicalsounds@gmail.com> May 31 05:05PM -0700 ^
     
    As far as I got it seems that only the R.java is shared by the
    library... I was not able to import any common java classes I've put
    on my library. Am I doing something wrong?
     
    -Moto
     

     

    John Gaby <jgaby@gabysoft.com> May 31 04:58PM -0700 ^
     
    I am trying to figure out how to make HTTP get requests. The
    following is what I have so far:
     
    HttpGet get = new HttpGet("http://www.microsoft.com");
    HttpClient client = new DefaultHttpClient();
    HttpResponse response;
     
    try
    {
    response = client.execute(get);
     
    HttpEntity entity = response.getEntity();
     
    InputStream stream = entity.getContent();
     
    byte[] b = new byte[1000];
     
    stream.read(b);
    }
    catch (ClientProtocolException e)
    {
    }
    catch (IOException e)
    {
    }
     
    This works fine, but what I really need is a way to read the data
    asynchronously. Is there some way to set up the transfer and specify
    a call back function which is called as the bytes come in, or do I
    need to create a thread to do this?
     
    Thanks.

     

    Chi Kit Leung <michaelchikit@gmail.com> Jun 01 09:42AM +1000 ^
     
    Yes, I agree there are many stuff they brought after Google I/O this year.
    But there are still a lot of areas they need to improve, such as the payment
    processor.
    A lot of developers outside US cannot put their priced apps on Android
    market
     
     
    --
    Regards,
    Michael Leung
    http://www.itblogs.info
    http://www.michaelleung.info

     

    "Paul Burke (iPaul Pro)" <mr.paulburke@gmail.com> May 31 03:51PM -0700 ^
     
    Please be aware that http://android-themes.com is pirating paid apps.
    I already found both of mine on there.
     
    Thought some of you would like to know.
     
    Paul (iPaul Pro)
    Finer Mobile

     

    Andrew Brampton <brampton@gmail.com> Jun 01 12:06AM +0100 ^
     
    I've just sent a complaint to http://www.justhost.com/submit-ticket
    which I believe is their webhost. Perhaps others who have their apps
    illegally listed on there should do the same.
     
    Andrew
     

     

    skink <pskink@gmail.com> May 31 03:41PM -0700 ^
     
    TreKing wrote:
     
    > The OP wants to know if there is a way to programmatically do the equivalent
    > of going through those steps.
     
    > This has nothing to do with an app's own preferences.
     
    oh yes, my apologies, i was to quick reading just the first paragraph
     
    pskink

     

    Krzysztof Wolny <k.wolny@gmail.com> May 31 03:03PM -0700 ^
     
    It's possible, via Intent and ACTION_VIEW constant. But I guess it
    only fires the same dialog like in Astro file manager, and nothing is
    set in the installerPackageName field(?), because Ypu don't deal with
    PackageManager direclty. Maybe it;s possible to pass some extra data
    in Intent? No idea. I'd like to see source from Android Market:)
     

     

    Christophe <christophe.lebesnerais@gmail.com> May 31 02:52PM -0700 ^
     
    I didn't know this methods exists :)
    This is exactly what I needed, with that I should'nt have to re-
    inflate the layout each time getView is called.
     
    thx
     

     

    Brad Gies <rbgies@gmail.com> May 31 02:54PM -0700 ^
     
    Hah... the code I was going to post has a switch statement to get
    different layouts... but I thought you were only using one layout, so I
    didn't want to confuse the issue.
     
    Lately, I have been using the below global (to the current Activity)
    type variables to keep track of which view I am showing, but this
    activity only show one type of layout at a time.
     
    private enum currentLayoutTypes {MY_GROUPS, FIND_GROUPS,
    GROUP_MEMBERS};
    private currentLayoutTypes currentLayout;
     
    I found when I was switching the view depending on item type that just
    setting the tag on the convertView when it was created and checking it
    to determine if it was the correct type worked well.
     
    Something like below in the getView, and using different functions for
    each type of view to attach text and listeners :
     
    if ((convertView == null) || ( (String)
    convertView.getTag() != "what I want"))
    {
    LayoutInflater inflater =
    Groups.this.getLayoutInflater();
    switch (currentLayout)
    {
    case MY_GROUPS : { convertView =
    inflater.inflate(R.layout.mygroupitem, null);
    convertView.setTag("MY_GROUPS"); break;}
    case FIND_GROUPS : convertView =
    inflater.inflate(R.layout.findgroupitem, null);
    convertView.setTag("FIND_GROUPS"); break;}
    case GROUP_MEMBERS : convertView =
    inflater.inflate(R.layout.groupmember, null);
    convertView.setTag("GROUP_MEMBERS"); break;}
    }
     
     
    }
    switch (currentLayout)
    {
    case MY_GROUPS : convertView =
    FillMyGroupsRow(convertView, position);
    case FIND_GROUPS : convertView =
    FillFindGroupsRow(convertView, position);
    case GROUP_MEMBERS : convertView =
    FillGroupMemberRow(convertView, position);
    }
     
     
     
     
     
     
     
     
     
    On 31/05/2010 1:51 PM, Christophe wrote:
    >>> -----------------------------------------------------------------------
     
    >>> 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
     
    --
    Sincerely,
     
    Brad Gies
    -----------------------------------------------------------------------
    Bistro Bot - Bistro Blurb
    http://www.bgies.com
    http://www.bistroblurb.com
    http://www.bistrobot.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

     

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

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

Comments: (0)

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

    Krzysztof Wolny <k.wolny@gmail.com> May 31 11:43AM -0700 ^
     
    Thanks Mark.
     
    I last question I have is Android Market updates themselves in
    background? How new button can appear in dialogs without any (visible)
    update.
     

     

    Mark Carter <mjc1904@googlemail.com> May 31 02:10PM -0700 ^
     
    There was some kind of Market app update a couple of weeks ago which I
    think happened silently.
     
    What if a third party app triggers the PackageManager to install
    another third party app? I think that's possible isn't it? In so,
    wouldn't the getInstallerPackageName() be non-null?
     

     

    Christophe <christophe.lebesnerais@gmail.com> May 31 12:58PM -0700 ^
     
    hello,
     
    I have written a custom ArrayAdapter for a ListActivity :
     
    private class StepItemAdapter extends ArrayAdapter<Step> {
    public StepItemAdapter(Context context, List<Step> objects) {
    super(context, R.layout.step_list_item, R.id.list_item_sb,
    objects);
    }
     
    @Override
    public View getView(final int pos, View convertView, ViewGroup
    parent) {
    View v = super.getView(pos, convertView, parent); // will crash
    here
     
    // etc ...
    }
    }
     
    On the "onCreate" method of the activity I tell the activity to use
    this adapter with a list of object I get from somewhere else
    ("t.getSteps()") :
     
    adapter = new StepItemAdapter(this, t.getSteps());
    this.setListAdapter(adapter);
     
    Everything works fine and the activity is displayed. But if I add a
    new object to the list and tell the adapter to refresh the view I've
    got an error :
     
    t.getSteps().add(3, new Step());
    adapter.notifyDataSetChanged();
     
    The "getView" method of my adapter is called, which is ok since the
    list view need to be updated, but I've got an exception on the call to
    "super.getView(pos, convertView, parent)".
     
    The stack trace :
     
    java.lang.NullPointerException
    at
    android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:
    355)
    at android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
    at pkr.tm.activities.EditTemplateActivity
    $StepItemAdapter.getView(EditTemplateActivity.java:145)
    at
    android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:
    220)
    at android.widget.AbsListView.obtainView(AbsListView.java:1294)
    at android.widget.ListView.makeAndAddView(ListView.java:1727)
    at android.widget.ListView.fillDown(ListView.java:652)
    at android.widget.ListView.fillSpecific(ListView.java:1284)
    at android.widget.ListView.layoutChildren(ListView.java:1558)
    at android.widget.AbsListView.onLayout(AbsListView.java:1147)
    ...
     
    Do you guy have any ideas of what is going on ??

     

    Brad Gies <rbgies@gmail.com> May 31 01:07PM -0700 ^
     
    You need something like this in the getView to create the view if it
    hasn't been created already.:
     
    if (convertView == null)
    {
    LayoutInflater inflater =
    Groups.this.getLayoutInflater();
    convertView = inflater.inflate(R.layout.groupitem,
    null);
    }
     
     
     
    On 31/05/2010 12:58 PM, Christophe wrote:
    > at android.widget.AbsListView.onLayout(AbsListView.java:1147)
    > ...
     
    > Do you guy have any ideas of what is going on ??
     
    --
    Sincerely,
     
    Brad Gies
    -----------------------------------------------------------------------
    Bistro Bot - Bistro Blurb
    http://www.bgies.com
    http://www.bistroblurb.com
    http://www.bistrobot.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

     

    Christophe <christophe.lebesnerais@gmail.com> May 31 01:36PM -0700 ^
     
    hello Brad, thanks for your reply.
     
    Isn't the call to super.getView(...) suppose to do this ?? I already
    told the adapter which layout to use (see the constructor of my
    adpater on my first post), so it should know which one to inflate.
     
    Anyways I tried something similar to what you suggested :
     
    if (convertView == null) {
    convertView =
    LayoutInflater.from(getApplicationContext()).inflate(R.layout.step_list_item,
    null);
    }
     
    but I've got a similar nullPointerException when I call
    "findViewById" :
     
    EditText ed = (EditText)
    convertView.findViewById(R.id.list_item_sb); // return null
    ed.setText("test"); // will crash
     
    Again, it works fine when the list is shown for the first time but it
    crash when I use "adapter.notifyDataSetChanged()" ...
    So "R.id.list_item_sb" is found in my layout the first time but not
    the second time ???
     
    This is getting confusing :(
     
     

     

    Christophe <christophe.lebesnerais@gmail.com> May 31 01:51PM -0700 ^
     
    ok,
     
    I finally have understand what is going on :
     
    I have different layout on my list (R.layout.step_list_item,
    R.layout.step_list_item2 ...) for each type of item in my list. When I
    insert a new item, android try to re-use the layout which was
    previously in the list at the same position. And it use the wrong one
    because the type of the item has changed ...
     
    So I remove the "if (convertView == null)" test and re-inflate my
    layout each time and everything works fine now.
     
    morale : Premature optimization is the root of all evil.
     
    So now I've got a new question : isn't there a better way to do
    this ? It really seem awfully complicated just to have a list with
    different kind of items.
     
    On May 31, 10:36 pm, Christophe <christophe.lebesner...@gmail.com>
    wrote:

     

    Brad Gies <rbgies@gmail.com> May 31 01:54PM -0700 ^
     
    There are only two choices (off the top of my head) that could cause a
    nullPointerException. One is the convertView is null, and the other is
    that the
     
    R.id.list_item_sb is not part of the layout of the convertView, so you get the NullPointerException when you try to cast it to EditText.
     
     
    Can you post your entire getView method?
     
     
     
    On 31/05/2010 1:36 PM, Christophe wrote:
    >> -----------------------------------------------------------------------
     
    >> 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
     
    --
    Sincerely,
     
    Brad Gies
    -----------------------------------------------------------------------
    Bistro Bot - Bistro Blurb
    http://www.bgies.com
    http://www.bistroblurb.com
    http://www.bistrobot.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

     

    Moto <medicalsounds@gmail.com> May 31 01:17PM -0700 ^
     
    I would like to remove the dependency to point to "packagename".R
    since I'm trying to merge free and paid apps into one. The mayor
    problem is the namespace.
     
    I'm able to get Context.getPackageName() but how can I convert that
    string to be accessible... i.e. Context.getPackageName().R?
     
    Thanks!
    -Moto

     

    Moto <medicalsounds@gmail.com> May 31 02:02PM -0700 ^
     
    Thanks Mark!
     
    Library project is actually a much easier way to handle multiple
    versions of one app :)
     
    Thanks again!
    -Moto!
     

     

    Nando Scheidecker <nando.android@gmail.com> May 31 01:43PM -0600 ^
     
    All,
     
    Every time I have to bring the emulator (even on a fast Linux machine) to
    test an app is quite painful.
     
    What would you suggest to speed up the development of an app w/o usinf the
    emulator?
     
    I thought that JUnit for the logical parts would help.
     
    Basically, I want to be able to test the app within Eclipse as much as I can
    before testing on the emulator.
     
    For instance, if one needs to write a service that does not have much UI how
    to approach that problem?
     
    Any ideas?
     
    Thanks.

     

    Mark Murphy <mmurphy@commonsware.com> May 31 03:55PM -0400 ^
     
    Nando Scheidecker wrote:
    > Every time I have to bring the emulator (even on a fast Linux machine)
    > to test an app is quite painful.
     
    Note that you can keep your emulator running for most tests. The main
    time you really need to stop and restart the emulator is if you are
    testing things that happen at boot time.
     
    > What would you suggest to speed up the development of an app w/o usinf
    > the emulator?
     
    You can experiment with the android-x86.org project and use it on a
    spare PC or a VirtualBox image. This allows you to avoid the ARM->x86
    opcode conversion. On the other hand, it limits you to Android 1.6 at
    present.
     
    > I thought that JUnit for the logical parts would help.
     
    > Basically, I want to be able to test the app within Eclipse as much as I
    > can before testing on the emulator.
     
    You are welcome to package Android-independent code into its own project
    for testing, perhaps generating a JAR that your Android project then uses.
     
    --
    Mark Murphy (a Commons Guy)
    http://commonsware.com | http://github.com/commonsguy
    http://commonsware.com/blog | http://twitter.com/commonsguy
     
    Android Consulting: http://commonsware.com/consulting

     

    Nando Scheidecker <nando.android@gmail.com> May 31 01:49PM -0600 ^
     
    All you have to do is to specify https.
     
    For instance:
     
    HTTPRequestHelper helper = new HTTPRequestHelper(myResponseHandler);
    helper.performPost("https://localhost/service", user, pass, null, null);
     

     

    Borsty <borstymail@googlemail.com> May 31 12:41PM -0700 ^
     
    I'm skipping generated id's smaller than 0 now. It indeed feels like
    it's just a hacky workaround, but it'll do for now.
    Thanks anyway :)
     
    -Borsty
     

     

    String <sterling.udell@googlemail.com> May 31 12:32PM -0700 ^
     

    > I'm having the same trouble, from a little searching it seems to be
    > related to me choosing the update my mail address from googlemail.com
    > to gmail.com
     
    That was certainly the issue for me. All downloads stalled until I
    switched back to @googlemail.com. It's got to be affecting all of our
    sales too.
     
    > Which is a massive pain.
     
    +1
     
    String

     

    "Tomáš Hubálek" <tom.hubalek@gmail.com> May 31 11:50AM -0700 ^
     
    BTW: I have a question. Is any developer here who is NOT AFFECTED? I'm
    curious how big this issue is.
     
    Thanks
    Tom

     

    Romain Guy <romainguy@android.com> May 31 11:42AM -0700 ^
     
    Implementing scrollable widgets is not difficult. The reason why we
    haven't done so until now is because once you add vertical scrollable
    widgets on the workspace, you take away the ability for Home apps to
    use vertical swipes/scrolls gestures. Putting this in the framework
    would be a huge limitation.
     
    Note that is is very important that Launcher apps never run external
    user code. I don't know how you've implemented your scrollable widgets
    but please make sure you run code that exists only in your app or the
    framework.
     
    We are evaluating something for Gingerbread but at this point it's
    just an experiment, no promises at all.
     
     
    --
    Romain Guy
    Android framework engineer
    romainguy@android.com
     
    Note: please don't send private questions to me, as I don't have time
    to provide private support.  All such questions should be posted on
    public forums, where I and others can see and answer them

     

 Topic: Same problem
    Bob Kerns <rwk@acm.org> May 31 11:18AM -0700 ^
     
    Same problem as what?
     
    I suspect you believed you were replying in a way that people would
    know what "same problem" refers to. But no, this post just appears by
    itself, and everyone is puzzled about what you're talking about.
     
    Even if this were a reply to another post (which it isn't), people
    would still see this message and not the reply. So you should include
    some context from the prior message.
     
    Changing the subject line to "Same Problem" is also a problem. If
    you're replying, generally you should NOT change the subject line,
    unless there is a major shift of subject. Basically, you removed the
    last possible way for anyone to know what you're talking about.
     
    Remember, this is a very active list, with hundreds of messages every
    day. I tried to at least scan them all every day for a while, but as
    the list has grown, I've found I cannot do that. The easier you make
    it for the reader of your message, the more likely you are to get
    help.
     

     

    Bob Kerns <rwk@acm.org> May 31 11:09AM -0700 ^
     
    Your description is a little unclear, but I think what you're seeing
    is that Android does not support simultaneous access between the PC
    and the SD card.
     
    Once you mount the SD card on the PC, it is not available on the
    device. To access it on the device again, you must first unmount it
    from the PC. The easiest way to do that is from the notifications bar,
    where it says "Turn off USB Storage / Select to turn off USB storage".
     

     

    Fernando Morais <nandox7@gmail.com> May 31 07:06PM +0100 ^
     
    Hey,
     
    Can someone point me to some example on how to use AudioRecord with the 2.1 SDK?
    I've seen many examples and they work fine withe 1.6 but not with 2.1.
    On 2.1 I can't get anything because the AudioRecord instance never
    gets initialized so I can't use it.
     
    Thanks!
     
    -Nando
     
    Sent from my Sinclair ZX81

     

 Topic: Linear Layout
    Brion Emde <brione2001@gmail.com> May 31 10:51AM -0700 ^
     
    Try setting layout_weight="1" on the items following the one that is
    asking for the full height.
     
    That will tell the LinearLayout that those items need some space also.
     
     

     

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

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

Comments: (0)

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

    Krzysztof Wolny <k.wolny@gmail.com> May 31 09:06AM -0700 ^
     
    Hi
     
    I have some doubts about this feature (Android Application Error
    Reports), described here http://android-developers.blogspot.com/2010/05/google-feedback-for-android.html
     
    I have a Nexus One from ADL 2010, with 2.1-update1 firmware. When a
    Launcher2 crashes I can send a report about this bug. But how? It's a
    OS feature or app feature? I downloaded a CrashApp from market (by
    Jacek Surazski, author of above post on dev blog), and when this app
    crashed I also can see a "Report" button. I wrote a small app that
    crashes and there is no "Report" button, so I concluded that it's an
    app feature. But how to enabled it?
     
    I wrote to Jacek Surazski with those questions but he didn't respond.
    Any ideas?

     

    Krzysztof Wolny <k.wolny@gmail.com> May 31 10:19AM -0700 ^
     
    I answer myself:
     
    It's the matter of return value from
    PackageManager.getInstallerPackageName() method. If it's not null then
    the button is shown.
    So next question is: how to set up this value. Android Market setup it
    somehow, but I can get the Android Market source (it's not open
    sourced, isn't it?).
     
    Any ideas? According to "all apps are equal" statement, it must be a
    way to do that.
     
     

     

    Krzysztof Wolny <k.wolny@gmail.com> May 31 10:28AM -0700 ^
     
    Mark, that truism :)
     
    Javadoc of PackageManager.getInstallerPackageName() says:
    "Retrieve the package name of the application that installed a
    package. This identifies which market the package came from."
     
    So, how about such case: writing your own market app with error report
    feature? It could be possible, right?
    I think it could also be used while developing, it could point to
    "ADB" or something similar.
     
     

     

    Mark Murphy <mmurphy@commonsware.com> May 31 01:32PM -0400 ^
     
    Krzysztof Wolny wrote:
    > So, how about such case: writing your own market app with error report
    > feature? It could be possible, right?
     
    Only if pre-installed in firmware, with a new implementation of the
    system service providing the brains behind PackageManager, from that I
    can tell.
     
    Note, though, that there are plenty of frameworks for applications to
    catch exceptions and report them. This list has covered that topic a
    dozen times or so this year alone. Google elected to integrate theirs
    into the Android Market, but applications can do whatever they want.
     
    --
    Mark Murphy (a Commons Guy)
    http://commonsware.com | http://github.com/commonsguy
    http://commonsware.com/blog | http://twitter.com/commonsguy
     
    Android Training...At Your Office: http://commonsware.com/training

     

    Scott Kennedy <skennedy27@gmail.com> May 31 10:00AM -0700 ^
     
    As long as the permissions don't change, and the user has it enabled
    for your application, the Market will handle it.
     

     

    "draffo3@gmail.com" <draffo3@gmail.com> May 31 06:03AM -0700 ^
     
    I am trying to use a sendOrderedBroadcast in my Android app.
     
    I want to be able to send the Intent from one of my applications to
    another and I then want to get data back from the Application that
    recieves the Intent, in this case a boolean true or false.
     
    Here is the current code:
     
    Intent i = new Intent();
    i.setAction(GlobalData.PROPOSE_IN_DOMAIN_ROAM_INTENT);
    i.putExtra("com.testnetworks.QCLEVEL",
    aProposedTheoreticalQoSLevel);
    sendOrderedBroadcast(i, null, null, null, Activity.RESULT_OK,
    null, null);
     
    Is this the correct way to achieve what I want?
     
    If so what do I use as the resultReceiver* parameter? (3rd parameter)
     
    And then how to I recieve data back from the Broadcast?
     
    I have done a quick google and not come up with any examples, any help
    or examples greatly appreciated.
     
    *resultReceiver - Your own BroadcastReceiver to treat as the final
    receiver of the broadcast.

     

    Donal Rafferty <draffo3@gmail.com> May 31 05:37PM +0100 ^
     
    **UPDATED CODE:**
     
    ---
     
    sendOrderedBroadcast(i, null, domainBroadcast, null, Activity.RESULT_OK,
    null, null);
     
    ---
     
    class DomainBroadcast extends BroadcastReceiver{
     
    @Override
    public void onReceive(Context arg0, Intent intent) {
    String action = intent.getAction();
     
    if(GlobalData.PROPOSE_IN_DOMAIN_ROAM_INTENT.equals(action)){
    Log.d("BROADCAST", "Returning broadcast");
     
    Bundle b = intent.getExtras();
    Log.d("BROADCAST", "Returning broadcast " +
    b.getInt("com.testnetworks.INT_TEST"));
    }
    }
     
    ---
     
    @Override
    public void onReceive(Context context, Intent intent) {
    String action = intent.getAction();
     
    if(GlobalData.PROPOSE_IN_DOMAIN_ROAM_INTENT.equals(action)){
     
    Bundle b = intent.getExtras();
    int testQCLevel = b.getInt("com.testnetworks.QCLEVEL");
    switch(testQCLevel){
    case 1:
    Log.d("QCLevel ", "QCLevel = UNAVAILABLE");
    break;
    case 2:
    Log.d("QCLevel ", "QCLevel = BELOWUSABILITY");
    break;
    case 3:
    Log.d("QCLevel ", "QCLevel = VOICE");
    break;
    }
     
    intent.putExtra("com.testnetworks.INT_TEST", 100);
     
    }
     
    ---
     
     
    So according to the Doc's I should recieve 100 back in my DomainBroadcast
    reciever but it always comes back as 0.
     
    Can anyone see why?
     

     

    ravishi <ravishivt@gmail.com> May 31 09:35AM -0700 ^
     
    Frank,
     
    I plan to use the SDK. I'd like to put whatever I make on the app
    store so browser based wouldn't work. And I'd like to use the SDK so
    it will give me access to the android classes and such. I'm just
    beginning to start with Android so my knowledge of it is limited. I'm
    just trying to focus on the server at the moment but also keep in mind
    android's networking capabilities. Also, my goal with persistent
    connections is that will improve latency since the client doesn't have
    to reconnect every time. Throughput is something I'll just have to
    hope for the best.
     
    Miguel,
     
    Thanks for responding to both posts. I didn't even realized my older
    post went through. It actually showed up in my profile as being
    posted to the board, "sex+gay" :) , so I removed it from there. I've
    found the old post and I've read over what you said. However, I've
    somewhat moved onto trying erlang as I've been reading how much better
    it scales.
     
    I've actually started reading the Armstrong's Programming Erlang book
    a few days ago. I got to the middle of chapter 3 but I got impatient
    and wanted to try this nitrogen stuff. Are there any specific
    chapters in that book that you think may help with my project? I
    started reading about OTP and behaviors. It seems promising but its
    hard to wrap my head around all of it. Oh, and I think I'll just
    stick with JSON as I don't expect the encoding/decoding to be the
    bottleneck plus JSON would give cleaner code.
     
    My main problem with Nitrogen is trying to figure out how to interact
    on the client side. I've installed the firebug extension into firefox
    so I can view all the requests needed to the server. There are
    several Javascript requests and some requests are 100KB plus. It
    seems like nitrogen adds a lot of overhead which is not something a
    data plan could endure. I've found another Erlang chat example which
    has far fewer requests than before. I've installed it on my server.
    You can access it at http://stormyd.dyndns.biz:8000 . The code is
    from http://chrismoos.com/2009/09/28/building-an-erlang-chat-server-with-comet-part-1/
    . When using firebug, it shows two javascript pages and multiple GET
    requests (the browser appears to cache the javascripts so it will only
    be the first time). I understand how the client will long poll the
    server for 1 minute 30 seconds until it responds, but I do not
    understand all the setting up requests. Is it possible to emulate all
    of the GET requests on android. Could I bypass the javascripts? If
    you or someone could help me interact with the server through telnet
    (logging in, posting messages, and receiving them), I think I'd better
    understand how it works.
     
    Thanks to both of you,
    Ravi
     

     

    Zigurd <zigurd.mednieks@gmail.com> May 31 08:49AM -0700 ^
     
    You say you have an Acer device. Have you tried the line below?
     
    SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666",
    GROUP="plugdev"
     
    Note that the ATTR{idVendor}=="nnnn" uses the id for Acer listed on
    the dev guide page. My previous example used the ID for Motorola,
    which works for my Droid.
     
    Also:
     
    1. Make sure usb debugging is turned on in Android, from the Home
    screen, use Option Menu Key -> Settings -> Applications -> Development
    -> USB Debugging
     
    2. Make sure you have restarted the udev service with the line
    "service udev restart"
     
    Try not to mix in stopping the adb server and restarting it as root.
    That makes everything else a red herring, since adb running as root
    will have access to your device. However, if you give up and need a
    workaround you can use "adb server-kill" followed by "sudo adb server-
    strart"
     
    Does that improve your results?
     

     

    Yahel <kayenko@gmail.com> May 31 07:15AM -0700 ^
     
    Ok Chi,
     
    You'll be the bad cop and I'll be the good cop :D
     
    Yahel
     

     

    TreKing <trekingapp@gmail.com> May 31 08:25AM -0500 ^
     

    > The space between checkboxes in below UI layout is too much, how to
    > decrease it?
     
     
    Try adjusting the various padding parameters on them.
     
    -------------------------------------------------------------------------------------------------
    TreKing - Chicago transit tracking app for Android-powered devices
    http://sites.google.com/site/rezmobileapps/treking

     

    Kostya Vasilyev <kmansoft@gmail.com> May 31 06:08PM +0400 ^
     
    Actually, looking at the sdk sources, the top/bottom margins are in the
    drawable (the checkbox images).
     
    I ran into the same problems with spinners, the fix was to create my own
    background images with smaller transparent margins.
     
    http://kmansoft.wordpress.com/2010/04/19/compact-spinner-widgets/
     
    -- Kostya
     
    31.05.2010 17:25, TreKing ?????:
     
    --
    Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

     

    TreKing <trekingapp@gmail.com> May 31 09:02AM -0500 ^
     

    > I like the looks of the Alert Dialog and wonder if there is any official
    > way to use those looks (icon, title, divider, grey gradient background for
    > the button bar) in an Activity?
     
     
    No idea if this will work but - you could try making a general dialog that
    looks the way you want within your Activity, then get the dialog's root view
    and set it on the activity.
     
    -------------------------------------------------------------------------------------------------
    TreKing - Chicago transit tracking app for Android-powered devices
    http://sites.google.com/site/rezmobileapps/treking

     

    TreKing <trekingapp@gmail.com> May 31 08:56AM -0500 ^
     

    > Is there any kind of hooking api to get this info or is not posible to get
    > it?
     
    Probably not, as this would be a massive security hole.
     
     
    > maby coding on native android?
     
    I don't know what you mean by "native android", but maybe by modifying the
    source and making your own custom build.
     
    -------------------------------------------------------------------------------------------------
    TreKing - Chicago transit tracking app for Android-powered devices
    http://sites.google.com/site/rezmobileapps/treking

     

    TreKing <trekingapp@gmail.com> May 31 08:54AM -0500 ^
     

    > Anyone else? What's going on?
     
     
    Search the Android Market "Support" forum for "Starting Download" ... you
    will find hundreds of posts with the same exact problem that flow in on a
    near-daily basis. This has been going on forever - it appears to be a
    problem they are incapable of solving - and no one from Google ever gives a
    good explanation of what the problem is or how to fix it on the user end
    (besides some suggestions that may or may not work for some people).
     
    Try some of the suggestions on some of those posts and see if one of them
    works for you - otherwise you're SOL.
     
    -------------------------------------------------------------------------------------------------
    TreKing - Chicago transit tracking app for Android-powered devices
    http://sites.google.com/site/rezmobileapps/treking

     

 Topic: Linear Layout
    Anton Persson <don.juanton@gmail.com> May 31 03:43PM +0200 ^
     
    Hello,
     
    I have a set of custom views that I would like to add to a LinearLayout
    object. However, the first object I add to the layout (I do this
    dynamically, during runtime) has a OnMeasure method that tries to get as
    much space as possible resulting in that it get's all the space LinearLayout
    object. This is correct behaviour, but when I then add more objects
    following that I want the allocated area for the first object to decrease so
    the others will fit.
     
    As it is now, each following object will get zero space, and hence won't be
    visible.
     
    Can this be solved somehow?
     
    Best Regards
    Anton

     

    TreKing <trekingapp@gmail.com> May 31 08:43AM -0500 ^
     

    > Can you provide with good tips on how to become a featured app in
    > the market?
     
    Become a major company that has a ton of money and resources to do
    advertising and does not actually need the benefit of being featured, like
    UPS, Twitter, Fandango, or The New York Times (all of which have been
    featured on my phone for at least a week).
     
    - OR -
     
    Be Google and promote your own apps which REALLY don't need the benefit of
    being featured (Earth, SkyMap, and Buzz Widget are currently being featured
    for me) - especially considering some of them come pre-installed on many
    phones (Maps, Goggles, I'm looking at you).
     
    - OR -
     
    Get really, really, REALLY lucky ... ? I have no idea.
     
    -------------------------------------------------------------------------------------------------
    TreKing - Chicago transit tracking app for Android-powered devices
    http://sites.google.com/site/rezmobileapps/treking

     

    Ubuntu Explorer <ubuntuexplorer@gmail.com> May 31 06:30AM -0700 ^
     
    HI,
    I am not able to find the device usb0 on my Ubuntu laptop for Android
    device (Samsung Galaxy Spica i5700). adb devices lists the device but
    I cannot see the usb0 device in
    ifconfig/lshw -class network on the Ubuntu PC.
     
    I do not have a WiFi AP / WiFi card in my PC and I would like to
    access the android market application from the device using USB.
     
    Buying a $10-$20 WiFi AP will solve it I suppose, but I want to know
    if I can go the USB way?
     
    Regards,
    UE.

     

    James W <jpbwebster@gmail.com> May 31 06:11AM -0700 ^
     
    Fantastic idea. The widgets on HTC Sense are not only great looking
    but the animation, scroll and gesture support (such as like flicking
    pictures in the album widget) add genuinely useful functionality.
     
    More importantly to Google, Home screen widgets are one of the great
    advantages of Android over the iPhone and other smartphone platforms,
    and anything they can do to keep the momentum of that advantage can
    only be good for Android.
     
    James
     
     

     

    TreKing <trekingapp@gmail.com> May 31 07:47AM -0500 ^
     

    > Can someone explain this behavior ?
     
     
    Just a guess - since in API level 4 introduced support for mutliple
    resolutions, which allow you to specify specific resources to be used for
    different screen sizes, the dialer probably has a new icon that's the
    default on high-res devices.
     
    -------------------------------------------------------------------------------------------------
    TreKing - Chicago transit tracking app for Android-powered devices
    http://sites.google.com/site/rezmobileapps/treking

     

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