[android-developers] Re: MapView showing as black screen after upgrade to 1.5

2009-05-02 Thread JP


Check if your app might be stuck in your overridden
MapActivity.onCreate().
I had that problem and shuffle things in onCreate() around. Once
onCreated() completes, the map showed as had been.



On May 1, 10:19 pm, Derek dlawl...@gmail.com wrote:
 Has anyone seen their MapView which was working in 1.1 displaying a
 plain black screen (no errors) after compling with the 1.5 SDK?  I
 made sure to copy the debug.keystore from the 1.1 location to the new
 1.5 location so its compiling and loading on the phone correctly (I
 did a reinstall not uninstall/install) and shouldn't need a new
 mapsAPI key.

 No errors are showing up in DDMS other than:
 Failed to find provider info for com.google.settings

 Any ideas would be much appreciated!

 Thanks,
 Derek
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Porting 1.0 to 1.5, map tiles stopped displaying

2009-05-02 Thread JP


Discovered that as another alternative. These new clothes are still a
bit scratchy.

On May 1, 10:10 pm, Derek dlawl...@gmail.com wrote:
 It looks like they moved the location of debug.keystore with SDK 1.5.
 Since I'm on Vista, I had to copy my original debug.keystore from C:
 \Users\me\AppData\Local\Android to C:\Users\me\.android

 On May 1, 11:38 pm, JP joachim.pfeif...@gmail.com wrote:

  OK that was it. Busywork.

  Thanks again.

  On Apr 30, 3:48 pm, Ron ry...@mac.com wrote:

   I had to generate a new Google maps key using the new keystore in my
   project before the tiles would show.

   On Apr 29, 8:44 pm, JP joachim.pfeif...@gmail.com wrote:

I started porting a functioning 1.0 app to 1.5 last night. It uses
MapView and associated classes and everything checks out on 1.0. No
such luck after taking it to 1.5. I've included maps API, the usual
touch points (API key, Internet permission) are in place of course
(coming from 1.0).
I've created an id=3 AVD (Google Maps app works), and followed the
porting instructions I found posted, but map tiles do not display
after porting. Everything else, i.e. the overlaying functionality, is
there. Nothing terrible shows in LogCat, so I am scratching my head
what might be missing. Pointers welcome, THX in advance!
JP
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Light theme doen't work properly in 1.5 SDK

2009-05-02 Thread jarkman

I spent a while having trouble with themes set in onCreate being
apparently ignored.

In the end, I moved all our theme setting to the manifest, and had no
more trouble.

Richard


On May 2, 2:34 am, havexz bali.param...@gmail.com wrote:
 I am setting the theme in onCreate() methodof every activity.
 Any screen which has views like text view, radio etc is not working
 fine in Light Theme. The background is black in light theme. One more
 question how to programmatically  change the application theme so that
 i dont have to change it for every activity?

 On Apr 28, 10:29 pm, Jeff Sharkey jshar...@android.com wrote:

  Hmm wait, that wouldn't explain the background colors.  Are you
  setting the theme from the android:theme attribute in your manifest,
  or in onCreate() somewhere?

  j

  On Tue, Apr 28, 2009 at 8:27 PM, Jeff Sharkey jshar...@android.com wrote:
   That's because you're probably looking to use textColorPrimaryInverse.  ;)

   j

   On Tue, Apr 28, 2009 at 7:18 PM,havexzbali.param...@gmail.com wrote:

   Thats right what I am trying to say is that when I apply white theme
   then the text views become black. I mean the text become black but the
   background also remains black. But this wont happen with the list
   view. So do i have to explicitly set the color of the background for
   the them. Currently I am not setting any background. Here is what I am
   doing : this is the xml for Activity

   LinearLayout xmlns:android=http://schemas.android.com/apk/res/
   android
          android:layout_height=fill_parent
   android:layout_width=fill_parent
          android:orientation=vertical android:id=@+id/view_xyz

          ScrollView android:id=@+id/ScrollView01
                  android:layout_height=wrap_content 
   android:layout_weight=1
                  android:layout_width=fill_parent

                  RelativeLayout android:id=@+id/RelativeLayout01
                          android:layout_width=wrap_content
   android:layout_height=wrap_content
                          TextView android:layout_height=wrap_content
                                  android:layout_width=fill_parent 
   android:text=@string/title
                                  
   android:gravity=center_vertical|center_horizontal android:id=@
   +id/title_text
                                  android:textSize=10pt 
   android:textColor=?android:attr/
   textColorPrimary/TextView
                          TextView android:layout_width=wrap_content
                                  android:layout_height=wrap_content 
   android:id=@+id/xyz_text
                                  android:layout_below=@+id/title_text 
   android:text=@string/
   xyz_text_string
                                  android:textSize=6pt/TextView
                  /RelativeLayout
          /ScrollView
   /LinearLayout

   Please help. Same code works fine on 1.1 but not on 1.5

   On Apr 28, 8:00 pm, Romain Guy romain...@google.com wrote:
   TextView and ScrollView do not have a background.

   On Tue, Apr 28, 2009 at 5:55 PM,havexzbali.param...@gmail.com wrote:

When apply the white theme, the text views and scrollviews display
black backgroundand its very hard to read the text. The same app
works fine on the 1.1 SDK. I am running the application on the Dev
Phone (but emulator also have same symptoms)

   --
   Romain Guy
   Android framework engineer
   romain...@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

   --
   Jeff Sharkey
   jshar...@google.com

  --
  Jeff Sharkey
  jshar...@google.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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Relationships among apps, tasks, and activities

2009-05-02 Thread devi prasad

Hi, Dianne: this is the portion of the dump that I get by executing
adb shell dumpsys activity :
--
Activities in Current Activity Manager State:
Task{3 com.robosoft.example}
clearOnBackground=false numActivities=3 rootWasReset=true
affinity=com.robosoft.example
intent=Intent { action=android.intent.action.MAIN
categories={android.intent.category.LAUNCHER}
 flags=0x1020

comp={com.robosoft.example/com.robosoft.example.AppRootActivity} }

History #3:
HistoryRecord{434d2090
{com.robosoft.example/com.robosoft.example.SingleTaskActivity}}
packageName=com.robosoft.example processName=com.robosoft.example
app=ProcessRecord{43516130 181:com.robosoft.example/10018}
Intent { flags=0x1000
comp={com.robosoft.example/com.robosoft.example.SingleTaskActivity} }

History #2:
HistoryRecord{434fb848
{com.robosoft.example/com.robosoft.example.ChildActivityOfRoot}}
packageName=com.robosoft.example processName=com.robosoft.example
app=ProcessRecord{43516130 181:com.robosoft.example/10018}
Intent {
comp={com.robosoft.example/com.robosoft.example.ChildActivityOfRoot} }

History #1:
HistoryRecord{434fe2e8
{com.robosoft.example/com.robosoft.example.AppRootActivity}}
packageName=com.robosoft.example processName=com.robosoft.example
app=ProcessRecord{43516130 181:com.robosoft.example/10018}
Intent { action=android.intent.action.MAIN
categories={android.intent.category.LAUNCHER}
---
As I gather, this shows that all three activities are part of the same
task, even though I use FLAG_ACTIVITY_NEW_TASK while starting
'SingleTaskActivity' and mark it with 'singleTask' launch mode. The
intent flag value (0x1000) indicates this in the top most activity
entry above.

I cannot explain this behavior with my current understanding derived
from the documentation. What am I missing here?

thanks


On Sat, May 2, 2009 at 10:50 AM, devi prasad dpras...@gmail.com wrote:
 Hi, Dianne: ok, thanks.
 I use the following functions to determine the task id and if it is
 the root of a task:

 activity.getTaskId();
 activity.isTaskRoot();

 I used logcat looking for useful hints. Let me see if I understand it
 better if I use
 adb shell dumpsys activity


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Storing app-specific synced data with a contact

2009-05-02 Thread jarkman

The sync process seems to re-encode the jpeg. You'll need to use a
robust steganographic method... :-)

I had read Contacts.Settings as storing settings for sync accounts,
not settings for individual contacts. Is that what you're after ?

Richard


On May 2, 1:00 am, Mike Hearn mh.in.engl...@gmail.com wrote:
 I would like to store some app-specific data in the contacts db. Is it
 safe to stuff random things into the Contacts.Settings table? Will it
 affect the GUI? Does anybody have an example of doing that? It's not
 really clear to me if there's a proper mechanism for this, or if the
 settings table is reserved for the systems own use.

 BTW my first attempt was to use an app specific database, but then
 users would uninstall the app, reinstall it later and wonder why it
 didn't work. My second attempt was to stuff the data into the JPEG
 headers but the sync process deletes them, presumably for security
 reasons. So if there's no way to store my things in the contacts db
 directly, I think I'm out of luck - I'll have to look at
 steganographically encoding the data into the raw pixels themselves!
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Ho to deteck key press on soft keyboard

2009-05-02 Thread Yossi

It seems this API is available only for 1.5 and I need the same code
to run also for 1.1
So I assume there is no backwards compatible API. correct?

Thanks,
Yossi

On May 2, 12:44 am, Dianne Hackborn hack...@android.com wrote:
 The InputConnection interface is the API the IME has to your text editor.
 TextView provides a default implementation, returned by
 View.onCreateInputConnection.

 On Fri, May 1, 2009 at 8:27 AM, Yossi yossi@gmail.com wrote:

  Hi,

  I have an EditText control on a preference screen and I run some logic
  when the user enters a character. I've been using View.OnKeyListener
  but it does not work with the soft (virtual) keyboard (V1.5).
  What should I use instead?

  Thanks,
  Yossi

 --
 Dianne Hackborn
 Android framework engineer
 hack...@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.
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Lost focus on soft keyboard

2009-05-02 Thread Yossi

Hi,

I implemented a custom preference screen on which I have an EditText
control. The problem I have is when the user clicks on the EditText
control to enter data, the soft keyboard pops-up and the EditText
loses the focus which makes it impossible to enter data.
What do I do wrong?

Thanks,
Yossi
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Duplicated text when using .append in widgets

2009-05-02 Thread Alberto M. Scattolo

Good morning everybody!

I'm pretty new to Android so I'm facing some problems :)
I'm using a TextView widget to show a log, just some text.
The log content is stored on an SQLite database that my app creates
and when a new line is added to the databse I use textview.append(my
last line) to add it. The problems is that when I add a line, it also
adds a copy of the text that was already displayed. Quite strange!
An example:
first line is One, if i add a new line with Two, it prints: One
\nOne\nTwo. If i add Three it prints One\nOne\nTwo\nOne\nOne\nTwo
\nThree.
Can anybody help me to solve this?

Huge thanks in advance!
Bests,
--

A
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Storing app-specific synced data with a contact

2009-05-02 Thread Mike Hearn

No :( I'm needing to store data about individual contacts. Does
anybody else have ideas? I really want to avoid steganography that can
survive JPEG recompression, it would be an astonishing amount of suck.

On May 2, 10:12 am, jarkman jark...@gmail.com wrote:
 The sync process seems to re-encode the jpeg. You'll need to use a
 robust steganographic method... :-)

 I had read Contacts.Settings as storing settings for sync accounts,
 not settings for individual contacts. Is that what you're after ?

 Richard

 On May 2, 1:00 am, Mike Hearn mh.in.engl...@gmail.com wrote:

  I would like to store some app-specific data in the contacts db. Is it
  safe to stuff random things into the Contacts.Settings table? Will it
  affect the GUI? Does anybody have an example of doing that? It's not
  really clear to me if there's a proper mechanism for this, or if the
  settings table is reserved for the systems own use.

  BTW my first attempt was to use an app specific database, but then
  users would uninstall the app, reinstall it later and wonder why it
  didn't work. My second attempt was to stuff the data into the JPEG
  headers but the sync process deletes them, presumably for security
  reasons. So if there's no way to store my things in the contacts db
  directly, I think I'm out of luck - I'll have to look at
  steganographically encoding the data into the raw pixels themselves!


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Trouble migrating apps to 1.5

2009-05-02 Thread Teo
Hmm, the problem reappears after restarting and i still have to do adb
kill-server every time.

On Thu, Apr 30, 2009 at 9:28 PM, Teo teomina...@gmail.com wrote:

 Hi, thanks for the response - fixed it in the meanwhile. Apparently it was
 something of this sort, i just tried adb kill-server and everything worked
 like a charm :)


 On Thu, Apr 30, 2009 at 9:26 PM, havexz bali.param...@gmail.com wrote:


 One small question which platform you running on windows/linux? And by
 any chance there are two instances of the emulator running? One is
 visible and other is running in the background. That can also cause
 this issue.

 On Apr 30, 12:34 pm, Teo teomina...@gmail.com wrote:
  Apparently the emulator can't attach itself to the adb tool too...
 
  On Apr 30, 4:06 pm, Teo teomina...@gmail.com wrote:
 
 
 
   Hi,
 
   is anyone else having trouble with the new app running 'system'? My
   emulator just ignores them, can't launch any app. Changed the project
   build target to 1.5 and made sure my AVD is 1.5 too.
 
   If i run once, when the emulator isn't started, after it starts it has
   no error message (and does nothing). Then, every time i try to run the
   app it says emulator: ERROR: the user data image is used by another
   emulator. aborting. I'm sure i must be doing something wrong, but i
   can't figure it out :) Any help is appreciated...
 
   Thanks,
   Teo- Hide quoted text -
 
  - Show quoted text -
 



 --
 Teo (a.k.a. Teominator a.k.a. Teodor Filimon)
 site www.teodorfilimon.com | blog www.teodorfilimon.blogspot.com
 GMT +2




-- 
Teo (a.k.a. Teominator a.k.a. Teodor Filimon)
site www.teodorfilimon.com | blog www.teodorfilimon.blogspot.com
GMT +2

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Intent.ACTION_PICK and gif image

2009-05-02 Thread Maxence Warzecha

Hi,

I'm able to browse image in phone with this code :

