[android-developers] Re: HTC Hero OpenGL Bug

2009-12-29 Thread Keith
I was suffering from the same problem.  The Texture Matrix works fine
in the emulator, and on other platforms, but seems to not work so well
on the htc device.  After a full day of bashing my head, I found the
root of the problem, and a simple workaround.

It seems that once you call loadIdentity() in TextureMatrix mode, all
subsequent calls to attempt to set the Texture Matrix to something
other than the identity dont work so well.  Your stuck with the
identity.
The simple workaround is to call glLoadMatrixf( MyIdentityMatrix )
rather than glLoadIdentity().

Im working on the jni side of the fence, but I assume the htc bug is
the same.

I hope that helps.

Does anyone know the best place to report this bug to htc?

Keith

-- 
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 build a binary dictionary for Latin IME( main.dict ) ??

2009-12-29 Thread vinay
Hi ,

I am trying to add a hindi  dictionary support in Latin IME. I was
able to make qwerty hindi keyboard layout. I figured out that the
suggestions are generated from main.dict.But I am unable to find a way
to generate main.dict comprising hindi words.

Any help in this regard would be highly appreciated.

Thanks in advance,

Vinay.

-- 
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] Achieving evenly spaced buttons on a layout

2009-12-29 Thread Robert
I am developing a misterhouse frontend.  I have 9 image buttons that I
want to be evenly spaced on all sides.  See
http://onlamp.com/onlamp/2004/11/11/graphics/mrhousemain.gif .  What
layout and xml parameters do I use to achieve this?

-- 
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] Getting a Nexus One

2009-12-29 Thread Leif Andersen
I am looking around for a piece of hardware to actually test my apps
on.  I was looking at the droid, until the roomers about the Nexus One
started coming out.  I then read this: 
http://www.cnet.com/8301-19736_1-10421101-251.html
Does anyone have any idea of how this 'invite only' system is going to
work?  Thank you.

~Leif

-- 
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: Error to create an AVD - Ignoring add-on

2009-12-29 Thread LP_Chicago
Has anyone found a solution to this?  I too get the error - and yes, I
ran SDK Setup

On Dec 10, 11:46 am, Sprouts tospro...@googlemail.com wrote:
 Hi,
 You need to run the SDK Setup to make sure you have the targets.

 On Dec 2, 8:21 pm, Dj dipjyoti_gh...@yahoo.com wrote:

  Hi,

  I too am getting similar error, and not able to start my work.
  I am using Windows Vista.
  The command prompt output is coming as:-
  C:\Users\dj\Downloads\android-sdk_r3-windows\android-sdk-windows
  \toolsand
  roid list target
  Error: Ignoring add-on 'google_apis-5_r01': Unable to find base
  platform with AP
  I level '5'
  Available Android targets:

  Kindly help me out.

  Asif k wrote:
   Same command I had copied and pasted in my command prompt and one avd
   is created successfully. So please check the sdk that u had
   downloaded.

   Check with android list target in command prompt that what
   target_id : 2.

   Thanks,
   Asif

   On Nov 15, 7:20 pm, Onnlist onnl...@gmail.com wrote:
Hello All,

I am new to Android development. I have installed Eclipse 3.5, SDK and
ADT plugin successfully.
But I am receiving following error to create an AVD -

C:\android-sdk-windows\toolsandroid create avd --target 2 --name
my_avd
Error: Ignoring add-on 'google_apis-3-r03': Unable to find base
platform with API level '3'
Error: Ignoring add-on 'google_apis-4-r01': Unable to find base
platform with API level '4'
Error: Ignoring add-on 'google_apis-5_r01': Unable to find base
platform with API level '5'
Error: Target id is not valid. Use 'android.bat list targets' to get
the target ids.

Please advise if i am missing any step - not sure why i am getting
above error

Thank you so much in advance.

Jagdish

-- 
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: Error to create an AVD - Ignoring add-on

2009-12-29 Thread LP_Chicago
I found the problem.  In the SDK Setup, under the settings section,
you have to select force https..., then go to Availalbe packages,
install a few of them, when that's complete, make sure they appear
under the Installed packages section, then you can just create a new
AVD in the Virtual Devices section.

thanks

On Dec 10, 11:46 am, Sprouts tospro...@googlemail.com wrote:
 Hi,
 You need to run the SDK Setup to make sure you have the targets.

 On Dec 2, 8:21 pm, Dj dipjyoti_gh...@yahoo.com wrote:

  Hi,

  I too am getting similar error, and not able to start my work.
  I am using Windows Vista.
  The command prompt output is coming as:-
  C:\Users\dj\Downloads\android-sdk_r3-windows\android-sdk-windows
  \toolsand
  roid list target
  Error: Ignoring add-on 'google_apis-5_r01': Unable to find base
  platform with AP
  I level '5'
  Available Android targets:

  Kindly help me out.

  Asif k wrote:
   Same command I had copied and pasted in my command prompt and one avd
   is created successfully. So please check the sdk that u had
   downloaded.

   Check with android list target in command prompt that what
   target_id : 2.

   Thanks,
   Asif

   On Nov 15, 7:20 pm, Onnlist onnl...@gmail.com wrote:
Hello All,

I am new to Android development. I have installed Eclipse 3.5, SDK and
ADT plugin successfully.
But I am receiving following error to create an AVD -

C:\android-sdk-windows\toolsandroid create avd --target 2 --name
my_avd
Error: Ignoring add-on 'google_apis-3-r03': Unable to find base
platform with API level '3'
Error: Ignoring add-on 'google_apis-4-r01': Unable to find base
platform with API level '4'
Error: Ignoring add-on 'google_apis-5_r01': Unable to find base
platform with API level '5'
Error: Target id is not valid. Use 'android.bat list targets' to get
the target ids.

Please advise if i am missing any step - not sure why i am getting
above error

Thank you so much in advance.

Jagdish

-- 
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] focus control in compund control?

2009-12-29 Thread ssocco
Hello,

I am trying to create a compound control using a TextView and Seekbar.
I am also trying to keep the SeekBar focused on itself during
View.FOCUS_RIGHT and View.FOCUS_LEFT transitions. If using just a seek
bar by itself I can add android:nextFocusRight(Left) to the layout.xml
which works. But when I pass focus to the seekbar in the compound
control it does not seem to work.

Any ideas on how to constrain the focus of a seek bar in a compound
control to only exit focus on View.FOCUS_UP or View.FOCUS_DOWN?

 mvis.pektroller.SeekBarLabeled
android:id=@+id/BrightnessBar
android:layout_width=fill_parent
 
android:layout_height=wrap_content
android:max=100
android:progress=100
android:nextFocusRight = @+id/
BrightnessBar
/mvis.pektroller.SeekBarLabeled 

public class SeekBarLabeled extends LinearLayout {

private static final String TAG = SeekBarLabeled;

TextViewtextView;
SeekBar seekBarFocused;

...
public SeekBarLabeled(Context context, AttributeSet attrs) {
super(context, attrs);

LayoutInflater inflater = (LayoutInflater)getContext
().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.seek_bar_labeled, this);

view.setFocusable(true);
seekBarFocused = (SeekBar)findViewById(R.id.ValueBar);
textView = (TextView)findViewById(R.id.ValueText);
}

public void onFocusChanged(boolean gainFocus, int direction, Rect
previouslyFocusedRect) {

if (gainFocus) {
textView.setTextColor(Color.WHITE);
Log.v(TAG, onFocusChangeListener() hasFocus.);
seekBarFocused.requestFocus();
} else {
textView.setTextColor(Color.LTGRAY);
Log.v(TAG, onFocusChangeListener() !hasFocus.);
}

super.onFocusChanged(gainFocus, direction, 
previouslyFocusedRect);
}
}

-- 
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] Question regarding Heap size behaviour

2009-12-29 Thread Rudra
Hi All,

I have developed an application in Android which is frequently facing
memory issues. The application deals with heavy amounts of data but
the heap size pattern is a bit baffling to me. Will be great if
someone can share his/her thoughts.

1) When the process requires a chunk of new memory, it grows the heap
by some amount. For example:

Stats at a point of time:
Maximum availbale memory: 24.0
Total memory: 8.507782
Free memory : 4.6412277
Used memory : 3.8673096

VM requires to increase memory the stats becomes:
Maximum availbale memory: 24.0
Total memory: 9.070282
Free memory : 2.1964188
Used memory : 6.8746185

Upto this looks fine, but immediately after the GC collects, and stats
become
Maximum availbale memory: 24.0
Total memory: 9.070282
Free memory : 4.1707535
Used memory : 4.900276

Total memory remains at 9 and Free mem becomes larger. My question is,
Is the free memory really free? Because in a situation like this, I
suddenly get

54540-byte external allocation too large for this process
 java.lang.OutOfMemoryError: bitmap size exceeds VM budget

How with an available free memory of 4.17 MB, 54 KB allocation is not
possible? Also, an important point would be, the outofmemory is always
about allocating memory for bitmap.

2) Between step 1 and step 2 in previous point, I see a log:
Grow heap (frag case) to 17.651MB for 522256-byte allocation

This is very baffling as Total memory has increased from 8.5 to 9 but
it reports to have increased the heap size to 17.651 MB. I can
guarantee the memory stats are correct because both System.freeMemory
() etc and DDMS view show the same memory stats. Can someone explain
how can this happen?

Thanks in advance
Rudra

-- 
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] Broadcasting Intent from native code

2009-12-29 Thread Anzi
Hi all,

The following I already posted to Android-NDK forum, but i wasn't get
any responses,  Thats why I am posting the same here, by expecting a
help from this forum. Sorry for the duplicate postings.

I am wrote JNI wrapper to broadcast Intent from native code.

But i am facing the following issue.

If i wasn't add any receiver filter for my broadcast action in my
application manifest file(that means i am not receiving the brodcasted
intent from my Application). I am able to broadcast Intents to an
unlimited number. But if I add the broadcast receiver for the action
which i broadcast from my native code, I am able to broadcast only 9
Intents.

Here Each Intent holding maximum of 300 bytes of data as a
parcellable.

Is Android suggest to broadcast Intents from Native code?

Is there any other way to communicate Application from native code
asynchronously?

How does the android framework communicate from native code to JAVA
applications.

Thanks in advance.

Regards,
Anzi

-- 
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: Widget does not render on wvga854 ?

2009-12-29 Thread Guy
forgot to mention: this code works on all other emulator skins.


On Dec 28, 9:37 pm, Guy guy.ta...@gmail.com wrote:
 Hi All,
 I've written a simple widget application based on the wikitionary
 code.

 When run on an wvga854 emulator, the widget view does *not* update
 after a call to:

       // Build the widget update for today
       RemoteViews updateViews = buildUpdate(this);

       // Push update for this widget to the home screen
       ComponentName thisWidget = new ComponentName(this,
 HebCalWidget.class);
       AppWidgetManager manager = AppWidgetManager.getInstance(this);
       manager.updateAppWidget(thisWidget, updateViews);

 The code seems to be executed (i've checked through the debugger), and
 no exceptions are thrown,
 still, the AppWidget view does not seem to be updated.

 Any ideas?

-- 
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] Problem while sending unicode character via SMS

2009-12-29 Thread andu
How are you all?


I am developing application for android phone. Currently I am testing
my system in the emulator. In my application, I want to send unicode
character (Amharic language character) via SMS to the other emulator
instance. But in the receiver side, the message is not viewed
properly. I think the problem is some character encoding related
problem.

In addition similar problem happens for texts which are queried for
the sqlite database. that is when I send a query result via SMS the
same problem occurs. Please help me.

Sorry for posting the same message again. Please help me.

Thank you

Andu.

-- 
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: VideoView playback fails on 2.0.1? MediaPlayer warnings in logcat

2009-12-29 Thread And-Rider
Did any one have a solution for this issue...?

I do have the same problem with 2.0.1

On Dec 16, 11:19 pm, Morgane Plat moj...@gmail.com wrote:
 Sorry I can't help you on your problem now since I don't even have videos
 working with Android 2.0.
 Maybe this will help though 
 :http://www.mail-archive.com/android-developers@googlegroups.com/msg20...

 However I'm curious about your videos, because I don't even have the sound
 with my videos. Can you please provide me a sample video so that I can try ?
 Also, are you testing on Wifi or 3G ? Emulator or device ? What protocol do
 you use ? rtsp, mms, http ?

 Cheers,

 Morgane

-- 
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 can I listen for WebView page load completed event for consecutive URL load

2009-12-29 Thread neha
Hi All,

I need to the following :-
On the android browser menu click I need to fetch URL from a file,
load them in a WebView, dump the Render Tree in some file.
There can be any no of URLs present in the file.

I have done teh following:-
Created a WebViewClient object, overriding onPageCompleted().
Then, called setWebViewClient() on  WebView object to tie the
WebViewClient to the WebView.
Then, implemented onPageCompleted() to do the above mentioned task
when the page is loaded.

The above method works fine for a single URL but when I try to do the
same with multiple URLs only last URL in loop is rendered completely
and its Render Tree is generated.

Could anyone please let me know what exactly the problem is.

In BrowserActivity.java in onOptionsItemSelected() I have written code
as follows:-

  case R.id.dump_rendertree_menu_id:
myFunction();
break;


--- Function Definitions---

   public void myFunction()
{
  TabControl.Tab dump_current_tab =
mTabControl.getCurrentTab();
WebView dump_current_webview[] = new WebView[10];
WebView view = null;


int count = 0, j = 0;
final int webview_progress;
BufferedWriter output = null;
BufferedReader reader = null;
File file = null;
String temp_text_reader = null, url = null;
String text_reader[] = new String[5];
String text_writer = http://www.msn.com/\nhttp://
www.android.com/\nhttp://www.yahoo.co.in/\nhttp://www.google.com/\nhttp://www.w3schools.com/;;

try
{
file = new File(/data/data/
com.android.browser/URL_new.txt);
output = new BufferedWriter(new FileWriter
(file));
output.write(text_writer);
System.out.println(Your file has been
written);
}
catch (FileNotFoundException e)
{
 e.printStackTrace();
}
catch (IOException e)
{
 e.printStackTrace();
 }
finally
 {
try
{
if (output != null)
  {
  output.close();
  }
  }
catch (IOException e)
{
  e.printStackTrace();
  }
 }

try
{
reader = new BufferedReader(new FileReader
(file));

System.out.println(\n The Reader is ready to
read URL);
while ((temp_text_reader = reader.readLine()) !
= null)
{
text_reader[j] = temp_text_reader;
System.out.println(\n The URL +
temp_text_reader + is copied in string array);
j++;
count++;
  }
}
catch (FileNotFoundException e)
{
 e.printStackTrace();
}
catch (IOException e)
{
 e.printStackTrace();
 }
finally
 {
try
{
  if (reader != null)
  {
  reader.close();
  }
  }
catch (IOException e)
{
  e.printStackTrace();
  }
 }

for(j = 0 ; j  count ; j++)
{
try
{
dump_current_webview[j] =
dump_current_tab.getWebView();
System.out.println(\n The URL +
text_reader[j] +  is about to load);
view = dump_current_webview[j];
url = text_reader[j];
view.loadUrl
(url);
mySecondFunction
(view,url);
}
catch (Exception e)
{
  e.printStackTrace();
  }
}
   }