String directory = /sdcard/*;
Uri uri = Media.INTERNAL_CONTENT_URI.buildUpon().appendQueryParameter
(bucketId, getBucketId(directory)).build();
Intent intent = new Intent();
intent.setData(uri);
intent.setType(image/*);
intent.setAction(Intent.ACTION_PICK);
startActivityForResult(Intent.createChooser(intent, Choose a
Viewer), SELECT_IMAGE);
break;

But I don't see my gif images... Do you know why? is it possible?

Thank you,
Max

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] API demos and SDK 1.5: is available?

2009-05-02 Thread EvgenyV

Hi!

As far I see the API demos sources are not a part of latest 1.5 SDK.
Can I download it somewhere?

Thanks,
Evgeny
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Tabhost Disappearing List view

2009-05-02 Thread cre

Mark,

Thanks.

Will do both.

On May 1, 9:05 pm, Mark Murphy mmur...@commonsware.com wrote:
 cre wrote:
  I didn't answer your previous question.  No, there are not problems
  with other Adapters only the ones in TabHost.
  I went back and looked at the Hierarchyviewer property values and it
  shows an item count of 3, which is the number of items in this
  ListView that should be visible but are not.  I am sure I will see the
  same thing with getCount() next time it fails. So I would say that the-
  adapter-thinks-its-empty theory is negative.  It thinks it has 3 items
  but has lost the pointer to them somehow.

  I also didn't make it clear that this problem only occurs after
  leaving the activity and returning. As long as I remain in the
  activity there is no problem with the ListViews.  That is why I
  suggested putting the code in onResume().

  At this point I firmly believe that this is a bug.

 That is quite likely. The question is, a bug in what?

 I recommend you try replacing ArrayAdapter.createFromResource() with
 some other constructed Adapter (e.g., new ArrayAdapter()) and see if the
 problem persists. If the problem goes away, then the problem is fairly
 well narrowed down, and you have a workaround. I suspect that
 createFromResource() is not the most popular way of creating adapters,
 so it is possible the difficulty lies there.

 Also, is this on 1.5 final, or some other edition? If you are not on 1.5
 final, you probably should try it there, since the issue might have been
 resolved.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://twitter.com/commonsguy

 _The Busy Coder's Guide to Android Development_ Version 2.0 Available!- Hide 
 quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: API demos and SDK 1.5: is available?

2009-05-02 Thread Evgeny V
Found it in \platforms\android-1.5

On Sat, May 2, 2009 at 3:12 PM, EvgenyV evgen...@gmail.com wrote:


 Hi!

 As far I see the API demos sources are not a part of latest 1.5 SDK.
 Can I download it somewhere?

 Thanks,
 Evgeny
 


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Tap Outside Listener for Dialog

2009-05-02 Thread Jason Parekh

If you want your dialog to cancel when the user taps outside its area,
check out Dialog.setCanceledOnTouchOutside.

jason

On Thu, Apr 30, 2009 at 2:46 PM, UBZack zferv...@gmail.com wrote:

 Hi all,

 I was wondering if anyone knew of an event listener that receives tap
 outside events, that is, taps that happen outside the widget's
 physical boundaries, and could this listener be assigned to a dialog
 box (or for that matter, any visual window).  Here's what the code
 MIGHT look like to construct a Dialog with this functionality:

 AlertDialog.Builder(this)
 .setTitle(My dialog)
 .setMessage(This is my dialog)
 .setOnOutsideClickListener(new MyOnClickListener()) // - does
 something like this exist?
 .create();

 Any help or insight anyone can give would be great.  I know that the
 menu currently supports taps outside of its boundaries, so I think
 this may be possible.

 Thank you!

 -UBZack
 


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] why thread died? need background thread..

2009-05-02 Thread guruk

hi,
bellow just a test sample source for a background thread.

i would like that when my app is closed it still run in the background
(like at my tracks) to collect data even when it is closed.

but it always dies after a while by itself, why?

thanks
chris

package com.chris.alarmer;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

public class alarmer extends Activity {
/** Called when the activity is first created. */

@Override
public void onDestroy() {
super.onDestroy();
Thread thr = new Thread(null, mTask, alarmer);
thr.start();
}


@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

Thread thr = new Thread(null, mTask, alarmer);
thr.start();


}

Runnable mTask = new Runnable() {
public void run() {
// Normally we would do some work here...  for our sample,
we will
// just sleep for 30 seconds.
Log.i(DATABASE-TEST,---: START THREAD);
long endTime = System.currentTimeMillis() + 9*1000;
long endTime2 = System.currentTimeMillis() + 10*1000;

while (System.currentTimeMillis()  endTime)
{
//get data after 10 seconds
if (System.currentTimeMillis()  endTime2)
{
endTime2 = System.currentTimeMillis() +10*1000;
Log.i(DATABASE-TEST,---: GET DATA);
}

}

Log.i(DATABASE-TEST,---: END THREAD);
// Done with our work...  stop the service!
  //  alarmer.this.stopSelf();
}
};

}
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: why thread died? need background thread..

2009-05-02 Thread guruk

update:

it looks the thread comes only killed after a while when i close the
app with the back button.
when i go out with the home button. the thread works endless.

so when i click the back button i guess it calls onDestroy, but
there i have the same call
to my thread. So whats going on, it close here and not when i click
home

thanks
chris

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Storing app-specific synced data with a contact

2009-05-02 Thread Mike Hearn

I wasn't able to find a good, free Java steganography library that can
survive recompression. I think I'll just store the data on the SD
card. It's not as nice as having it associated with the contact in the
contacts db, as the user can delete the database, swap SD cards or buy
a new phone and the stuff won't work any more. But I don't see other
options.

On May 2, 12:10 pm, Mike Hearn mh.in.engl...@gmail.com wrote:
 No :( I'm needing to store data about individual contacts. Does
 anybody else have ideas? I really want to avoid steganography that can
 survive JPEG recompression, it would be an astonishing amount of suck.

 On May 2, 10:12 am, jarkman jark...@gmail.com wrote:

  The sync process seems to re-encode the jpeg. You'll need to use a
  robust steganographic method... :-)

  I had read Contacts.Settings as storing settings for sync accounts,
  not settings for individual contacts. Is that what you're after ?

  Richard

  On May 2, 1:00 am, Mike Hearn mh.in.engl...@gmail.com wrote:

   I would like to store some app-specific data in the contacts db. Is it
   safe to stuff random things into the Contacts.Settings table? Will it
   affect the GUI? Does anybody have an example of doing that? It's not
   really clear to me if there's a proper mechanism for this, or if the
   settings table is reserved for the systems own use.

   BTW my first attempt was to use an app specific database, but then
   users would uninstall the app, reinstall it later and wonder why it
   didn't work. My second attempt was to stuff the data into the JPEG
   headers but the sync process deletes them, presumably for security
   reasons. So if there's no way to store my things in the contacts db
   directly, I think I'm out of luck - I'll have to look at
   steganographically encoding the data into the raw pixels themselves!


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: why thread died? need background thread..

2009-05-02 Thread Mark Murphy

 i would like that when my app is closed it still run in the background
 (like at my tracks) to collect data even when it is closed.

Use a Service.

 but it always dies after a while by itself, why?

Android may have killed off your process to reclaim memory. And, of
course, if the device goes to sleep, your background thread will also go
to sleep, which may or may not be what you want.

Particularly for a polling-style application, use an AlarmManager to
arrange for a Service to do the work. That allows your whole application
to close down between polls, minimizing your memory and battery footprint.
I have a blog post briefly describing this technique:

http://androidguys.com/?p=4411

Also:

-- Do not busy-wait like you are in your code. You want your code to run
almost never.

-- Do not poll frequently.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Bluetooth and Serial Port Profile

2009-05-02 Thread Alin Radut

On Apr 22, 3:09 am, Nick Pelly npe...@google.com wrote:
 RfcommSocket.java is what you want. SPP is just rfcomm.


Thanks. RfcommSocket is hidden in the 1.5r1 SDK, is there any way I
can access it without compiling my own version of the framework?

Alin
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Random crashes on MapActivity when rendering tile

2009-05-02 Thread chris

Hi ,

I have from time to time some crashes on the google code for drawing
tiles on a mapActivity.

05-02 16:03:00.510: WARN/dalvikvm(6278): threadid=23: thread exiting
with uncaught exception (group=0x4000fe70)
05-02 16:03:00.540: ERROR/AndroidRuntime(6278): Uncaught handler:
thread Thread-28 exiting due to uncaught exception
05-02 16:03:00.540: ERROR/AndroidRuntime(6278):
java.lang.NullPointerException
05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
com.google.googlenav.map.Map.drawTile(Unknown Source)
05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
com.google.googlenav.map.Map.drawMapBackground(Unknown Source)
05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
com.google.googlenav.map.Map.preLoad(Unknown Source)
05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
com.google.android.maps.MapController.animateTo(MapController.java:
234)
05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
com.google.android.maps.MapController.animateTo(MapController.java:
203)
05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
com.piggyback.foxydroid.MainActivity$1.run(MainActivity.java:164)
05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
java.lang.Thread.run(Thread.java:1058)

and this in /data/anr/traces.txt
Thread-28 prio=5 tid=23 NATIVE
  | group=main sCount=1 dsCount=0 s=0 obj=0x43590018
  | sysTid=6314 nice=0 sched=0/0 handle=1750032
  at android.os.BinderProxy.transact(Native Method)
  at android.app.ActivityManagerProxy.handleApplicationError
(ActivityManagerNative.java:2103)
  at com.android.internal.os.RuntimeInit.crash(RuntimeInit.java:302)
  at com.android.internal.os.RuntimeInit
$UncaughtHandler.uncaughtException(RuntimeInit.java:75)
  at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:887)
  at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:884)

Any idea what could cause such crashes and how to avoid/prevent them
to crash my application ?

Chris



--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: xml view defination to take event handler class name

2009-05-02 Thread Raja Nagendra Kumar

Nice to note this.. in which release could be expect this feature in..
when is the expected date for this release...pl.

Regards,
Raja Nagendra Kumar,
www.tejasoft.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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android Menu

2009-05-02 Thread Raja Nagendra Kumar

ok.

One of the point we were considering was to allow the users to choose
if he needs always visible menu (specially if the menu items or one or
two).
Also application using both menu and layout buttons could possibly
confuse the users and may not be a good UI design.

Regards,
Raja Nagendra Kumar
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: why thread died? need background thread..

2009-05-02 Thread JP

I suppose you see this when the device goes to sleep. Check out wake
locks to keep the CPU awake. Test this out thoroughly, nothing's more
annoying than a background thread run amok. Also note if you reach out
to the Internet to query a database server - Android shuts off the
WLAN adapter after 2mins or so. The phone may or may not have
connectivity once that occurs, depending whether a SIM card is in the
device, there's wireless connectivity etc.
Note the default connect and read timeouts are longer than 10s. Even
after dropping the connect and read TO's to align with your wait
times, dropping to 10s (endTime2) is pretty aggressive.
There's a lot of variables you need to consider and test out before
you can unleash this onto users.

On May 2, 6:24 am, guruk ilovesi...@gmail.com wrote:
 hi,
 bellow just a test sample source for a background thread.

 i would like that when my app is closed it still run in the background
 (like at my tracks) to collect data even when it is closed.

 but it always dies after a while by itself, why?

 thanks
 chris

 package com.chris.alarmer;

 import android.app.Activity;
 import android.os.Bundle;
 import android.util.Log;

 public class alarmer extends Activity {
 /** Called when the activity is first created. */

 @Override
 public void onDestroy() {
 super.onDestroy();
 Thread thr = new Thread(null, mTask, alarmer);
 thr.start();
 }

 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);

 Thread thr = new Thread(null, mTask, alarmer);
 thr.start();

 }

 Runnable mTask = new Runnable() {
 public void run() {
 // Normally we would do some work here...  for our sample,
 we will
 // just sleep for 30 seconds.
 Log.i(DATABASE-TEST,---: START THREAD);
 long endTime = System.currentTimeMillis() + 9*1000;
 long endTime2 = System.currentTimeMillis() + 10*1000;

 while (System.currentTimeMillis()  endTime)
 {
 //get data after 10 seconds
 if (System.currentTimeMillis()  endTime2)
 {
 endTime2 = System.currentTimeMillis() +10*1000;
 Log.i(DATABASE-TEST,---: GET DATA);
 }

 }

 Log.i(DATABASE-TEST,---: END THREAD);
 // Done with our work...  stop the service!
   //  alarmer.this.stopSelf();
 }
 };

 }
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] is android:layout_width and android:layout_height manditory attributes

2009-05-02 Thread Raja Nagendra Kumar

All the view components does take layout_height, layout_width
attributes.. and most of the time the valid value for them (in righly
coded views) is fill_parent.

What is the default value assumed if one is not given in the xml. I
see such a xml definition fails to load at run time with error message
instantiation exception. Are there any safe defaults assumed.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Template ROW using xml and api

2009-05-02 Thread Raja Nagendra Kumar

Hi,

We have a table which may have infinite rows. Would it be possible to
create row by using the xml template say

TableRow
EditText android:id=@+id/tbRelation
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:singleLine=true
  android:scrollHorizontally=true
  android:textSize=20sp/
Button android:id=@+id/bRelationQuery
style=?android:attr/buttonStyleSmall
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=@string/blQuery/
/TableRow


some thing similar to clone of existing row but with different id's
etc.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Validating view components at compile time

2009-05-02 Thread Raja Nagendra Kumar

Hi,

We see that if there are any xml view tags, which does not exist are
going though at compile time but fails at run time.. such as xml like
below are valid during compile time but not at run time as it is not
able to find ATableLayout

ATableLayout android:layout_width=fill_parent
 android:layout_height=fill_parent
 android:stretchColumns=0,1,2/ATableLayout 

Does aapi has any options to check this at compile time it self.

Also, was there any intent of doing this at run time as opposed to at
compile time. I am hoping this may have some thing to do with 3rd
party components usage etc..


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Duplicated text when using .append in widgets

2009-05-02 Thread Alberto M. Scattolo

Hi guys!
It seems to be a problem with an unregistered broadcast receiver
The idea is that I send and sms and I register a broadcast receiver to
know if the sms has been sent.
When can I unregister the broadcast receiver?

Thanks a lot to everybody!
--

A
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Random crashes on MapActivity when rendering tile

2009-05-02 Thread JP


I've seen crashes like this (did not take snapshots of the traces to
compare) as well. If I remember correctly, the built-in Map app can be
crashed like that, too. Just as your trace shows, this occurs mostly
in animateTo(). I suspected this had to do with memory availability
(or lack thereof) when new tiles are loaded, so I spent a few days on
optimizing memory usage on my end. I found the problem tapered off
considerably after that campaign. When testing, I have to try pretty
hard now to trigger this (on a standard G1 or emulator session).


On May 2, 7:20 am, chris christ.pe...@gmail.com wrote:
 Hi ,

 I have from time to time some crashes on the google code for drawing
 tiles on a mapActivity.

 05-02 16:03:00.510: WARN/dalvikvm(6278): threadid=23: thread exiting
 with uncaught exception (group=0x4000fe70)
 05-02 16:03:00.540: ERROR/AndroidRuntime(6278): Uncaught handler:
 thread Thread-28 exiting due to uncaught exception
 05-02 16:03:00.540: ERROR/AndroidRuntime(6278):
 java.lang.NullPointerException
 05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
 com.google.googlenav.map.Map.drawTile(Unknown Source)
 05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
 com.google.googlenav.map.Map.drawMapBackground(Unknown Source)
 05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
 com.google.googlenav.map.Map.preLoad(Unknown Source)
 05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
 com.google.android.maps.MapController.animateTo(MapController.java:
 234)
 05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
 com.google.android.maps.MapController.animateTo(MapController.java:
 203)
 05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
 com.piggyback.foxydroid.MainActivity$1.run(MainActivity.java:164)
 05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
 java.lang.Thread.run(Thread.java:1058)

 and this in /data/anr/traces.txt
 Thread-28 prio=5 tid=23 NATIVE
   | group=main sCount=1 dsCount=0 s=0 obj=0x43590018
   | sysTid=6314 nice=0 sched=0/0 handle=1750032
   at android.os.BinderProxy.transact(Native Method)
   at android.app.ActivityManagerProxy.handleApplicationError
 (ActivityManagerNative.java:2103)
   at com.android.internal.os.RuntimeInit.crash(RuntimeInit.java:302)
   at com.android.internal.os.RuntimeInit
 $UncaughtHandler.uncaughtException(RuntimeInit.java:75)
   at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:887)
   at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:884)

 Any idea what could cause such crashes and how to avoid/prevent them
 to crash my application ?

 Chris
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Random crashes on MapActivity when rendering tile

2009-05-02 Thread JP

One more tip - I got the best bang for the buck by reducing the
footprints of bitmaps and canvases. Mine were unnecessarily big, at
first.

On May 2, 8:05 am, JP joachim.pfeif...@gmail.com wrote:
 I've seen crashes like this (did not take snapshots of the traces to
 compare) as well. If I remember correctly, the built-in Map app can be
 crashed like that, too. Just as your trace shows, this occurs mostly
 in animateTo(). I suspected this had to do with memory availability
 (or lack thereof) when new tiles are loaded, so I spent a few days on
 optimizing memory usage on my end. I found the problem tapered off
 considerably after that campaign. When testing, I have to try pretty
 hard now to trigger this (on a standard G1 or emulator session).

 On May 2, 7:20 am, chris christ.pe...@gmail.com wrote:

  Hi ,

  I have from time to time some crashes on the google code for drawing
  tiles on a mapActivity.

  05-02 16:03:00.510: WARN/dalvikvm(6278): threadid=23: thread exiting
  with uncaught exception (group=0x4000fe70)
  05-02 16:03:00.540: ERROR/AndroidRuntime(6278): Uncaught handler:
  thread Thread-28 exiting due to uncaught exception
  05-02 16:03:00.540: ERROR/AndroidRuntime(6278):
  java.lang.NullPointerException
  05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
  com.google.googlenav.map.Map.drawTile(Unknown Source)
  05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
  com.google.googlenav.map.Map.drawMapBackground(Unknown Source)
  05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
  com.google.googlenav.map.Map.preLoad(Unknown Source)
  05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
  com.google.android.maps.MapController.animateTo(MapController.java:
  234)
  05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
  com.google.android.maps.MapController.animateTo(MapController.java:
  203)
  05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
  com.piggyback.foxydroid.MainActivity$1.run(MainActivity.java:164)
  05-02 16:03:00.540: ERROR/AndroidRuntime(6278): at
  java.lang.Thread.run(Thread.java:1058)

  and this in /data/anr/traces.txt
  Thread-28 prio=5 tid=23 NATIVE
| group=main sCount=1 dsCount=0 s=0 obj=0x43590018
| sysTid=6314 nice=0 sched=0/0 handle=1750032
at android.os.BinderProxy.transact(Native Method)
at android.app.ActivityManagerProxy.handleApplicationError
  (ActivityManagerNative.java:2103)
at com.android.internal.os.RuntimeInit.crash(RuntimeInit.java:302)
at com.android.internal.os.RuntimeInit
  $UncaughtHandler.uncaughtException(RuntimeInit.java:75)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:887)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:884)

  Any idea what could cause such crashes and how to avoid/prevent them
  to crash my application ?

  Chris
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Documentation does not specify when an API was added

2009-05-02 Thread a druid

WOuld be a good feature.
I'm missing it.


On May 1, 11:45 pm, Jon Colverson jjc1...@gmail.com wrote:
 On May 1, 9:27 pm, Mike Hearn mh.in.engl...@gmail.com wrote:

  I noticed WebView seemed to have some new methods I didn't remember
  from before. Unfortunately I can't tell exactly which ones are new,
  without actually trying them and waiting for the SDK to catch the
  mistake.

  Could the docs please state in which API release a method, class,
  interface, enum etc was added? This is pretty fundamental to know when
  trying to figure out how to implement something.

 I agree that it would be very nice to have this in the docs, but in
 the meantime there are always the API Differences 
 reports:http://developer.android.com/sdk/api_diff/3/changes.html

 I filed an issue about the 
 Javadocs:http://code.google.com/p/android/issues/detail?id=2557

 --
 Jon
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] AOP support

2009-05-02 Thread Raja Nagendra Kumar

Hi,

Does AOP support with in Android sdk. If no, is it possible to use the
exsiting AOP  impl. and use them to bulild the application. Does AOP
break Andriod applications design in any way.

Any URL to know more on this topic would be very useful.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Duplicated text when using .append in widgets

2009-05-02 Thread Mark Murphy

Alberto M. Scattolo wrote:
 Hi guys!
 It seems to be a problem with an unregistered broadcast receiver
 The idea is that I send and sms and I register a broadcast receiver to
 know if the sms has been sent.
 When can I unregister the broadcast receiver?

If you registered it via registerReceiver(), call unregisterReceiver()
whenever you are done with it.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Activity execute onDestroy() and onCreate() method when push on keyboard.

2009-05-02 Thread apostl...@gmail.com

I use sdk 1.5 version and same to my handphone, my handphone is use
G1. Now i test my application on my handphone. When i push on
keyboard,  i found system will destroy current activity(execute
onDestroy() method) and execute onCreate() method again. So i will all
current status and all datas. I don't wish this happen, how to block
system execute onDestroy() and onCreate() when i open and close
keyboard? Anybody can help me? thanks a lot!
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Can I put something into the ScrollView of WebView?

2009-05-02 Thread Mariano Kamp

Hi,

   I show articles in WebView and would like to add some additional  
information, e.g. publishing date, author etc., into the same  
ScrollView above the original content. So that it usually doesn't take  
up space, but the user can just scroll back when the information is  
needed.

   Did any of you do something like that in a sane way?

   I thought I can put my stuff into the same ScrollView that WebView  
uses, but when looking at it with hierarchyviewer I can't see any  
children, it's probably native.

Cheers,
Mariano

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Mime type on download file

2009-05-02 Thread arnouf

Hi all,

I would like to a mimetype to Android Web browser, to allow opening my
application when a certain mime type file is downloaded by the web
browser.

Apparently, only media file's mime type can be supported by the web
browser. Is it right?
How can I do it?
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Mime type on download file

2009-05-02 Thread Mark Murphy

arnouf wrote:
 I would like to a mimetype to Android Web browser, to allow opening my
 application when a certain mime type file is downloaded by the web
 browser.
 
 Apparently, only media file's mime type can be supported by the web
 browser. Is it right?

No.

 How can I do it?

AFAIK, all you need to do is implement an appropriate intent-filter on
your activity.

http://developer.android.com/guide/samples/NotePad/AndroidManifest.html

In the above example, the MIME type is one unique to Notepad
(vnd.android.cursor.item/vnd.google.note) and unlikely to be seen on the
Web. In your case, you would use the actual MIME type you wish to handle.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android App Developer Training: http://commonsware.com/training.html

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: conversion to dalvik format failed with error 1

2009-05-02 Thread CnmJbm

i got the same error, TOO!!!

May Day

On Apr 28, 3:57 pm, chris.cap...@gmail.com chris.cap...@gmail.com
wrote:
 Hi,

 I just updated to SDK 1.5 and all of my projects are failing to build
 with the following error:

 [2009-04-28 15:53:23 - Utilities] no classfiles specified
 [2009-04-28 15:53:23 - Utilities] Conversion to Dalvik format failed
 with error 1

 (Utilities is the name of this specific project.)

 Any idea why? I'm on Ubuntu 9.04 x64. Before the update to 1.5
 everything worked fine. Thanks.

 Chris
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Mime type on download file

2009-05-02 Thread arnouf

Hi Mark and thank for your answer...
I know that it's not the first time that you answer to this type of
problem...

But my question wasn't not explain enough: I would like to open
directly file after the download and not force user to click on file
and click on View or Open entry.

Can you help me about this issue?

Regards

On 2 mai, 18:44, Mark Murphy mmur...@commonsware.com wrote:
 arnouf wrote:
  I would like to a mimetype to Android Web browser, to allow opening my
  application when a certain mime type file is downloaded by the web
  browser.

  Apparently, only media file's mime type can be supported by the web
  browser. Is it right?

 No.

  How can I do it?

 AFAIK, all you need to do is implement an appropriate intent-filter on
 your activity.

 http://developer.android.com/guide/samples/NotePad/AndroidManifest.html

 In the above example, the MIME type is one unique to Notepad
 (vnd.android.cursor.item/vnd.google.note) and unlikely to be seen on the
 Web. In your case, you would use the actual MIME type you wish to handle.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://twitter.com/commonsguy

 Android App Developer Training:http://commonsware.com/training.html
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: conversion to dalvik format failed with error 1

2009-05-02 Thread CnmJbm

ok, it seems i fixed it on my environment.

just delete the R.java (by refreshing the project) and rebuild the
project.

On May 2, 9:57 am, CnmJbm cnm...@gmail.com wrote:
 i got the same error, TOO!!!

 May Day

 On Apr 28, 3:57 pm, chris.cap...@gmail.com chris.cap...@gmail.com
 wrote:

  Hi,

  I just updated to SDK 1.5 and all of my projects are failing to build
  with the following error:

  [2009-04-28 15:53:23 - Utilities] no classfiles specified
  [2009-04-28 15:53:23 - Utilities] Conversion to Dalvik format failed
  with error 1

  (Utilities is the name of this specific project.)

  Any idea why? I'm on Ubuntu 9.04 x64. Before the update to 1.5
  everything worked fine. Thanks.

  Chris
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SlidingDrawer issue #1?

2009-05-02 Thread dan raaka
take a look at the Launcher source code in the open source
./packages/app/Launcher
That should serve as a good example as to how to use it ..

-Dan

On Fri, May 1, 2009 at 8:29 PM, Sheepz eladk...@gmail.com wrote:


 anyone found a solution?

 On May 1, 10:03 am, cannehal tomasz.l...@gmail.com wrote:
  I tkink I have the same issue. For handle I have ImageView and for
  content I am using LinearLayout with some views inside of it.
  There is probably problem with eclipse plugin because in runtime it
  works fine.
 
  On May 1, 7:01 am, Sheepz eladk...@gmail.com wrote:
 
   anyone else found something here?
 
   On Apr 30, 5:43 pm, Sheepz eladk...@gmail.com wrote:
 