public void mySecondFunction(WebView view, String url)
{
WebViewClient myWebViewClient = new WebViewClient()
{
@Override
  public void onPageFinished(WebView view, String url)
{
   

[android-developers] Re: Get body movement (e.g. turn around)

2009-12-29 Thread Moritzz
Okay, I came up with an idea now but I can't implement it. Basically I
need to implement sthg like a real compass. I also found an
application like that in the market: Compass. But I have no clue how
they got that thing working properly. Does anyone have some experience
with the orientation and magnetic field sensors?

On Dec 27, 6:40 pm, Moritzz moritz...@googlemail.com wrote:
 I'm working on an app that needsbodymovements as inputs. So
 basically I want to know if a person turns around completely (360°).
 If a the person does sthg happens inside the application. My problem
 for now is: How to figure out if a person turned around?
 I don't see an approach with gps as the person is not moving enough.
 So I thought about the compass or acceleration sensor but I have no
 clue how to manage that. I'd really appreciate some ideas / hints /
 tipps!

 Cheers

 Moritz

-- 
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] ListView and Touch mode

2009-12-29 Thread Andriy Zakharchuk
Hello all,

I have a question about ListView behaviour when user is in the touch
mode.

I have an application which has a list of items (stored in the
database, thus I use SimpleCursorAdapter), and user can add new, edit
and delete existing items to/from the list.

I want to implement following behaviour:
- when the user adds an item and returns (from the form screen) to the
list screen newly created item should be selected in the list;
- when the user edits an item and returns to the list, the item that
was edited should be selected in the list;
- when the user deletes an item, the next list item should be
displayed (or last but one when the last item is deleted).

So after the operation is performed I'm trying to set proper selection
in the list to make the item that has been added or edited visible
(and selected). Things works pretty good when I do this with buttons
(emulator+keyboard, or do all operations with trackball on my G1), but
when I do all operations touching the screen I can not make last added/
edited item selected.

I know that selection is not applicable in the touch mode, but I want
to have this item at least visible (and when user moves track ball
next time, this item will be selected). Is there any way to do that?

I investigated Contacts application (on my G1, and friend's Hero) -
they don't do that (in both touch and non-touch modes). If I see
contacts from A to C on the screen and add a new contact that starts
on M, then after returning to the list I still see contacts from A to
C, but not the contact I've just added. Not much intuitive, eh?

-- 
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] Strange behavior using alignParentBottom in a Relative Layout for a ListView item

2009-12-29 Thread Wouter
Does someone has a solution for this issue?

http://code.google.com/p/android/issues/detail?id=1394

Thanks,

Wouter

-- 
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: ListView and Touch mode

2009-12-29 Thread Andriy Zakharchuk
After playing with it a little bit I discovered more interesting
thing.

Frankly speaking, I used my extension of the ListView, shortly

public class MyListView
{
...
public void setSelection(long theID)
{
ListAdapter adapter = getAdapter();

if (adapter == null) {
return;
}

for (int i = 0; i  adapter.getCount(); i++) {
if (adapter.getItemId(i) == theID) {
setSelection(i);
break;
}
}
}
}

or smth like that. The problem is that after calling setSelection(int)
the selection was not changed when the list in the touch mode. I know
that setSelection should be called via post(Runnable) method, so all
setSelection(long) (me method) calls were performed via post().
Besides, in the other cases (non-touch mode, onSave/
RestoreInstanceState) this setSelection(long) worked just perfectly.

I decided to change method setSelection(long theID) like this

public void setSelection(long theID)
{
ListAdapter adapter = getAdapter();

if (adapter == null) {
return;
}

for (int i = 0; i  adapter.getCount(); i++) {
   if (adapter.getItemId(i) == theID) {
final int position = i;
post(new Runnable() {
public void run()
{
setSelection(position);
}
});
break;
   }
   }
}

I don't know why (do I need to call post(Runnable) from another
postRunnable()?), but it seems it helped... and... it broke onSave/
RestoreInstanceState :( On the second screen rotation selected item in
the list is not restored (1 item becomes selected), when I return back
to simpler solution, onSave/Restore works fine but selection after
returning from the form doesn't work.

The only my hope is that Romain Guy can see message and explain what's
going on 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] blocking UI thread when Yes/No AlertDialog is displayed

2009-12-29 Thread swapnil kamble
Hi ,
  I am displaying Confirmation type dialog box. I want to pause
execution of that thread until answer is provided by user, but since this
AlertDialog works asynchronously, I am facing problems in blocking that
thread but displaying AlertDialog and continue execution on answer. I tried
using wait notify between threads but didn't worked. Anybody Used
AlertDialog.wait() method ?
I am pasting my code here too,

 AlertDialog.Builder builder = new
AlertDialog.Builder(Demo.ctxt);
  builder.setMessage(Do
you want  to Trust testgenservercert)
 .setCancelable(false)

.setPositiveButton(Yes, new DialogInterface.OnClickListener() {
 public void
onClick(DialogInterface dialog, int id) {


//uiThread.notify();

System.out.println(Positive Button clicked);
 }
 })

.setNegativeButton(No, new DialogInterface.OnClickListener() {
 public void
onClick(DialogInterface dialog, int id) {


//uiThread.notify();


System.out.println(Negative Button clicked);

 }
 });
/*uiThread = Thread.currentThread();
AlertDialog alert =
builder.create();
alert.show();
synchronized(alert) {
alert.wait();
}*/


-- 
...Swapnil

|| Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
|| Hare RamaHare Rama   Rama   RamaHare Hare ||

-- 
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] continous raw audio playback using AudioTrack.

2009-12-29 Thread Ravinder
Hi,

I am trying to play raw audio samples ( 16 bit , stereo , @ 32000KHz)
using AudioTrack, in MODE_STREAM mode.

I could play the first video buffer successfully but, After having
received onMarkerReached for that raw audio buffer, I wonder how to
push more audio data in AudioTrack ? without closing/stopping it.
Writing more data to AudioTrack  in onMarkerReached callback does
not help.

I am using the same thread to construct the AudioTrack and pump in
audio - buffers and receive callbacks.

Any pointers would be of great help.

regards,
Ravinder Chouhan

-- 
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 do Both horizontal and vertical scrolling on a screen

2009-12-29 Thread Atif
Yes, it is possible, I just tested it. And thanks for giving hint. I
was also looking for the same solution :)

regards,
Atif Gulzar

On Dec 14, 7:13 pm, Nithin nithin.war...@gmail.com wrote:
 Hi,

 Is it possible to put a scrollView(vertical scroll view) inside
 HorizontalScrollview, so that, I want my screen to scroll both
 horizontally and vertically

 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] MediaPlayer hanging abruptedly

2009-12-29 Thread Pierre Henry
I have a code running a MediaPlayer object with an mp3 uri somewhere
in an activity.

The player runs for 6/7 minutes and suddenly hangs off.

Is there a particular thing to do with a mp3 streaming server ?

--
Pierre

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

2009-12-29 Thread moneytoo
Are you advertising the correct SDP record using
listenUsingRfcommWithServiceRecord? UUID for BT SPP is
1101--1000-8000-00805F9B34FB. Does the device act as server
or client?
You might try running sdptool browse on linux to find additional
information about your BT device.

On Dec 28, 6:15 am, Fred penguinpavil...@gmail.com wrote:
 Hello All,
 I have a simple device, not developed by me, that uses SPP to send out
 a simple 55 byte data packet once every second.  The device accepts no
 communication other than any needed for pairing/connection.  Once it
 has been connected it is supposed to start sending the 1Hz packets
 out.

 I can pair the device just fine, but have yet to be able to establish
 a connection.  If I try setting up a BluetoothSocket using the connect
 () method, it fails with an error related to services, i.e. no known
 services are on the device.  I figure this isn't a big deal, as connect
 () appears to be only for the outgoing data, but then I try to listen
 using   BluetoothServerSocket::listenUsingRfcommWithServiceRecord()
 but get nothing.  It seems that I should need to actively do something
 to establish the connection, but don't see anything in the javadocs
 that look liek what I think I need.  I just want to connect the device
 and start catching the packets so I can move on to coding the real
 application.
 Fred

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


Re: [android-developers] blocking UI thread when Yes/No AlertDialog is displayed

2009-12-29 Thread Frank Weiss
I assume you want a modal dialog. I'm pretty sure  blocking the UI thread is
going about this wrong. For example, consider the Activity lifecycle
callbacks which would be called when another Activity or Application becomes
visible.

Here's an explanation I found by googling for android modal dialog:
http://groups.google.com/group/android-developers/browse_thread/thread/5616a220c97a13fc/5e722e601f33d884#5e722e601f33d884

On Tue, Dec 29, 2009 at 3:52 AM, swapnil kamble swap.kam...@gmail.comwrote:

 Hi ,
   I am displaying Confirmation type dialog box. I want to pause
 execution of that thread until answer is provided by user, but since this
 AlertDialog works asynchronously, I am facing problems in blocking that
 thread but displaying AlertDialog and continue execution on answer. I tried
 using wait notify between threads but didn't worked. Anybody Used
 AlertDialog.wait() method ?
 I am pasting my code here too,

  AlertDialog.Builder builder = new
 AlertDialog.Builder(Demo.ctxt);

 builder.setMessage(Do you want  to Trust testgenservercert)
  .setCancelable(false)

 .setPositiveButton(Yes, new DialogInterface.OnClickListener() {
  public void
 onClick(DialogInterface dialog, int id) {


 //uiThread.notify();

 System.out.println(Positive Button clicked);
  }
  })

 .setNegativeButton(No, new DialogInterface.OnClickListener() {
  public void
 onClick(DialogInterface dialog, int id) {


 //uiThread.notify();


 System.out.println(Negative Button clicked);

  }
  });
 /*uiThread =
 Thread.currentThread();
 AlertDialog alert =
 builder.create();
 alert.show();
 synchronized(alert) {
 alert.wait();
 }*/


 --
 ...Swapnil

 || Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
 || Hare RamaHare Rama   Rama   RamaHare Hare ||

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

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

Re: [android-developers] Problem while sending unicode character via SMS

2009-12-29 Thread Frank Weiss
I believe SMS does support UTF-16 encoding. I would suggest analyzing the
actual bits of the improperly received message. If you are getting spaces
(0x20), then likely you've forced 7-bit-only encoding in your code. A code
or data sample would be helpful.

On Tue, Dec 29, 2009 at 1:02 AM, andu alemf...@yahoo.com wrote:

 How are you all?


 I am developing application for android phone. Currently I am testing
 my system in the emulator. In my application, I want to send unicode
 character (Amharic language character) via SMS to the other emulator
 instance. But in the receiver side, the message is not viewed
 properly. I think the problem is some character encoding related
 problem.

 In addition similar problem happens for texts which are queried for
 the sqlite database. that is when I send a query result via SMS the
 same problem occurs. Please help me.

 Sorry for posting the same message again. Please help me.

 Thank you

 Andu.

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

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

Re: [android-developers] No Adobe Flash support for Eclair!?!

2009-12-29 Thread Sena Gbeckor-Kove
Hi Mark,

Just a clarification, unless I'm worng. The HTC implementation is Flash 9. Not 
Flash Lite.

S


On 28 Dec 2009, at 20:10, Mark Murphy wrote:

 chris harper wrote:
 According to this article it is had been done and is possible:
 http://www.flashmobileblog.com/2009/08/12/flash-development-with-android-part2/
 
 The very first sentence of that post:
 
 As we already know by now the HTC Hero supports Flash in the browser,
 and by double tapping on Flash content it will be played in full screen
 mode.
 
 You will note that this says HTC Hero. The HTC Hero is a device, for
 which HTC licensed a Flash (Lite) implementation.
 
 But again like I stated before, after downloading the latest source
 code, building it, flashing it to my development phone and flash still
 not working I am having my doubts (and greatly wondering how this guy
 said it is working).
 
 That is because he is referring to the HTC Hero.
 
 Do you know if this is even somewhat possible (maybe a FlashLite plugin
 I am missing or something?).
 
 This presumably will work on an HTC Hero -- I haven't tried it. It will
 not work on devices that did not license Flash (Lite) from Adobe. It
 most definitely will not work from the Android open source tree, because
 Flash is not open source.
 
 -- 
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://twitter.com/commonsguy
 
 Android App Developer Books: http://commonsware.com/books
 
 -- 
 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



smime.p7s
Description: S/MIME cryptographic signature


Re: [android-developers] No Adobe Flash support for Eclair!?!

2009-12-29 Thread Mark Murphy
Sena Gbeckor-Kove wrote:
 Just a clarification, unless I'm worng. The HTC implementation is Flash 9. 
 Not Flash Lite.

That's possible. It reportedly uses ActionScript 2.0, which I
interpreted as meaning Flash Lite, but I hadn't considered the
possibility that they ported an older Flash to Android.

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

Android Development Wiki: http://wiki.andmob.org

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


Re: [android-developers] continous raw audio playback using AudioTrack.

2009-12-29 Thread Olivier Guilyardi
On 12/29/2009 01:01 PM, Ravinder wrote:
 
 I am trying to play raw audio samples ( 16 bit , stereo , @ 32000KHz)
 using AudioTrack, in MODE_STREAM mode.
 
 I could play the first video buffer successfully but, After having
 received onMarkerReached for that raw audio buffer, I wonder how to
 push more audio data in AudioTrack ? without closing/stopping it.
 Writing more data to AudioTrack  in onMarkerReached callback does
 not help.
 
 I am using the same thread to construct the AudioTrack and pump in
 audio - buffers and receive callbacks.

AudioTrack in MODE_STREAM is very simple to use. Just call write() repeatedly.
It will block if the AudioTrack buffer is full, and return as soon as space has
been freed in the buffer and data could be written.

You don't need to deal with onMarkerReacher() for $subj.

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


Re: [android-developers] Re: Get body movement (e.g. turn around)

2009-12-29 Thread Frank Weiss
It's doubtful you can literally tell if the person has turned around. I
think you're trying to infer that, by assuming the person is holding the
device a certain way in relation to his or her body..

Perhaps by that assumption, the device moves in a 360° arc through space,
not on an axis intersecting the device (simple bearing). It should be
possible to track the position of the device through the arc via the
accelerometer and infer the body movement you are trying to figure out.

On Tue, Dec 29, 2009 at 2:18 AM, Moritzz moritz...@googlemail.com wrote:

 Okay, I came up with an idea now but I can't implement it. Basically I
 need to implement sthg like a real compass. I also found an
 application like that in the market: Compass. But I have no clue how
 they got that thing working properly. Does anyone have some experience
 with the orientation and magnetic field sensors?

 On Dec 27, 6:40 pm, Moritzz moritz...@googlemail.com wrote:
  I'm working on an app that needsbodymovements as inputs. So
  basically I want to know if a person turns around completely (360°).
  If a the person does sthg happens inside the application. My problem
  for now is: How to figure out if a person turned around?
  I don't see an approach with gps as the person is not moving enough.
  So I thought about the compass or acceleration sensor but I have no
  clue how to manage that. I'd really appreciate some ideas / hints /
  tipps!
 
  Cheers
 
  Moritz

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


-- 
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: Adding contacts to a custom account

2009-12-29 Thread sazilla
Hi Vadim,

Actually for what I've understood the custom mime type can be used to
specify how to render the custom fields when you view the contact not
while you edit it. I've found a bug in the Contacts application
(around line 178):
http://android.git.kernel.org/?p=platform/packages/apps/Contacts.git;a=blob;f=src/com/android/contacts/model/Sources.java;h=f664fb1d13d87f5efca857872da544848ac473b9;hb=HEAD

The ExternalSource component should be able to read the xml file you
mentioned above and render it in the contacts editing screen, but...
it doesn't.

The Facebook application, for example, defines a custom filed (the FB
profile) in the contacts.xml file, and it i rendered correctly when
you view a FB contact, but the FB account in Android is a read only
account, it means that in any case you cannot create/edit contacts
from android.

Up to now I found only a workaroun, filtering the intent launched
everytime a contact must be created/edited and show a custom contacts
edit screen, for our contacts account, or forward the request to the
default contacts app if the contact belongs to a different account.

Let me know if you've found any other workaround.

Thank you

Carlo