okay, that didnt work :(
SlidingDrawer android:id=@+id/SlidingDrawer01
android:layout_width=wrap_content
android:layout_height=wrap_content
 android:handle=@+id/ImageView01
android:content=@+id/ImageView02
ImageView android:id=@id/ImageView01
android:layout_width=wrap_content
android:layout_height=wrap_content android:src=@drawable/back2/
ImageView
ImageView android:id=@id/ImageView02
android:layout_width=wrap_content
android:layout_height=wrap_content android:src=@drawable/ahh/
ImageView
/SlidingDrawer
 
still getting the same message in the ADT only now when launching the
app, it simply stalls half drawn instead of giving an error message
saying the application threw an exception...
 
On Apr 30, 5:40 pm, Romain Guy romain...@google.com wrote:
 
 You must use different views, it doesn't make sense to have the
 same
 view, it's going to confuse SlidingDrawer :)
 
 On Thu, Apr 30, 2009 at 2:38 PM, Sheepz eladk...@gmail.com
 wrote:
 
  yeah, i figured that might be it, but even after this fix:
  SlidingDrawer android:id=@+id/SlidingDrawer01
  android:layout_width=wrap_content
  android:layout_height=wrap_content
 android:handle=@+id/ImageView01
  android:content=@+id/ImageView01
  ImageView android:id=@id/ImageView01
  android:layout_width=wrap_content
  android:layout_height=wrap_content
 android:src=@drawable/ahh/
  ImageView
  /SlidingDrawer
  i still get the same error - i'm gonna try using diffrent views
 for
  the content and the handle
  brb :)
 
  On Apr 30, 5:32 pm, Romain Guy romain...@google.com wrote:
  There is a bug indeed, the exception message says the handle
 is
  missing, but the content is missing. Check out the javadoc.
 I'll fix
  the exception message.
 
  On Thu, Apr 30, 2009 at 2:26 PM, Sheepz eladk...@gmail.com
 wrote:
 
   okay, i might be missing something, the reason i think that
 this is a
   bug is that if you use the supplied tool, and cannot avoid
 getting an
   exception - it's a bug...
   i don't see any way around it - the way to create this widget
 is:
   a) create widget
   b) get exception
   c) fix error
   d) populate it with the values you want
 
   by the way, i still havent gotten it to work on my app -
 here's the
   code:
   TableLayout
   LinearLayout
   ...
   /LinearLayout
 
   SlidingDrawer android:id=@+id/SlidingDrawer01
   android:layout_width=wrap_content
   android:layout_height=wrap_content android:handle=@+id/
   ImageView01
 
   ImageView android:id=@+id/ImageView01
   android:layout_width=wrap_content
   android:layout_height=wrap_content
 android:src=@drawable/ahh/
   ImageView
 
   /SlidingDrawer
   /TableLayout
 
   I guess i'm doing something wrong here - but i'm used to the
 whole
   hierarchical way of things - why is this different in it's
   implementation?
   Thanks for the quick answers btw!
   Sh.
   (p.s. if you want to see the rest of the layout, it's
 available at:
  http://code.google.com/p/bestcardgameever-android/)
 
   On Apr 30, 5:21 pm, Romain Guy romain...@google.com wrote:
   It *needs* a handle. It's not a bug, it's a requirement to
 make the widget work.
 
   On Thu, Apr 30, 2009 at 2:16 PM, Sheepz eladk...@gmail.com
 wrote:
 
so you mean i have to put some content in it and only then
 it will be
visilble? even if this is true, it's still a bug - albeit
 with a much
lower severity...
i'll check it out and report back in a few.
 
On Apr 30, 5:10 pm, Romain Guy romain...@google.com
 wrote:
Do what the exception says:
 
java.lang.IllegalArgumentException: The handle attribute
 is required
and must refer to a valid child.
 
You need to define the widget to use as the handle of the
 drawer.
 
On Thu, Apr 30, 2009 at 2:02 PM, Sheepz 
 eladk...@gmail.com wrote:
 
 when adding a slidingDrawer object to my application, i
 got this error
 when trying to display it on the main.xml layout view
 i used that view to create it as the bottommost
 component, and
 immediatly got this 

[android-developers] Re: MapView showing as black screen after upgrade to 1.5

2009-05-02 Thread Derek

Thanks JP, looks like MyLocationOverlay.enableCompass() is the
culprit.  Commenting out that call is allowing the view to display.


On May 2, 1:02 am, JP joachim.pfeif...@gmail.com wrote:
 Check if your app might be stuck in your overridden
 MapActivity.onCreate().
 I had that problem and shuffle things in onCreate() around. Once
 onCreated() completes, the map showed as had been.

 On May 1, 10:19 pm, Derek dlawl...@gmail.com wrote:

  Has anyone seen their MapView which was working in 1.1 displaying a
  plain black screen (no errors) after compling with the 1.5 SDK?  I
  made sure to copy the debug.keystore from the 1.1 location to the new
  1.5 location so its compiling and loading on the phone correctly (I
  did a reinstall not uninstall/install) and shouldn't need a new
  mapsAPI key.

  No errors are showing up in DDMS other than:
  Failed to find provider info for com.google.settings

  Any ideas would be much appreciated!

  Thanks,
  Derek
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: is android:layout_width and android:layout_height manditory attributes

2009-05-02 Thread Dianne Hackborn
There is no default, a value must be supplied.  And I don't think
fill_parent is significantly more common than wrap_content.

On Sat, May 2, 2009 at 7:51 AM, Raja Nagendra Kumar 
nagendra.r...@tejasoft.com wrote:


 All the view components does take layout_height, layout_width
 attributes.. and most of the time the valid value for them (in righly
 coded views) is fill_parent.

 What is the default value assumed if one is not given in the xml. I
 see such a xml definition fails to load at run time with error message
 instantiation exception. Are there any safe defaults assumed.

 Regards,
 Raja Nagendra Kumar,
 C.T.O
 www.tejasoft.com


 



-- 
Dianne Hackborn
Android framework engineer
hack...@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.

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Duplicated text when using .append in widgets

2009-05-02 Thread Jeff Sharkey

Ooh, this sounds like such a perfect problem to solve with a ListView,
android:stackFromBottom, and a ResourceCursorAdapter.  :)

j

On Sat, May 2, 2009 at 2:40 AM, Alberto M. Scattolo
thedarkfrees...@gmail.com wrote:

 Good morning everybody!

 I'm pretty new to Android so I'm facing some problems :)
 I'm using a TextView widget to show a log, just some text.
 The log content is stored on an SQLite database that my app creates
 and when a new line is added to the databse I use textview.append(my
 last line) to add it. The problems is that when I add a line, it also
 adds a copy of the text that was already displayed. Quite strange!
 An example:
 first line is One, if i add a new line with Two, it prints: One
 \nOne\nTwo. If i add Three it prints One\nOne\nTwo\nOne\nOne\nTwo
 \nThree.
 Can anybody help me to solve this?

 Huge thanks in advance!
 Bests,
 --

 A
 




-- 
Jeff Sharkey
jshar...@google.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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Template ROW using xml and api

2009-05-02 Thread Mark Murphy

Raja Nagendra Kumar wrote:
 We have a table which may have infinite rows. 

Unless you have a device with infinite RAM, your table will have finite
rows.

 Would it be possible to
 create row by using the xml template say
 
 TableRow
   EditText android:id=@+id/tbRelation
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:singleLine=true
 android:scrollHorizontally=true
 android:textSize=20sp/
   Button android:id=@+id/bRelationQuery
   style=?android:attr/buttonStyleSmall
   android:layout_width=wrap_content
   android:layout_height=wrap_content
   android:text=@string/blQuery/
   /TableRow
 
 
 some thing similar to clone of existing row but with different id's
 etc.

Yes and no.

Yes, you should be able to inflate an XML file for a TableRow and use
addView() or something to append it to a TableLayout.

No, by default, each inflated row's elements will have the same IDs as
those in every other row. You would need to call setId() on each View
that needs its own ID, supplying some unique value.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android 1.5 SDK now available

2009-05-02 Thread Raphael

The emulator uses your host (desktop) computer for connecting to the internet.
R/

2009/5/1 Lucky-dog honglian...@gmail.com:

 Hi all
I had install SDK 1.5 and setup AVDs on My windows XP. All these
 things got done successfully. But after I start the emulator up, it
 seems GSM modem has not started and got No Service. Would you like to
 let me know how to fix it? Do emulator require Internet connection as
 I had no broad band internet connection now?


 On 5月2日, 上午7时40分, a druid klausf...@gmail.com wrote:
 Hi havexz.

 I backup your proposal. Knowing when a feature has been introduced is
 very useful.
 I suggested something similiar some days ago (if I didn't forget to
 send it)

 On Apr 27, 11:41 pm, havexz bali.param...@gmail.com wrote:



  Thanks Xav for the update.

  I have a suggestion regarding the online 1.5 sdk documentation. Is it
  possible to add the the sdk version (version with which the API is
  introduced) with the APIs in the reference section.

  Example (just a fake example):

  onLayout(boolean changed, int l, int t, int r, int b)
  sdk_v1.0

  onMeasure(int widthMeasureSpec, int heightMeasureSpec)
  sdk_v1.5

  This will help developers to know which apis are new and which ones
  are old and help them cofigure there releases (using minSdkVersion)
  easily and efficiently.

  This kind of notation is also used in Windows Mobile SDK.

  Havexz

  On Apr 27, 1:12 pm, Xavier Ducrohet x...@android.com wrote:

   Hello developers,

   The Android 1.5 SDK, and the 1.5 images for ADP1 are now available for 
   download.

   More information 
   athttp://android-developers.blogspot.com/2009/04/android-15-is-here.html

   Xav
   --
   Xavier Ducrohet
   Android Developer Tools Engineer
   Google Inc.- 隐藏被引用文字 -

 - 显示引用的文字 -
 


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Button Listeners

2009-05-02 Thread Mariam Rady

Hi everyone,
I'm trying to add an OnClickListener and an OnTouchListener on a
button. However when I add the OnClickListener on the button it
works.
Whenever I add the OnTouchListener to the button with the
OnCLickListener, none of them works. Here is the code:

final Button a=new Button(this);
a.setLayoutParams(new
AbsoluteLayout.LayoutParams
(-2,-2,lastxposition,lastyposition));
a.setText(Button);


a.setOnClickListener(new View.OnClickListener
()
{
@Override
public void onClick(View v) {
  openFiles
();
}


});


a.setOnTouchListener(new View.OnTouchListener
()
 {
@Override
public boolean onTouch(View v, MotionEvent
event) {
String tagname=(String) a.getText();
findID(tagname);
return true;
}


});


Can anybody tell me what I do wrong here?


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android Menu

2009-05-02 Thread Raphael

Being consistent with the general user interface is generally a good
way to start.

As Romain said, you could of course include a view in your layout that
looks like a menu, always present, and thus hide or show it depending
on user preferences. The rest of your layout would reflow accordingly.

There are alternatives too. Maybe you don't need to strickly emulate
the menu look. For example the email app have buttons at the bottom of
a thread, with only the minimal choices one need (e.g. reply). The
rest, the non-frequent operations, are in the menu.

Another example is to have a row of buttons at the bottom that depends
on what element is currently selected.

Yet another example: you can reduce this row of buttons to merely
icons with no text, thus saving space. Place the full icon+text in the
context menu = the menu helps for the learning curve and once you
know the icons you can just press them directly.

R/

On Sat, May 2, 2009 at 7:32 AM, Raja Nagendra Kumar
nagendra.r...@tejasoft.com wrote:

 ok.

 One of the point we were considering was to allow the users to choose
 if he needs always visible menu (specially if the menu items or one or
 two).
 Also application using both menu and layout buttons could possibly
 confuse the users and may not be a good UI design.

 Regards,
 Raja Nagendra Kumar
 


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Using AbsolluteLayout even though it is deprecated

2009-05-02 Thread karthikr


Hi Guys,

Ihave used absolute layout in the application that I had earlier
developed and since it has been deprecated now it has been quite
difficult in changing the layout params, can I go forward and publish
the application without removing the absolute layout? what will be the
problems because of this? will this layout become obsolute in the
future?

Regards,
R.Karthik
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: xml view defination to take event handler class name

2009-05-02 Thread Raphael

In the meantime, you could easily automate this behavior on your side:

- one method is to add custom tags to your layout XML. Use an
XmlPullParser to parse the XML and when you find an element with an
android:id and your tag, use reflection to associate a listener to it.

- another method would be to use special id names, for example
__name. Inflate your view content, visit the view hierarchy and for
each view id that matches the name you can automatically attach a
listener found via reflection.

In both cases you can just make an utility method that does this and
use it everywhere.
The visit xml/hierarchy and reflection keywords should tell you
it's going to be expensive.

R/

On Fri, May 1, 2009 at 9:24 PM, Romain Guy romain...@google.com wrote:

 Funny you say that now, I implemented this feature this morning for
 the next release of Android :)

 On Fri, May 1, 2009 at 9:14 PM, Raja Nagendra Kumar
 nagendra.r...@tejasoft.com wrote:

 Instead of finding the button (as per the id specified in xml) i.e

 Button button = (Button)findViewById(R.id.corky);
    // Register the onClick listener with the implementation above
    button.setOnClickListener(mCorkyListener);

 is it possible to set the Listener class name directly in the xml
 definition.

 Most of the time dealing with id's for attaching listeners is
 affecting our productivity.

 Regards,
 Raja Nagendra Kumar,
 C.T.O
 www.tejasoft.com


 




 --
 Romain Guy
 Android framework engineer
 romain...@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

 


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Template ROW using xml and api

2009-05-02 Thread Romain Guy

A table with an infinite number of rows would be better implemented
as a ListView.

On Sat, May 2, 2009 at 11:29 AM, Mark Murphy mmur...@commonsware.com wrote:

 Raja Nagendra Kumar wrote:
 We have a table which may have infinite rows.

 Unless you have a device with infinite RAM, your table will have finite
 rows.

 Would it be possible to
 create row by using the xml template say

 TableRow
           EditText android:id=@+id/tbRelation
                     android:layout_width=wrap_content
                     android:layout_height=wrap_content
                     android:singleLine=true
                     android:scrollHorizontally=true
                     android:textSize=20sp/
           Button android:id=@+id/bRelationQuery
                   style=?android:attr/buttonStyleSmall
                   android:layout_width=wrap_content
                   android:layout_height=wrap_content
                   android:text=@string/blQuery/
       /TableRow


 some thing similar to clone of existing row but with different id's
 etc.

 Yes and no.

 Yes, you should be able to inflate an XML file for a TableRow and use
 addView() or something to append it to a TableLayout.

 No, by default, each inflated row's elements will have the same IDs as
 those in every other row. You would need to call setId() on each View
 that needs its own ID, supplying some unique value.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://twitter.com/commonsguy

 Warescription: Three Android Books, Plus Updates, $35/Year

 




-- 
Romain Guy
Android framework engineer
romain...@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

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: is android:layout_width and android:layout_height manditory attributes

2009-05-02 Thread Romain Guy

 All the view components does take layout_height, layout_width
 attributes.. and most of the time the valid value for them (in righly
 coded views) is fill_parent.

fill_parent is not more common than wrap_content, it depends on your
UI. There is no default, you must specify these params.

-- 
Romain Guy
Android framework engineer
romain...@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

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Trouble migrating apps to 1.5

2009-05-02 Thread Raphael

Let's start by that simple question: What OS are you using? Windows,
Linux, MacOS?

R/

On Sat, May 2, 2009 at 3:46 AM, Teo teomina...@gmail.com wrote:
 Hmm, the problem reappears after restarting and i still have to do adb
 kill-server every time.

 On Thu, Apr 30, 2009 at 9:28 PM, Teo teomina...@gmail.com wrote:

 Hi, thanks for the response - fixed it in the meanwhile. Apparently it was
 something of this sort, i just tried adb kill-server and everything worked
 like a charm :)

 On Thu, Apr 30, 2009 at 9:26 PM, havexz bali.param...@gmail.com wrote:

 One small question which platform you running on windows/linux? And by
 any chance there are two instances of the emulator running? One is
 visible and other is running in the background. That can also cause
 this issue.

 On Apr 30, 12:34 pm, Teo teomina...@gmail.com wrote:
  Apparently the emulator can't attach itself to the adb tool too...
 
  On Apr 30, 4:06 pm, Teo teomina...@gmail.com wrote:
 
 
 
   Hi,
 
   is anyone else having trouble with the new app running 'system'? My
   emulator just ignores them, can't launch any app. Changed the project
   build target to 1.5 and made sure my AVD is 1.5 too.
 
   If i run once, when the emulator isn't started, after it starts it
   has
   no error message (and does nothing). Then, every time i try to run
   the
   app it says emulator: ERROR: the user data image is used by another
   emulator. aborting. I'm sure i must be doing something wrong, but i
   can't figure it out :) Any help is appreciated...
 
   Thanks,
   Teo- Hide quoted text -
 
  - Show quoted text -




 --
 Teo (a.k.a. Teominator a.k.a. Teodor Filimon)
 site www.teodorfilimon.com | blog www.teodorfilimon.blogspot.com
 GMT +2



 --
 Teo (a.k.a. Teominator a.k.a. Teodor Filimon)
 site www.teodorfilimon.com | blog www.teodorfilimon.blogspot.com
 GMT +2

 


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Can I put something into the ScrollView of WebView?

2009-05-02 Thread Romain Guy

WebView doesn't use a ScrollView, it handles scrolling itself, just
like ListView.

On Sat, May 2, 2009 at 9:18 AM, Mariano Kamp mariano.k...@gmail.com wrote:

 Hi,

   I show articles in WebView and would like to add some additional
 information, e.g. publishing date, author etc., into the same
 ScrollView above the original content. So that it usually doesn't take
 up space, but the user can just scroll back when the information is
 needed.

   Did any of you do something like that in a sane way?

   I thought I can put my stuff into the same ScrollView that WebView
 uses, but when looking at it with hierarchyviewer I can't see any
 children, it's probably native.

 Cheers,
 Mariano

 




-- 
Romain Guy
Android framework engineer
romain...@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

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Validating view components at compile time

2009-05-02 Thread Romain Guy

This cannot be checked at compile time. Well, it could be checked at
compile time but you could potentially get false negatives. XML
inflation uses reflection so the check happens at runtime.

On Sat, May 2, 2009 at 7:58 AM, Raja Nagendra Kumar
nagendra.r...@tejasoft.com wrote:

 Hi,

 We see that if there are any xml view tags, which does not exist are
 going though at compile time but fails at run time.. such as xml like
 below are valid during compile time but not at run time as it is not
 able to find ATableLayout

 ATableLayout android:layout_width=fill_parent
                 android:layout_height=fill_parent
                 android:stretchColumns=0,1,2/ATableLayout 

 Does aapi has any options to check this at compile time it self.

 Also, was there any intent of doing this at run time as opposed to at
 compile time. I am hoping this may have some thing to do with 3rd
 party components usage etc..


 




-- 
Romain Guy
Android framework engineer
romain...@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

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Sqlite open error : unable to open database file

2009-05-02 Thread havexz

URGENT - I had uploaded an application with copy protection on. After
that i had removed the copy protection but my new update is unable to
access the files created by older version. Is there a way to retrieve
the data from the older version so that user data is not lost?

On Apr 29, 9:17 pm, havexz bali.param...@gmail.com wrote:
 Many of my application users are getting this error. There is no
 reason in the code that leads to this. For the background,  I had
 released the application with copy protection on and then next day i
 had switched it off as people with dev phones are unable to download
 the app. Any solution for this problem? Can anyway I can help the app
 users to retrieve their data?

 android.database.sqlite.SQLiteException: unable to open database file
 at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
 at android.database.sqlite.SQLiteDatabase.init(SQLiteDatabase.java:
 1421)
 at android.database.sqlite.SQLiteDatabase.openDatabase
 (SQLiteDatabase.java:537)
 at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase
 (SQLiteDatabase.java:558)
 at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase
 (SQLiteDatabase.java:551)
 at android.app.ApplicationContext.openOrCreateDatabase
 (ApplicationContext.java:427)
 at android.content.ContextWrapper.openOrCreateDatabase
 (ContextWrapper.java:181)
 at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase
 (SQLiteOpenHelper.java:98)
 at com.myactivity.backend.myactivityDBAdapter.open
 (myactivityDBAdapter.java:408)
 at com.myactivity.views.myactivityMain.onCreate(myactivityMain.java:
 233)
 at android.app.Instrumentation.callActivityOnCreate
 (Instrumentation.java:1122)
 at android.app.ActivityThread.performLaunchActivity
 (ActivityThread.java:2104)
 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
 2157)
 at android.app.ActivityThread.access$1800(ActivityThread.java:112)
 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
 1581)
 at android.os.Handler.dispatchMessage(Handler.java:88)
 at android.os.Looper.loop(Looper.java:123)
 at android.app.ActivityThread.main(ActivityThread.java:3739)
 at java.lang.reflect.Method.invokeNative(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:515)
 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
 (ZygoteInit.java:739)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
 at dalvik.system.NativeStart.main(Native Method)
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Regarding APN settings for 3G network.

2009-05-02 Thread sush

Hi,

I was trying audio/video streaming in android G1 from from rtsp server
through a 3G n/w. In order to do that I tried using a 3G sim where a
server would be running all the time for streaming of music and video.
Once after inserting the sim I tried to add a new APN in the mobile
networks settings in which I gave the name of the APN, port number,
MCC, MNC code and then I tried to start the browser application for
the streaming but it dint even open google home page for me. Is there
any need of some other settings that I had missed out.

Thanks in advance.

Regards,
Sush
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Can I put something into the ScrollView of WebView?

2009-05-02 Thread Mariano Kamp
And do you see any other way to accomplish what I am looking for?Just
putting both into another ScrollView doesn't seem right when the WebView
wants to scroll itself...

On Sat, May 2, 2009 at 9:14 PM, Romain Guy romain...@google.com wrote:


 WebView doesn't use a ScrollView, it handles scrolling itself, just
 like ListView.

 On Sat, May 2, 2009 at 9:18 AM, Mariano Kamp mariano.k...@gmail.com
 wrote:
 
  Hi,
 
I show articles in WebView and would like to add some additional
  information, e.g. publishing date, author etc., into the same
  ScrollView above the original content. So that it usually doesn't take
  up space, but the user can just scroll back when the information is
  needed.
 
Did any of you do something like that in a sane way?
 
I thought I can put my stuff into the same ScrollView that WebView
  uses, but when looking at it with hierarchyviewer I can't see any
  children, it's probably native.
 
  Cheers,
  Mariano
 
  
 



 --
 Romain Guy
 Android framework engineer
 romain...@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

 


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Light theme doen't work properly in 1.5 SDK

2009-05-02 Thread havexz

Hi Jarkman

Well the themes are working fine on 1.1, no issues at all. It just
that light theme has some issues on the 1.5 sdk.

Thanks

On May 2, 3:04 am, jarkman jark...@gmail.com wrote:
 I spent a while having trouble with themes set in onCreate being
 apparently ignored.

 In the end, I moved all our theme setting to the manifest, and had no
 more trouble.

 Richard

 On May 2, 2:34 am, havexz bali.param...@gmail.com wrote:

  I am setting the theme in onCreate() methodof every activity.
  Any screen which has views like text view, radio etc is not working
  fine in Light Theme. The background is black in light theme. One more
  question how to programmatically  change the application theme so that
  i dont have to change it for every activity?

  On Apr 28, 10:29 pm, Jeff Sharkey jshar...@android.com wrote:

   Hmm wait, that wouldn't explain the background colors.  Are you
   setting the theme from the android:theme attribute in your manifest,
   or in onCreate() somewhere?

   j

   On Tue, Apr 28, 2009 at 8:27 PM, Jeff Sharkey jshar...@android.com 
   wrote:
That's because you're probably looking to use textColorPrimaryInverse.  
;)

j

On Tue, Apr 28, 2009 at 7:18 PM,havexzbali.param...@gmail.com wrote:

Thats right what I am trying to say is that when I apply white theme
then the text views become black. I mean the text become black but the
background also remains black. But this wont happen with the list
view. So do i have to explicitly set the color of the background for
the them. Currently I am not setting any background. Here is what I am
doing : this is the xml for Activity

LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
       android:layout_height=fill_parent
android:layout_width=fill_parent
       android:orientation=vertical android:id=@+id/view_xyz

       ScrollView android:id=@+id/ScrollView01
               android:layout_height=wrap_content 
android:layout_weight=1
               android:layout_width=fill_parent

               RelativeLayout android:id=@+id/RelativeLayout01
                       android:layout_width=wrap_content
android:layout_height=wrap_content
                       TextView android:layout_height=wrap_content
                               android:layout_width=fill_parent 
android:text=@string/title
                               
android:gravity=center_vertical|center_horizontal android:id=@
+id/title_text
                               android:textSize=10pt 
android:textColor=?android:attr/
textColorPrimary/TextView
                       TextView android:layout_width=wrap_content
                               android:layout_height=wrap_content 
android:id=@+id/xyz_text
                               android:layout_below=@+id/title_text 
android:text=@string/
xyz_text_string
                               android:textSize=6pt/TextView
               /RelativeLayout
       /ScrollView
/LinearLayout

Please help. Same code works fine on 1.1 but not on 1.5

On Apr 28, 8:00 pm, Romain Guy romain...@google.com wrote:
TextView and ScrollView do not have a background.

On Tue, Apr 28, 2009 at 5:55 PM,havexzbali.param...@gmail.com wrote:

 When apply the white theme, the text views and scrollviews display
 black backgroundand its very hard to read the text. The same app
 works fine on the 1.1 SDK. I am running the application on the Dev
 Phone (but emulator also have same symptoms)

--
Romain Guy
Android framework engineer
romain...@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

--
Jeff Sharkey
jshar...@google.com

   --
   Jeff Sharkey
   jshar...@google.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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Can I put something into the ScrollView of WebView?

2009-05-02 Thread Romain Guy

Modify the HTML or the DOM :)

On Sat, May 2, 2009 at 12:24 PM, Mariano Kamp mariano.k...@gmail.com wrote:
 And do you see any other way to accomplish what I am looking for?
 Just putting both into another ScrollView doesn't seem right when the
 WebView wants to scroll itself...

 On Sat, May 2, 2009 at 9:14 PM, Romain Guy romain...@google.com wrote:

 WebView doesn't use a ScrollView, it handles scrolling itself, just
 like ListView.

 On Sat, May 2, 2009 at 9:18 AM, Mariano Kamp mariano.k...@gmail.com
 wrote:
 
  Hi,
 
    I show articles in WebView and would like to add some additional
  information, e.g. publishing date, author etc., into the same
  ScrollView above the original content. So that it usually doesn't take
  up space, but the user can just scroll back when the information is
  needed.
 
    Did any of you do something like that in a sane way?
 
    I thought I can put my stuff into the same ScrollView that WebView
  uses, but when looking at it with hierarchyviewer I can't see any
  children, it's probably native.
 
  Cheers,
  Mariano
 
  
 



 --
 Romain Guy
 Android framework engineer
 romain...@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




 




-- 
Romain Guy
Android framework engineer
romain...@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

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] URGENT - Retrieve User Data

2009-05-02 Thread havexz

URGENT - I had uploaded an application with copy protection on. After
that i had removed the copy protection but my new update is unable to
access the files created by older version. Is there a way to retrieve
the data from the older version so that user data is not lost?
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: URGENT - Retrieve User Data

2009-05-02 Thread havexz

Also I dont want user to uninstall the application and reinstall it as
this leads to loss of data.

On May 2, 2:29 pm, havexz bali.param...@gmail.com wrote:
 URGENT - I had uploaded an application with copy protection on. After
 that i had removed the copy protection but my new update is unable to
 access the files created by older version. Is there a way to retrieve
 the data from the older version so that user data is not lost?
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Regarding APN settings for 3G network.

2009-05-02 Thread Marco Nelissen
For what carrier/network is your 3G sim, and is there a data plan associated
with the sim?

On Sat, May 2, 2009 at 12:22 PM, sush susama.choudh...@gmail.com wrote:


 Hi,

 I was trying audio/video streaming in android G1 from from rtsp server
 through a 3G n/w. In order to do that I tried using a 3G sim where a
 server would be running all the time for streaming of music and video.
 Once after inserting the sim I tried to add a new APN in the mobile
 networks settings in which I gave the name of the APN, port number,
 MCC, MNC code and then I tried to start the browser application for
 the streaming but it dint even open google home page for me. Is there
 any need of some other settings that I had missed out.

 Thanks in advance.

 Regards,
 Sush
 


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Devs: Give your thumbs up on these missing Market features

2009-05-02 Thread Keith Wiley

I have started a discussion thread on the Discuss group at:
http://groups.google.com/group/android-discuss/browse_thread/thread/31876cf39acfb836

I have also entered an Issue on b.android.com at:
http://code.google.com/p/android/issues/detail?id=2558

They both list a straight-forward set of recommendations for
improvements to the Market comment system.  If we keep the threads
alive and if many developers vote in favor of issue 2558 by starring
it, then maybe that will push Google to act on them more quickly.

Vote on the issue and keep the thread alive.

Cheers!
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to add a button widget to a custom ImageView.

2009-05-02 Thread wmhtet


it seems that similar question about Custom View and button has been
asked at the following thread.
http://groups.google.com/group/android-beginners/browse_thread/thread/d2e84054373d1703/a2bdcf9d824c2cdf?lnk=gstq=Button+in+Custom+View#a2bdcf9d824c2cdf


I think that I have some workaround to it using XML. It is to call
Custom View in XML with all the required button. First you need to
create your View Constructor with AttributeSet,  declare the XML with
the merge tag and call the Custom XML in it with the desire button
layout.
The rest is a business as usual, call setContentView
(R.layout.myCustomlayout); from myActivity in onCreate.


public class myView extends View{
   public myView(Context context,AttributeSet attrs){
   super(context,attrs);

   }
   }

?xml version=1.0 encoding=utf-8?

merge
   xmlns:android=http://schemas.android.com/apk/res/android;
   xmlns:myView=http://schemas.android.com/apk/res/
com.g1wmhtet.myapp

   com.g1wmhtet.myapp.myView
   android:layout_width=fill_parent
   android:layout_height=fill_parent

   android:scaleType=center /

 LinearLayout
 android:orientation=vertical
 android:layout_height=wrap_content
 android:layout_width=fill_parent
 android:layout_gravity=bottom
 TableLayout
android:layout_height=wrap_content
android:layout_width=wrap_content
android:layout_gravity=center
android:stretchColumns=*
TableRow
 Button
android:id=@+id/button1
android:text=@string/label1 /
 Button
android:id=@+id/button2
android:text=@string/label2 /
 /TableRow
TableRow
 Button
android:id=@+id/button3
android:text=@string/label3 /
 Button
android:id=@+id/button4
android:text=@string/label4 /
/TableRow
 /TableLayout
  /LinearLayout

/merge

---
Here are my references:
http://www.curious-creature.org/2009/03/01/android-layout-tricks-3-optimize-part-1/
http://groups.google.com/group/android-beginners/browse_thread/thread/1876b8ebc08ae3a7/a747b0a87481bf22?lnk=gstq=error+inflating+xml+layout+file#a747b0a87481bf22

wmhtet
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Devs: Give your thumbs up on these missing Market features

2009-05-02 Thread Raphael