On Dec 23, 3:16 pm, Vadim Vohmjanin vadim...@gmail.com wrote:
 I have found something...

 For that custom Data row to appear in the Contacts app, you'll need to
 associate your custom MIME-type with XML that describes how to render
 the UI.  The only current way of doing this is to define a sync
 adapter service and add meta-data definition inside, something
 like this:

 meta-data android:name=android.provider.CONTACTS_STRUCTURE
  android:resource=@xml/contacts /

 So you have 2 metas there, one is for sync adapter.

 Then define the contacts XML inside your app ./res/xml/contacts.xml:

 --snip--
  ContactsSource xmlns:android=http://schemas.android.com/apk/res/
 android;
      ContactsDataKind
          android:mimeType=vnd.com.example.voip.cursor.item/phone_v2
          android:icon=@drawable/icon
          android:summaryColumn=data2
          android:detailColumn=data3 /
  /ContactsSource
 --snip--

 I have tried this, but i didn't get it working. It sure effects in
 some way. But i don't get desirable result.

 Any help pls?

 On Dec 18, 4:32 pm, Vadim Vohmjanin vadim...@gmail.com wrote:

  I faced the same problem.

  I'm doing the research now. If you have found how to do it, please
  provide this info. I'd be very greatfull.

  I also wanted to know, what exactly way do you create custom account?
  As i understood account creation currently *requires* a developer to
  implement a
  service that extends AbstractThreadedSyncAdapter and publishes the
  correct intent in
  its manifest.
  When this is not the case, the Accounts  Sync settings does not
  handle the case
  where this is not defined and causes the NPE in the core process that
  causes the
  reboot.
  It is recommended that this defect be patch and/or the documentation
  updated to include the
  proper procedures and requirements for creation of an account in
  Android.

  Also account creation requires of the authenticator to be implemented
  for the account type.
  In order to be an authenticator developer must extend
  AbstractAccountAuthenticator class, provider implementations for the
  abstract methods and write a service that returns implemented
  AccountAuthenticator.

  Or there is more simple way to create a custom account for Contacts?

  On Dec 15, 4:52 pm, sazilla sazi...@gmail.com wrote:

   Hi everyone,

   I encountered an issue while configuring my own account for android
   contacts sync. When the user choses to add a new contact to the custom
   account, only the name fields and the photo are showed. This behaviour
   can be found in the ExternalSource.java android source file.

   My question is, if I don't want to add custom contacts fields for my
   account, how can I configure the account to show all the standard
   fields in the contacts application in the same way the google account
   does?

   Thank you

   Carlo

-- 
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: BitmapDrawable with unexpected size in Android 2.0.1 WVA854

2009-12-29 Thread Streets Of Boston
I had something similar. But Android wasn't resizing the bitmap.

Doing bitmapDrawable.getBitmap().getWidth() and
bitmapDrawable.getBitmap().getHeight() returned the expected values
(in your case those would be 480 and 320). However, i loaded the
bitmap seperately and then wrapped it within a BitmapDrawable. Still,
the bitmapDrawable.getIntrinsicWidth/Height returned these scaled
values (320 x 213 in your case).

On Dec 29, 2:49 am, Hermes Pique hermespi...@gmail.com wrote:
 I want to display a 480x320 JPEG file stored in the SD card in Android
 2.0.1 with WVGA854 skin and 240 lcd density (Motorola Droid).

 However, when I create a BitmapDrawable through Drawable.createFromPath
 (), the resulting BitmapDrawable has the following values:

 mBitmapWidth = 320
 mBitmapHeight = 213
 mTargetDensity = 160

 The manifest includes the following configuration:

     uses-sdk android:minSdkVersion=3 android:targetSdkVersion=4 /

     supports-screens
         android:largeScreens=true
         android:normalScreens=true
         android:smallScreens=true
         anyDensity=true
     /

 Apparently Android is resizing the bitmap. What could be the cause of
 this behavior? How can I avoid it?

 Thank you in advance.

-- 
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: Get body movement (e.g. turn around)

2009-12-29 Thread Matt
Isn't it possible to use the compass magnet to track direction?

Matt

On Dec 29, 7:07 am, Frank Weiss fewe...@gmail.com wrote:
 It's doubtful you can literally tell if the person has turned around. I
 think you're trying to infer that, by assuming the person is holding the
 device a certain way in relation to his or her body..

 Perhaps by that assumption, the device moves in a 360° arc through space,
 not on an axis intersecting the device (simple bearing). It should be
 possible to track the position of the device through the arc via the
 accelerometer and infer the body movement you are trying to figure out.



 On Tue, Dec 29, 2009 at 2:18 AM, Moritzz moritz...@googlemail.com wrote:
  Okay, I came up with an idea now but I can't implement it. Basically I
  need to implement sthg like a real compass. I also found an
  application like that in the market: Compass. But I have no clue how
  they got that thing working properly. Does anyone have some experience
  with the orientation and magnetic field sensors?

  On Dec 27, 6:40 pm, Moritzz moritz...@googlemail.com wrote:
   I'm working on an app that needsbodymovements as inputs. So
   basically I want to know if a person turns around completely (360°).
   If a the person does sthg happens inside the application. My problem
   for now is: How to figure out if a person turned around?
   I don't see an approach with gps as the person is not moving enough.
   So I thought about the compass or acceleration sensor but I have no
   clue how to manage that. I'd really appreciate some ideas / hints /
   tipps!

   Cheers

   Moritz

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

-- 
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] Inflating error after animation run

2009-12-29 Thread arnouf
Hi all,

I apply an animation on my current displayed layout. I set an
animation listener. When animation is ended, I'm trying to load a
layout, using inflater, inside the current layout. But I've always the
following error :
ERROR/AndroidRuntime(2315): android.view.InflateException: Binary XML
file line #7: Error inflating class java.lang.reflect.Constructor

Do you know if I can call a callback to check if the current layout is
loaded correctly before to call gatLayoutinflater ?

-- 
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: Fancy ListView help

2009-12-29 Thread Abhi
Hi

Your suggestion sounds good. But I haven't been able to figure out how
to use tags with buttons to determine the position. Would you be able
to give me an example?

Thanks,

Abhi

On Dec 22, 10:30 am, WoodManEXP woodman...@gmail.com wrote:
 Although I use ListView a lot it has always been a little confusing to
 understand how it manages its views returned from BaseAdapter.getView
 ().

 If you know you have just the six list rows, which is not a lot, then
 every time BaseAdapter.getView() is called create the view hierarchy,
 with the button in each row, and return it.

 Of course for each button attach a listener with setOnClickListener
 and that listener will get called whenever the button is clicked/
 touched. You can use the tag field of the button view to help you
 determine at click time which button has been clicked.

 Or you can instantiate a separate listener for each button and set
 something in the listener class to is the view clicked.

 Make the listener a private class under the containing Activity and it
 can easily get at all the state contained in the Activity. Or make the
 Activity an implementer of View.OnClickListener and just pass
 Activity.this to setOnClickListener.

 In all cases onClick(View v) will be called whenever the button is
 clicked/touched.

 Hope this helps…

 On Dec 22, 8:58 am,Abhiabhishek.r.sha...@gmail.com wrote:



  Hi guys,

  All I need is a listview with 6 items, each having an icon, textview
  and a button/imageview. I want to be able to click the button/
  imageview to open up a new activity and each row opens up a different
  activity.

  Any suggestions?

 Abhi

  On Dec 21, 8:11 pm,Abhiabhishek.r.sha...@gmail.com wrote:

   Hi,

   I am using excerpts from this website 
   -http://www.androidguys.com/2008/07/14/fancy-listviews-part-one/
   (under Dynamic) to build my own ListView with 6 list rows. I am doing
   the exact same thing, but with a button added to each row. I want to
   be able to listen to each button click and take action according to
   the position of the button pressed.

   I don't know how to use the onClick and Listener in the above case.
   Any help would be appreciated. I have posted this question a number of
   times but haven't been able to receive a satisfactory reply.

   I see that the original post is from Mark Murphy who is an active
   member of this group. If I hear from him, nothing like it!

   Thanks,

   Abhishek- 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] Trying to get rid of my last few Long calculations in my game and completely turn it into FP format. System.currentTimeMillis() giving me a headache.

2009-12-29 Thread Mika
Like the topic of the thread says. In my game I would like to turn all
the calculations into FP format. I can eliminate pretty much
everything else but I still need to do the the following calculation
in long format.

Code:
long t = this.lastUpdateTime - System.currentTimeMillis();


The value I get from this is the time passed since last frame, which
is like.. two digit millisecond value, which naturally is more than
good for FP stuff. After that calculation I turn the resulting value
into FP integer and use it with the rest of my calculations but I'd
like to get rid of that long calculation too. Any ideas how to go
around this to do it in FP format?

I mean, I'm pretty sure I cannot just go and do a normal conversion to
FP format in this style:
Code:
int fpT = t * (116);

because there is always the change that it'll overflow and as the
numbers that System.currentTimeMillis() give out are BIG.

So any advice how to keep the same accuracy of the timer but get rid
of the long calculation and have it replaced with nice and fast FP
calculation. Any advices on how to trim down the
System.currentTimeMillis() or what ever to get around this are greatly
appreciated.

Cheers guys.

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


Re: [android-developers] Trying to get rid of my last few Long calculations in my game and completely turn it into FP format. System.currentTimeMillis() giving me a headache.

2009-12-29 Thread Mark Murphy
Mika wrote:
 Like the topic of the thread says. In my game I would like to turn all
 the calculations into FP format.

That is the wrong direction to be going. Floating-point calculations are
awful on mobile devices, since they usually lack floating-point
hardware. Your game will perform better if you eliminate as many
floating-point calculations as possible, replacing them with fixed-point
equivalents.

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

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

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


Re: [android-developers] Re: Get body movement (e.g. turn around)

2009-12-29 Thread Frank Weiss
Using the (magnetic) compass would require less coding, I suppose. However,
is it available on all your target devices and is it accurate enough?

I should defer to someone who's actually used the compass sensor. In the
meantime, you could put together a test app in just a few minutes. You could
base it on the following accelerometer test code:
http://stuffthathappens.com/blog/2009/03/15/android-accelerometer/
On Tue, Dec 29, 2009 at 7:11 AM, Matt hansen.matt...@gmail.com wrote:

 Isn't it possible to use the compass magnet to track direction?

 Matt

 On Dec 29, 7:07 am, Frank Weiss fewe...@gmail.com wrote:
  It's doubtful you can literally tell if the person has turned around. I
  think you're trying to infer that, by assuming the person is holding the
  device a certain way in relation to his or her body..
 
  Perhaps by that assumption, the device moves in a 360° arc through space,
  not on an axis intersecting the device (simple bearing). It should be
  possible to track the position of the device through the arc via the
  accelerometer and infer the body movement you are trying to figure out.
 
 
 
  On Tue, Dec 29, 2009 at 2:18 AM, Moritzz moritz...@googlemail.com
 wrote:
   Okay, I came up with an idea now but I can't implement it. Basically I
   need to implement sthg like a real compass. I also found an
   application like that in the market: Compass. But I have no clue how
   they got that thing working properly. Does anyone have some experience
   with the orientation and magnetic field sensors?
 
   On Dec 27, 6:40 pm, Moritzz moritz...@googlemail.com wrote:
I'm working on an app that needsbodymovements as inputs. So
basically I want to know if a person turns around completely (360°).
If a the person does sthg happens inside the application. My problem
for now is: How to figure out if a person turned around?
I don't see an approach with gps as the person is not moving enough.
So I thought about the compass or acceleration sensor but I have no
clue how to manage that. I'd really appreciate some ideas / hints /
tipps!
 
Cheers
 
Moritz
 
   --
   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.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

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

-- 
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 test if app is shown on Market for all screensizes

2009-12-29 Thread ChristianF
I need to bring this issue (not seeing copyprotected apps in the
market) up again.
GOOGLE please give us an update when to expect this issue fixed!!!

You are keeping loyal and honest customers from their leglay bought
applications away
and hinder us to spend more money on the market!!! This hurts your
developers!

Its been more than a month than this issue came up with the launch of
the Milestone in europe.

In the UK the problem was fixed within days but the unlocked phones
are still waiting.
What is the problem??? Respond to your customers.

regards
Christian


On 18 Dez., 20:51, Justin (Google Employee) j...@google.com wrote:
 The problem of some Milestone devices not seeing copy protected apps
 is one we continue to work on addressing. We are working with the OEM
 to resolve the root cause.

  You guys are funny. Android Market on HTC Tattoo does not show
  applications that do not implicitly declare that they support its
  screen. It definitely has nothing to do with CAMERA permission or
  whatsoever

 This is false. As previously stated, *if* the app requires the
 android.permission.CAMERA manifest, it *must* state that it does not
 require autofocus in uses-feature in order to show on Tattoo. This
 is because the camera permission, if granted, implies access to an
 autofocus camera. The request must be modified to not require
 autofocus with uses-feature. Admittedly this is not as developer-
 friendly as it could be, its the result of a lack of foresight in our
 original design.

 A separate issue is that apps that do not explicitly support
 sdkVersion 4 or above will not be shown to Tattoo because it contains
 a small screen. small screen devices did not exist before Android
 1.6 (sdkVersion 4) and apps may break when shrunk to fit the smaller
 screen. Apps declaring support for sdkVersion 4 or above will be
 assumed to support small screens, unless stated otherwise in the
 supports-screens element.

 Regards,
 Justin
 Android Team @ Google

 On Dec 9, 3:38 pm, Paul Turchenko paul.turche...@gmail.com wrote:

  You guys are funny. AndroidMarketon HTC Tattoo does not show
  applications that do not implicitly declare that they support its
  screen. It definitely has nothing to do with CAMERA permission or
  whatsoever. I do agree that Google could post some clear explanations
  what exactly AndroidMarkettakes into account when he decides that
  application should not show up (I'm pretty sure that it's a server
  side of AndroidMarketwho makes these decisions). And it has nothing
  to do with device vendor since it just includes AndroidMarketin
  their firmwares.

  Please stop blaming phone vendors. Google is the only one to blame for
  Android Market behavior.

  On Nov 18, 11:58 am, blindfold seeingwithso...@gmail.com wrote:

   Same thing with me, I have copy protection turned off in Android
  Market.

   It would be good now to get some feedback from Google or HTC on
   whether it is a bug.

   On Nov 18, 9:54 am, Klaus Kartou kar...@gmail.com wrote:

We haven't turned copy protection on for ourapp, and it is still not
visible on HTC Tattoo/HTC Dragon.
Please, Google is this a known issue?

On Tue, Nov 17, 2009 at 11:02 AM, Aspidoff aspid...@gmail.com wrote:
 I noticed this problem when the new Droid Eris came out. At first, i
 started messing with minsdk and even lowered it to 2 but that didnt
 fix it, the apps didnt show up in themarket. I ran through Verizon
 and Sprint stores for days to try to get this to work.

 I dont think Google people even know the problem exist. I am surprised
 that this problem hasnt been fixed for such a long time now. Anyway,
 the reason why you can 't see yourappon HTC Hero/Eris or any other
 1.5 phones is because you have copy protection set to On. You can
 turn this off in your developer console when logged in to your Android
Marketaccount and editing your application description/title

 cheers!

 On Nov 17, 1:19 am, Klaus Kartou kar...@gmail.com wrote:
  Is there any Google people that can shed some light on this issue?

  On Mon, Nov 16, 2009 at 4:42 PM, blindfold 
  seeingwithso...@gmail.com
 wrote:

   Thanks Phil!

   Indeed this is very strange. As I understand it,allAndroid 1.6 
   apps
   should by default be visible to HTC Tattoo on the AndroidMarket, 
   and
   use of the camera should not matter. I had even tested myappto 
   show
   OK on a 240x320 screen using the emulator, and cannot think of
   anything else to correct. I was thinking of trying an empty 
   supports-
   screens element in case documentation is ambiguous, but even so 
   it
   would not seem to make sense to have the CAMERA dependency. 
   Hopefully
   HTC or Android developers (Romain?) will figure it out soon, 
   because
   this kind ofmarketfragmentation seems unnecessary.

   On Nov 16, 9:55 am, phil philipp.bre...@gmail.com 