Neither android-developers nor android-discuss are correct channels
for Market feedback.
Please use the market support forum here for this kind of purpose, it
will be much more effective:
  http://www.google.com/support/forum/p/Android+Market

R/


On Sat, May 2, 2009 at 1:43 PM, Keith Wiley kbwi...@gmail.com wrote:

 I have started a discussion thread on the Discuss group at:
 http://groups.google.com/group/android-discuss/browse_thread/thread/31876cf39acfb836

 I have also entered an Issue on b.android.com at:
 http://code.google.com/p/android/issues/detail?id=2558

 They both list a straight-forward set of recommendations for
 improvements to the Market comment system.  If we keep the threads
 alive and if many developers vote in favor of issue 2558 by starring
 it, then maybe that will push Google to act on them more quickly.

 Vote on the issue and keep the thread alive.

 Cheers!
 


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: URGENT - Retrieve User Data

2009-05-02 Thread Raphael

I believe there is no way of doing that.
R/

On Sat, May 2, 2009 at 12:29 PM, havexz bali.param...@gmail.com wrote:

 URGENT - I had uploaded an application with copy protection on. After
 that i had removed the copy protection but my new update is unable to
 access the files created by older version. Is there a way to retrieve
 the data from the older version so that user data is not lost?
 


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Devs: Give your thumbs up on these missing Market features

2009-05-02 Thread Keith Wiley

Actually, that approach seems to be completely ineffective,
considering that I posted this message there yesterday and received no
responses at all, whereas my post on the Discuss forum quickly
received several responses, and the post on code.google.com quickly
received a few votes.  I doubt that all developers are reading all the
forums with the even distribution you are implying.

I take your point that the purpose of dividing the forums up is to
keep them on-topic, but that only works if everyone reads
everything...which I doubt.  Lots of people probably don't do that;
they just read a few of the main forums, in which case topic-division
actually prevents people from seeing all subject lines.

Both approaches have advantages and disadvantages.  Sorry to have
cluttered the list.

Cheers!

On May 2, 2:22 pm, Raphael r...@android.com wrote:
 Neither android-developers nor android-discuss are correct channels
 for Market feedback.
 Please use the market support forum here for this kind of purpose, it
 will be much more effective:
  http://www.google.com/support/forum/p/Android+Market

 R/

 On Sat, May 2, 2009 at 1:43 PM, Keith Wiley kbwi...@gmail.com wrote:

  I have started a discussion thread on the Discuss group at:
 http://groups.google.com/group/android-discuss/browse_thread/thread/3...

  I have also entered an Issue on b.android.com at:
 http://code.google.com/p/android/issues/detail?id=2558

  They both list a straight-forward set of recommendations for
  improvements to the Market comment system.  If we keep the threads
  alive and if many developers vote in favor of issue 2558 by starring
  it, then maybe that will push Google to act on them more quickly.

  Vote on the issue and keep the thread alive.

  Cheers!
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Button Listeners

2009-05-02 Thread Raphael

Please see the reply I made a couple hours ago to the same thing you
posted in android-beginners.
http://groups.google.com/group/android-beginners/browse_thread/thread/f25bb151ca62bb1/708bd4b8ab765737

R/

On Sat, May 2, 2009 at 11:53 AM, Mariam Rady mariam.r...@gmail.com wrote:

 Hi everyone,
 I'm trying to add an OnClickListener and an OnTouchListener on a
 button. However when I add the OnClickListener on the button it
 works.
 Whenever I add the OnTouchListener to the button with the
 OnCLickListener, none of them works. Here is the code:

                        final Button a=new Button(this);
                        a.setLayoutParams(new
 AbsoluteLayout.LayoutParams
 (-2,-2,lastxposition,lastyposition));
                        a.setText(Button);


                        a.setOnClickListener(new View.OnClickListener
 ()
                        {
                               �...@override
                        public void onClick(View v) {
                                                          openFiles
 ();
                                        }


                        });


                        a.setOnTouchListener(new View.OnTouchListener
 ()
                                 {
                       �...@override
                        public boolean onTouch(View v, MotionEvent
 event) {
                        String tagname=(String) a.getText();
                        findID(tagname);
                        return true;
                                        }


                                });


 Can anybody tell me what I do wrong here?


 


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to create a Toast from a background operation?

2009-05-02 Thread Raphael

From a user point of view, I don't think trying to display a toast
from a non-UI background task makes much sense. Would you like your
usage of the phone to be interrupted by random toasts appearing for no
apparent reason? Notifications are there for that purpose instead.

I'd suggest:
- use toasts in response to immediate user interaction.
- use notifications for information from background tasks.

Using a notification, the user can just know that something happened
and either ignore it, dismiss it or take care of it later. The user
should have more details by looking at the notification area. As an
added benefit clicking on the notification should bring one back to
your app to get an update status view or something.


R/


On Fri, May 1, 2009 at 10:40 AM, Mariano Kamp mariano.k...@gmail.com wrote:
 Hi,
   what is a good way to signal an error from a thread that is not the UI
 thread and you don't know which activity/handler is currently active? Can I
 somehow get eleto the current UI thread?
   Can I somehow use the MainLooper from the application context?
   I use notification for serious events where the user needs to take action,
 e.g. a login failed, but here I am looking for a transient notification with
 a toast and it would be ok if the toast is not seen in some cases.
 Cheers,
 Mariano
 


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: URGENT - Retrieve User Data

2009-05-02 Thread havexz

Thanks for reply but I m still looking for a solutioncan i
some how change the file permissions?

On May 2, 4:25 pm, Raphael r...@android.com wrote:
 I believe there is no way of doing that.
 R/

 On Sat, May 2, 2009 at 12:29 PM, havexz bali.param...@gmail.com wrote:

  URGENT - I had uploaded an application with copy protection on. After
  that i had removed the copy protection but my new update is unable to
  access the files created by older version. Is there a way to retrieve
  the data from the older version so that user data is not lost?
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Suggestion about android.graphics.path for performance

2009-05-02 Thread freeanderson

Hi.

Currently android.graphics.path is JNI.
It has a good performance. Working well.
But I think it need to be added more features to Path.

It's like this:

Path p = new Path();
p.load(stream);
p.save(stream);

The reason is simple. Imagine you want to load TrueType font and to
build it up to Path for drawing.
Now, you have to parse a TrueType font file every each time if you
can't use path.load().
That means, you can't manage glyph cache with Path object.
Not only Path, but there would be more (graphical) objects to be
needed load()/save().

Of course, I tried to use ObjectInputStream.
But it's too slow and it didn't work correctly.
And critically Path data file is too big
For example, to save Alphabet 'S' glyph require about 3KByte. It's
useless.

So I suggest Path.load(), save().
Please consider these features for next version of Android.

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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: StreeView

2009-05-02 Thread Raphael

Looks like the maps addons does not have the streetview activity. I filed a bug.
R/

On Fri, May 1, 2009 at 12:52 AM, Olivier Tournaire olit...@gmail.com wrote:
 Hi all,

 I am currently trying to use StreetView in my application, but I does not
 work. I use an AVD based on the Google API which has Maps (display a simple
 map works well).
 My activity extends MapActivity and tries to call streetview:

     String temp=google.streetview:cbll=31.335198,-86.287204;
     try {
     startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse(temp)));
     } catch( Exception e)
 { ... }

 The problem is that I always catch an exception:

 No Activity found to handle Intent { action=android.intent.action.VIEW
 data=google.streetview:cbll=2.26,46.287204 }

 Any idea idea about what is wrong ?

 Regards,

 Olivier

 


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



[android-developers] Re: Suggestion about android.graphics.path for performance

2009-05-02 Thread Mark Murphy

freeanderson wrote:
 Hi.
 
 Currently android.graphics.path is JNI.
 It has a good performance. Working well.
 But I think it need to be added more features to Path.
 
 It's like this:
 
 Path p = new Path();
 p.load(stream);
 p.save(stream);
 
 The reason is simple. Imagine you want to load TrueType font and to
 build it up to Path for drawing.
 Now, you have to parse a TrueType font file every each time if you
 can't use path.load().
 That means, you can't manage glyph cache with Path object.
 Not only Path, but there would be more (graphical) objects to be
 needed load()/save().
 
 Of course, I tried to use ObjectInputStream.
 But it's too slow and it didn't work correctly.
 And critically Path data file is too big
 For example, to save Alphabet 'S' glyph require about 3KByte. It's
 useless.
 
 So I suggest Path.load(), save().
 Please consider these features for next version of Android.

I would strongly encourage you to post these sorts of suggestions to
http://b.android.com.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Devs: Give your thumbs up on these missing Market features

2009-05-02 Thread Raphael

I'm moving this to android-discuss, where it belongs.
R/

On Sat, May 2, 2009 at 2:27 PM, Keith Wiley kbwi...@gmail.com wrote:

 Actually, that approach seems to be completely ineffective,
 considering that I posted this message there yesterday and received no
 responses at all, whereas my post on the Discuss forum quickly
 received several responses, and the post on code.google.com quickly
 received a few votes.  I doubt that all developers are reading all the
 forums with the even distribution you are implying.

 I take your point that the purpose of dividing the forums up is to
 keep them on-topic, but that only works if everyone reads
 everything...which I doubt.  Lots of people probably don't do that;
 they just read a few of the main forums, in which case topic-division
 actually prevents people from seeing all subject lines.

 Both approaches have advantages and disadvantages.  Sorry to have
 cluttered the list.

 Cheers!

 On May 2, 2:22 pm, Raphael r...@android.com wrote:
 Neither android-developers nor android-discuss are correct channels
 for Market feedback.
 Please use the market support forum here for this kind of purpose, it
 will be much more effective:
  http://www.google.com/support/forum/p/Android+Market

 R/

 On Sat, May 2, 2009 at 1:43 PM, Keith Wiley kbwi...@gmail.com wrote:

  I have started a discussion thread on the Discuss group at:
 http://groups.google.com/group/android-discuss/browse_thread/thread/3...

  I have also entered an Issue on b.android.com at:
 http://code.google.com/p/android/issues/detail?id=2558

  They both list a straight-forward set of recommendations for
  improvements to the Market comment system.  If we keep the threads
  alive and if many developers vote in favor of issue 2558 by starring
  it, then maybe that will push Google to act on them more quickly.

  Vote on the issue and keep the thread alive.

  Cheers!
 


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Suggestion about android.graphics.path for performance

2009-05-02 Thread freeanderson

Yeap. Thank you for information.

On May 3, 7:06 am, Mark Murphy mmur...@commonsware.com wrote:
 freeanderson wrote:
  Hi.

  Currently android.graphics.path is JNI.
  It has a good performance. Working well.
  But I think it need to be added more features to Path.

  It's like this:

  Path p = new Path();
  p.load(stream);
  p.save(stream);

  The reason is simple. Imagine you want to load TrueType font and to
  build it up to Path for drawing.
  Now, you have to parse a TrueType font file every each time if you
  can't use path.load().
  That means, you can't manage glyph cache with Path object.
  Not only Path, but there would be more (graphical) objects to be
  needed load()/save().

  Of course, I tried to use ObjectInputStream.
  But it's too slow and it didn't work correctly.
  And critically Path data file is too big
  For example, to save Alphabet 'S' glyph require about 3KByte. It's
  useless.

  So I suggest Path.load(), save().
  Please consider these features for next version of Android.

 I would strongly encourage you to post these sorts of suggestions 
 tohttp://b.android.com.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://twitter.com/commonsguy

 Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to create a Toast from a background operation?

2009-05-02 Thread Mark Murphy

Mariano Kamp wrote:
 (a) There is a temporary network problem and a toast says that. The
 service goes to sleep and an hour later it tries again. If the user
 didn't pay attention to the problem and the toast then that's fine.

Why not keep a log of failures and display it to the user when they next
launch your application? Or at least have that as an option.

I agree with Raphael -- popping up Toasts in the background would be
annoying to me as a user.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to create a Toast from a background operation?

2009-05-02 Thread Mariano Kamp
Because having many options, logs and tweakable features are just good for
developers, not for users.
I think a toast an hour is not annoying (if something goes slightly wrong),
but I understand that you might think otherwise.

On Sun, May 3, 2009 at 12:08 AM, Mark Murphy mmur...@commonsware.comwrote:


 Mariano Kamp wrote:
  (a) There is a temporary network problem and a toast says that. The
  service goes to sleep and an hour later it tries again. If the user
  didn't pay attention to the problem and the toast then that's fine.

 Why not keep a log of failures and display it to the user when they next
 launch your application? Or at least have that as an option.

 I agree with Raphael -- popping up Toasts in the background would be
 annoying to me as a user.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://twitter.com/commonsguy

 Warescription: Three Android Books, Plus Updates, $35/Year

 


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Sending SMS messages between AVDs (in Eclips)

2009-05-02 Thread lior



I am using Android Eclipse plug in and before the upgrade to the 1.5
SDK I was able shoot messages (SMS) between two emulators just by
using the number that appeared at the top of the emulator window
(5554 , 5556 etc.).

This functionality is not longer working with the 1.5 SDK (at least
for me).

Thoughts on how to make it work?

Lior
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Devs: Give your thumbs up on these missing Market features

2009-05-02 Thread Keith Wiley

It's already there, you're duplicating it.

On May 2, 3:06 pm, Raphael r...@android.com wrote:
 I'm moving this to android-discuss, where it belongs.
 R/

 On Sat, May 2, 2009 at 2:27 PM, Keith Wiley kbwi...@gmail.com wrote:

  Actually, that approach seems to be completely ineffective,
  considering that I posted this message there yesterday and received no
  responses at all, whereas my post on the Discuss forum quickly
  received several responses, and the post on code.google.com quickly
  received a few votes.  I doubt that all developers are reading all the
  forums with the even distribution you are implying.

  I take your point that the purpose of dividing the forums up is to
  keep them on-topic, but that only works if everyone reads
  everything...which I doubt.  Lots of people probably don't do that;
  they just read a few of the main forums, in which case topic-division
  actually prevents people from seeing all subject lines.

  Both approaches have advantages and disadvantages.  Sorry to have
  cluttered the list.

  Cheers!

  On May 2, 2:22 pm, Raphael r...@android.com wrote:
  Neither android-developers nor android-discuss are correct channels
  for Market feedback.
  Please use the market support forum here for this kind of purpose, it
  will be much more effective:
   http://www.google.com/support/forum/p/Android+Market

  R/

  On Sat, May 2, 2009 at 1:43 PM, Keith Wiley kbwi...@gmail.com wrote:

   I have started a discussion thread on the Discuss group at:
  http://groups.google.com/group/android-discuss/browse_thread/thread/3...

   I have also entered an Issue on b.android.com at:
  http://code.google.com/p/android/issues/detail?id=2558

   They both list a straight-forward set of recommendations for
   improvements to the Market comment system.  If we keep the threads
   alive and if many developers vote in favor of issue 2558 by starring
   it, then maybe that will push Google to act on them more quickly.

   Vote on the issue and keep the thread alive.

   Cheers!
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to create a Toast from a background operation?

2009-05-02 Thread Raphael

What you are describing is more or less the current workflow of the
gmail  email app:
- they download regularly your new mails in the background
- you do NOT see any notification nor toast whether emails were
retrieved or failed to or anything.
- you just get a status when you go back to the application itself.

Think about it:
- would I want to see a toast *each* time my cell is out of network? No.
- would I want the device to spend time (and battery) displaying a
toast when I'm not looking at it? No.

The point (a) you described is exactly where you would not want to
display a toast.
Instead on that kind of app I'd like to see a small status icon or
text that says: a/ failure to download, will retry in N minutes or b/
last time fetched N articles.

R/

On Sat, May 2, 2009 at 3:00 PM, Mariano Kamp mariano.k...@gmail.com wrote:
 I agree for the most part, but maybe I was to abstract to get to the details
 where we possibly don't agree.
 My app downloads regularly, say once an hour, new articles.
 There are two noteworthy outcomes:
 (a) There is a temporary network problem and a toast says that. The service
 goes to sleep and an hour later it tries again. If the user didn't pay
 attention to the problem and the toast then that's fine.
 (b) The login fails, because the credentials are wrong. This is not
 recoverable and needs attention. I use a notification to inform the user
 about that. The notification leads the user to the login screen to correct
 the problem. Another attempt at downloading new articles can only be
 executed when the credentials are corrected.

 If I would use a notification for (a) this would be highly annoying for the
 user; at least that is the way I think about it.
 On Sat, May 2, 2009 at 11:38 PM, Raphael r...@android.com wrote:

 From a user point of view, I don't think trying to display a toast
 from a non-UI background task makes much sense. Would you like your
 usage of the phone to be interrupted by random toasts appearing for no
 apparent reason? Notifications are there for that purpose instead.

 I'd suggest:
 - use toasts in response to immediate user interaction.
 - use notifications for information from background tasks.

 Using a notification, the user can just know that something happened
 and either ignore it, dismiss it or take care of it later. The user
 should have more details by looking at the notification area. As an
 added benefit clicking on the notification should bring one back to
 your app to get an update status view or something.


 R/


 On Fri, May 1, 2009 at 10:40 AM, Mariano Kamp mariano.k...@gmail.com
 wrote:
  Hi,
    what is a good way to signal an error from a thread that is not the UI
  thread and you don't know which activity/handler is currently active?
  Can I
  somehow get eleto the current UI thread?
    Can I somehow use the MainLooper from the application context?
    I use notification for serious events where the user needs to take
  action,
  e.g. a login failed, but here I am looking for a transient notification
  with
  a toast and it would be ok if the toast is not seen in some cases.
  Cheers,
  Mariano
  
 




 


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to create a Toast from a background operation?

2009-05-02 Thread Raphael

Being out of network on a cellphone is not slightly wrong, it's
something that happens very regularly.
R/

On Sat, May 2, 2009 at 3:28 PM, Mariano Kamp mariano.k...@gmail.com wrote:
 Because having many options, logs and tweakable features are just good for
 developers, not for users.
 I think a toast an hour is not annoying (if something goes slightly wrong),
 but I understand that you might think otherwise.

 On Sun, May 3, 2009 at 12:08 AM, Mark Murphy mmur...@commonsware.com
 wrote:

 Mariano Kamp wrote:
  (a) There is a temporary network problem and a toast says that. The
  service goes to sleep and an hour later it tries again. If the user
  didn't pay attention to the problem and the toast then that's fine.

 Why not keep a log of failures and display it to the user when they next
 launch your application? Or at least have that as an option.

 I agree with Raphael -- popping up Toasts in the background would be
 annoying to me as a user.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://twitter.com/commonsguy

 Warescription: Three Android Books, Plus Updates, $35/Year




 


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Relationships among apps, tasks, and activities

2009-05-02 Thread devi prasad

Well, I DO think that Android documentation speaks about tasks and
their affinities, contrary to what I said previously :)

I defined a non-default value for the taskAffinity attribute of the
activity in question:
activity android:name=.SingleTaskActivity
 android:label=ChildActivity:SingleTaskActivity
 android:launchMode=singleTask
 android:taskAffinity=com.robosoft.example.taskByIteself
/activity

and the activity gets to run in a separate task.

Both 'taskAffinity' and 'launchMode' are necessary if we want to have
an activity run in a separate task. Alternatively,
Intent.FLAG_ACTIVITY_NEW_TASK may be used in the intent, in case only
'taskAffinity' is mentioned in the manifest.

This is really interesting :)


On Sat, May 2, 2009 at 1:37 PM, devi prasad dpras...@gmail.com wrote:
 Hi, Dianne: this is the portion of the dump that I get by executing
 adb shell dumpsys activity :
 --
 Activities in Current Activity Manager State:
    Task{3 com.robosoft.example}
    clearOnBackground=false numActivities=3 rootWasReset=true
    affinity=com.robosoft.example
    intent=Intent { action=android.intent.action.MAIN
 categories={android.intent.category.LAUNCHER}
                         flags=0x1020

 comp={com.robosoft.example/com.robosoft.example.AppRootActivity} }

    History #3:
        HistoryRecord{434d2090
 {com.robosoft.example/com.robosoft.example.SingleTaskActivity}}
        packageName=com.robosoft.example processName=com.robosoft.example
        app=ProcessRecord{43516130 181:com.robosoft.example/10018}
        Intent { flags=0x1000
        comp={com.robosoft.example/com.robosoft.example.SingleTaskActivity} }

    History #2:
        HistoryRecord{434fb848
 {com.robosoft.example/com.robosoft.example.ChildActivityOfRoot}}
        packageName=com.robosoft.example processName=com.robosoft.example
        app=ProcessRecord{43516130 181:com.robosoft.example/10018}
        Intent {
 comp={com.robosoft.example/com.robosoft.example.ChildActivityOfRoot} }

    History #1:
        HistoryRecord{434fe2e8
 {com.robosoft.example/com.robosoft.example.AppRootActivity}}
        packageName=com.robosoft.example processName=com.robosoft.example
        app=ProcessRecord{43516130 181:com.robosoft.example/10018}
        Intent { action=android.intent.action.MAIN
 categories={android.intent.category.LAUNCHER}
 ---
 As I gather, this shows that all three activities are part of the same
 task, even though I use FLAG_ACTIVITY_NEW_TASK while starting
 'SingleTaskActivity' and mark it with 'singleTask' launch mode. The
 intent flag value (0x1000) indicates this in the top most activity
 entry above.

 I cannot explain this behavior with my current understanding derived
 from the documentation. What am I missing here?

 thanks


 On Sat, May 2, 2009 at 10:50 AM, devi prasad dpras...@gmail.com wrote:
 Hi, Dianne: ok, thanks.
 I use the following functions to determine the task id and if it is
 the root of a task:

 activity.getTaskId();
 activity.isTaskRoot();

 I used logcat looking for useful hints. Let me see if I understand it
 better if I use
 adb shell dumpsys activity



--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: StreeView

2009-05-02 Thread dan raaka
Street is not part of maps !!it is a separate apk ..

On Sat, May 2, 2009 at 3:02 PM, Raphael r...@android.com wrote:


 Looks like the maps addons does not have the streetview activity. I filed a
 bug.
 R/

 On Fri, May 1, 2009 at 12:52 AM, Olivier Tournaire olit...@gmail.com
 wrote:
  Hi all,
 
  I am currently trying to use StreetView in my application, but I does not
  work. I use an AVD based on the Google API which has Maps (display a
 simple
  map works well).
  My activity extends MapActivity and tries to call streetview:
 
  String temp=google.streetview:cbll=31.335198,-86.287204;
  try {
  startActivity(new
 Intent(Intent.ACTION_VIEW,Uri.parse(temp)));
  } catch( Exception e)
  { ... }
 
  The problem is that I always catch an exception:
 
  No Activity found to handle Intent { action=android.intent.action.VIEW
  data=google.streetview:cbll=2.26,46.287204 }
 
  Any idea idea about what is wrong ?
 
  Regards,
 
  Olivier
 
  
 

 


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



[android-developers] Re: Relationships among apps, tasks, and activities

2009-05-02 Thread devi prasad

some more thoughts...
What I've said about taskAffinity and launchMode attributes, in
general, makes sense when the activities are in the same app since the
default value of taskAffinity will be set to the package name. When
the activities across apps activate one another, just the launch mode
value tells if the launched activity would be the root of  the new
task. Again, this is because the package names of the apks would be
different.

On Sun, May 3, 2009 at 5:17 AM, devi prasad dpras...@gmail.com wrote:
 Well, I DO think that Android documentation speaks about tasks and
 their affinities, contrary to what I said previously :)

 I defined a non-default value for the taskAffinity attribute of the
 activity in question:
        activity android:name=.SingleTaskActivity
                     android:label=ChildActivity:SingleTaskActivity
                     android:launchMode=singleTask
                     android:taskAffinity=com.robosoft.example.taskByIteself
        /activity

 and the activity gets to run in a separate task.

 Both 'taskAffinity' and 'launchMode' are necessary if we want to have
 an activity run in a separate task. Alternatively,
 Intent.FLAG_ACTIVITY_NEW_TASK may be used in the intent, in case only
 'taskAffinity' is mentioned in the manifest.

 This is really interesting :)


 On Sat, May 2, 2009 at 1:37 PM, devi prasad dpras...@gmail.com wrote:
 Hi, Dianne: this is the portion of the dump that I get by executing
 adb shell dumpsys activity :
 --
 Activities in Current Activity Manager State:
    Task{3 com.robosoft.example}
    clearOnBackground=false numActivities=3 rootWasReset=true
    affinity=com.robosoft.example
    intent=Intent { action=android.intent.action.MAIN
 categories={android.intent.category.LAUNCHER}
                         flags=0x1020

 comp={com.robosoft.example/com.robosoft.example.AppRootActivity} }

    History #3:
        HistoryRecord{434d2090
 {com.robosoft.example/com.robosoft.example.SingleTaskActivity}}
        packageName=com.robosoft.example processName=com.robosoft.example
        app=ProcessRecord{43516130 181:com.robosoft.example/10018}
        Intent { flags=0x1000
        comp={com.robosoft.example/com.robosoft.example.SingleTaskActivity} }

    History #2:
        HistoryRecord{434fb848
 {com.robosoft.example/com.robosoft.example.ChildActivityOfRoot}}
        packageName=com.robosoft.example processName=com.robosoft.example
        app=ProcessRecord{43516130 181:com.robosoft.example/10018}
        Intent {
 comp={com.robosoft.example/com.robosoft.example.ChildActivityOfRoot} }

    History #1:
        HistoryRecord{434fe2e8
 {com.robosoft.example/com.robosoft.example.AppRootActivity}}
        packageName=com.robosoft.example processName=com.robosoft.example
        app=ProcessRecord{43516130 181:com.robosoft.example/10018}
        Intent { action=android.intent.action.MAIN
 categories={android.intent.category.LAUNCHER}
 ---
 As I gather, this shows that all three activities are part of the same
 task, even though I use FLAG_ACTIVITY_NEW_TASK while starting
 'SingleTaskActivity' and mark it with 'singleTask' launch mode. The
 intent flag value (0x1000) indicates this in the top most activity
 entry above.

 I cannot explain this behavior with my current understanding derived
 from the documentation. What am I missing here?

 thanks


 On Sat, May 2, 2009 at 10:50 AM, devi prasad dpras...@gmail.com wrote:
 Hi, Dianne: ok, thanks.
 I use the following functions to determine the task id and if it is
 the root of a task:

 activity.getTaskId();
 activity.isTaskRoot();

 I used logcat looking for useful hints. Let me see if I understand it
 better if I use
 adb shell dumpsys activity




--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: conversion to dalvik format failed with error 1

2009-05-02 Thread Raphael

For the record, I generally get the Conversion to Dalvik format
failed with error 1 error when I do a checkout of an existing project
in a new workspace. Doing Project  Clean fixes it.

R/

On Tue, Apr 28, 2009 at 3:57 PM, chris.cap...@gmail.com
chris.cap...@gmail.com wrote:

 Hi,

 I just updated to SDK 1.5 and all of my projects are failing to build
 with the following error:

 [2009-04-28 15:53:23 - Utilities] no classfiles specified
 [2009-04-28 15:53:23 - Utilities] Conversion to Dalvik format failed
 with error 1

 (Utilities is the name of this specific project.)

 Any idea why? I'm on Ubuntu 9.04 x64. Before the update to 1.5
 everything worked fine. Thanks.


 Chris
 


--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: AppWidget issues

2009-05-02 Thread AndroidApp

'won't be able to fix' for 1.5 SDK, what about on the cupcake update?
Dont really care about whether it's fixed for the SDK.

On Apr 23, 2:02 pm, Jeff Sharkey jeffrey.shar...@gmail.com wrote:
 So just a heads up that we won't be able to fix the onDeleted() bug
 for the 1.5 SDK.  Here is a quick workaround that you can patch
 against your class that extends AppWidgetProvider to correctly catch
 and handle the onDeleted() event.

 @Override
 public void onReceive(Context context, Intent intent) {
     final String action = intent.getAction();
     if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) {
         final int appWidgetId = extras.getInt
 (AppWidgetManager.EXTRA_APPWIDGET_ID,
                 AppWidgetManager.INVALID_APPWIDGET_ID);
         if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) {
             this.onDeleted(context, new int[] { appWidgetId });
         }
     } else {
         super.onReceive(context, intent);
     }

 }

 j

 On Apr 20, 4:43 pm, Jeff Sharkey jshar...@android.com wrote:

   In onActivityResult(), the cancellation is checked for request
   code REQUEST_PICK_APPWIDGET whereas it should be checking
   for REQUEST_CREATE_APPWIDGET.

  Oops, you're right, thanks for catching that.  For the example widgets
  I've been writing that use configuration steps, I've been keeping an
  internal CONFIGURED flag which I use to skip updates.  Because I was
  skipping non-configuredwidgetupdates, I never noticed this myself.
  (I also used this flag to skip the first update before the
  configuration step has been completed.)

  Also, a quick update on the fixes: most of them will be delayed until
  the next platform release because the device-bound code is already
  frozen.  We could fix it for the SDK, but it would be bad to have
  different behavior between the two.  We definitely have bugs filed for
  these, and they will be fixed.

  Thanks for digging in and finding them.  :)

  --
  Jeff Sharkey
  jshar...@google.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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to change background on a Spinner?