[android-developers] Re: Surface and Format

2009-12-29 Thread fala70
is there somebody can answer me ?

how can I do to show an image YCbCr_420_SP directly on surfaceview ?

On 27 Dic, 17:50, fala70 fal...@gmail.com wrote:
 Looking the doc with class SurfaceHolder is possibile set the kind of
 surface format. I need to show images YCbCr_420_SP format. If I set
 YCbCr_420_SP format is not clear after how I can set the data. With
 Canvas object I can draw only bitmap format and not YCbCr_420_SP.
 Then my question is : can I draw directly on surface using
 YCbCr_420_SP data ? how ?

 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] java access from Android Webkit plugin

2009-12-29 Thread Digambar
Hi,

has anybody tried to access Java class from Android Webkit plugin?


I am trying to do but there is no reliable way to access with JNI. So
if anybody has tried please reply.


here is example of what I want -


JS in webage access plugin and plugin accesses JAVA class/application
to access Android platform.


Regards
Digambar

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


Re: [android-developers] java access from Android Webkit plugin

2009-12-29 Thread Mark Murphy
Digambar wrote:
 has anybody tried to access Java class from Android Webkit plugin?

The Android SDK does not support development of WebKit plugins. Please
do not cross-post to multiple lists.

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

Android App Developer Books: http://commonsware.com/books

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


Re: [android-developers] AudioTrack stop/release

2009-12-29 Thread Olivier Guilyardi
On 12/25/2009 02:00 PM, Business Talk wrote:
 I keep posting this message hoping that maybe somebody from google
 (media group in particular) monitors the group.  I need to stop the
 AudioTrack, regardless what's in the buffer, immediately when
 executing the stop/release. The AudioTrack plays in the STREAM mode.
 It appears that the AudioTrack finishes playing what's in the buffer
 and than stops. It seems that it's such a fundamental flaw since there
 are so many audio applications out there.

I don't think that your question relates to AudioTrack in particular, but to
dealing with audio buffers in general, and especially when these buffers are too
large.

On almost any platform and API I can think of, if the audio buffer is large then
you have to deal with a rather noticeable latency. And I think that your problem
is indeed about latency.

Instead of starting/stopping the AudioTrack as you do, which is a quite heavy
operation (thread, locks, IPC, etc..), I would first recommend that you fill the
buffer with zeros whenever sound has to stop.

But if your buffer is large then there will be a noticeable delay between the
moment you actually write zeros and the moment the sound becomes silent (yet,
that should be faster than actually calling play() or stop()).

For instance, I'm quite successfully using AudioTrack with a buffer size of 4096
frames, which at 22050Hz, induces (at least) a 185ms delay. That is quite a lot
IMO, and I don't think you can reduce that in Android's current state. I would
even say than 8092 frames seems a safer choice.

But many audio applications out there know how to deal with a such latency, even
if it is about hundreds of milliseconds. It is not always possible, but in some
case it is, especially if you can:

(1) measure the output latency
(2) anticipate audio output events

So that you start playing sounds (or silence) in advance, taking the latency
into account.

You can approximate (1) with: latency = bufferSize / sampleRate

Whether (2) is possible or not depends on you app. If it isn't and that
200-400ms latency is too much for you then I recommend that you star the
following issue to encourage Google to address it as soon as possible:
http://code.google.com/p/android/issues/detail?id=3434

--
  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: Display Contacts You don't have any contacts to display possibly caused by NullPointerException: null

2009-12-29 Thread Scott W
Hi,

If anyone could help me find the code for queryEntities function?

I've been looking at the ViewContactActivity.java and digging through
the querying code gets me to the following function call under
AsyncQueryHandler.java:

resolver.queryEntities(args.uri, args.selection, args.selectionArgs,
args.orderBy);

I've been trying to find out how this function works by going through
the git repository and had no real joy, help would be appreciated.

Scott

On Dec 18, 10:43 am, Scott W d38dm8nw81k...@gmail.com wrote:
 Just a quick follow-up:

 Using the built-in search facility, I am able to view names, however
 no information is displayed. I believe the problem here is the same as
 the Names list. Looking at res/layout-finger/contact_card_layout.xml
 in Eclipse is a NullPointerException: null. Again, LogCat shows no
 error output.

 Interestingly, when I search for a name, the search suggestions box
 displays contact information e.g. phone number, email address but
 selecting the name doesn't show this information.

 In addition, the Edit button is greyed out and not selectable.

 I have done some testing and the queries for Names are not being
 directed to Android's Contacts provider.

 Cheers,
 Scott

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

2009-12-29 Thread Business Talk
Using the JetCreator, I have created an ‘App Controller’ event and
assigned a track number = 2 to it. Yet, track = 0 is passed to the
onJetEvent listener method. Any Ideas?

-- 
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: java access from Android Webkit plugin

2009-12-29 Thread Digambar
I know that but Webkit development is not platform feature. Its more
of application than platform feature and so I thought its good to post
here.

Anyway sorry to disturb you

cheers
Digambar

-- 
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: Trying to get rid of my last few Long calculations in my game and completely turn it into FP format. System.currentTimeMillis() giving me a headache.

2009-12-29 Thread a1
Well, yes, you can simply shift to fixed since t is difference which I
should be around 20.
But what's the point? I'm using floating point exclusively for
calculations, and really do
not have problems with performance. If you do not perform heavy
calculations it doesn't matter,
and if you do interpreter overhead will kill your performance anyway.

--
Bart Janusz
www.beepstreet.com

On Dec 29, 4:25 pm, Mika mts...@googlemail.com wrote:
 Like the topic of the thread says. In my game I would like to turn all
 the calculations into FP format. I can eliminate pretty much
 everything else but I still need to do the the following calculation
 in long format.

 Code:
 long t = this.lastUpdateTime - System.currentTimeMillis();

 The value I get from this is the time passed since last frame, which
 is like.. two digit millisecond value, which naturally is more than
 good for FP stuff. After that calculation I turn the resulting value
 into FP integer and use it with the rest of my calculations but I'd
 like to get rid of that long calculation too. Any ideas how to go
 around this to do it in FP format?

 I mean, I'm pretty sure I cannot just go and do a normal conversion to
 FP format in this style:
 Code:
 int fpT = t * (116);

 because there is always the change that it'll overflow and as the
 numbers that System.currentTimeMillis() give out are BIG.

 So any advice how to keep the same accuracy of the timer but get rid
 of the long calculation and have it replaced with nice and fast FP
 calculation. Any advices on how to trim down the
 System.currentTimeMillis() or what ever to get around this are greatly
 appreciated.

 Cheers guys.

-- 
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: Trying to get rid of my last few Long calculations in my game and completely turn it into FP format. System.currentTimeMillis() giving me a headache.

2009-12-29 Thread Mika
OH sorry guys, my bad, I wasn't specific enough.
I'm TRYING To shift myself into fixed point(FP) world and trying to
get rid of the long calculations :) So.. does the topic make more
sense now? Sorry for being such a numnum and not realising that FP =
fixed point AND floating point. D'oh.

But yeah, any help how to get rid of the remaining long calculation?

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


Re: [android-developers] No Adobe Flash support for Eclair!?!

2009-12-29 Thread chris harper
Sena - I picked up a book on writing Flash content for mobile devices and
from I understand from the book is that FlashLite is based off of Flash 9.
They are essentially the same thing. Where anything written for Flash 9
(with actionscript 2) can be run in FlashLite. That is my current
understanding between the two. There might be minor differences.I did flash
my HTC HERO about a month ago and that thought did cross my mind that maybe
the FlashLite got messed up in the process. So my current thought process is
to FLASH HTC's newest ROM onto my Hero:

http://www.htc.com/uk/SupportViewNews.aspx?dl_id=671news_id=254

I think this will be my best bet for getting the most updated Flash from HTC
onto my HERO and (hopefully if the moons align) be able to write a little
WebView client to read .swf files.

-Chris



On Tue, Dec 29, 2009 at 7:00 AM, Sena Gbeckor-Kove s...@imkon.com wrote:

 If you've flashed you Hero with somethign else you'll have removed the
 Flash Plugin. Unless you have a cracked ROM that includes Flash.

 S


 On 28 Dec 2009, at 20:30, chris harper wrote:

 Ok. It is becoming clear now.

 Flash is licensed per device. So even though you have different devices all
 running Android, only the ones that are licensed for Flash can implement it.
 Is that correct?

 I didn't mention that I do have an HTC Hero (as well as my android
 development phone). It is running Firmware version 1.5.
 I also tried doing the WebView as stated in the article testing on this
 device and also got the same result as my android development phone when
 trying to view a .swf (a screen full of random characters).

 From what you told me it sounds like I need to go down the road of
 continuing to test my WebView stub on my HTC Hero and maybe looking into why
 my flashlite plugin doesn't seem to be working with my WebView stub code?

 Does that sound about right to you Mark?

 Thank you again, this really does help me alot.

 -Chris



 On Mon, Dec 28, 2009 at 12:10 PM, Mark Murphy mmur...@commonsware.comwrote:

 chris harper wrote:
  According to this article it is had been done and is possible:
 
 http://www.flashmobileblog.com/2009/08/12/flash-development-with-android-part2/

 The very first sentence of that post:

 As we already know by now the HTC Hero supports Flash in the browser,
 and by double tapping on Flash content it will be played in full screen
 mode.

 You will note that this says HTC Hero. The HTC Hero is a device, for
 which HTC licensed a Flash (Lite) implementation.

  But again like I stated before, after downloading the latest source
  code, building it, flashing it to my development phone and flash still
  not working I am having my doubts (and greatly wondering how this guy
  said it is working).

 That is because he is referring to the HTC Hero.

  Do you know if this is even somewhat possible (maybe a FlashLite plugin
  I am missing or something?).

 This presumably will work on an HTC Hero -- I haven't tried it. It will
 not work on devices that did not license Flash (Lite) from Adobe. It
 most definitely will not work from the Android open source tree, because
 Flash is not open source.

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

 Android App Developer Books: http://commonsware.com/books

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



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




-- 
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: AudioTrack stop/release

2009-12-29 Thread Business Talk
Thanks Olivier,

It is very helpful Olivier, I am just curious about MP3 players, They
are able to stop playing with a very small latency. It seems like they
would have to repeatedly write into a very small buffer. Do you think
that is the case?

My scenario is very similar to the MP3 players. I don’t know when the
stop action is going to take place so writing zeros might not work. So
the only solution is to use small buffer. I will see how it goes.
Thanks


On Dec 29, 11:23 am, Olivier Guilyardi l...@samalyse.com wrote:
 On 12/25/2009 02:00 PM, Business Talk wrote:

  I keep posting this message hoping that maybe somebody from google
  (media group in particular) monitors the group.  I need to stop the
  AudioTrack, regardless what's in the buffer, immediately when
  executing the stop/release. The AudioTrack plays in the STREAM mode.
  It appears that the AudioTrack finishes playing what's in the buffer
  and than stops. It seems that it's such a fundamental flaw since there
  are so many audio applications out there.

 I don't think that your question relates to AudioTrack in particular, but to
 dealing with audio buffers in general, and especially when these buffers are 
 too
 large.

 On almost any platform and API I can think of, if the audio buffer is large 
 then
 you have to deal with a rather noticeable latency. And I think that your 
 problem
 is indeed about latency.

 Instead of starting/stopping the AudioTrack as you do, which is a quite heavy
 operation (thread, locks, IPC, etc..), I would first recommend that you fill 
 the
 buffer with zeros whenever sound has to stop.

 But if your buffer is large then there will be a noticeable delay between the
 moment you actually write zeros and the moment the sound becomes silent (yet,
 that should be faster than actually calling play() or stop()).

 For instance, I'm quite successfully using AudioTrack with a buffer size of 
 4096
 frames, which at 22050Hz, induces (at least) a 185ms delay. That is quite a 
 lot
 IMO, and I don't think you can reduce that in Android's current state. I would
 even say than 8092 frames seems a safer choice.

 But many audio applications out there know how to deal with a such latency, 
 even
 if it is about hundreds of milliseconds. It is not always possible, but in 
 some
 case it is, especially if you can:

 (1) measure the output latency
 (2) anticipate audio output events

 So that you start playing sounds (or silence) in advance, taking the latency
 into account.

 You can approximate (1) with: latency = bufferSize / sampleRate

 Whether (2) is possible or not depends on you app. If it isn't and that
 200-400ms latency is too much for you then I recommend that you star the
 following issue to encourage Google to address it as soon as 
 possible:http://code.google.com/p/android/issues/detail?id=3434

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


Re: [android-developers] Trying to get rid of my last few Long calculations in my game and completely turn it into FP format. System.currentTimeMillis() giving me a headache.

2009-12-29 Thread Frank Weiss
Do you really think that calculating the difference between two floats is
faster than calculating the difference between two longs?

On Dec 29, 2009 7:25 AM, Mika mts...@googlemail.com wrote:

Like the topic of the thread says. In my game I would like to turn all
the calculations into FP format. I can eliminate pretty much
everything else but I still need to do the the following calculation
in long format.

Code:
long t = this.lastUpdateTime - System.currentTimeMillis();


The value I get from this is the time passed since last frame, which
is like.. two digit millisecond value, which naturally is more than
good for FP stuff. After that calculation I turn the resulting value
into FP integer and use it with the rest of my calculations but I'd
like to get rid of that long calculation too. Any ideas how to go
around this to do it in FP format?

I mean, I'm pretty sure I cannot just go and do a normal conversion to
FP format in this style:
Code:
int fpT = t * (116);

because there is always the change that it'll overflow and as the
numbers that System.currentTimeMillis() give out are BIG.

So any advice how to keep the same accuracy of the timer but get rid
of the long calculation and have it replaced with nice and fast FP
calculation. Any advices on how to trim down the
System.currentTimeMillis() or what ever to get around this are greatly
appreciated.

Cheers guys.

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

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

Re: [android-developers] Portrait vs landscape using sensor

2009-12-29 Thread Frank Weiss
This may a related issue. When using the accelerometer sensor on Droid when
I hold the device with the display plane vertical, like when taking a
picture, the y axis is minus one g, regardless of lanscap or portrait
orientation.

On Dec 18, 2009 10:50 AM, Mark Wyszomierski mar...@gmail.com wrote:

Hi,

I'm trying to detect landscape vs portrait orientation with the
following:

 public void onSensorChanged(SensorEvent event) {
 float pitch = event.values[2];
 if (pitch = 45  pitch = -45) {
// portrait
 }
 else if (pitch  -45) {
// landscape
 }
 else if (pitch  45) {
// landscape
 }
 }

anyone have something more robust? It works pretty well, except if the
phone is in a landscape orientation, and the user starts to 'flatten'
it out, starts thinking it's in the portrait orientation again,

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

-- 
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] AES decryption is slow....

2009-12-29 Thread sdphil
hi,

I am trying to do AES decryption like this --

Cipher cipher = Cipher.getInstance(AES/ECB/PKCS5Padding);
cipher.init(Cipher.DECRYPT_MODE, aesKey);
cipher.update(encryBytes, 0, encrByteCount);

And it is taking me about 2.5+ seconds to run just the cipher.update
(i.e. I excluded the init and getInstance() calls) for 65KB of data --
which seems way too long.

What this translates to (roughly) 60 seconds for a 1.5MB file.  Which
is uber slow.

I *am* actually seeing 60 or so seconds when I try to decrypt that big
of a file (looping through and feeding buffers).

Does anybody know why AES decryption is so slow on Android?  A co-
worker is seeing times around 10 seconds for the same file on a RIM
device.

tia.

-- 
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: Reminder: IRC office hours tomorrow

2009-12-29 Thread theSmith
Thanks for those Megha.

Is there any plan to add responses to the 12/17 and 12/22 meetings?  I
find this an excellent resource issues/problems/insight that I think
should be available.

-theSmith

On Dec 18, 5:39 pm, Megha Joshi mjo...@google.com wrote:
 Check out the answers to questions from the 12/15 office hours 
 here:http://moderator.appspot.com/#15/e=120951t=11fd95

 2009/12/17 Megha Joshi mjo...@google.com

  We are still considering whether to provide transcripts depending on its
  demand.

  There is a list of questions asked during office hours here.We will be
  updating it with answers soon:.
 http://moderator.appspot.com/#15/e=120951t=11fd95

  For today's office hours at 5pm PST you could post your questions at:
 http://moderator.appspot.com/#15/e=120951t=121ce5f=121ce6

  Thanks,
  Megha

  2009/12/16 theSmith chris.smith...@gmail.com

  Megha,

  Is there a transcript of previous office hours (just one I believe) /
  future office hours?

  By transcript I mean exactly what was said during the session,
  available for those who were unable to actually be on IRC at that
  time.

  Thanks,

  Chris

  On Dec 14, 7:02 pm, Megha Joshi mjo...@google.com wrote:
   Hi Everyone,

   Just a quick reminder that our IRC office hour session is taking place
   tomorrow morning, 9:00-10:00 a.m. PST. Please join us with your
  technical
   questions at:

   irc://irc.freenode.net#android-dev 
 http://irc.freenode.net/#android-dev

   Thanks,
   Megha

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

-- 
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 can i stop a thread in a Activity?

2009-12-29 Thread theSmith
I found this article to be very insightful because I too am just
learning about managing multiple threads.
http://articles.techrepublic.com.com/5100-10878_11-5144546.html

I ended up using a shared volatile variable that is check when I'm
doing this that take alot of time in the background thread, if it's
false the thread will exit accordingly.  Also in my app's onStop()
method I make sure to check to see if the thread is running and stop
it if it is.

-theSmith

On Dec 18, 5:44 pm, Streets Of Boston flyingdutc...@gmail.com wrote:
 Calling interrupt() only works if your thread is interruptable and if
 your thread handles interruptions appropriately.

 Your thread only is interrupted if the thread is doing I/O or is in a
 wait-state (having called wait() on Object).

 If you want to have background threads that do one-shot jobs and then
 wait, use AsyncTask or the java.util.concurrent's ExecutorService .

 And, you'd better read up on concurrent programming a little :-) It
 can be tricky.

 On Dec 16, 11:26 pm, Matt hansen.matt...@gmail.com wrote:

  Try storing the newly spawned thread as a field or collection in the
  appropriate class.  Then when you need to kill the thread, retrieve it
  and call Thread.interrupt().

  Matt

  On Dec 9, 6:15 pm, Richard Zhao zwher...@gmail.com wrote:

   My problem is:
   Activity A called Activity B, and in Activity B, it start a background
   thread to do some client-server work. But it maybe takes too much
   time. So i add a cancel button to call the stop() method to stop the
   thread, and call finish() to finish the Activity B and go back to
   Activity A. Although it is back to Activity A, the thread isn't stop
   immediately.

   Can i just call the finish() to go back to Activity A, and leave the
   thread to exit by itself?
   If it is not the right way, which is?

   Thanks for any help.- 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: AES decryption is slow....

2009-12-29 Thread sdphil
interestingly enough, on a device T-Mobile G2, things are fast - like
on the order that I would expect - 10 to 15 seconds.  so i guess this
is less important, however, it's still troubling that it's so slow on
the simulator.

On Dec 29, 9:14 am, sdphil phil.pellouch...@gmail.com wrote:
 hi,

 I am trying to do AES decryption like this --

 Cipher cipher = Cipher.getInstance(AES/ECB/PKCS5Padding);
 cipher.init(Cipher.DECRYPT_MODE, aesKey);
 cipher.update(encryBytes, 0, encrByteCount);

 And it is taking me about 2.5+ seconds to run just the cipher.update
 (i.e. I excluded the init and getInstance() calls) for 65KB of data --
 which seems way too long.

 What this translates to (roughly) 60 seconds for a 1.5MB file.  Which
 is uber slow.

 I *am* actually seeing 60 or so seconds when I try to decrypt that big
 of a file (looping through and feeding buffers).

 Does anybody know why AES decryption is so slow on Android?  A co-
 worker is seeing times around 10 seconds for the same file on a RIM
 device.

 tia.

-- 
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: Trying to get rid of my last few Long calculations in my game and completely turn it into FP format. System.currentTimeMillis() giving me a headache.

2009-12-29 Thread Lance Nanek
Fixed point can still fit a good 30 seconds or so worth of whole
milliseconds, can't it? Are you ever going to have updates more than
30 seconds apart?

Even if you are, you can just convert to seconds. Use the integer
representing portion of the fixed point from 116 up for whole
seconds. Use the fraction representing portion below that for the
remainder.

That said, I'm working on a game where all the values passed to OpenGL
are fixed point and most of the calculations are as well. I just pass
the time delta around as a non-fixed point integer, however.

It's never a fraction and never passed to OpenGL directly, so you
aren't forced to convert it. The various speed constants in the game
take into account that it is much smaller than if it were shifted into
fixed point is all.

By the way, you may want to use SystemClock.uptimeMillis() instead of
System.currentTimeMillis(). System.currentTimeMillis() is documented
as jumping around occasionally:
http://developer.android.com/reference/android/os/SystemClock.html

On Dec 29, 10:25 am, Mika mts...@googlemail.com wrote:
 Like the topic of the thread says. In my game I would like to turn all
 the calculations into FP format. I can eliminate pretty much
 everything else but I still need to do the the following calculation
 in long format.

 Code:
 long t = this.lastUpdateTime - System.currentTimeMillis();

 The value I get from this is the time passed since last frame, which
 is like.. two digit millisecond value, which naturally is more than
 good for FP stuff. After that calculation I turn the resulting value
 into FP integer and use it with the rest of my calculations but I'd
 like to get rid of that long calculation too. Any ideas how to go
 around this to do it in FP format?

 I mean, I'm pretty sure I cannot just go and do a normal conversion to
 FP format in this style:
 Code:
 int fpT = t * (116);

 because there is always the change that it'll overflow and as the
 numbers that System.currentTimeMillis() give out are BIG.

 So any advice how to keep the same accuracy of the timer but get rid
 of the long calculation and have it replaced with nice and fast FP
 calculation. Any advices on how to trim down the
 System.currentTimeMillis() or what ever to get around this are greatly
 appreciated.

 Cheers guys.

-- 
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] Droid/Milestone: GL_OES_framebuffer_object reported but not working

2009-12-29 Thread Hexage
Hi,

I'm trying to use the framebuffer object extension on Milestone with
2.0 firmware. The extension is reported by OpenGL but when you try to
use it then my app aborts. No message, no stacktrace, nothing.

Here is a simple code snippet for creating a framebuffer object:

int createFBO(GL11 gl) {
  boolean hasFBO = isGLExtensionAvailable
(GL_OES_framebuffer_object); // internal function for GL_EXTENSIONS
lookup
  if (! hasFBO)
return 0;

  if (! (gl instanceof GL11ExtensionPack))
return 0;
  GL11ExtensionPack glext = (GL11ExtensionPack)gl;

  int[] handles = new int[1];
  glext.glGenFramebuffersOES(1, handles, 0); // aborts on Milestone
  return handles[0];
}

Has anyone had any luck using FBO?

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


Re: [android-developers] blocking UI thread when Yes/No AlertDialog is displayed

2009-12-29 Thread TreKing
Um ... why don't you just put the code you want to execute in the onClick
handlers for the Yes and No options, respectively?
That's pretty much the point of having them ...

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking


On Tue, Dec 29, 2009 at 8:25 AM, Frank Weiss fewe...@gmail.com wrote:

 I assume you want a modal dialog. I'm pretty sure  blocking the UI thread
 is going about this wrong. For example, consider the Activity lifecycle
 callbacks which would be called when another Activity or Application becomes
 visible.

 Here's an explanation I found by googling for android modal dialog:
 http://groups.google.com/group/android-developers/browse_thread/thread/5616a220c97a13fc/5e722e601f33d884#5e722e601f33d884

 On Tue, Dec 29, 2009 at 3:52 AM, swapnil kamble swap.kam...@gmail.comwrote:

 Hi ,
   I am displaying Confirmation type dialog box. I want to pause
 execution of that thread until answer is provided by user, but since this
 AlertDialog works asynchronously, I am facing problems in blocking that
 thread but displaying AlertDialog and continue execution on answer. I tried
 using wait notify between threads but didn't worked. Anybody Used
 AlertDialog.wait() method ?
 I am pasting my code here too,

  AlertDialog.Builder builder = new
 AlertDialog.Builder(Demo.ctxt);

 builder.setMessage(Do you want  to Trust testgenservercert)
  .setCancelable(false)

 .setPositiveButton(Yes, new DialogInterface.OnClickListener() {
  public void
 onClick(DialogInterface dialog, int id) {


 //uiThread.notify();

 System.out.println(Positive Button clicked);
  }
  })

 .setNegativeButton(No, new DialogInterface.OnClickListener() {
  public void
 onClick(DialogInterface dialog, int id) {


 //uiThread.notify();


 System.out.println(Negative Button clicked);

  }
  });
 /*uiThread =
 Thread.currentThread();
 AlertDialog alert =
 builder.create();
 alert.show();
 synchronized(alert) {
 alert.wait();
 }*/


 --
 ...Swapnil

 || Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
 || Hare RamaHare Rama   Rama   RamaHare Hare ||

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


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


-- 
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] Logs from framework.jar

2009-12-29 Thread Michael Scott
Hi,

Why does no logprints from the framework-code (Telephony) show up in
logcat? Is there a setting somewhere I should turn on or something?

Thanks,
Michael

-- 
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: Crop a Picture after Using Camera to Take It

2009-12-29 Thread Wysie
Hi all,

After doing some reading, I realized it can't be done so simply. My
modded Contacts source is at http://github.com/Wysie, you can take a
look if you're interested. Also, here's what I did to get it working:

private void doTakePhotoAction() {
// http://2009.hfoss.org/Tutorial:Camera_and_Gallery_Demo
// 
http://stackoverflow.com/questions/1050297/how-to-get-the-url-of-the-captured-image
// http://www.damonkohler.com/2009/02/android-recipes.html
// http://www.firstclown.us/tag/android/
// The one I used to get everything working:
http://groups.google.com/group/android-developers/msg/2ab62c12ee99ba30

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

//Wysie_Soh: Create path for temp file
mImageCaptureUri = Uri.fromFile(new File
(Environment.getExternalStorageDirectory(),
tmp_contact_ + String.valueOf
(System.currentTimeMillis()) + .jpg));

intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT,
mImageCaptureUri);

try {
intent.putExtra(return-data, true);
startActivityForResult(intent, PICK_FROM_CAMERA);
} catch (ActivityNotFoundException e) {
//Do nothing for now
}
}

protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
if (resultCode != RESULT_OK) {
return;
}

switch (requestCode) {

case CROP_FROM_CAMERA: {
//Wysie_Soh: After a picture is taken, it will go to
PICK_FROM_CAMERA, which will then come here
//after the image is cropped.

final Bundle extras = data.getExtras();

if (extras != null) {
Bitmap photo = extras.getParcelable(data);

mPhoto = photo;
mPhotoChanged = true;
mPhotoImageView.setImageBitmap(photo);
setPhotoPresent(true);
}

//Wysie_Soh: Delete the temporary
file
File f = new File(mImageCaptureUri.getPath());
if (f.exists()) {
f.delete();
}

InputMethodManager mgr = (InputMethodManager)
getSystemService(Context.INPUT_METHOD_SERVICE);
mgr.showSoftInput(mPhotoImageView,
InputMethodManager.SHOW_IMPLICIT);

break;
}

case PICK_FROM_CAMERA: {
//Wysie_Soh: After an image is taken and saved to the
location of mImageCaptureUri, come here
//and load the crop editor, with the necessary parameters
(96x96, 1:1 ratio)

Intent intent = new Intent
(com.android.camera.action.CROP);
intent.setClassName(com.android.camera,
com.android.camera.CropImage);

intent.setData(mImageCaptureUri);
intent.putExtra(outputX, 96);
intent.putExtra(outputY, 96);
intent.putExtra(aspectX, 1);
intent.putExtra(aspectY, 1);
intent.putExtra(scale, true);
intent.putExtra(return-data, true);
startActivityForResult(intent, CROP_FROM_CAMERA);

break;

}
}
}

Hope it helps :)

-- 
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: Debugging on mobile 2

2009-12-29 Thread LeGeNDuS
Hello!, thanks for the answers.

Yes I have enbled the USB debugging. My device is a HTC hero of Orange
(in spain). It takes the android 1.5 (I don't know how to update it).
I have installed the USB tool that comes with the setup of the SDK,
and well, when I want to debug on the device (or trying at
least... ;) ) I connect the USB to the PC and the device and when I
click on run it install the APP and run it... When I click on debug,
it does exactly the same (install if there is a change, and run) and
never stops on the breakpoints used (and that breakpoints works with
the emulator).

On 28 dic, 08:41, sunit nair sunitna...@gmail.com wrote:
 please check if u have enabled the USB debugging option on the device.





 On Mon, Dec 28, 2009 at 5:38 PM, Frank Weiss fewe...@gmail.com wrote:
  Please give details about your device and how you connect to it for
  debbing.

  On Dec 28, 2009 12:16 AM, LeGeNDuS legen...@gmail.com wrote:

  I had open this one:

 http://groups.google.com/group/android-developers/browse_thread/threa...

  But now, I can't asnwer in that post. I says to me that it has been
  published (my message) But it's not true, because I have tried to put
  5 or 6 times to put a messages there and it never appears. So I reopen
  it. I hope now it works...

  I answer to Frank:

  Yes, I have used the breakpoints, and it works fine when I use the
  emulator, it stops where it must stop. But in the device, it doens't
  work I don't know why

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

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

 --
 Cheers,
 Sunit

 Marie von 
 Ebner-Eschenbachhttp://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac
 - Even a stopped clock is right twice a day.

-- 
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: Phone calls recording on 2.0

2009-12-29 Thread appforce.org

I would like to ask Google engineers or anyone, if there is known
device that supports voice call audio recording?

-- 
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: Debugging on mobile 2

2009-12-29 Thread LeGeNDuS
thanks for all!, I have seen why it doesnt work...
android:debuggable=true lacked in the manifiest, now it works (I
didn't know it was neccesary...)


On 29 dic, 18:32, LeGeNDuS legen...@gmail.com wrote:
 Hello!, thanks for the answers.

 Yes I have enbled the USB debugging. My device is a HTC hero of Orange
 (in spain). It takes the android 1.5 (I don't know how to update it).
 I have installed the USB tool that comes with the setup of the SDK,
 and well, when I want to debug on the device (or trying at
 least... ;) ) I connect the USB to the PC and the device and when I
 click on run it install the APP and run it... When I click on debug,
 it does exactly the same (install if there is a change, and run) and
 never stops on the breakpoints used (and that breakpoints works with
 the emulator).

 On 28 dic, 08:41, sunit nair sunitna...@gmail.com wrote:



  please check if u have enabled the USB debugging option on the device.

  On Mon, Dec 28, 2009 at 5:38 PM, Frank Weiss fewe...@gmail.com wrote:
   Please give details about your device and how you connect to it for
   debbing.

   On Dec 28, 2009 12:16 AM, LeGeNDuS legen...@gmail.com wrote:

   I had open this one:

  http://groups.google.com/group/android-developers/browse_thread/threa...

   But now, I can't asnwer in that post. I says to me that it has been
   published (my message) But it's not true, because I have tried to put
   5 or 6 times to put a messages there and it never appears. So I reopen
   it. I hope now it works...

   I answer to Frank:

   Yes, I have used the breakpoints, and it works fine when I use the
   emulator, it stops where it must stop. But in the device, it doens't
   work I don't know why

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

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

  --
  Cheers,
  Sunit

  Marie von 
  Ebner-Eschenbachhttp://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac
  - Even a stopped clock is right twice a day.

-- 
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] SMS text garbled using native Messaging app when message spans two text messages?