2009-05-02 Thread craiget

I'm trying to figure out how to change the default white background
from a spinner. I've tried a couple of things and looked around on
this newsgroup and elsewhere online. There have been a few related
questions, but I haven't deduced the answer yet (maybe I just didn't
understand what I've read). Am I on the right track or waay off?

Here is what I've got so far:

spinner = (Spinner)findViewById(R.id.spinner);
ArrayAdapterString adapter = new ArrayAdapterString(this,
R.layout.spinner_item, data);
adapter.setDropDownViewResource(R.layout.spinner_dropdown);
spinner.setBackgroundDrawable(null);
spinner.setAdapter(adapter);

This does what you would expect - it hooks up the Spinner and
spinner.setBackgroundDrawable(null) removes the background from the
unfocused view.

However, I can't figure out how to remove the white background shown
when you click on the Spinner and it to pops up.

I figured this might be possible by setting the background of the
spinner_dropdown TextView by using an empty/transparent PNG as a
background:

TextView xmlns:android=http://schemas.android.com/apk/res/android;
android:singleLine=true
android:layout_width=fill_parent
android:layout_height=wrap_content
android:background=@drawable/empty/

This does set the background of an individual row, but it seems there
is another View wrapping all the rows that is drawing the white
background.

How can I eliminate or replace the default white background from the
wrapping view?

Or... have I misinterpreted the situation? Is there a preferred way to
style a Spinner?

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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: AppWidget issues

2009-05-02 Thread Romain Guy

Same thing, won't be fixed in the cupcake update.

On Sat, May 2, 2009 at 6:02 PM, AndroidApp zl25dre...@gmail.com wrote:

 'won't be able to fix' for 1.5 SDK, what about on the cupcake update?
 Dont really care about whether it's fixed for the SDK.

 On Apr 23, 2:02 pm, Jeff Sharkey jeffrey.shar...@gmail.com wrote:
 So just a heads up that we won't be able to fix the onDeleted() bug
 for the 1.5 SDK.  Here is a quick workaround that you can patch
 against your class that extends AppWidgetProvider to correctly catch
 and handle the onDeleted() event.

 @Override
 public void onReceive(Context context, Intent intent) {
     final String action = intent.getAction();
     if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) {
         final int appWidgetId = extras.getInt
 (AppWidgetManager.EXTRA_APPWIDGET_ID,
                 AppWidgetManager.INVALID_APPWIDGET_ID);
         if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) {
             this.onDeleted(context, new int[] { appWidgetId });
         }
     } else {
         super.onReceive(context, intent);
     }

 }

 j

 On Apr 20, 4:43 pm, Jeff Sharkey jshar...@android.com wrote:

   In onActivityResult(), the cancellation is checked for request
   code REQUEST_PICK_APPWIDGET whereas it should be checking
   for REQUEST_CREATE_APPWIDGET.

  Oops, you're right, thanks for catching that.  For the example widgets
  I've been writing that use configuration steps, I've been keeping an
  internal CONFIGURED flag which I use to skip updates.  Because I was
  skipping non-configuredwidgetupdates, I never noticed this myself.
  (I also used this flag to skip the first update before the
  configuration step has been completed.)

  Also, a quick update on the fixes: most of them will be delayed until
  the next platform release because the device-bound code is already
  frozen.  We could fix it for the SDK, but it would be bad to have
  different behavior between the two.  We definitely have bugs filed for
  these, and they will be fixed.

  Thanks for digging in and finding them.  :)

  --
  Jeff Sharkey
  jshar...@google.com


 




-- 
Romain Guy
Android framework engineer
romain...@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

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: URGENT - Retrieve User Data

2009-05-02 Thread Carter

This is an Android bug which has been discussed on this forum before.
Unfortunately, you are screwed.  The only workaround is for your users
to uninstall and reinstall the app.


- Carter


On May 2, 5:55 pm, havexz bali.param...@gmail.com wrote:
 Thanks for reply but I m still looking for a solutioncan i
 some how change the file permissions?

 On May 2, 4:25 pm, Raphael r...@android.com wrote:



  I believe there is no way of doing that.
  R/

  On Sat, May 2, 2009 at 12:29 PM, havexz bali.param...@gmail.com wrote:

   URGENT - I had uploaded an application with copy protection on. After
   that i had removed the copy protection but my new update is unable to
   access the files created by older version. Is there a way to retrieve
   the data from the older version so that user data is not lost?
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android 1.5 Early look problems

2009-05-02 Thread EboMike

Jeff, is there a list of classes that are prohibited? Looks like
TableLayout is also on the no-fly list.

On Apr 17, 1:17 pm, Jeff Sharkey jshar...@android.com wrote:
 Yes, that's working as intended.  There are unsolved issues with how
 to get EditText content back across PendingIntent boundaries, so we
 aren't allowing EditText in widgets for 1.5.  We're looking for a way
 to solve this in future releases.

 As a workaround, you could link your widget to launch a Theme.Dialog
 activity that contains the EditText.  And removing the EditText from
 your layout should allow the widget to inflate correctly.

 j

 2009/4/16 daen sz.d...@gmail.com:





  I downloaded the android 1.5 SDK.
  And I found that we can simply add a widget into the Android
  Homescreen with the java class android.appwidget.AppWidgetProvider.

  use this layout i can add my own widget successfuly。

  ?xml version=1.0 encoding=utf-8?
  LinearLayout xmlns:android=http://schemas.android.com/apk/res/
  android
 android:orientation=vertical
 android:layout_width=fill_parent
 android:layout_height=fill_parent

  TextView
 android:layout_width=fill_parent
 android:layout_height=wrap_content
 android:text=Hello
 /
  /LinearLayout

  but when i change the TextView to EditText like this.
  The Android Home cannotload my widget.

  04-16 09:27:07.111: WARN/AppWidgetHostView(633): Caused by:
  android.view.InflateException: Binary XML file line #13: Classnot
 allowedto beinflatedandroid.widget.EditText

  ?xml version=1.0 encoding=utf-8?
  LinearLayout xmlns:android=http://schemas.android.com/apk/res/
  android
 android:orientation=vertical
 android:layout_width=fill_parent
 android:layout_height=fill_parent

  EditText
 android:layout_width=fill_parent
 android:layout_height=wrap_content
 android:text=Hello
 /
  /LinearLayout

  any one can help me?

 --
 Jeff Sharkey
 jshar...@android.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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: AudioFlinger - many write blocked for log WARN messages

2009-05-02 Thread Mark Carter

I see that AudioFlinger is some native base C++ library.

Does anyone know what can be done about all these messages? Having
hundreds/thousands of these messages is making the logcat very
difficult to use...

On May 1, 9:20 am, Mark Carter m...@carter.name wrote:
 I'm using the MediaPlayer to play audio (mp3) files. I don't think I'm
 doing anything out of the ordinary, but, during playback, I get many
 (several per second) log messages like these:

 05-01 09:46:20.685: WARN/AudioFlinger(554): write blocked for 47 msecs
 05-01 09:46:20.785: WARN/AudioFlinger(554): write blocked for 47 msecs
 05-01 09:46:20.895: WARN/AudioFlinger(554): write blocked for 49 msecs
 05-01 09:46:20.985: WARN/AudioFlinger(554): write blocked for 47 msecs

 I've searched all over the place for this - other people seem to
 experience the same thing but I can find any sort of explanation as to
 what it means.

 Am I doing something wrong?

 Also, how do I define a LogCat filter (in eclipse) to *remove*, say,
 all AudioFlinger messages? I can't seem to find the not syntax.
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] MediaRecorder setCamera function

2009-05-02 Thread bra...@gmail.com

Ok posted this several days ago but it appears to have been deleted.

I am looking for clarification on the setCamera function. One would
have assumed you could open a camera device and set it as the input
device of the MediaRecorder. However this causes a crash because no
matter what I do it tries to open a locked device. I have tried
removing the line setsource and this causes all sorts of other issues,
not the least of which being that no other set functions will work
without that line.

Would appreciate a description of exactly WHAT the setCamera function
is for.
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android 1.5 Early look problems

2009-05-02 Thread Jeff Sharkey

Here ya go:
http://groups.google.com/group/android-developers/msg/a5247467151f5e3a

j

2009/5/2 EboMike ebom...@gmail.com:

 Jeff, is there a list of classes that are prohibited? Looks like
 TableLayout is also on the no-fly list.


-- 
Jeff Sharkey
jshar...@google.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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-05-02 Thread schwiz

this suuucks I can understand googles reasoning behind this but
this is way to extreme.  Why not make it so the user can decide if
they want an app to be able to access these settings or not.  Sure
there are some apps out there that switched things on and off without
the user knowing.  But there are PLENTY more apps that did this with
the user knowing why ruin it for everyone because of a few bad
apples.  There are a lot of smart people working for google surely
they can come up with a better solution than this.  Im going to be
lost without powermanager.

On Apr 24, 11:30 pm, nEx.Software justin.shapc...@gmail.com wrote:
 It's a good thing I copied and duplicated all of the private APIs I
 used into my own project. :)

 I understand though, guess I didn't realize that Power Manager was
 using private APIs.
 I still think there were better ways to handle this, such as those
 mentioned above.
 I'd gladly make the decision at install time to allow an app access to
 settings.
 I won't appreciate having to manually change settings all of the time.

 On Apr 24, 6:32 pm, Romain Guy romain...@google.com wrote:



  It's not like we didn't warn developers about private APIs :)

  On Fri, Apr 24, 2009 at 12:44 PM, Tom Gibara m...@tomgibara.com wrote:
   I don't want to single out any particular app, but conversely should a
   developer sell an application that can't be supported in the future 
   because
   it uses an undocumented API?
   Tom.

   2009/4/24 Al Sutton a...@funkyandroid.com

   I wouldn't worry, you can always do a chargeback on your credit card for
   power manager and Google will approve it through and fine the developer 
   $3
   all without asking them...

   Nice... Not.

   Al.

   -Original Message-
   From: android-developers@googlegroups.com
   [mailto:android-develop...@googlegroups.com] On Behalf Of nEx.Software
   Sent: 24 April 2009 20:01
   To: Android Developers
   Subject: [android-developers] Re: Android v. 1.5 =FAIL#2: Directly
   Manipulating Settings

   So, if I understand this all correctly... Those of us who have paid for 
   an
   app to toggle settings for us, specifically - Power Manager (which, by 
   the
   way, is currently the 2nd most popular Paid Application), have thrown 
   away
   our money since we will be prompted to allow changes for some of the
   settings every time the application wants to change them? Man, I am glad
   this app was only $0.99, otherwise I'd be really ticked off. Not to
   mention
   that I will not be able to conserve battery life as well as I do now,
   meaning that this effort to help users conserve battery life actually
   hurts
   me (and 10,000 - 50,000 other users who have purchased Power Manager).

   On Apr 24, 10:48 am, Tom Gibara m...@tomgibara.com wrote:
 ... The GPS hardware will only actually be powered up if someone is

asking to get data from it Another way to look at this -- the GPS
setting is primarily there for
 privacy, to allow users to determine whether is okay -at
 all- for anyone to be getting the fine-grained information about
 where they are.

So it's really unfortunate that the explanation for the GPS setting
reads:
deselect to conserve battery, it gives every user I've discussed it
with the impression that enabling the setting will drain their battery
faster independently of what applications choose to do. This is
enforced the absence of similar indications for other settings.

Tom.

  --
  Romain Guy
  Android framework engineer
  romain...@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
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Trouble migrating apps to 1.5

2009-05-02 Thread Teo
Sorry, i forgot about it: Windows Vista (Eclipse Ganymede)

On Sat, May 2, 2009 at 10:13 PM, Raphael r...@android.com wrote:


 Let's start by that simple question: What OS are you using? Windows,
 Linux, MacOS?

 R/

 On Sat, May 2, 2009 at 3:46 AM, Teo teomina...@gmail.com wrote:
  Hmm, the problem reappears after restarting and i still have to do adb
  kill-server every time.
 
  On Thu, Apr 30, 2009 at 9:28 PM, Teo teomina...@gmail.com wrote:
 
  Hi, thanks for the response - fixed it in the meanwhile. Apparently it
 was
  something of this sort, i just tried adb kill-server and everything
 worked
  like a charm :)
 
  On Thu, Apr 30, 2009 at 9:26 PM, havexz bali.param...@gmail.com
 wrote:
 
  One small question which platform you running on windows/linux? And by
  any chance there are two instances of the emulator running? One is
  visible and other is running in the background. That can also cause
  this issue.
 
  On Apr 30, 12:34 pm, Teo teomina...@gmail.com wrote:
   Apparently the emulator can't attach itself to the adb tool too...
  
   On Apr 30, 4:06 pm, Teo teomina...@gmail.com wrote:
  
  
  
Hi,
  
is anyone else having trouble with the new app running 'system'? My
emulator just ignores them, can't launch any app. Changed the
 project
build target to 1.5 and made sure my AVD is 1.5 too.
  
If i run once, when the emulator isn't started, after it starts it
has
no error message (and does nothing). Then, every time i try to run
the
app it says emulator: ERROR: the user data image is used by
 another
emulator. aborting. I'm sure i must be doing something wrong, but
 i
can't figure it out :) Any help is appreciated...
  
Thanks,
Teo- Hide quoted text -
  
   - Show quoted text -
 
 
 
 
  --
  Teo (a.k.a. Teominator a.k.a. Teodor Filimon)
  site www.teodorfilimon.com | blog www.teodorfilimon.blogspot.com
  GMT +2
 
 
 
  --
  Teo (a.k.a. Teominator a.k.a. Teodor Filimon)
  site www.teodorfilimon.com | blog www.teodorfilimon.blogspot.com
  GMT +2
 
  
 

 



-- 
Teo (a.k.a. Teominator a.k.a. Teodor Filimon)
site www.teodorfilimon.com | blog www.teodorfilimon.blogspot.com
GMT +2

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---