2009-12-29 Thread Mark Wyszomierski
Hi,

I'm working with the sms intent. Testing this on 2.0 emulators.

If I use the built-in messaging app to create a text message which
spans two messages, the receiving emulator displays the received
message as garbled text. Looks like it's encoded or compressed etc.
Does anyone else see this? Is this just an issue with the emulators,
and won't happen on a real device? If I send a message  160
characters, the other emulator gets it ok.

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: How can i stop a thread in a Activity?

2009-12-29 Thread jotobjects
Why not just call Thread.isInterrupted() instead of using the
volatile?

On Dec 29, 9:24 am, theSmith chris.smith...@gmail.com wrote:
 I found this article to be very insightful because I too am just
 learning about managing multiple 
 threads.http://articles.techrepublic.com.com/5100-10878_11-5144546.html

 I ended up using a shared volatile variable that is check when I'm
 doing this that take alot of time in the background thread, if it's
 false the thread will exit accordingly.  Also in my app's onStop()
 method I make sure to check to see if the thread is running and stop
 it if it is.

 -theSmith

 On Dec 18, 5:44 pm, Streets Of Boston flyingdutc...@gmail.com wrote:

  Calling interrupt() only works if your thread is interruptable and if
  your thread handles interruptions appropriately.

  Your thread only is interrupted if the thread is doing I/O or is in a
  wait-state (having called wait() on Object).

  If you want to have background threads that do one-shot jobs and then
  wait, use AsyncTask or the java.util.concurrent's ExecutorService .

  And, you'd better read up on concurrent programming a little :-) It
  can be tricky.

  On Dec 16, 11:26 pm, Matt hansen.matt...@gmail.com wrote:

   Try storing the newly spawned thread as a field or collection in the
   appropriate class.  Then when you need to kill the thread, retrieve it
   and call Thread.interrupt().

   Matt

   On Dec 9, 6:15 pm, Richard Zhao zwher...@gmail.com wrote:

My problem is:
Activity A called Activity B, and in Activity B, it start a background
thread to do some client-server work. But it maybe takes too much
time. So i add a cancel button to call the stop() method to stop the
thread, and call finish() to finish the Activity B and go back to
Activity A. Although it is back to Activity A, the thread isn't stop
immediately.

Can i just call the finish() to go back to Activity A, and leave the
thread to exit by itself?
If it is not the right way, which is?

Thanks for any help.- 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: Get body movement (e.g. turn around)

2009-12-29 Thread Moritzz
Well, I chose another way now:
I'm just looking at the compass (calibration required) and check with
a switch-case if the phone was turned. That's not the good approach
but it works for now and as I'm just working on a prototype that
should be fine for now. As the user is supposed to look on the screen
while using my app I don't think people would start turning the phone
but not themselves.
Thanks for your help anyway!

Cheers


On Dec 29, 4:32 pm, Frank Weiss fewe...@gmail.com wrote:
 Using the (magnetic) compass would require less coding, I suppose. However,
 is it available on all your target devices and is it accurate enough?

 I should defer to someone who's actually used the compass sensor. In the
 meantime, you could put together a test app in just a few minutes. You could
 base it on the following accelerometer test 
 code:http://stuffthathappens.com/blog/2009/03/15/android-accelerometer/

 On Tue, Dec 29, 2009 at 7:11 AM, Matt hansen.matt...@gmail.com wrote:
  Isn't it possible to use the compass magnet to track direction?

  Matt

  On Dec 29, 7:07 am, Frank Weiss fewe...@gmail.com wrote:
   It's doubtful you can literally tell if the person has turned around. I
   think you're trying to infer that, by assuming the person is holding the
   device a certain way in relation to his or her body..

   Perhaps by that assumption, the device moves in a 360° arc through space,
   not on an axis intersecting the device (simple bearing). It should be
   possible to track the position of the device through the arc via the
   accelerometer and infer the body movement you are trying to figure out.

   On Tue, Dec 29, 2009 at 2:18 AM, Moritzz moritz...@googlemail.com
  wrote:
Okay, I came up with an idea now but I can't implement it. Basically I
need to implement sthg like a real compass. I also found an
application like that in the market: Compass. But I have no clue how
they got that thing working properly. Does anyone have some experience
with the orientation and magnetic field sensors?

On Dec 27, 6:40 pm, Moritzz moritz...@googlemail.com wrote:
 I'm working on an app that needsbodymovements as inputs. So
 basically I want to know if a person turns around completely (360°).
 If a the person does sthg happens inside the application. My problem
 for now is: How to figure out if a person turned around?
 I don't see an approach with gps as the person is not moving enough.
 So I thought about the compass or acceleration sensor but I have no
 clue how to manage that. I'd really appreciate some ideas / hints /
 tipps!

 Cheers

 Moritz

--
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.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs
  cr...@googlegroups.com
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

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

-- 
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: Trying to get rid of my last few Long calculations in my game and completely turn it into FP format. System.currentTimeMillis() giving me a headache.

2009-12-29 Thread a1


On 29 Gru, 17:49, Mika mts...@googlemail.com wrote:
 OH sorry guys, my bad, I wasn't specific enough.
 I'm TRYING To shift myself into fixed point(FP) world and trying to
 get rid of the long calculations :) So.. does the topic make more
 sense now? Sorry for being such a numnum and not realising that FP =
 fixed point AND floating point. D'oh.

 But yeah, any help how to get rid of the remaining long calculation?

By writing shift into fixed I meant you can simply do:

int time_15_16 = ((int) (now - last)  16) / 1000;

since difference betweend now and last update time cannot overflow.

--
Bart Janusz

-- 
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: Phone calls recording on 2.0

2009-12-29 Thread Matt
You can watch this thread:
http://code.google.com/p/android/issues/detail?id=2117

I don't think it works on any phones yet.  There is some speculation
it might work on the Nexus one.

matt

On Dec 29, 11:36 am, appforce.org ogi.andr...@gmail.com wrote:
 I would like to ask Google engineers or anyone, if there is known
 device that supports voice call audio recording?

-- 
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: No Adobe Flash support for Eclair!?!

2009-12-29 Thread Skid
The browsers on my Droid (Milestone) forwards me Adobe's site that
tells me:
Adobe Flash Player 10.1 is coming to Android 2.0 and future releases
in the first half of 2010.

Nice and vague but there you are.

On Dec 28, 6:07 pm, chris harper ch393...@gmail.com wrote:
 I kept reading about how one of the biggest news about eclair coming
 out in 2010 is that  support for Flash 10 (or ANY Flash for that
 matter) will be built into it.

 This does not appear to be the case for the fact that I download all
 the latest source code for Eclair, built and installed Eclair onto my
 development phone over the Christmas break and to my surprise/
 disappointment there is absolutely no support for Flash when I try to
 view with the browser. I tried plugin's and searching for missing .apk
 installs for Flash but I found nothing.

 Unless I am missing something (i.e. maybe a side tree build for
 flash?)  and if I did then I apologize but from what I can tell as of
 now the Eclair build does and will not support flash.

 If anyone knows ANYTHING on this topic on this please update for us.

 Thank you

 -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


Re: [android-developers] No Adobe Flash support for Eclair!?!

2009-12-29 Thread chris harper
Hey Sena

It looks like I have to do a little more research between Flash 9 and
FlashLite. I will do that tonight. Thank you.

Unfortunately I have the Sprint HTC HERO which as I recently found out is
less open to find ROM updates. I will search for the Sense 2 that you
referred to. I might get lucky. :-)

I am doing a proof of concept right now for an app that I want to do.
For my app to work I will need to interact certain system actions on the
phone with code in Flash (actionscript 2 which FlashLite supports).
I have not found a way for Java (i.e. an android app) to interact with
actionScript directly.

The bridge I found is javascript.

ActionScript WILL interact with javascript.
Java also interact with javascript as seen here with WebView.
http://code.google.com/p/apps-for-android/
Check out the *WebViewDemo.*

So what I am trying to do is when an action happens ( for example the phone
ringing or other events on the phone)  that triggers a call to javascript
which will then in turn send an action to the actionScript within flash
which will then perform an animation or something.
If I can only find a way to actually display the flash content within
WebView.

I might be out in right field on this and if I am please feel free to give
me a virtual slap around but this is the only way I can find to do what I
want.

-Chris

On Tue, Dec 29, 2009 at 1:20 PM, Sena Gbeckor-Kove s...@imkon.com wrote:

 Hi Chris,

 From what I kwow there are quite a few differences between Flash 9 and
 Flash Lite. A quick Google should fill you in.

 You'll definitely need one of the standard Hero roms unless somebody has
 hacked the Flash files onto a custom rom. If you must have something more
 recent you might want to track down the Sense 2 rom. I know that runs on
 Hero. There are videos of it floating about. Or just wait, for 2 months for
 HTC to drop the official 2.x update.

 I must say I'm intrigued as to why you want to create such a WebView when
 only Hero owners will be able to use it at present. Of course once Flash
 10.1 turns up for Android everybody should be able to play.

 Q2 2010?

 S
 On 29 Dec 2009, at 17:51, chris harper wrote:


 Sena - I picked up a book on writing Flash content for mobile devices and
 from I understand from the book is that FlashLite is based off of Flash 9.
 They are essentially the same thing. Where anything written for Flash 9
 (with actionscript 2) can be run in FlashLite. That is my current
 understanding between the two. There might be minor differences. I did
 flash my HTC HERO about a month ago and that thought did cross my mind that
 maybe the FlashLite got messed up in the process. So my current thought
 process is to FLASH HTC's newest ROM onto my Hero:

 http://www.htc.com/uk/SupportViewNews.aspx?dl_id=671news_id=254

 I think this will be my best bet for getting the most updated Flash from
 HTC onto my HERO and (hopefully if the moons align) be able to write a
 little WebView client to read .swf files.

 -Chris



 On Tue, Dec 29, 2009 at 7:00 AM, Sena Gbeckor-Kove s...@imkon.com wrote:

 If you've flashed you Hero with somethign else you'll have removed the
 Flash Plugin. Unless you have a cracked ROM that includes Flash.

 S


 On 28 Dec 2009, at 20:30, chris harper wrote:

 Ok. It is becoming clear now.

 Flash is licensed per device. So even though you have different devices
 all running Android, only the ones that are licensed for Flash can implement
 it. Is that correct?

 I didn't mention that I do have an HTC Hero (as well as my android
 development phone). It is running Firmware version 1.5.
 I also tried doing the WebView as stated in the article testing on this
 device and also got the same result as my android development phone when
 trying to view a .swf (a screen full of random characters).

 From what you told me it sounds like I need to go down the road of
 continuing to test my WebView stub on my HTC Hero and maybe looking into why
 my flashlite plugin doesn't seem to be working with my WebView stub code?

 Does that sound about right to you Mark?

 Thank you again, this really does help me alot.

 -Chris



 On Mon, Dec 28, 2009 at 12:10 PM, Mark Murphy mmur...@commonsware.comwrote:

 chris harper wrote:
  According to this article it is had been done and is possible:
 
 http://www.flashmobileblog.com/2009/08/12/flash-development-with-android-part2/

 The very first sentence of that post:

 As we already know by now the HTC Hero supports Flash in the browser,
 and by double tapping on Flash content it will be played in full screen
 mode.

 You will note that this says HTC Hero. The HTC Hero is a device, for
 which HTC licensed a Flash (Lite) implementation.

  But again like I stated before, after downloading the latest source
  code, building it, flashing it to my development phone and flash still
  not working I am having my doubts (and greatly wondering how this guy
  said it is working).

 That is because he is referring to the HTC Hero.

  Do you know 

[android-developers] Re: Android “hover” event i n custom layout

2009-12-29 Thread k_day
I suppose one way to do this is to capture touch events at the layout
level, and then loop through all the layouts to see if an imageview is
under that point, though that sounds inefficient.

Is there any better way to find which view is at a given point?

Also, is it true that any touch event on an imageview will always
start with an ACTION_DOWN? I would like to switch focus to another
view when a finger is dragged over it.

On Dec 26, 11:06 pm, k_day kevin.r@gmail.com wrote:
 I have a custom layout that I have written that basically just
 displays a bunch of ImageViews. I am handing onTouch events for all
 the ImageViews in my layout. However, if a user touches one imageView
 and then drags over another ImageView, I would like to be able to
 handle that as well.

 How would I go about capturing this behavior?

-- 
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 can i stop a thread in a Activity?

2009-12-29 Thread theSmith
That would work also, you just have to remember that function calls
are never free and the GC on android is annoying enough as it is, no
need to give it more stuff to do.

-theSmith

On Dec 29, 1:43 pm, jotobjects jotobje...@gmail.com wrote:
 Why not just call Thread.isInterrupted() instead of using the
 volatile?

 On Dec 29, 9:24 am, theSmith chris.smith...@gmail.com wrote:

  I found this article to be very insightful because I too am just
  learning about managing multiple 
  threads.http://articles.techrepublic.com.com/5100-10878_11-5144546.html

  I ended up using a shared volatile variable that is check when I'm
  doing this that take alot of time in the background thread, if it's
  false the thread will exit accordingly.  Also in my app's onStop()
  method I make sure to check to see if the thread is running and stop
  it if it is.

  -theSmith

  On Dec 18, 5:44 pm, Streets Of Boston flyingdutc...@gmail.com wrote:

   Calling interrupt() only works if your thread is interruptable and if
   your thread handles interruptions appropriately.

   Your thread only is interrupted if the thread is doing I/O or is in a
   wait-state (having called wait() on Object).

   If you want to have background threads that do one-shot jobs and then
   wait, use AsyncTask or the java.util.concurrent's ExecutorService .

   And, you'd better read up on concurrent programming a little :-) It
   can be tricky.

   On Dec 16, 11:26 pm, Matt hansen.matt...@gmail.com wrote:

Try storing the newly spawned thread as a field or collection in the
appropriate class.  Then when you need to kill the thread, retrieve it
and call Thread.interrupt().

Matt

On Dec 9, 6:15 pm, Richard Zhao zwher...@gmail.com wrote:

 My problem is:
 Activity A called Activity B, and in Activity B, it start a background
 thread to do some client-server work. But it maybe takes too much
 time. So i add a cancel button to call the stop() method to stop the
 thread, and call finish() to finish the Activity B and go back to
 Activity A. Although it is back to Activity A, the thread isn't stop
 immediately.

 Can i just call the finish() to go back to Activity A, and leave the
 thread to exit by itself?
 If it is not the right way, which is?

 Thanks for any help.- 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


Re: [android-developers] No Adobe Flash support for Eclair!?!

2009-12-29 Thread Frank Weiss
Chris, sounds OK to me. I suppose using the WebView is to bridge between
Flash and Java as you indicated and to allow instant application updates
(instead of requiring install of a rich interface application).

However, the plumbing looks awful, I think you'd agree. I've wondered if
Adobe hasn't missed the boat by not having made Flash the mobile app
platform of choice, but that's another discussion.

On Tue, Dec 29, 2009 at 1:45 PM, chris harper ch393...@gmail.com wrote:

 Hey Sena

 It looks like I have to do a little more research between Flash 9 and
 FlashLite. I will do that tonight. Thank you.

 Unfortunately I have the Sprint HTC HERO which as I recently found out is
 less open to find ROM updates. I will search for the Sense 2 that you
 referred to. I might get lucky. :-)

 I am doing a proof of concept right now for an app that I want to do.
 For my app to work I will need to interact certain system actions on the
 phone with code in Flash (actionscript 2 which FlashLite supports).
 I have not found a way for Java (i.e. an android app) to interact with
 actionScript directly.

 The bridge I found is javascript.

 ActionScript WILL interact with javascript.
 Java also interact with javascript as seen here with WebView.
 http://code.google.com/p/apps-for-android/
 Check out the *WebViewDemo.*

 So what I am trying to do is when an action happens ( for example the phone
 ringing or other events on the phone)  that triggers a call to javascript
 which will then in turn send an action to the actionScript within flash
 which will then perform an animation or something.
 If I can only find a way to actually display the flash content within
 WebView.

 I might be out in right field on this and if I am please feel free to give
 me a virtual slap around but this is the only way I can find to do what I
 want.

 -Chris

 On Tue, Dec 29, 2009 at 1:20 PM, Sena Gbeckor-Kove s...@imkon.com wrote:

 Hi Chris,

 From what I kwow there are quite a few differences between Flash 9 and
 Flash Lite. A quick Google should fill you in.

 You'll definitely need one of the standard Hero roms unless somebody has
 hacked the Flash files onto a custom rom. If you must have something more
 recent you might want to track down the Sense 2 rom. I know that runs on
 Hero. There are videos of it floating about. Or just wait, for 2 months for
 HTC to drop the official 2.x update.

 I must say I'm intrigued as to why you want to create such a WebView when
 only Hero owners will be able to use it at present. Of course once Flash
 10.1 turns up for Android everybody should be able to play.

 Q2 2010?

 S
   On 29 Dec 2009, at 17:51, chris harper wrote:


 Sena - I picked up a book on writing Flash content for mobile devices and
 from I understand from the book is that FlashLite is based off of Flash 9.
 They are essentially the same thing. Where anything written for Flash 9
 (with actionscript 2) can be run in FlashLite. That is my current
 understanding between the two. There might be minor differences.I did
 flash my HTC HERO about a month ago and that thought did cross my mind that
 maybe the FlashLite got messed up in the process. So my current thought
 process is to FLASH HTC's newest ROM onto my Hero:

 http://www.htc.com/uk/SupportViewNews.aspx?dl_id=671news_id=254

 I think this will be my best bet for getting the most updated Flash from
 HTC onto my HERO and (hopefully if the moons align) be able to write a
 little WebView client to read .swf files.

 -Chris



 On Tue, Dec 29, 2009 at 7:00 AM, Sena Gbeckor-Kove s...@imkon.comwrote:

 If you've flashed you Hero with somethign else you'll have removed the
 Flash Plugin. Unless you have a cracked ROM that includes Flash.

 S


   On 28 Dec 2009, at 20:30, chris harper wrote:

   Ok. It is becoming clear now.

 Flash is licensed per device. So even though you have different devices
 all running Android, only the ones that are licensed for Flash can implement
 it. Is that correct?

 I didn't mention that I do have an HTC Hero (as well as my android
 development phone). It is running Firmware version 1.5.
 I also tried doing the WebView as stated in the article testing on this
 device and also got the same result as my android development phone when
 trying to view a .swf (a screen full of random characters).

 From what you told me it sounds like I need to go down the road of
 continuing to test my WebView stub on my HTC Hero and maybe looking into why
 my flashlite plugin doesn't seem to be working with my WebView stub code?

 Does that sound about right to you Mark?

 Thank you again, this really does help me alot.

 -Chris



 On Mon, Dec 28, 2009 at 12:10 PM, Mark Murphy 
 mmur...@commonsware.comwrote:

 chris harper wrote:
  According to this article it is had been done and is possible:
 
 http://www.flashmobileblog.com/2009/08/12/flash-development-with-android-part2/

 The very first sentence of that post:

 As we already know by now the HTC Hero supports Flash in the 

[android-developers] AudioTrack - Clicking Sounds

2009-12-29 Thread Business Talk
Do you know of any freeware application that can convert/generate
sounds in the PCM format? I am getting clicking sounds when playing
AudioTrack and I think it is because I am playing a wave file which is
a pcm with some headers. I downloaded a number of converters but all
of them generate wave files.

-- 
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] open sourcing an app

2009-12-29 Thread Christine
I haven't seen many open source android apps yet. Can I make my app
gpl open source just like that? Or do I have to include legal
statements regarding the Android code that my app is using?

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


Re: [android-developers] open sourcing an app

2009-12-29 Thread Greg Donald
On Tue, Dec 29, 2009 at 4:39 PM, Christine christine.kar...@gmail.com wrote:
 I haven't seen many open source android apps yet.

There are quite a few actually:

http://code.google.com/hosting/search?q=label:android


-- 
Greg Donald
http://destiney.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: Contact Picking on Motorola Cliq (1.5)?

2009-12-29 Thread jak.
Hello Suzanne,

I'm glad to hear that there is a fix in the works for this bug.
Are you aware that there is also a bug when using the create intent?

Intent(Intent.ACTION_INSERT,Contacts.People.CONTENT_URI);

This does allow me to create a new contact, but the result it sends
back to my onActivityResult callback is useless.

  protected void onActivityResult(int requestCode, int resultCode, Intent 
 data) {}

Whenever the user is done creating a contact, I get a call to my on
activity result with resultCode set to 0 (AKA: RESULT_CANCELED), and
data is null;
Even though the contact creation was successful!

This is not the default Android behavior.
When a user uses this intent to create a new contact, the
onActivityResult should pass a -1 for the result (AKA: RESULT_OK).
And the Intent data should contain a Uri to the newly created contact,
accessible via data.getData().

Since Motorola's implementation of contacts sends back RESULT_CANCELED
for any contact insert, there's no way for our App that started the
Intent to know when we have a valid result to act on.

If Motorola completely re-implements parts of the Android OS, I really
wish they would be careful not break the programmer interfaces.
It makes us developers look bad when our Apps don't work on your
devices when It really isn't even our fault.

Thanks for your help.

On Dec 2, 1:19 pm, suzanne.alexandra
suzanne.alexan...@motorola.com wrote:
 I'm happy to say this bug has been fixed and is expected to be
 released toCLIQusers in an upcoming OTA upgrade. I would anticipate
 early next year for this.

 --
 Suzanne Alexandra
 Motorolahttp://developer.motorola.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: open sourcing an app

2009-12-29 Thread Christine
Thanks for pointing that out, I should have done a search first :-)

On Dec 29, 11:52 pm, Greg Donald gdon...@gmail.com wrote:
 On Tue, Dec 29, 2009 at 4:39 PM, Christine christine.kar...@gmail.com wrote:
  I haven't seen many open source android apps yet.

 There are quite a few actually:

 http://code.google.com/hosting/search?q=label:android

 --
 Greg Donaldhttp://destiney.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 retrieve sms number

2009-12-29 Thread snehal penurkar
Hello Freinds,

i am doing program for retrieving sms number. I am using BroadcastReciever.
Can anyone tell me how to  retrieve sms numbers?

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] Sony Ericsson Developer World on Android Developers

2009-12-29 Thread SonyEricsson DeveloperWorld
Hi all

This is the debut post of Sony Ericsson Developer World on this forum
and we are pleased to announce that our content submission portal,
https://submit.sonyericsson.com is now open for Android developers to
upload applications and games to PlayNow, Sony Ericsson’s one-stop
content store which operates in 70 countries.

Sony Ericsson Developer World is a global support program and web
portal totally dedicated to helping mobile developers achieve business
success by providing the documentation, tools, training, technical and
go-to-market support they need in their development process.

Our presence here is one more step in this direction. If you got any
queries, suggestions and grievances, just direct them to us.

Sony Ericsson Developer World can be accessed through 
http://developer.sonyericsson.com

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] On distribution of APP

2009-12-29 Thread cristiamterrera
Good Community, I wonder if someone uploaded any application to
market sales of google android market? and if an earned some
selling silver or been uploaded for free?

-- 
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 draw lines through onTouchEvent

2009-12-29 Thread hollowback
Hi, i need to create app in which will user draw simple lines through
onTouchEvent.
It had to be possible to save drawed image as bitmap.
At Graphics | Android Developers I read there are 2 ways to do it. But
as i wrote with SurfaceView it is impossible to save it as bitmap.
But I don't know how to do that with other View objects.
In my onTouchEvent I use Path object to store coordinates.

Please could you tell me how to 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] hashset problem

2009-12-29 Thread raphael couturier
Hi,

I have a problem with the hashset implementation because the followinf
little part of my code uses it and doesn't give the same result
according to the version of android.

Here is my code :
HashSetString hset=new HashSetString();
hset.add(new String(cat));
hset.add(new String(dog));
hset.add(new String(youpi));
hset.add(new String(argh));
hset.add(new String(cat));
hset.add(new String(why));
hset.add(new String(dummmy));

for(String s:hset)
  Log.v(test,s);

with android 1.5 I obtain :

argh
cat
why
youpi
dog
dummmy

whereas with android 2.0 I obtain
argh
youpi
cat
dummmy
dog
why

Does anyone have any idea of the problem?

Thanks in advance
Raphaël

-- 
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] Sony Ericsson Developer World on Android Developers

2009-12-29 Thread SonyEricsson DeveloperWorld
Hi all

This is the debut post of Sony Ericsson Developer World on this forum
and we are pleased to announce that our content submission portal,
https://submit.sonyericsson.com is now open for Android developers to
upload applications and games to PlayNow, Sony Ericsson’s one-stop
content store which operates in 70 countries.

Sony Ericsson Developer World is a global support program and web
portal totally dedicated to helping mobile developers achieve business
success by providing the documentation, tools, training, technical and
go-to-market support they need in their development process.

Our presence here is one more step in this direction. If you got any
queries, suggestions and grievances, just direct them to us.

Sony Ericsson Developer World can be accessed through 
http://developer.sonyericsson.com

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] Adobe AIR runtime can run on Android?

2009-12-29 Thread Lucas
Hi everyone,
im from Argentina and this is mi 1st post, sorry for my poor english.

My doubt is if Adobe AIR runtime, for desktop apps, can be installed
and run on Android.

Recently i get a smartphone (Droid phone) and i want to use the multi-
touch API launch by Adobe, to mobile devices, and is ideal to test on
the smartphnoe directly, only if Adobe AIR can be run on Android

Thanks in advance.

Lucas

-- 
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] Suppressing touch events with ACTION_CANCEL

2009-12-29 Thread rahul
Hi,

I am suppressing the touch events depending upon the size in the
dispatchTouchEvent of View.java. If the event size is greater than the
threshhold i m sending the event as ACTION_CANCEL to onTouchEvent. I
wanted to know how ACTION_CANCEL works. In the android document it
says it cancel the current gesture. What is the meaning of gesture (is
it  ACTION_DOWN plus something which can happen between ACTION_UP) or
is it individual event like ACTION_DOWN, ACTION_UP or ACTION_MOVE ?

Thanks in advance.

Rahul

-- 
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: Microphone sample rates

2009-12-29 Thread RLScott
OK, can anyone give me any information at all on Android phones with a
microphone sample rate of more than 8000 Hz?

Robert Scott
Ypsilanti, Michigan

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

2009-12-29 Thread Jiawu Zhong


-- 
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] Questions about data persistence

2009-12-29 Thread cristiamterrera
Good community, I am developing an application data load information,
such an agenda, and I get the question of how to persist data?
to join the application, as besides the data also
persist the settings that are joining as preferences between
other things and information that is generated will persist in the
application?
someone can tell me roughly where it's the simplest
adequate?

-- 
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] What use for simple drawing on screen

2009-12-29 Thread hollowback
Hi, what is best way to create app in which I only need to draw simple
lines through onTouchEvent?
When i use invalidate everytime i draw any line, that erase lines i
draw before. But if I use some List structure to store drawed lines it
lose performance.
Is there any simple way to do it?

Thanks for reply

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

2009-12-29 Thread Duey Oxburger
Hey All,

A spinner question:

I want to have multiple spinners working in the same view.  In my
list, the first spinner works, but the others are empty. Here's how my
main.xml looks:

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

TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginTop=10dip
android:text=Build your Squad:
/

TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginTop=10dip
android:text=Unit 1:
/

Spinner
android:id=@+id/spinner
android:layout_width=fill_parent
android:layout_height=wrap_content
android:drawSelectorOnTop=true
android:prompt=@string/planet_prompt
/

TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginTop=10dip
android:text=Unit 2:
/

Spinner
android:id=@+id/spinner
android:layout_width=fill_parent
android:drawSelectorOnTop=true
android:prompt=@string/planet_prompt
android:layout_height=fill_parent/

TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginTop=10dip
android:text=Unit 3:
/

Spinner
android:id=@+id/spinner
android:layout_width=fill_parent
android:layout_height=wrap_content
android:drawSelectorOnTop=true
android:prompt=@string/planet_prompt
/

TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginTop=10dip
android:text=Unit 4:
/

Spinner
android:id=@+id/spinner
android:layout_width=fill_parent
android:layout_height=wrap_content
android:drawSelectorOnTop=true
android:prompt=@string/planet_prompt
/

TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginTop=10dip
android:text=Unit 5:
/

Spinner
android:id=@+id/spinner
android:layout_width=fill_parent
android:layout_height=wrap_content
android:drawSelectorOnTop=true
android:prompt=@string/planet_prompt
/

TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginTop=10dip
android:text=Unit 6:
/

Spinner
android:id=@+id/spinner
android:layout_width=fill_parent
android:layout_height=wrap_content
android:drawSelectorOnTop=true
android:prompt=@string/planet_prompt
/

TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginTop=10dip
android:text=Unit 7:
/

Spinner
android:id=@+id/spinner
android:layout_width=fill_parent
android:layout_height=wrap_content
android:drawSelectorOnTop=true
android:prompt=@string/planet_prompt
/

TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginTop=10dip
android:text=Unit 8:
/

Spinner
android:id=@+id/spinner
android:layout_width=fill_parent
android:layout_height=wrap_content
android:drawSelectorOnTop=true
android:prompt=@string/planet_prompt
/

TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginTop=10dip
android:text=Unit 9:
/

Spinner
android:id=@+id/spinner
android:layout_width=fill_parent
android:layout_height=wrap_content
android:drawSelectorOnTop=true
android:prompt=@string/planet_prompt
/

TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginTop=10dip
android:text=Unit 10:
/

Spinner
android:id=@+id/spinner
android:layout_width=fill_parent
android:layout_height=wrap_content
android:drawSelectorOnTop=true
android:prompt=@string/planet_prompt
/
/

/LinearLayout


Any thoughts?...

Thx,

D

-- 
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: Microphone sample rates

2009-12-29 Thread niko20
Hi,

I know the G1 and the Droid can both do multiple sample rates. As far
as I know from reading posts, only the Samsung Moment is limited to
8000hz. I don't know of other devices tho.

-niko

On Dec 29, 8:52 am, RLScott fixthatpi...@yahoo.com wrote:
 OK, can anyone give me any information at all on Android phones with a
 microphone sample rate of more than 8000 Hz?

 Robert Scott
 Ypsilanti, Michigan

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


Re: [android-developers] Adobe AIR runtime can run on Android?

2009-12-29 Thread Mark Murphy
Lucas wrote:
 My doubt is if Adobe AIR runtime, for desktop apps, can be installed
 and run on Android.

Android does not natively support Flash, let alone AIR. Adobe does not
have a downloadable Flash player for Android, let alone an AIR runtime.

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

Android Development Wiki: http://wiki.andmob.org

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


Re: [android-developers] No Adobe Flash support for Eclair!?!

2009-12-29 Thread Dianne Hackborn
On Tue, Dec 29, 2009 at 1:45 PM, chris harper ch393...@gmail.com wrote:

 I am doing a proof of concept right now for an app that I want to do.
 For my app to work I will need to interact certain system actions on the
 phone with code in Flash (actionscript 2 which FlashLite supports).
 I have not found a way for Java (i.e. an android app) to interact with
 actionScript directly.


Hi, the platform currently doesn't support Flash.  I would ask that you
please do not put applications up on the Market that rely on Flash, as they
will be very tied to specific devices that may happen to have it.

Even if at some point Flash is more generally supported on the platform, it
may well be an optional plug-in for users to download, so you would want to
think very seriously about whether you want rely on that with the attendant
hassles for the user of having to install Flash to use your app.  And of
course the minimum platform version your app would be compatible with is
whichever one this feature appears on -- for example, however you get it to
work with the HTC Hero will probably not match a standard platform facility,
since this is a non-standard platform feature owned by HTC.

Of course for futzing around with your own private app, have at it and do
what you want.  But for things that are intended to go on market, please
keep this in mind.

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

Re: [android-developers] Suppressing touch events with ACTION_CANCEL

2009-12-29 Thread Dianne Hackborn
ACTION_CANCEL lets you consume the current touch event stream until the next
up.

I would highly recommend that you not do this yourself, but use the APIs on
ViewGroup for intercepting touch events that will take care of these details
for you and ensure that the correct event flow occurs.

On Tue, Dec 29, 2009 at 10:04 AM, rahul rahulii...@gmail.com wrote:

 Hi,

 I am suppressing the touch events depending upon the size in the
 dispatchTouchEvent of View.java. If the event size is greater than the
 threshhold i m sending the event as ACTION_CANCEL to onTouchEvent. I
 wanted to know how ACTION_CANCEL works. In the android document it
 says it cancel the current gesture. What is the meaning of gesture (is
 it  ACTION_DOWN plus something which can happen between ACTION_UP) or
 is it individual event like ACTION_DOWN, ACTION_UP or ACTION_MOVE ?

 Thanks in advance.

 Rahul

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




-- 
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: ProgressDialog during location tasks either won't show or force closes - I have tried everything!

2009-12-29 Thread andrew android
Thanks.  I was trying to create the ProgressDialog in OnCreate or
OnStart.  That must be the problem so what is the best approach to do
it immediately when theView is loading?I even tried
RunInUIThread?

Sorry for not including much trace before, by the way.  My mistake.  I
may try again later if still...



On Dec 28, 2:04 am, Chander Pechetty cspeche...@gmail.com wrote:
 That was not much help as I don't see any stacktrace.

 Are you passing the right context when you create the dialog, when you
 say it doesn't show up ?
 like so ... new ProgressDialog(YourActivity.this);

 Also you cannot touch any UI components in threads except the main UI
 thread or the Handlers, which might explain the force close.

 Please refer the docs for more info at 
 :http://developer.android.com/guide/topics/ui/dialogs.html#ProgressDialog

 On Dec 27, 10:10 pm,andrewandroidandygoldm...@gmail.com wrote:



  Here is the logCat from one method I have tried - using basic thread
  with progressdialog:
  12-27 11:07:46.365: INFO/ApplicationChangeReceiverAbc(5537):
  com.hawkmoon.locabot.alpha added
  12-27 11:07:46.443: INFO/ApplicationChangeReceiverAbc(5537):
  com.hawkmoon.locabot.alpha disable 1
  12-27 11:07:46.764: INFO/ActivityManager(1018): Process com.svox.pico
  (pid 5532) has died.
  12-27 11:07:47.021: INFO/Process(5503): Sending signal. PID: 5503 SIG:
  9
  12-27 11:07:47.041: INFO/ActivityManager(1018): Process
  com.android.vending (pid 5524) has died.
  12-27 11:07:47.053: INFO/WindowManager(1018): WIN DEATH: Window
  {448c7438 Please wait... paused=false}
  12-27 11:07:47.053: INFO/ActivityManager(1018): Process
  com.hawkmoon.locabot.alpha (pid 5503) has died.
  12-27 11:07:47.060: WARN/UsageStats(1018): Unexpected resume of
  com.android.browser while already resumed in
  com.hawkmoon.locabot.alpha
  12-27 11:07:47.068: ERROR/JavaBinder(1018): !!! FAILED BINDER
  TRANSACTION !!!
  12-27 11:07:47.146: DEBUG/dalvikvm(5537): GC freed 774 objects / 66528
  bytes in 273ms
  12-27 11:07:47.287: WARN/InputManagerService(1018): Window already
  focused, ignoring focus gain of:
  com.android.internal.view.iinputmethodclient$stub$pr...@4467cf08
  12-27 11:07:47.357: DEBUG/dalvikvm(5537): GC freed 312 objects / 17904
  bytes in 94ms
  12-27 11:07:47.381: INFO/ActivityManager(1018): Start proc
  jp.benishouga.clipstore:remote for broadcast
  jp.benishouga.clipstore/.ClipboardObserver: pid=5544 uid=10061 gids=
  {1015}
  12-27 11:07:47.412: INFO/dalvikvm(5544): Debugger thread not active,
  ignoring DDM send (t=0x41504e4d l=38)

  On Dec 26, 12:58 am, Chander Pechetty cspeche...@gmail.com wrote:

   post your stack trace on force close ...

   On Dec 25, 11:41 pm, Wayne Wenthin wa...@fuligin.com wrote:

When you find out let me know.   I've had no luck either.

On Fri, Dec 25, 2009 at 6:50 
AM,andrewandroidandygoldm...@gmail.comwrote:

 ProgressDialog during location tasks either won't show or force closes
 - I have tried everything!

 I now have it in a Handler with a full 1 second delay (one method
 another post suggested) but it doesn't show.  I simply am stuck.
 Threads are usually force closing when I use those methods.

 What other tricks are there for this?

 Thanks!

 --
 You received this message because you are subscribed to the Google
 Groups AndroidDevelopers group.
 To post to this group, send email 
 toandroid-develop...@googlegroups.com
 To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsub
 s­cr...@googlegroups.com
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
Writing code is one of few things
that teaches me I don't know everything.

Join the Closed Beta of Call Girl 
Managerhttp://www.fuligin.com/forums-Hidequoted 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: Spinners

2009-12-29 Thread Brion Emde
At least one of your Spinners has android:layout_height=fill_parent.
that could mess you up.

On Dec 29, 12:47 pm, Duey Oxburger cg-art...@hotmail.com wrote:
 Hey All,

 A spinner question:

 I want to have multiple spinners working in the same view.  In my
 list, the first spinner works, but the others are empty. Here's how my
 main.xml looks:

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

     TextView
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:layout_marginTop=10dip
         android:text=Build your Squad:
     /

     TextView
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:layout_marginTop=10dip
         android:text=Unit 1:
     /

     Spinner
         android:id=@+id/spinner
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:drawSelectorOnTop=true
         android:prompt=@string/planet_prompt
     /

     TextView
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:layout_marginTop=10dip
         android:text=Unit 2:
     /

     Spinner
         android:id=@+id/spinner
         android:layout_width=fill_parent
         android:drawSelectorOnTop=true
         android:prompt=@string/planet_prompt
     android:layout_height=fill_parent/

     TextView
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:layout_marginTop=10dip
         android:text=Unit 3:
     /

     Spinner
         android:id=@+id/spinner
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:drawSelectorOnTop=true
         android:prompt=@string/planet_prompt
     /

         TextView
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:layout_marginTop=10dip
         android:text=Unit 4:
     /

     Spinner
         android:id=@+id/spinner
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:drawSelectorOnTop=true
         android:prompt=@string/planet_prompt
     /

     TextView
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:layout_marginTop=10dip
         android:text=Unit 5:
     /

     Spinner
         android:id=@+id/spinner
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:drawSelectorOnTop=true
         android:prompt=@string/planet_prompt
     /

     TextView
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:layout_marginTop=10dip
         android:text=Unit 6:
     /

     Spinner
         android:id=@+id/spinner
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:drawSelectorOnTop=true
         android:prompt=@string/planet_prompt
     /

     TextView
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:layout_marginTop=10dip
         android:text=Unit 7:
     /

     Spinner
         android:id=@+id/spinner
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:drawSelectorOnTop=true
         android:prompt=@string/planet_prompt
     /

     TextView
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:layout_marginTop=10dip
         android:text=Unit 8:
     /

     Spinner
         android:id=@+id/spinner
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:drawSelectorOnTop=true
         android:prompt=@string/planet_prompt
     /

     TextView
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:layout_marginTop=10dip
         android:text=Unit 9:
     /

     Spinner
         android:id=@+id/spinner
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:drawSelectorOnTop=true
         android:prompt=@string/planet_prompt
     /

     TextView
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:layout_marginTop=10dip
         android:text=Unit 10:
     /

     Spinner
         android:id=@+id/spinner
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:drawSelectorOnTop=true
         android:prompt=@string/planet_prompt
     /
     /

 /LinearLayout

 Any thoughts?...

 Thx,

 D

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, 

[android-developers] Re: hashset problem

2009-12-29 Thread Brion Emde
HashSet is not an ordered collection. The ordering is based on the the
hash value and however it represents the data internally. I am not
surprised at all that different versions of Android would give
different orderings.

On Dec 29, 4:25 am, raphael couturier raphael.coutur...@gmail.com
wrote:
 Hi,

 I have a problem with the hashset implementation because the followinf
 little part of my code uses it and doesn't give the same result
 according to the version of android.

 Here is my code :
 HashSetString hset=new HashSetString();
 hset.add(new String(cat));
 hset.add(new String(dog));
 hset.add(new String(youpi));
 hset.add(new String(argh));
 hset.add(new String(cat));
 hset.add(new String(why));
 hset.add(new String(dummmy));

 for(String s:hset)
   Log.v(test,s);

 with android 1.5 I obtain :

 argh
 cat
 why
 youpi
 dog
 dummmy

 whereas with android 2.0 I obtain
 argh
 youpi
 cat
 dummmy
 dog
 why

 Does anyone have any idea of the problem?

 Thanks in advance
 Raphaël

-- 
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: blocking UI thread when Yes/No AlertDialog is displayed

2009-12-29 Thread theSmith

On Dec 29, 1:22 pm, TreKing treking...@gmail.com wrote:
 Um ... why don't you just put the code you want to execute in the onClick
 handlers for the Yes and No options, respectively?
 That's pretty much the point of having them ...


+1 for the win.

I agree, just take what ever action is necessary and put it in the
onClick listeners.  Its really that simple

-theSmith

 -
 TreKing - Chicago transit tracking app for Android-powered 
 deviceshttp://sites.google.com/site/rezmobileapps/treking

 On Tue, Dec 29, 2009 at 8:25 AM, Frank Weiss fewe...@gmail.com wrote:
  I assume you want a modal dialog. I'm pretty sure  blocking the UI thread
  is going about this wrong. For example, consider the Activity lifecycle
  callbacks which would be called when another Activity or Application becomes
  visible.

  Here's an explanation I found by googling for android modal dialog:
 http://groups.google.com/group/android-developers/browse_thread/threa...

  On Tue, Dec 29, 2009 at 3:52 AM, swapnil kamble 
  swap.kam...@gmail.comwrote:

  Hi ,
        I am displaying Confirmation type dialog box. I want to pause
  execution of that thread until answer is provided by user, but since this
  AlertDialog works asynchronously, I am facing problems in blocking that
  thread but displaying AlertDialog and continue execution on answer. I tried
  using wait notify between threads but didn't worked. Anybody Used
  AlertDialog.wait() method ?
  I am pasting my code here too,

                                       AlertDialog.Builder builder = new
  AlertDialog.Builder(Demo.ctxt);

  builder.setMessage(Do you want  to Trust testgenservercert)
                                                       .setCancelable(false)

  .setPositiveButton(Yes, new DialogInterface.OnClickListener() {
                                                           public void
  onClick(DialogInterface dialog, int id) {

  //uiThread.notify();

  System.out.println(Positive Button clicked);
                                                                   }
                                                       })

  .setNegativeButton(No, new DialogInterface.OnClickListener() {
                                                           public void
  onClick(DialogInterface dialog, int id) {

  //uiThread.notify();

  System.out.println(Negative Button clicked);

                                                                   }
                                                       });
                                          /*uiThread =
  Thread.currentThread();
                                          AlertDialog alert =
  builder.create();
                                          alert.show();
                                          synchronized(alert) {
                                                  alert.wait();
                                          }*/

  --
  ...Swapnil

  || Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
  || Hare Rama    Hare Rama   Rama   Rama    Hare Hare ||

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

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

-- 
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] TabActivity how to show Contact activity in a tab.

2009-12-29 Thread maxsap
Hello all I am developing an application and as part of it I would
like to show a tabactivity and use the contact activity to let the
user see,modify,or call a specified contact. my code is this:
package com.WaveCally;

import android.app.AlertDialog;
import android.app.TabActivity;
import android.app.AlertDialog.Builder;
import android.content.Intent;
import android.os.Bundle;
import android.provider.Contacts.People;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class WaveCally extends TabActivity  {
private TabHost mTabHost;
private int PICK_CONTACT;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

mTabHost = getTabHost();
try{
mTabHost.addTab(mTabHost.newTabSpec(Contacts).setIndicator
(TAB 1).setContent(R.id.ParentView));
mTabHost.addTab(mTabHost.newTabSpec(tab_test2).setIndicator
(Contacts).setContent(new Intent(Intent.ACTION_PICK,
People.CONTENT_URI)));
mTabHost.addTab(mTabHost.newTabSpec(tab_test3).setIndicator
(TAB 3).setContent(R.id.textview3));
}catch(java.lang.SecurityException ex){;
}

mTabHost.setCurrentTab(0);

}

}

but when I run this programm I get a securityException even though I
have all the needed permision on my manifest.
I tried to run only the intent for calling the contact and worked so I
think the problem occurs when triyng to show the contact activity as a
tab content. So the questions are :
how to make it work and call the contact activity and set it as the
content of a tab?
And why I can't set the contents with the above mentioned code?
thanks in advanced maxsap

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


Re: [android-developers] TabActivity how to show Contact activity in a tab.

2009-12-29 Thread Mark Murphy
maxsap wrote:
 Hello all I am developing an application and as part of it I would
 like to show a tabactivity and use the contact activity to let the
 user see,modify,or call a specified contact. my code is this:
 package com.WaveCally;
 
 import android.app.AlertDialog;
 import android.app.TabActivity;
 import android.app.AlertDialog.Builder;
 import android.content.Intent;
 import android.os.Bundle;
 import android.provider.Contacts.People;
 import android.widget.TabHost;
 import android.widget.TabHost.TabSpec;
 
 public class WaveCally extends TabActivity  {
 private TabHost mTabHost;
 private int PICK_CONTACT;
 
   /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);
 
 mTabHost = getTabHost();
 try{
   mTabHost.addTab(mTabHost.newTabSpec(Contacts).setIndicator
 (TAB 1).setContent(R.id.ParentView));
   mTabHost.addTab(mTabHost.newTabSpec(tab_test2).setIndicator
 (Contacts).setContent(new Intent(Intent.ACTION_PICK,
 People.CONTENT_URI)));
   mTabHost.addTab(mTabHost.newTabSpec(tab_test3).setIndicator
 (TAB 3).setContent(R.id.textview3));
 }catch(java.lang.SecurityException ex){;
 }
 
 mTabHost.setCurrentTab(0);
 
 }
 
 }
 
 but when I run this programm I get a securityException even though I
 have all the needed permision on my manifest.

You can only put your own activities in tabs, not activities from the
system or third party apps.

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


  1   2   >