[android-developers] Re: Getting a Dev phone.

2010-04-22 Thread Vladimir
I bought a Droid for development in December and use it with wifi.
Bypassed activation by tapping the corners of the screen (I live in
Europe so no other options for me). No issues at all with the device.

On Apr 23, 2:17 am, Nathan  wrote:
> On Apr 22, 1:47 pm, Mark Murphy  wrote:
>
> > Nathan wrote:
> > > So even though you can buy a Nexus One without a plan, you can't start
> > > using it without one? That's too bad.
>
> > Bear in mind that all you need is *somebody* with a SIM, a data plan,
> > and five minutes. After that, you can go SIM-less or use a prepaid SIM
> > (if you want to play around with telephony stuff).
>
> > You're not limited to a T-Mobile store clerk -- it can be anyone handy
> > meeting those criteria.
>
> > "Friends, Romans, countrymen, lend me your SIMs; I come to activate my
> > phone, not to praise this $#*#)@ Google Experience mandatory Google
> > account requirement", to loosely paraphrase The Bard.
>
> I'll be looking for some more friends.
>
> You probably can't do this with the Droid, since the Droid doesn't use
> a SIM card. So is Droid out of the running? Used Droids are running
> about $200 cheaper than used Nexus Ones.
>
> Nathan
>
> --
> 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 
> athttp://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] Re: Getting one form data on anather forn

2010-04-22 Thread Mohammad Siddiqui
This is Android application

On 4/22/10, Mike dg  wrote:
>
> Is this a web app or an Android app?
>
> -Mike dg
>
> On Apr 22, 8:29 am, Mohammad Siddiqui  wrote:
> > Hi everyone,
> >
> > i have therre consecutive form ,after filling the form one i press the
> > next button on the first form to go
> > to the second form then prees the next button to go to the third
> > form.from third form i have a button to
> > post the data on a specific url.the problem is that how can get the
> > first and second form data on the
> > last form
> >
> > --
> > 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 athttp://
> 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: Callback when SoftKeyboard goes away

2010-04-22 Thread mkellner
Alas, onSizeChanged() doesn't get called when the IME is invoked or
dismissed.

My manifest contains:
  android:windowSoftInputMode="adjustResize"
as suggested.

My main window is a SurfaceView.
I also have an EditText view.
When I need to open the keyboard, I make the EditText visible and
toggleSoftInput.

The keyboard appears, but no onSizeChanged() is called for either the
EditText view or the SurfaceView.

Any suggestions?

-mk





On Apr 22, 10:26 pm, jamesc  wrote:
> onSizeChanged() - the system resizes the window when the IME is shown/
> hidden. Take a look here:
>
> http://groups.google.com/group/android-developers/browse_thread/threa...
>
> On Apr 22, 3:40 am, mkellner  wrote:
>
>
>
> > Hello,
>
> > I am trying to find a way to get a notification that the soft keyboard
> > has been dismissed by the user pressing the "Back" key.
>
> > showSoftInput() with a ResultReceiver will tell you if/when the
> > keyboard appears, but not if it goes away.
>
> > addTextChangedListener() doesn't get called because text hasn't
> > changed.
>
> > onEditorAction() doesn't get called, because the Action button wasn't
> > pressed.
>
> > dispatchKeyEvent() doesn't get called with KEYCODE_BACK.
>
> > onConfigurationChanged() doesn't get called even with this in the
> > manifest:
> >                   android:configChanges="keyboardHidden|orientation|
> > locale|screenLayout|fontScale"
>
> > Any suggestions?
>
> > Thanks!
> > -mk
>
> > --
> > 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 
> > athttp://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 
> athttp://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 scroll/move text within TextView on home screen widget ?

2010-04-22 Thread Kumar Bibek
Ummm, well, on the widget , this can't be done. Because you dont have
a reference to that TextView.

Thanks and Regards,
Kumar Bibek

On Apr 23, 11:00 am, ravindra singhai 
wrote:
> Hi Kumar,
>
> Thanks for your reply :)
>
> There is one property supported for TextView named   *
> android:ellipsize="marquee"*
>
> I read in android dev-guide/forums that it works only when TextView is in
> focus in home screen, but i am not able to find any api or way to set
> TextView as focused item/view so i suspect that is the main reason behind my
> problem.
>
> Somehow if i can set TextView as focused view  than text displayed within
> widget might scroll/move within single line.
>
> Please suggest if anybody already tried this or some other way for the same.
>
> /Ravi
>
> Thanks,
> Ravi
>
>
>
> On Fri, Apr 23, 2010 at 10:38 AM, Kumar Bibek  wrote:
> > Scrolling is not supported on the Widget Framework right now. So, you
> > cannot do this.
>
> > Thanks and Regards,
> > Kumar Bibek
>
> > On Apr 21, 3:18 pm, Ravi  wrote:
> > > Hi All,
>
> > > I have created a widget to be displayed on android emulator's home
> > > screen to display some long text. In my main.xml layout file i've
> > > already set TextView properties like singleLine="true",
> > > ellipsize="marquee", focusable="true" etc, but still when my widget is
> > > displayed on home screen text does not move/scroll.
>
> > > - main.xml layout file 
>
> > > 
> > > http://schemas.android.com/apk/res/
> > > android"
> > > android:layout_width="fill_parent"
> > > androidrientation="vertical"
> > > android:layout_gravity="center"
> > > android:layout_height="wrap_content" android:background="@drawable/
> > > background">
> > >  > > android:text="@string/widget_text"
> > > android:layout_height="wrap_content"
> > > android:layout_width="wrap_content"
> > > android:layout_gravity="center_horizontal|center"
> > > android:layout_marginTop="5dip"
> > > androidadding="10dip"
> > > android:textColor="@android:color/black"
> > > android:singleLine="true"
> > > android:ellipsize="marquee"
> > > android:focusable="true" />
> > > 
>
> > > - end of main.xml layout file 
>
> > > - My WidgetProvider.java file --
>
> > > package com.android.weatherdata;
>
> > > import android.util.Log;
> > > import android.widget.RemoteViews;
> > > import android.appwidget.AppWidgetManager;
> > > import android.appwidget.AppWidgetProvider;
> > > import android.content.Context;
> > > import android.content.Intent;
> > > import android.app.PendingIntent;
>
> > > public class WeatherWidget extends AppWidgetProvider{
>
> > > private static final String TAG = "WeatherWidget";
>
> > > @Override
> > > public void onUpdate(Context context, AppWidgetManager
> > > appWidgetManager, int[] appWidgetIds)
> > > {
> > > Log.d("WEATHER-WIDGET", "onUpdate(): ");
>
> > > final int N = appWidgetIds.length;
> > > // Perform this loop procedure for each App Widget that belongs to
> > > this provider
> > > for (int i=0; i > > int appWidgetId = appWidgetIds[i];
>
> > > // Create an Intent to launch ExampleActivity
> > > Intent intent = new Intent(context, Weather.class);
> > > PendingIntent pendingIntent = PendingIntent.getActivity(context, 0,
> > > intent, 0);
>
> > > Log.i("WEATHER-WIDGET", " Create and Attach Text-view click handler
> > > ");
> > > // Get the layout for the App Widget and attach an on-click listener
> > > to the button
> > > RemoteViews views = new RemoteViews(context.getPackageName(),
> > > R.layout.main);
> > > views.setOnClickPendingIntent(R.id.widget_textview , pendingIntent);
>
> > > // Tell the AppWidgetManager to perform an update on the current App
> > > Widget
> > > appWidgetManager.updateAppWidget(appWidgetId, views);
>
> > > }
> > > }
> > > }
>
> > > - End of WidgetProvider file
>
> > > When i add widget on home screen than only some part of text is
> > > displayed as " Latest Weather Infor" but i would like to write the
> > > code in such a way that the complete text should scroll till the
> > > complete string/text is displayed.
>
> > > Please suggest whether i need to change my layout file or what logic i
> > > can write so that i can scroll the text.
>
> > > Thanks in advance,
> > > Ravi
>
> > > --
> > > 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 athttp://
> > 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
> > andro

[android-developers] Strange timezone issue, when I set timezone to Alaska

2010-04-22 Thread A.TNG
Hi Guys,

I meet a strange timezone issue when I debug my application on
Android_2.1 SDK. I first start the emulator and set timezone to
"Alaska" in Settings. I also search the internet and find Alaska is in
GMT-9:00. If DST applied, it should be GMT-8:00. Then write some
sample code like:

TimeZone.getDefault().getOffset(0);  // returns 3600 (= 10 * 60 * 60 * 1000)
TimeZone.getTimeZone("GMT-9:00").getOffset(0); // returns 3240 (=
9 * 60 * 60 * 1000)

How does this happen? Why this same API getOffset with same parameter
returns different value?

Any idea? Thanks for your help. BTW: I'm not in Alaska now.

-- 
Best Regards,
TANG Jiyu
Blog: http://jiyu.wordpress.com.cn/
ezkeypad: http://ezkeypad.tool100.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


Re: [android-developers] Re: How to scroll/move text within TextView on home screen widget ?

2010-04-22 Thread ravindra singhai
Hi Kumar,

Thanks for your reply :)

There is one property supported for TextView named   *
android:ellipsize="marquee"*

I read in android dev-guide/forums that it works only when TextView is in
focus in home screen, but i am not able to find any api or way to set
TextView as focused item/view so i suspect that is the main reason behind my
problem.

Somehow if i can set TextView as focused view  than text displayed within
widget might scroll/move within single line.

Please suggest if anybody already tried this or some other way for the same.

/Ravi

Thanks,
Ravi

On Fri, Apr 23, 2010 at 10:38 AM, Kumar Bibek  wrote:

> Scrolling is not supported on the Widget Framework right now. So, you
> cannot do this.
>
> Thanks and Regards,
> Kumar Bibek
>
> On Apr 21, 3:18 pm, Ravi  wrote:
> > Hi All,
> >
> > I have created a widget to be displayed on android emulator's home
> > screen to display some long text. In my main.xml layout file i've
> > already set TextView properties like singleLine="true",
> > ellipsize="marquee", focusable="true" etc, but still when my widget is
> > displayed on home screen text does not move/scroll.
> >
> > - main.xml layout file 
> >
> > 
> > http://schemas.android.com/apk/res/
> > android"
> > android:layout_width="fill_parent"
> > androidrientation="vertical"
> > android:layout_gravity="center"
> > android:layout_height="wrap_content" android:background="@drawable/
> > background">
> >  > android:text="@string/widget_text"
> > android:layout_height="wrap_content"
> > android:layout_width="wrap_content"
> > android:layout_gravity="center_horizontal|center"
> > android:layout_marginTop="5dip"
> > androidadding="10dip"
> > android:textColor="@android:color/black"
> > android:singleLine="true"
> > android:ellipsize="marquee"
> > android:focusable="true" />
> > 
> >
> > - end of main.xml layout file 
> >
> > - My WidgetProvider.java file --
> >
> > package com.android.weatherdata;
> >
> > import android.util.Log;
> > import android.widget.RemoteViews;
> > import android.appwidget.AppWidgetManager;
> > import android.appwidget.AppWidgetProvider;
> > import android.content.Context;
> > import android.content.Intent;
> > import android.app.PendingIntent;
> >
> > public class WeatherWidget extends AppWidgetProvider{
> >
> > private static final String TAG = "WeatherWidget";
> >
> > @Override
> > public void onUpdate(Context context, AppWidgetManager
> > appWidgetManager, int[] appWidgetIds)
> > {
> > Log.d("WEATHER-WIDGET", "onUpdate(): ");
> >
> > final int N = appWidgetIds.length;
> > // Perform this loop procedure for each App Widget that belongs to
> > this provider
> > for (int i=0; i > int appWidgetId = appWidgetIds[i];
> >
> > // Create an Intent to launch ExampleActivity
> > Intent intent = new Intent(context, Weather.class);
> > PendingIntent pendingIntent = PendingIntent.getActivity(context, 0,
> > intent, 0);
> >
> > Log.i("WEATHER-WIDGET", " Create and Attach Text-view click handler
> > ");
> > // Get the layout for the App Widget and attach an on-click listener
> > to the button
> > RemoteViews views = new RemoteViews(context.getPackageName(),
> > R.layout.main);
> > views.setOnClickPendingIntent(R.id.widget_textview , pendingIntent);
> >
> > // Tell the AppWidgetManager to perform an update on the current App
> > Widget
> > appWidgetManager.updateAppWidget(appWidgetId, views);
> >
> > }
> > }
> > }
> >
> > - End of WidgetProvider file
> >
> > When i add widget on home screen than only some part of text is
> > displayed as " Latest Weather Infor" but i would like to write the
> > code in such a way that the complete text should scroll till the
> > complete string/text is displayed.
> >
> > Please suggest whether i need to change my layout file or what logic i
> > can write so that i can scroll the text.
> >
> > Thanks in advance,
> > Ravi
> >
> > --
> > 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 athttp://
> 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] Computation on db data then list them using either SimpleCursorAdapter or ArrayAdapter

2010-04-22 Thread kc2uno_CMU
Hi all,

I juststarted programming in android a few weeks ago, so I am not
entirely sure how to deal with listing values. Please help me out!
I have some questions regarding displaying data sets from db in a
list. Currently I have a cursor returned by my db points to a list of
rows and I want display 2 columns values in a single row of the list.
The row xml looks like this:

 

 

so I was thinking using simplecursoradapter which supposedly makes my
life easier by displaying the data in a list. However that is only
true if I want to display the raw data.
For the purpose of my program I need to do some computations on the
raw data sets, then display them. I am not sure how to do that using
SimpleCursorAdapter. Here's how I display the raw data:

   String[] from = new String[]
{BtDbAdapter.KEY_EX_TYPE,BtDbAdapter.KEY_EX_TIMESTAMP};

   int[] to = new int[]{R.id.text1, R.id.text2};

// Now create a simple cursor adapter and set it to display
SimpleCursorAdapter records =
new SimpleCursorAdapter(this, R.layout.exset_row,
mExsetCursor, from, to);

setListAdapter(records);

Is there a way to do computation on the data in those rows before I
bind it with the SimpleCursorAdapter? I was trying to use an
alternative way of doing this by using arraylist and arrayadapter, but
that way I dont know to how achieve displaying 2 items in a single
row.

This is my code for using arrayadapter which only display 1 text in a
row instead of 2 textviews in a row:

  //fill in the array
  timestamp_arr = new ArrayList();
  type_arr = new ArrayList();
  fillRecord();

  Log.d(TAG,"setting now in recordlist");
  setListAdapter(new ArrayAdapter(this,
R.layout.list_item,timestamp_arr));
  setListAdapter(new ArrayAdapter(this,
R.layout.list_item2,type_arr));

It's very obvious that it only displays one textview in a row because
I set the second arrayadapter overwrites the first one! I was trying
to use R.id.text1 and R.id.text2 for them, but it gave me some errors
saying
04-23 01:40:58.658: ERROR/AndroidRuntime(3309):
android.content.res.Resources$NotFoundException: Resource ID
#0x7f070008 type #0x12 is not valid

I believe the second method can achieve this, but I'm not sure how do
deal with the layout problems, so if you any suggestions, please post
them out. Thank you!!

-- 
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: Allow only decimal numeric input and use phone soft keyboard?

2010-04-22 Thread jamesc
>From reading this:

http://developer.android.com/resources/articles/creating-input-method.html

it looks like you need TYPE_CLASS_NUMBER.

On Apr 21, 10:25 pm, Watter  wrote:
> I am trying to do something that I thought would be simple, yet I
> still haven't found the right approach.
>
> I have a EditText field that should only accept unsigned decimal
> entries. Using android:inputType="numberDecimal" in my layout xml file
> achieves this, however the soft keyboard that is raised with this
> inputType is the standard keyboard but just uses the alternate view
> with the number row on top. This is far from ideal for a field that
> only allows numbers. A much better soft keyboard for numeric entry is
> the "phone" one. It has all of the numbers and a decimal. Perfect!!
> Well, except that for the life of me I cannot figure out how to use
> both the phone keyboard AND allow only numeric entry. I've tried
> everything I can think of but if I use the phone soft keyboard then
> the input field also allows things like "(" and any of the other
> symbols available on that keyboard.
>
> Is there any way to get the nice big numeric buttons of the phone
> keyboard along with only allowing decimal entry?
>
> --
> 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 
> athttp://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] Android requires .class compatibility set to 5.0.

2010-04-22 Thread ravindra singhai
Hi,

If you are using Eclipse SDK than perform following steps to fix your
problem:

Right click on your application name (within Package Explorer view) ->
Android Tools -> Fix Project Properties

It worked for me when i faced similar problem. give it a try.

/Ravi


On Wed, Apr 21, 2010 at 7:43 PM, Sylvain  wrote:

> I had to reload XP and Eclipse + android of course. I am using the
> 2.0.1 SDK version/ API 6.
>
> Everything was fine before, Now the project doesn't load-
> I get:
>
> [2010-04-21 09:59:24 - LatLonQ] Android requires .class compatibility
> set to 5.0. Please fix project properties.
>
> Don't see anything in project properties. Where is this set? Never saw
> this before.
>
> A clue? when I try to open the "default.properties" from my project I
> get:
> org.eclipse.core.internal.resources.ResourceException: Resource is out
> of sync with the file system: '/LatLonQ/default.properties'.
>
> Help!
>
>
> --
> 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: Callback when SoftKeyboard goes away

2010-04-22 Thread jamesc
onSizeChanged() - the system resizes the window when the IME is shown/
hidden. Take a look here:


http://groups.google.com/group/android-developers/browse_thread/thread/9d1681a01f05e782

On Apr 22, 3:40 am, mkellner  wrote:
> Hello,
>
> I am trying to find a way to get a notification that the soft keyboard
> has been dismissed by the user pressing the "Back" key.
>
> showSoftInput() with a ResultReceiver will tell you if/when the
> keyboard appears, but not if it goes away.
>
> addTextChangedListener() doesn't get called because text hasn't
> changed.
>
> onEditorAction() doesn't get called, because the Action button wasn't
> pressed.
>
> dispatchKeyEvent() doesn't get called with KEYCODE_BACK.
>
> onConfigurationChanged() doesn't get called even with this in the
> manifest:
>                   android:configChanges="keyboardHidden|orientation|
> locale|screenLayout|fontScale"
>
> Any suggestions?
>
> Thanks!
> -mk
>
> --
> 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 
> athttp://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: a question about menu

2010-04-22 Thread priyanka
Hello,

In which method is this code written? I believe this part has to go
inside onCreateOptionsMenu(Menu myMenu) itself. myMenu would be a
parameter, and after adding menuItems to it, you need to return it
back.

Thanks,
Priyanka

On Apr 22, 1:10 pm, 智超 薛  wrote:
> hey all!
>
> meet a question about menu.
>
> i want to push a button to pop-up menu,
>
> my coding is
>
> case R.id.menus:
> if(myMenu==null) {
>                                         myMenu.add(0, 0, 0, 
> "Add").setIcon(R.drawable.addfolderr);
>                                         myMenu.add(0, 1, 0, 
> "Delete").setIcon(R.drawable.delete);
>                                                                         }
>                                 onCreateOptionsMenu(myMenu);
> braek;
>
> but onCreateOptionsMenu(myMenu) is not work ,
> how to make it work ,or had other way to realize button pop-up menu ?
>
> --
> 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 
> athttp://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: Hashtable Serialization (Server/Client App)

2010-04-22 Thread priyanka
Hi All,

I am observing a similar issue. I get structured data from my server
to Android client in XML format. I parse the XML into a HashMap, and
save this HashMap object in file persistent storage. Now, when I
retrieve this HashMap object saved in file through :
HashMap hashMap = (HashMap)
objectInputStream.readObject();

I get
GetFieldID: unable to find field Ljava/util/HashMap;.loadFactor:F


for about 150 times (interspersed with about 2 GC freed commands); and
then I am able to read my object. I am not getting any crash, but I
suppose this might be slowing my app. And I am wondering how I can
resolve this. Any clues would be appreciated.

Thanks,
Priyanka


On Apr 14, 11:30 pm, Naqi Syed  wrote:
> Hi Bob,
> Thanks for the help.Yes you are correct there is a difference in
> architecture which I naively dismissed, I changed it to JSON and everything
> is working correctly. I did tested with HashMap however but it was no
> different from what I saw on Hashtable.
> As for GC yes my problem turned out to be the Datagram Socket, i was
> initializing it every time I was making a datapacket and closing it
> afterwards. Once I tweaked the code a bit more it has gone down to
> acceptable levels.
>
> Thanks,
>
> Naqi
>
>
>
>
>
> On Wed, Apr 14, 2010 at 12:23 PM, Bob Kerns  wrote:
> > I don't have a solution, but I have a couple of recommendations --
> > either of which would avoid the problem.
>
> > #1 - don't use object serialization. Convert to an XML or JSON
> > representation instead. XML in particular would be preferred if you're
> > going to store these for an extended time.
>
> > #2 -- don't use Hashtable. It is a holdover from the early days of
> > Java, but it has inappropriate synchronization on various methods.
> > Use HashMap instead. This won't usually result in any other changes to
> > your code. If you were depending on the method synchronization of
> > Hashtable, you should take a good look at your code; it's likely you
> > weren't doing it right, and synchronizing on the table (or a larger-
> > scoped object) across a larger set of operations will fix bugs you may
> > not know you have. The synchronizing built into Hashtable is seldom
> > the actual synchronization needed!
>
> > Nothing in your message really suggests that your crash is related to
> > the message about serialization. If the loadfactor for the Hashtable
> > is set to zero, I suspect that would cause problems, but if it ends up
> > initialized to some reasonable default, this would be harmless. You
> > could check in the debugger pretty easily
>
> > The GC messages are not related to your problem. They indicate that
> > your program is causing the GC to run; this is of interest for
> > optimizing or analyzing performance.
>
> > On Apr 13, 12:11 pm, nsyed  wrote:
> > > Hi All,
>
> > > I am having a weird issue with serialization of a Hashtable. I have
> > > made a Server, Client app. Where server(PC/MAC) is serializing a
> > > Hashtable and sending it to Client(Android) through UDP. The data is
> > > sent/read correctly but I get a bunch of these messages below on
> > > LogCat.
>
> > > 04-12 11:19:43.059: DEBUG/dalvikvm(407): GetFieldID: unable to find
> > > field Ljava/util/Hashtable;.loadFactor:F
>
> > > Occasionally, I would see these
>
> > > 04-12 11:21:19.150: DEBUG/dalvikvm(407): GC freed 10814 objects /
> > > 447184 bytes in 97ms
>
> > > The app would run for 2-3 mins and then crash. Interestingly enough I
> > > do not see the Loadfactor errors on SDK 1.5. But I do see the GC Free
> > >  objects, quiet often.
>
> > > After debugging I have found that the issue is with de-serialization
> > > and the error/warning are coming from following code
>
> > > Code:
>
> > > ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
> > > ObjectInputStream ois = new ObjectInputStream(bis);
> > > object = ois.readObject();
> > > at Code:
>
> > > object = ois.readObject();
> > > on the client. My server is serializing code is the following.
>
> > > Code:
>
> > > ByteArrayOutputStream bos = new ByteArrayOutputStream();
> > > ObjectOutputStream oos = new ObjectOutputStream(bos);
> > > oos.writeObject(obj);
> > > Any idea what is going on?
>
> > > Thanks for the Help!
>
> > --
> > 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
>
> > To unsubscribe, reply using "remove me" as the subject.
>
> --
> -Naqi Syed- 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..

[android-developers] Re: How to scroll/move text within TextView on home screen widget ?

2010-04-22 Thread Kumar Bibek
Scrolling is not supported on the Widget Framework right now. So, you
cannot do this.

Thanks and Regards,
Kumar Bibek

On Apr 21, 3:18 pm, Ravi  wrote:
> Hi All,
>
> I have created a widget to be displayed on android emulator's home
> screen to display some long text. In my main.xml layout file i've
> already set TextView properties like singleLine="true",
> ellipsize="marquee", focusable="true" etc, but still when my widget is
> displayed on home screen text does not move/scroll.
>
> - main.xml layout file 
>
> 
> http://schemas.android.com/apk/res/
> android"
> android:layout_width="fill_parent"
> androidrientation="vertical"
> android:layout_gravity="center"
> android:layout_height="wrap_content" android:background="@drawable/
> background">
>  android:text="@string/widget_text"
> android:layout_height="wrap_content"
> android:layout_width="wrap_content"
> android:layout_gravity="center_horizontal|center"
> android:layout_marginTop="5dip"
> androidadding="10dip"
> android:textColor="@android:color/black"
> android:singleLine="true"
> android:ellipsize="marquee"
> android:focusable="true" />
> 
>
> - end of main.xml layout file 
>
> - My WidgetProvider.java file --
>
> package com.android.weatherdata;
>
> import android.util.Log;
> import android.widget.RemoteViews;
> import android.appwidget.AppWidgetManager;
> import android.appwidget.AppWidgetProvider;
> import android.content.Context;
> import android.content.Intent;
> import android.app.PendingIntent;
>
> public class WeatherWidget extends AppWidgetProvider{
>
> private static final String TAG = "WeatherWidget";
>
> @Override
> public void onUpdate(Context context, AppWidgetManager
> appWidgetManager, int[] appWidgetIds)
> {
> Log.d("WEATHER-WIDGET", "onUpdate(): ");
>
> final int N = appWidgetIds.length;
> // Perform this loop procedure for each App Widget that belongs to
> this provider
> for (int i=0; i int appWidgetId = appWidgetIds[i];
>
> // Create an Intent to launch ExampleActivity
> Intent intent = new Intent(context, Weather.class);
> PendingIntent pendingIntent = PendingIntent.getActivity(context, 0,
> intent, 0);
>
> Log.i("WEATHER-WIDGET", " Create and Attach Text-view click handler
> ");
> // Get the layout for the App Widget and attach an on-click listener
> to the button
> RemoteViews views = new RemoteViews(context.getPackageName(),
> R.layout.main);
> views.setOnClickPendingIntent(R.id.widget_textview , pendingIntent);
>
> // Tell the AppWidgetManager to perform an update on the current App
> Widget
> appWidgetManager.updateAppWidget(appWidgetId, views);
>
> }
> }
> }
>
> - End of WidgetProvider file
>
> When i add widget on home screen than only some part of text is
> displayed as " Latest Weather Infor" but i would like to write the
> code in such a way that the complete text should scroll till the
> complete string/text is displayed.
>
> Please suggest whether i need to change my layout file or what logic i
> can write so that i can scroll the text.
>
> Thanks in advance,
> Ravi
>
> --
> 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 
> athttp://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] Re: Seeding program phones. Anyone tried to activate their droid on a private account yet?

2010-04-22 Thread David Orriss Jr
So far Neel at Google hasn't been able to tell me how to resolve this issue.

To say the least I'm annoyed.

On Wed, Apr 21, 2010 at 12:48 PM, BradVoy  wrote:
> My phone just arrived today.  I haven't tried calling Verizon yet to
> activate it.  But I found it confusing that the 2 page from Google
> that came with the phone say "Please refer to the enclosed "Read Me
> First" leaflet from Verizon Wireless for instructions to activate the
> enclosed Droid."  There was no "Read Me First" leaflet from Verizon in
> my package.
>
>
> On Apr 21, 11:39 am, David Orriss Jr  wrote:
>> Apparently I'm unable to activate the one I received because it's
>> "pending activation on another account".  And I have to have Google
>> release it from that account to activate it.
>>
>> So, what do I do now?
>>
>> --
>> David Orriss Jr.
>>
>> My blog:http://www.codethought.com/blog
>>
>> --
>> 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 
>> athttp://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



-- 
David Orriss Jr.

My blog: http://www.codethought.com/blog

-- 
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: Change color of progressbar

2010-04-22 Thread Kumar Bibek
Well, I guess, there's just not a single file/image which you need to
change. You will also need to change the background and other stuff.

This file must be referring to other internal drawables which you
would need to change.

Thanks and Regards,
Kumar Bibek

On Apr 22, 11:41 am, vandy  wrote:
> hi
>
> Is there any way to change the color of indeterminate progressbar.
>
> i made changes in the progress_indeterminate.xml and saved it my
> projects drawable folder and tried to set
> progressBar.setProgressDrawable(R.drawable.progress_indeterminate)
>
> but still the color did not change. it uses the default color.
>
> Any help on 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 
> athttp://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: Device Seeding Program for Top Android Market Developers

2010-04-22 Thread dgoemans
Dude,
1. What do you mean "your instructions". They specifically said, no
choosing. Thou shalt not choose. Bam. That's it.
2. I'm gonna guess u're in the states, none of us in Europe have got
our phones ( without the potential for a Droid ), and it's closing on
the 8th week

On Apr 22, 4:01 am, "Jason K [Appirio]"  wrote:
> I got my Droid, but my instructions were for a Nexus One (sigh).
>
> Anyway, is there a way to expedite the free thirty day service?
>
> Jason
>
> On Mar 31, 5:28 am, Justin Giles  wrote:
>
> > On Tue, Mar 30, 2010 at 11:48 PM, Jason  wrote:
> > > I received a Droid and I did not see the "Read Me First" leaflet that
> > > was referenced in the Getting Started on Droid - Activation section of
> > > the letter. Anyone else who got a Droid know what it looks like, where
> > > it was packed or what it said?
>
> > I too received a Droid and I didn't get a "Read Me First" leaflet.  Not sure
> > what channel to go through to activate this thing so I can get the 2.1
> > update coming any day now.
>
> > Justin
>
> --
> 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 
> athttp://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 call another application from tabview

2010-04-22 Thread Kumar Bibek
Application is not the right word. You can put an Activity inside a
Tab. But again, I am not sure if you can put an Activity from another
application in the Tab. You have to check it out for yourself.

Thanks and Regards,
Kumar Bibek

On Apr 22, 5:24 pm, Ganz  wrote:
> I wish to know if any way to start another application inside my
> landing application.
>
> I have created a two application. My Landing Application has the
> tabview. And in the second shows toast message.
> Is there any way to load another application in a each tab?
>
> I can start a another application using below code
> Intent intent = new Intent();
> intent.setComponent(new ComponentName("com.labtest2",
> "com.labtest2.MainActivity"));
> startActivity(intent);
>
> --
> 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 
> athttp://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: ProgressDialog in full screen

2010-04-22 Thread Ajay
Hi,
  How can you inflate a progress dialog from xml? If I try to inflate
this way, it gives a compile error telling that View cannot be cast to
a ProgressDialog.

Thank you,
AJ

On Apr 22, 5:33 pm, prabhakaran sambasivam
 wrote:
> *just  make the progress dialog as the parent class in the XML and with in
> this class  define all other class.
> *
>
>
>
> On Thu, Apr 22, 2010 at 5:55 PM, Ajay  wrote:
> > Hi,
> >   I have the standard ProgressDialog displayed during a lengthy
> > operation. How can I make this ProgressDialog to occupy the entire
> > screen (make it full screen)?
>
> > Thank you,
> > AJ
>
> > --
> > 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 
> athttp://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: HELP! Cannot launch sub activity

2010-04-22 Thread Kumar Bibek
Then you should have another activity with the same intent filter.
Remove the intent filter from this Activity.

And from the other activity, on button click event you need to start
this Activity.









Thanks and Regards,
Kumar Bibek

On Apr 22, 8:39 pm, Jennifer  wrote:
> Hi y'all,
>
> I'm working on making an application that requires me to populate a
> contact list.
>
> My code works when the intent-filter for the activity is set to:
>
>                    android:label="Contact Picker">
>             
>                 
>                  android:name="android.intent.category.LAUNCHER" />
>             
> 
>
> However, I do not want this activity to start right at the launch of
> the emulator. My program has a menu page where once you click on a
> button, this contact picker (basically a contact list) will show up.
> What are the manifest attributes that I need for this to happen?
>
> Thanks!
>
> Jennifer
>
> --
> 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 
> athttp://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: Allow only decimal numeric input and use phone soft keyboard?

2010-04-22 Thread Nmix
Try adding the following line to the xml to filter for integer input:

android:digits="0123456789"

I've had some success using android:inputType to select the soft
keyboard and android:digits to filter which keys are accepted.

On Apr 21, 5:25 pm, Watter  wrote:
> I am trying to do something that I thought would be simple, yet I
> still haven't found the right approach.
>
> I have a EditText field that should only accept unsigned decimal
> entries. Using android:inputType="numberDecimal" in my layout xml file
> achieves this, however the soft keyboard that is raised with this
> inputType is the standard keyboard but just uses the alternate view
> with the number row on top. This is far from ideal for a field that
> only allows numbers. A much better soft keyboard for numeric entry is
> the "phone" one. It has all of the numbers and a decimal. Perfect!!
> Well, except that for the life of me I cannot figure out how to use
> both the phone keyboard AND allow only numeric entry. I've tried
> everything I can think of but if I use the phone soft keyboard then
> the input field also allows things like "(" and any of the other
> symbols available on that keyboard.
>
> Is there any way to get the nice big numeric buttons of the phone
> keyboard along with only allowing decimal entry?
>
> --
> 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 
> athttp://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: Your feedback on Samples/Tutorials/Articles

2010-04-22 Thread Santha
It will be  a good thing for begginers if any one can contribute video
tutorials right from the beginninghow each View and Viewgroup will
be  used and all..

On Apr 12, 2:27 pm, Tim  wrote:
> On Apr 9, 8:02 pm, mike  wrote:
>
> > On 04/09/2010 11:52 AM, Matt Kanninen wrote:
>
> > > I've been using Sidewiki, it's an easy way to comment on problems with
> > > documentation, it's almost as good as directly fixing the docs myself.
>
> > In principle, is there any reason why this has to be a google-sponsored
> > thing? Couldn't you essentially "frame" the doc content tree and overlay
> > a comments section?
>
> No, but I don't think it will get much use if it isn't. You could use
> frames (essentially the same as sidewiki), but a better approach might
> be to modify javadoc to add a comments section to each documentation
> icon and regenerate the docs using that. This actually looks fairly
> easy. We need some kind of comments server, and to modify the
> 'standard doclet':
>
> http://java.sun.com/j2se/1.4.2/docs/tooldocs/javadoc/standard-doclet
>
> to add some javascript to each item.

-- 
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: Seek Bar .setFocusable(false) not working

2010-04-22 Thread Jeffrey
Note that setEnabled will not work for me as it darkens the color.


On Apr 22, 10:36 pm, Jeffrey  wrote:
> I need a seek bar to not be able to be adjusted, but without making
> the color change... setFocusable does not work for this. Is there a
> way to do this because it seems like there should be (without re-
> writing the seekbar class that is).
>
> --
> 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 
> athttp://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] Seek Bar .setFocusable(false) not working

2010-04-22 Thread Jeffrey
I need a seek bar to not be able to be adjusted, but without making
the color change... setFocusable does not work for this. Is there a
way to do this because it seems like there should be (without re-
writing the seekbar class that is).

-- 
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] SocketChannel, broken pipe exception - Cupcake only

2010-04-22 Thread moju27
Hello :)

I'm currently writing an application to communicate with my server app
which is on a PC on the LAN. I'm using a SocketChannel and it causes
an IO exception (broken pipe). The weird and really problematic part
is that this exception only occurs on Cupcake !!!

To give more details, the exception happens when I'm writing on the
socket channel. The socket channel says that it's connected / bound,
everything seems to be correct. Plus I see my client on the server
side.
By the way, I use a non blocking socket.

So, I would be very happy if anyone had a clue regarding this ... I
couldn't find any help anywhere else.

Thanks,

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] want to draw over a changing solid-color background

2010-04-22 Thread Rob Y.
I'm trying to draw an animated picture over a background that I want
to shift gradually in color.

The picture is kept in a bitmap, and on each frame, I erase the
background to the new background color and then draw the bitmap on top
of it.  The bitmap was originally cleared to Color.TRANSPARENT, and
that works.  I can see the background color.  But as I animate my
image, each pixel in the bitmap that I 'erase' to Color.TRANSPARENT
seems to remain whatever color it originally was.  Eventually I just
end up with a big blob of color where the moving image should be.

Am I doing something wrong?  How come Color.TRANSPARENT results in
transparency when I use it to drawColor to my bitmap canvas, but not
when I draw with a Color.TRANSPARENT paint to the same canvas?

-- 
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: 14-year-old Android Developer:

2010-04-22 Thread ~ TreKing
On Thu, Apr 22, 2010 at 7:37 PM, Ivan Greene  wrote:

> I'm thinking about college, because I would really like to work for Google.
> But I'm not sure that will happen, my grades are quite bad (about 2.5 GPA).
>

Maybe you could go work on the Android Market Support Forum!?
I don't care how bad your grades are, if you simply replied "Monkey Butt" to
every post that came through, you would be of more help then whoever is
running that thing now =P

Also, congrats on your project. =)

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

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

Re: [android-developers] app crashes only on device

2010-04-22 Thread ~ TreKing
On Thu, Apr 22, 2010 at 7:33 PM, emada.adame  wrote:

> How can i see whats going on?
>

Use your debugger ... maybe ... ?


> what could be going on?
>

Based on this VASTLY detailed post that provided so much information I can,
with 100% confidence, conclude that it's the gnomes.

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

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

Re: [android-developers] Code executing out of order?

2010-04-22 Thread ~ TreKing
On Thu, Apr 22, 2010 at 3:38 PM, scp89  wrote:

> They should change right away, since that code is first. Can someone
> explain why this is and how to prevent it?
>

Although you call setText first, you won't actually see that reflected on
the screen until the system does a render pass on the view. This happens on
the main thread. Unfortunately you're also calling the Music.playSong on the
main thread, which *blocks* until it's finished, then allows the main thread
to continue. Only then does the render pass complete at which point you see
the text changed. So the order of execution is something like this:

- request change in text (does not actually change view)
- load song (process, download, buffer, whatever, it takes time)
- system refreshes display with new text set in the first call

I hope that makes sense.

I want the textview and seekbar to change right away so the user has some
> feedback when they click, otherwise it looks like nothing happens for a few
> seconds while the song is loading.
>

You'll want to put the music loading in a separate thread, or use Android's
threading facilities to simplify this (AsyncTask for example).

HOWEVER - since you said you new to Java it is HIGHLY recommended you learn
that first independently of Android. If you try to do both, after you
already got stuck on a classic threading problem, you are setting yourself
up for a lot of frustration.

Good luck.

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

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

Re: [android-developers] Activities and ListActivities with button and lists

2010-04-22 Thread ~ TreKing
On Thu, Apr 22, 2010 at 10:51 AM, MyGB  wrote:

> I'm developing a real-time informations about train.
>

Cool, me too! Well, mostly buses, but same diff.


> But, my problem is, I can't put buttons and lists in the same class.
>

Sure you can.


>  I explain, to get a list on the screen, I have to put : "public class
> NextTrain extends ListActivity {"
>

No, you don't HAVE to, but extending ListActivity does simplify things if
your activity is predominantly list-oriented.


> but the buttons function doesn't work (the app crashs).
>

Crashes HOW? We can't read your mind (or code).

 By the way, if I put
>
"public class NextTrain extends Activity {"
> the buttons works but not the list (no crash, but the screen
> doesn't display anything).
>

Did you actually add a ListView to the Activity?


>  Can you help me ?
>

I can try.
If you extend ListActivity you can add a header view to your ListView
containing your two buttons.
Alternatively if you extend Activity, you can create a layout with your two
buttons and a ListView.


> Thanks in advance.
>

You're welcome in advance.

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

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

Re: [android-developers] Itemized Overlays...Not drawing a collection but refreshing????

2010-04-22 Thread ~ TreKing
On Thu, Apr 22, 2010 at 9:49 AM, Scott  wrote:

> What's been killing me is that the Overlays always overwrite one
> another...So I can never have more than one circle...HELP WHAT AM I
> DOING WRONG?
>

Besides the fact that you're only drawing one circle?


> PS This code also crashes if I touch the map now.
>

OK. And what do you want us to do about that? Perhaps looking at the
debugger and the call stack so see WHERE the app crashes will be of
assistance?

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

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

Re: [android-developers] Hi Question about menu

2010-04-22 Thread ~ TreKing
On Thu, Apr 22, 2010 at 3:36 AM, 智超 薛  wrote:

> anyone know how to make it work?


Try checking if (myMenu != null), since, you know, you probably want a valid
object to add stuff to.

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

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

Re: [android-developers] Scrolling a dynamically filled AbsoluteLayout.

2010-04-22 Thread ~ TreKing
On Thu, Apr 22, 2010 at 1:10 AM, rocrail  wrote:

> Any advice?


Yeah, don't use AbsoluteLayout, it's deprecated.


> Or do I have a design problem in this layout?


Yeah, you're using AbsoluteLayout, which is deprecated.

Are you trying to achieve the same effect as the pictures in the link, or is
that what you have working so far?

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

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

Re: [android-developers] Interface

2010-04-22 Thread ~ TreKing
On Wed, Apr 21, 2010 at 8:57 PM, LTMOD  wrote:

> Other than DroidDraw, are there any tools that can help with Android GUI
> design?
>
Are there any official tools planned, or web sites that cater to this?
>

You mean besides the official tools for Eclipse?

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

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

[android-developers] how to port my application into fbreaderj

2010-04-22 Thread n.newtechie techie
Hi ,

I am new to this world of android..

I want to create an application which has a book in epub format with
audio attached to it.
and then want to port this application into fbreaderj.

Any ideas , how this can be done ?

Please help..

-- 
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] power button hitting onCreate

2010-04-22 Thread Dianne Hackborn
When you turn off the device, the lock screen is displayed.  This typically
forces the display to a particular orientation.  If the screen is not
currently in that orientation, it will need to be changed, and the top
activity's configuration appropriately changed to match.

On Thu, Apr 22, 2010 at 1:55 PM, scottrick49  wrote:

> In my application, if you press the power button on the phone, i am
> seeing:
>
> onPause
> onDestroy
> onCreate
> onResume
> onPause
>
> getting called in that order; I can't figure out why the app is
> getting created again and then re-paused.  Obviously I am doing
> something incorrect, but I am not sure what.  Anybody seen anything
> like this before?
>
> --
> 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
>



-- 
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: ListActivity does the ArrayAdapter class have to be an Inner Class

2010-04-22 Thread Brion Emde
No, there is no reason at all that your Adapter has to be in internal
class.

Post your code and maybe someone will see your problem.

On Apr 21, 2:40 pm, David Parry  wrote:
> Question:
>
> I have a Concrete class that implements ListActivity in this class I
> have an InnerClass extends ArrayAdapter. This came from an example
> and works great i.e. displays my list of items on the screen.
>
> The problem is that I tried pulling out the InnerClass and use it as a
> standalone Concrete class. So now I pass in the array of Items i.e T[]
> to the constructor but when I set the ListActivity classes
> setListAdapter(my pulled out InnerClass); the screen comes up empty?
>
> So is this by design that ArrayAdapter has to be an InnerClass in the
> ListActivity class?
>
> If no then how can i get the list to display and update.
>
> Thank you,
> David
>
> --
> 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 
> athttp://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] Re: 14-year-old Android Developer:

2010-04-22 Thread Miguel Morales
I would recommend you try to go to college though, specially if you
want to work for google.
There's definitely a lot of algorithm/math stuff that I missed out on.
Good luck on your game and your grades.

On Thu, Apr 22, 2010 at 5:37 PM, Ivan Greene  wrote:
> Miguel: Thanks for the encouragement!
> I am working on an Android game right now.
> I'm thinking about college, because I would really like to work for
> Google.
> But I'm not sure that will happen, my grades are quite bad (about 2.5
> GPA).
>
> On Apr 22, 6:48 pm, Miguel Morales  wrote:
>> Congratulations guys!  You're on your way to build some great stuff.
>> I really wish I had a good computer teacher in High School, lucky!
>> Keep it up and you might not even need to go to college (MIT or
>> something would be cool though) to make good money.
>> I wrote my first program at 15 and never finished High School, now I
>> make more money than most college graduates, best of luck to you!
>>
>>
>>
>>
>>
>> On Thu, Apr 22, 2010 at 4:36 PM, Eddie Ringle  wrote:
>> > Yeah, I'm 15 (will be 16 in May), and I haven't made much just yet,
>> > but that is more due to the target audience of my app (GitHub users)
>> > and the fact that a free version is available. I only make money if
>> > someone chooses to buy the donate version (there are ads on the free
>> > verison, but they aren't really effective). Good job though. :)
>>
>> > On Apr 21, 8:26 pm, joshbeck  wrote:
>> >> Hello,
>>
>> >> I'm writing a curriculum this year that is designed to get high-
>> >> achieving 8th grade students to write and publish
>> >> Android apps. One of my students broke the $50 this week.
>>
>> >> Here's an article:
>>
>> >>http://www.neisd.net/ComRel/News/Krueger_PaidApp_10.htm
>>
>> >> He's basically spent the last 2 months camped out in my computer lab,
>> >> but hard work pays off for sure.
>>
>> >> I'm doing my best to document my instruction through YouTube 
>> >> athttp://linuxclassroom.com
>>
>> >> Thanks all,
>> >> Josh Beck
>>
>> >> --
>> >> 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 
>> >> athttp://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
>>
>> --http://diastrofunk.com,http://developingthedream.blogspot.com/,http://www.youtube.com/user/revoltingx,
>>  ~Isaiah 55:8-9
>>
>> --
>> 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 
>> athttp://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



-- 
http://diastrofunk.com, http://developingthedream.blogspot.com/,
http://www.youtube.com/user/revoltingx, ~Isaiah 55:8-9

-- 
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 execute "cd sdcard" command

2010-04-22 Thread karteek
Thanks Marks,Bob.
Your help is really appreciated,
I will follow java i/o.

On Apr 22, 9:39 pm, Bob Kerns  wrote:
> Mark points out all the reasons you shouldn't even be trying to do
> this.
>
> But there's more! I assume you're going to take Mark's advice anyway,
> but these are things that are likely to cause you trouble someday in
> the future, so I'll point them out anyway.
>
> First, you are trying to cd to some directory you have no reason to
> believe exists. You don't have any idea what your current directory is
> -- why should you expect it to have a 'sdcard' subdirectory? I expect
> you meant "/sdcard" -- and that might work on your device. It might
> not work on some other device, though. See this class for methods to
> handle this cleanly:
>
> http://developer.android.com/intl/de/reference/android/os/Environment...
> (You'll want to make use of this with Mark's advice, too).
>
> And even if you did manage to cd to a directory named 'sdcard' -- it
> would have NO EFFECT WHATSOEVER on the next command you execute!
>
> You ran a shell and told it to do 'cd sdcard'. When it's done with
> that, it exits. You no longer have a shell with that working
> directory. Now you try to run 'ls' in a new shell. This new shell
> doesn't care what you did in the old shell. It is NOT going to be
> executing in your sdcard directory.
>
> You could put these two commands into a .sh file, and execute that.
> But what's the point? You could supply the same path directly to 'ls'.
> Or even better, use the Java facilities for accessing the filesystem
> and avoid all kinds of bugs you'd probably introduce -- like, for
> example, handling spaces in filenames, etc.
>
> On Apr 22, 5:50 am, Karteek N  wrote:
>
>
>
>
>
> > Hi ,
> > I want to display what are the files and contents in sdcard through
> > application.
> > I am able to print the root folder.But when i execute cd sdcard
> > it throws me exception that permission is denied.
> > When i did the same thing using adb shell i am able to display the sdcard.
> > Is there any way to change permissions like sudo
>
> > I used the following code to display root folder
>
> >  Runtime rt = Runtime.getRuntime();
> >           try {
> >                    Process process;
> >                    process=rt.exec("ls");
> >                  try{
> >                           BufferedReader in =new BufferedReader(new
> > InputStreamReader(process.getInputStream()));
>
> >                          String line;
> >                          while ((line = in.readLine()) != null) {
> >                                Log.d("debug",line);
> >                                 }
> >                           in.close();
>
> >                       } catch (Exception e) {
> >                               e.printStackTrace();
> >                              System.out.println(e.getMessage());
> >                        }
>
> >                    } catch (IOException e) {
>
> >                           e.printStackTrace();
> >                   }
>
> > But when change the above code like
> >   process=rt.exec("cd sdcard");
> >   process=rt.exec("ls");
> > Its throws exception
>
> > Any help please
> > Regards,
> > Karteek
>
> > --
> > 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 
> > athttp://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 
> athttp://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: 14-year-old Android Developer:

2010-04-22 Thread Ivan Greene
Miguel: Thanks for the encouragement!
I am working on an Android game right now.
I'm thinking about college, because I would really like to work for
Google.
But I'm not sure that will happen, my grades are quite bad (about 2.5
GPA).

On Apr 22, 6:48 pm, Miguel Morales  wrote:
> Congratulations guys!  You're on your way to build some great stuff.
> I really wish I had a good computer teacher in High School, lucky!
> Keep it up and you might not even need to go to college (MIT or
> something would be cool though) to make good money.
> I wrote my first program at 15 and never finished High School, now I
> make more money than most college graduates, best of luck to you!
>
>
>
>
>
> On Thu, Apr 22, 2010 at 4:36 PM, Eddie Ringle  wrote:
> > Yeah, I'm 15 (will be 16 in May), and I haven't made much just yet,
> > but that is more due to the target audience of my app (GitHub users)
> > and the fact that a free version is available. I only make money if
> > someone chooses to buy the donate version (there are ads on the free
> > verison, but they aren't really effective). Good job though. :)
>
> > On Apr 21, 8:26 pm, joshbeck  wrote:
> >> Hello,
>
> >> I'm writing a curriculum this year that is designed to get high-
> >> achieving 8th grade students to write and publish
> >> Android apps. One of my students broke the $50 this week.
>
> >> Here's an article:
>
> >>http://www.neisd.net/ComRel/News/Krueger_PaidApp_10.htm
>
> >> He's basically spent the last 2 months camped out in my computer lab,
> >> but hard work pays off for sure.
>
> >> I'm doing my best to document my instruction through YouTube 
> >> athttp://linuxclassroom.com
>
> >> Thanks all,
> >> Josh Beck
>
> >> --
> >> 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 
> >> athttp://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
>
> --http://diastrofunk.com,http://developingthedream.blogspot.com/,http://www.youtube.com/user/revoltingx,
>  ~Isaiah 55:8-9
>
> --
> 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 
> athttp://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] app crashes only on device

2010-04-22 Thread emada.adame
Hello all

So i have a app that runs fine on the emulator but crashes (force
close message as soon as i open the app) on every device i have tested
it on. How can i see whats going on? what could be going on? Thank
you.

-EA

-- 
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] Activity - get notified when all views are rendered

2010-04-22 Thread Mark Murphy
vistaman wrote:
> I searched for all overidable methods of Activity and couldn't find
> this: Basically I want to get notified or override a method when all
> views in the current activity had been rendered. This is because I
> need to get the measured heights of a couple of TextViews and then
> resize other views accordingly. I can't do this in onCreate because
> those views are not rendered yet. Any suggestions on how to achieve
> this? Thanks.

The official answer is for you to write your own custom layout manager
and use that, instead of using LinearLayout, RelativeLayout, etc. That
can then find the sizes and do the calculations you need.

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

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

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


Re: [android-developers] Android temporary file

2010-04-22 Thread Mark Murphy
venkata raidu wrote:
> Hi all,
>   I need to copy some content(which is in the form of a byte array,
> now) into a temporary file and save it in .PNG format on android.
> Please advise a way to do that. Thanks in advance.

Java file I/O would seem like a likely starting point.

http://exampledepot.com/taxonomy/term/164

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

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

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


Re: [android-developers] Getting appWidget position/coordinates on homescreen

2010-04-22 Thread Mark Murphy
Yesmic wrote:
> Hello,
> 
> I'm trying to develop an appWidget. I would like to retrieve its
> coordinates or position (row, col) on home screen.
> 
> Is it possible ?

No, sorry.

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

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

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


[android-developers] Introducing AppsMarketing.mobi

2010-04-22 Thread OrenTodoros
Hey there

Oren here, Co-Founder of http://www.appsmarketing.mobi and fresh in
the group!
I wanted to quickly introduce myself and our service to you all. Hope
that's cool? :)

We specialize in managing Mobile App Marketing campaigns and helping
up-and-coming mobile app developers as well as established brands
promote their apps within the social media landscape. We work directly
with industry leading bloggers in order to increase awareness and
branding for our clients.

There are 3 main areas which we specialize in.

Consulting: From the concept to usability phase through
implementation.

Optimization: Both through the App store descriptions and reviews and
on your website to increase visibility via user searches.

Promotional: by working with a network of targeted bloggers from
various industries "kids, tech, business, sports, etc.." in order to
promote your app to the web's most active audiences. We spark the
conversations that get people talking and sharing your app.

We'd love to get to know you and the apps you're working on and find
out how we can get involved!
Reach out to us. We're also on http://www.twitter.com/AppsMktg

-- 
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] HELP! Cannot launch sub activity

2010-04-22 Thread Jennifer
Hi y'all,

I'm working on making an application that requires me to populate a
contact list.

My code works when the intent-filter for the activity is set to:








However, I do not want this activity to start right at the launch of
the emulator. My program has a menu page where once you click on a
button, this contact picker (basically a contact list) will show up.
What are the manifest attributes that I need for this to happen?

Thanks!

Jennifer

-- 
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 integrate a mjpeg decoder into open core framework

2010-04-22 Thread dadaowuwei
Hi,
I am quite new for android onpencore framework and have some
questions  for integrating process of a new openmax mjpeg component

1. can I directly inherit the omx_component_video class to form my own
mjpeg component?
2. how pvmf consumes the output buffer of the component, what kind of
decoded data should i put onto the output buffer so that these data
will be recognized by pvmf and played (this helps me to design my
decoder)
3. when pvmf  first sends fillthisbuffer command to component,I wonder
how pvmf could indicate the component where the file is?
4. If the file needs to be serialized before filling in the input
buffer and who serialize it component or pvmf?

thank you very much,
Best Regards,

Dadao

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


[android-developers] Activity - get notified when all views are rendered

2010-04-22 Thread vistaman
I searched for all overidable methods of Activity and couldn't find
this: Basically I want to get notified or override a method when all
views in the current activity had been rendered. This is because I
need to get the measured heights of a couple of TextViews and then
resize other views accordingly. I can't do this in onCreate because
those views are not rendered yet. Any suggestions on how to achieve
this? 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] power button hitting onCreate

2010-04-22 Thread scottrick49
In my application, if you press the power button on the phone, i am
seeing:

onPause
onDestroy
onCreate
onResume
onPause

getting called in that order; I can't figure out why the app is
getting created again and then re-paused.  Obviously I am doing
something incorrect, but I am not sure what.  Anybody seen anything
like this before?

-- 
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 appWidget position/coordinates on homescreen

2010-04-22 Thread Yesmic
Hello,

I'm trying to develop an appWidget. I would like to retrieve its
coordinates or position (row, col) on home screen.

Is it possible ? Can anybody help ?

-- 
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] Android 2.1 Motorola Milestone

2010-04-22 Thread firefight16
I updated couple days ago on my Telus Milestone unlocked and running
on Bell network, to 2.1 and now phone won't dial 1-888 numbers, I
tried 4-5 differant numbers and phone hangs up right away just a buzz
and call ends. No problem withh 1-800 and I have not tried 1-900 I
don't use those!

-- 
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] Activities and ListActivities with button and lists

2010-04-22 Thread MyGB
Hi everyone,
It's the first time I post here, so I hope I'll be clear for my
problem.

I'm developing a real-time informations about train. The application
will connect to a XML plateform that will give the next trains with a
station given.
I'm a beginner in Android development, and I'm stuck to a class-
problem (I think...).

In details, the problem is, when I start the application, the user get
a screen with 2 buttons, one of them get the user to a new screen with
stations list. But, my problem is, I can't put buttons and lists in
the same class.
I explain, to get a list on the screen, I have to put :
"public class NextTrain extends ListActivity {"
but the buttons function doesn't work (the app crashs).
By the way, if I put
"public class NextTrain extends Activity {"
the buttons works but not the list (no crash, but the screen doesn't
display anything).

Can you help me ?
Thanks in advance.

The Java source file : http://pastebin.com/RwHyi299
The Main.xml file : http://pastebin.com/A1avkfZc
The Stations.xml file : http://pastebin.com/1firyRhB

-- 
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] Android temporary file

2010-04-22 Thread venkata raidu
Hi all,
  I need to copy some content(which is in the form of a byte array,
now) into a temporary file and save it in .PNG format on android.
Please advise a way to do that. Thanks in advance.

-Venkata

-- 
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] Code executing out of order?

2010-04-22 Thread scp89
I am fairly new to android (and Java for that matter). I have an
onClick fuction for my listview. What I want it to do is changing the
text of a textview, set a seekbar progress to 0, and then load a new
song. The problem is that it loads the new song (which takes a while),
and THEN changes the textview and seekbar.

I want the textview and seekbar to change right away, then load the
song. Here's my function:


   public void onListItemClick(ListView parent, View v, int position,
long id) {

  //This stuff should happen immediately
 Globals.song = items[position];
 title.setText(Globals.artist + " - " + Globals.song);
 seek.setProgress(0);

//Then this should happen
 Music.playSong(Music.youtubeMp4(Globals.artist,Globals.song));
}

Like I said, the textview and seekbar doesn't change until the song
url is retrieved, and then the song buffers and starts. They should
change right away, since that code is first. Can someone explain why
this is and how to prevent it?


I want the textview and seekbar to change right away so the user has
some feedback when they click, otherwise it looks like nothing happens
for a few seconds while the song is loading.

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


[android-developers] Re: Is IPv6 over the wifi interface supported in the SDK?

2010-04-22 Thread Steinar H. Gunderson
On Apr 21, 4:30 am, Michael Newton  wrote:
> I'm hearing that IPv6 is supported by android, at least over the wifi
> interface, but I cannot do anything with IPv6 through the SDK at all.
> I am running Android 2.1 on an N1.
>
> I can see that at the OS level, the wifi interface has a link local
> inet6 address:

Hi,

It sounds like you're connected to a network that simply doesn't have
any IPv6.

/* Steinar */
--
Software Engineer, Google Switzerland

-- 
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 connect to ms Exchange?

2010-04-22 Thread Borislav Kapukaranov
Hi,

I'm trying to connect to Exchange server to obtain some appointments
data.
I googled the whole stuff and could not find some useful examples.
I would appreciate it if someone give me or point me to some
examples(code snippets are preferred).

Thanks,
Bobby

-- 
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 call another application from tabview

2010-04-22 Thread Ganz
I wish to know if any way to start another application inside my
landing application.

I have created a two application. My Landing Application has the
tabview. And in the second shows toast message.
Is there any way to load another application in a each tab?

I can start a another application using below code
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.labtest2",
"com.labtest2.MainActivity"));
startActivity(intent);


-- 
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 determine contacts Gmail/Google voice group membership from android phone/emulator

2010-04-22 Thread reekotubbs
Hello all,

I have a OutGoingCallReceiver setup to catch outgoing calls, it
attempts to check their group membership and return which groups the
contacts are part of.

I have been using 1.5 code to accomplish this on the emulator. It
works for users I create, because I have to add them to the groups I
am looking for, but when I do this on a live android phone with gmail
synced, it does not pull back group membership. Any help on this.

here is some of the code:

d =
context.getContentResolver().query(Contacts.GroupMembership.CONTENT_URI,
projection2,
   filterString2,null, null);
if(d.moveToFirst()){
String notes2 =
c.getString(c.getColumnIndex(Contacts.GroupMembership.PERSON_ID));
sGroupName =
d.getString(d.getColumnIndex(Contacts.GroupMembership.NAME));
return (sGroupName);

-- 
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] Dex cache issue

2010-04-22 Thread nickname
Hi all,
  My application is crashing once in a  while . Logcat logs are pasted
bellow.

04-11 02:26:37.225 1245 1245 W dalvikvm: Refusing to reopen boot DEX '/
system/framework/frameworks.jar'
04-11 02:26:37.334 1245 1245 E dalvikvm: Can't open dex cache '/data/
dalvik-cache/sys...@app@settings@classes.dex': No such file or
directory
04-11 02:26:37.345 1245 1245 I dalvikvm: Unable to open or create
cache for /system/app/Settings.apk (/data/dalvik-cache/
sys...@app@settings@classes.dex)
04-11 02:26:37.350 1245 1245 D AndroidRuntime: Shutting down VM
04-11 02:26:37.373 1245 1245 W dalvikvm: threadid=3: thread exiting
with uncaught exception (group=0x4001e600)
04-11 02:26:37.373 1245 1245 E AndroidRuntime: Uncaught handler:
thread main exiting due to uncaught exception
04-11 02:26:37.389 1245 1245 E AndroidRuntime:
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.android.setupwizard/
com.android.setupwizard.SetupWirelessActivity}:
java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.android.settings/
com.android.settings.wifi.WifiSettings}:
java.lang.ClassNotFoundException:
com.android.settings.wifi.WifiSettings in loader
dalvik.system.pathclassloa...@44f0d8d8
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2550)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2566)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
android.app.ActivityThread.access$2400(ActivityThread.java:121)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1917)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
android.os.Handler.dispatchMessage(Handler.java:99)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
android.os.Looper.loop(Looper.java:123)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
android.app.ActivityThread.main(ActivityThread.java:4417)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
java.lang.reflect.Method.invokeNative(Native Method)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
java.lang.reflect.Method.invoke(Method.java:521)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
dalvik.system.NativeStart.main(Native Method)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: Caused by:
java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.android.settings/
com.android.settings.wifi.WifiSettings}:
java.lang.ClassNotFoundException:
com.android.settings.wifi.WifiSettings in loader
dalvik.system.pathclassloa...@44f0d8d8
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2471)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
android.app.ActivityThread.startActivityNow(ActivityThread.java:2389)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
android.app.LocalActivityManager.moveToState(LocalActivityManager.java:
127)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
android.app.LocalActivityManager.startActivity(LocalActivityManager.java:
339)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
com.android.setupwizard.SetupWirelessActivity.onCreate(SetupWirelessActivity.java:
99)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1047)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2513)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: ... 11 more
04-11 02:26:37.389 1245 1245 E AndroidRuntime: Caused by:
java.lang.ClassNotFoundException:
com.android.settings.wifi.WifiSettings in loader
dalvik.system.pathclassloa...@44f0d8d8
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
java.lang.ClassLoader.loadClass(ClassLoader.java:573)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
java.lang.ClassLoader.loadClass(ClassLoader.java:532)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2463)
04-11 02:26:37.389 1245 1245 E AndroidRuntime: ... 17 more
04-11 02:26:37.444 1156 1261 I Process : Sending signal. PID: 1245
SIG: 3
04-11 02:26:37.451 1245 1249 I dalvikvm: threadid=7: reacting to
signal 3

Any idea what can be the reason,,

Thank you all,


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

[android-developers] RTSP cache/buffer

2010-04-22 Thread Chirag
Hi All,

I am trying do rtsp video streaming on my android device using media
player. works fine for both, h263 and h264. the only issue is, I am
getting around 3 to 4 second delay. I want to reduce it to less then a
second.

I have checked till depth, I cant find buffer or cache settings
anywhere. Is it default for media player? Is there any way I can
change it?

Is there any other option to play remote video without delay??

If this limitation is from Opencore it self, there is no way android
can have by-directional video calling with its native libs.


Thanks,

Chirag

-- 
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] Itemized Overlays...Not drawing a collection but refreshing????

2010-04-22 Thread Scott
I'm trying to write code that draws accuracy circles around a gps
location based on a time param. I have no problem setting up the GPS,
or of calculating how to draw the circles...What's been killing me is
that the Overlays always overwrite one another...So I can never have
more than one circle...I've looked at all the examples and tutorials
online but they seem to be obsessed with putting in icons or with
Drawing from some database or array...If I understood correctly I
should be able to do itemizedoverlays and just draw as i go without
having to track each readout in an arrayHELP WHAT AM I DOING
WRONG? PS This code also crashes if I touch the map now.

MY CLASS
public class HelloItemizedOverlay extends ItemizedOverlay {
private List items;
private Drawable marker;
public HelloItemizedOverlay() {
super(null);
items = new ArrayList();
}
@Override
protected OverlayItem createItem(int index) {
return (OverlayItem)items.get(index);
}
@Override
public int size() {
return items.size();
}
@Override
public void draw(Canvas canvas, MapView mapView, boolean shadow)
{
super.draw(canvas, mapView, shadow);
if (TempLat > 0) {
Point center = new Point();
Point left = new Point();
Point screenPts = new Point();
Projection projection = mapView.getProjection();
float[] result = new float[1];
Location.distanceBetween(TempLat, TempLon, TempLat,
TempLon +1, result);
float longitudeLineDistance = result[0];
GeoPoint leftGeo = new GeoPoint((int)(TempLat*1e6),(int)
((TempLon-TempAccy/longitudeLineDistance)*1e6));
projection.toPixels(leftGeo, left);
projection.toPixels(p, center);
int radius = center.x - left.x;
accuracyPaint.setAntiAlias(true);
accuracyPaint.setStrokeWidth(2.0f);
accuracyPaint.setColor(0xffff);
accuracyPaint.setStyle(Style.STROKE);
canvas.drawCircle(center.x, center.y, radius,
accuracyPaint);
accuracyPaint.setColor(0x18ff);
accuracyPaint.setStyle(Style.FILL);
canvas.drawCircle(center.x, center.y, radius,
accuracyPaint);
}
}
public void addItem(OverlayItem item) {
items.add(item);
populate();
}
}

MY ONCREATE INITIALIZATION CALL

super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mapView = (MapView) findViewById(R.id.myGMap);
LinearLayout zoomLayout = (LinearLayout)findViewById(R.id.zoom);
View zoomView = mapView.getZoomControls();
mapView.setSatellite(true);
zoomLayout.addView(zoomView,
new LinearLayout.LayoutParams(
LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));
mapView.displayZoomControls(true);
mc = mapView.getController();
mc.setZoom(1;
accuracyPaint = new Paint();
overlay = new HelloItemizedOverlay();
..

MY ONLOCATIONCHANGED EVENT

public void onLocationChanged(Location location) {
MSGSTXT.setText("Location Found...");
TempTime = location.getTime();
TempLat = location.getLatitude();
TempLon = location.getLongitude();
TempAccy = location.getAccuracy();
TempSpeed = location.getSpeed();
TempBear = location.getBearing();
TempAlt = location.getAltitude();
p = new GeoPoint(
(int) (TempLat * 1E6),
(int) (TempLon * 1E6));
mc.animateTo(p);
mapView.getOverlays().add(overlay);

-- 
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] Hi Question about menu

2010-04-22 Thread 智超 薛
i want to realize button pop-up optionmenu,

i write a button setOnClickListener, check this could pop-up menu ,

how to made it?

my code is:

case R.id.tools:
if(myMenu==null) {
myMenu.add(0, 0, 0, 
"Add").setIcon(R.drawable.addfolderr);
myMenu.add(0, 1, 0, 
"Delete").setIcon(R.drawable.delete);

}
onCreateOptionsMenu(myMenu);
break;
but method onCreateOptionsMenu(menu) not work;
type System.out.println("12334"); it could print ,but the menu not
work:(
anyone know how to make it work? or  had other way to pop-up menu

-- 
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] Timestamp of SensorEvent

2010-04-22 Thread Vincenzo Manzoni
Hi,

I am wondering what is the format of the field "timestamp" of the
class SensorEvent. The Android reference [1] says that is

"The time in nanosecond at which the event happened";

my question is: from what? I am interested in correlate the
measurements from accelerometers to measurements from GPS.

Thanks,

Vincenzo


[1] 
http://developer.android.com/reference/android/hardware/SensorEvent.html#timestamp

--
Vincenzo Manzoni, PhD Student
Dipartimento di Elettronica e Informazione
Politecnico di Milano

http://home.dei.polimi.it/manzoni

-- 
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 use Fiddler to get traffic of the Market in Android Emulator

2010-04-22 Thread Xin Song
hi guys, this question seems to be encountered by many people.
I have set up the proxy(10.0.2.2) and port() of Emulator and it
can connect to the net. But the Fiddler can just get traffic of the
Browser in Emulator, it can not get anything of the Market. i.e. if I
open an page by the Browser, there will be some traffics in Fiddler
and if I go into the Market to find some applications, then Fiddler
will show nothing. How can I make it work?
Anyone any ideas?
Thanks 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] Design / Architect - Media Player app

2010-04-22 Thread George Of That Bush
Hi

  I would like to DESIGN and then CODE a Media Player Application
where-in a list of files stored on the sd card are shown on one page.
When the user clicks on a file, it should be played on another page.

  Given a few steps, I can code an application. But what I would like
to know is how do I go about with the DESIGN part? Being a junior
programmer, I am new to the world of DESIGNING / ARCHITECTING
applications and related best practices / methodologies. Hence, need
some expert advice from you to BUILD a ROCK-SOLID Mobile Application.
This will help me think in terms of a Mobile Application Architect!

  I am sorry if my question is not android specific at the moment. If
this is not the correct mailing list, please point me to a relevant
one.

  Any links, pointers, guides would be very helpful. 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] Progress bar in notification bar

2010-04-22 Thread yakura y
Hello everybody,

I would like to put a progress bar in the notification bar. The idea is
showing the progress bar while the program uploads a file to a server.
Everything else is ok, but I can not figure out how to refresh the progress
bar inside the notification. Does anybody knows any pattern to play with?

Thanks 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] android.hardware

2010-04-22 Thread Ivan Longin
Hi!

Does anyone know where to find source code for android.hardware
package? I need to make some modification in SensorManager for my
application and possible modification in other classes from that
package. Google didn't help me a lot so I'm asking here.

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] a question about menu

2010-04-22 Thread 智超 薛
hey all!

meet a question about menu.

i want to push a button to pop-up menu,

my coding is

case R.id.menus:
if(myMenu==null) {
myMenu.add(0, 0, 0, 
"Add").setIcon(R.drawable.addfolderr);
myMenu.add(0, 1, 0, 
"Delete").setIcon(R.drawable.delete);
}
onCreateOptionsMenu(myMenu);
braek;

but onCreateOptionsMenu(myMenu) is not work ,
how to make it work ,or had other way to realize button pop-up menu ?

-- 
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 use VideoView to streaming without buffering?

2010-04-22 Thread Chirag
When you want live video streaming, second case is fine. Is there any
way to reduce buffer size???

On Apr 14, 4:32 pm, MobDev  wrote:
> well most of the time buffering is just part of streaming...
> it's there so that a user will get a more seamless playback of the
> video/audio...
> The flipside is that it starts a little later because it has to buffer
> beforehand, and when it has enough data to play a specific amount of
> time seamlessly it will start..
> Cutting out the buffering might mean frequent hickups during play...
> The first case might be acceptable for users (buffering) the second
> one definitely isn't (frequent hickups)...
>
> On 12 apr, 05:33, Kelvin  wrote:
>
> > I have a question.
> > When I use the VideoView to play theRTSPstreaming, the VideoView
> > will buffering some cache buffer.
> > Is there any method to tell the VideoView DON'T buffer?
>
> > My code:
> > String VideoUri = "rtsp://192.168.5.121:/live/h264";
> > mVideoView = (VideoView) findViewById(R.id.video_view);
> > mVideoView.setVideoURI(Uri.parse(VideoUri));
> > mVideoView.start();
>
> > Is anybody help me?
> > 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: Adding scrollbars in a Custom View

2010-04-22 Thread Jonas
Hi,

Did you get any help with this question, I am having the same problem.
No scroll bars are displayed. I also wish to get the Y position of the
scrollbar and see if it is bigger or smaller than screen width / 2.

BR
Jonas

On Mar 5, 12:15 pm, Neha  wrote:
> Hi,
>
> I am working on adding vertical and horizontal scrollbars in a custom
> drawn View. I have overridden the compute*ScrollOffset,
> compute*ScrollRange, etc methods and have enabled the scrollbars by
> called set*ScrollBarEnabled. However, I do not see the scrollbars in
> my View, even after a call to scrollBy, which according to the
> documentation calls awakenScrollbars (I assumed awakenScrollbars is
> not required as the scrollbars do not auto-fade -
> isScrollbarFadingEnabled returns false).
> Does anyone have a sample with scrollbars in a custom view which they
> can share? Or provide any pointers as to how this should be fixed?
>
> Any help would be appreciated.
> 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


Re: [android-developers] ProgressDialog in full screen

2010-04-22 Thread prabhakaran sambasivam
*just  make the progress dialog as the parent class in the XML and with in
this class  define all other class.
*
On Thu, Apr 22, 2010 at 5:55 PM, Ajay  wrote:

> Hi,
>   I have the standard ProgressDialog displayed during a lengthy
> operation. How can I make this ProgressDialog to occupy the entire
> screen (make it full screen)?
>
> Thank you,
> AJ
>
> --
> 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] IllegalMonitorStateException on 'object.wait()' call randomly

2010-04-22 Thread svd
My code throws an IllegalMonitorStateException on 'object.wait()'
call, even though wait is invoked inside a synchronized block. And
this exception occurs only randomly not always.

below is my code snippet:

while (!mFinish) {
  synchronized (mResponse) {
if (!mResponse.isEmpty()) {
   do something
} else {
try {
mResponse.wait(1000);
} catch (InterruptedException ie) {
   ..
}
}

  }
}

Also all the 'notify' methods are in synchronized block.
Please point out if there is anything wrong in my code?

-- 
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: Device Seeding Program for Top Android Market Developers

2010-04-22 Thread Jeffrey
Moto Droid received in Southern California. Thank you Google!

-- 
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] android.hardware

2010-04-22 Thread Ivan Longin
Hi!

Does anyone know where to find source code for android.hardware
package? I need to make some modification in SensorManager for my
application and possible modification in other classes from that
package. Google didn't help me a lot so I'm asking here.

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 many Android phones have touchscreens?

2010-04-22 Thread Watter
On Apr 21, 5:06 am, Sean Hodges  wrote:
> If you are a beginner, you should really be posting to the
> android-beginners list.

Well, to be frank, a beginner (like myself) is going to have a hard
time even knowing that group exists. If you go to the Android SDK
site, then the Resources tab and look under developer forums, there's
only the briefest mention of the "beginners" group and no link to it
like there is for every other group. You have to actually know it
exists and then specifically search for it in order to find it. Not
very beginner friendly, really.

-- 
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: What happens with the registered broadcast receivers after the application is killed?

2010-04-22 Thread mmonibi
What if my receiver is registered for the ACTION_BATTERY_CHANGED
intent?

As stated in the documentation, "You can not receive this through
components declared in manifests, only by explicitly registering for
it with Context.registerReceiver()."

Is there anyway to make sure my receiver is always registered for this
intent, even if the process is destroyed? Would it make a difference
if I used the application context when registering the receiver
instead of the activity context? (frankly, I still don't have a good
grasp of the context object and don't quite understand how the
application and activity contexts differ)

I know that I may be able to use the new battery related broadcasts
that have been added to API level 4, but I'm trying to stick to level
3 to ensure compatibility with all devices.

Thanks!


On Mar 25, 8:23 am, Mark Murphy  wrote:
> Tughi wrote:
> > Hi guys,
> > I want to optimize the CPU usage in my application.
>
> > Currently my application is configured to always receive the
> > CONNECTIVITY_CHANGED action to force an update if the previous update
> > failed because there was no connectivity.
> > What I don't like about this is that the broadcast receiver gets to be
> > called too many times although it is not needed.
>
> > I was thinking to register my broadcast receiver only if an update
> > failed using the Context.registerReceiver(BroadcastReceiver receiver,
> > IntentFilter filter) method. But I'm not so sure if this is a good
> > idea.
>
> > I'm concerned that if my application is evicted from memory the
> > broadcast receiver will be unregistered or lost and my application
> > will not be notified about the future CONNECTIVITY_CHANGED actions.
>
> > The update is done in a short lived service. So if the update fails,
> > the service will register the broadcast receiver just before it ends
> > its execution time.
>
> > Can somebody explain what happens to my broadcast receiver after the
> > application is evicted from memory?
>
> You will leak memory, as your BroadcastReceiver will keep the component
> in RAM (even if it was destroyed) until such time as Android terminates
> the process.
>
> You might consider going with a manifest-registered receiver, but
> enabling and disabling the component as needed via PackageManager.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Training...At Your Office: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


[android-developers] Callback when SoftKeyboard goes away

2010-04-22 Thread mkellner
Hello,

I am trying to find a way to get a notification that the soft keyboard
has been dismissed by the user pressing the "Back" key.

showSoftInput() with a ResultReceiver will tell you if/when the
keyboard appears, but not if it goes away.

addTextChangedListener() doesn't get called because text hasn't
changed.

onEditorAction() doesn't get called, because the Action button wasn't
pressed.

dispatchKeyEvent() doesn't get called with KEYCODE_BACK.

onConfigurationChanged() doesn't get called even with this in the
manifest:
  android:configChanges="keyboardHidden|orientation|
locale|screenLayout|fontScale"


Any suggestions?

Thanks!
-mk

-- 
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 X, Y Co-ordinates on touch event

2010-04-22 Thread Veeru
Hi Friends,

How can I get the x, y co-ordinates of my touch event on any screen
irrespective of any activity?

I have seen the following query...
http://groups.google.com/group/android-developers/browse_thread/thread/71a4750dfa6fb883

But I do not want to make changes in the activity. I just want generic
click co-ordinates for any activity. Is there any way to get this info
from the window manager?

Any pointers on this will be very helpful.

Thanks,
-Veerendra

-- 
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: Device Seeding Program for Top Android Market Developers

2010-04-22 Thread Jason K [Appirio]
I got my Droid, but my instructions were for a Nexus One (sigh).

Anyway, is there a way to expedite the free thirty day service?

Jason

On Mar 31, 5:28 am, Justin Giles  wrote:
> On Tue, Mar 30, 2010 at 11:48 PM, Jason  wrote:
> > I received a Droid and I did not see the "Read Me First" leaflet that
> > was referenced in the Getting Started on Droid - Activation section of
> > the letter. Anyone else who got a Droid know what it looks like, where
> > it was packed or what it said?
>
> I too received a Droid and I didn't get a "Read Me First" leaflet.  Not sure
> what channel to go through to activate this thing so I can get the 2.1
> update coming any day now.
>
> Justin

-- 
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 import music into Android library

2010-04-22 Thread Y Kim
Hello, I would like to know how can I import songs from a web service
into Android library without having to download the file into sdcard.
I have all the data from the web service but I do not know how to
integrate the tracks into Android database. My idea is not to have to
download the files, but playing them on streaming using the music
player. Do I need to download the tracks to the sd card and then
Android does all the stuff?

Thanks 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


Re: [android-developers] XMPP service, jabber , push notification

2010-04-22 Thread Ismael Bejarano
Hi,

On Wed, Apr 21, 2010 at 5:17 AM, SLY  wrote:
> Hi,
> I am currently working on a project which requires a server to request
> data from the devices which are currently connected to the server.
> Meaning, first the server finds out which devices are connected to the
> server and then sends an application specific message to the client
> device which should wake certain functionality present on the client,
> like for example send out its current location.
>
> I was looking into XMPP service which looked promising since it works
> as a PUSH notification. The  in XMPP can be used to check if
> the device is currently connected and has subscribed to the server.
> Since every android user has a gmail account, I was thinking of using
> the gmail xmpp service to connect /subscribe to the server. Then send
> specific message to the client, i.e x...@gmail.com. But if a message is
> sent this way the client app gets the message as well as the native
> gtalk client. So how do I go about intercepting this so that it
> doesn't show up on the gtalk client but my app still gets it.
>
> I want the PUSH notification to work, not PUSH.
>
> Please do comment on the above approach. If there is another way to do
> this, please do suggest.
>
>
> - SLY
>

Your situation is addressed in XMPP standards [1], each jabber id
includes a resource modifier, such that you can connect from multiple
clients (or from a service). So if you login with
ro...@example.org/myservice, then the server's messages to
ro...@example.org/myserive, should only be addressed to you
(optionally you can set a low priority).

Well at least that is what the specs says, it can be that gtalk server
implementation differ in some details. In any case you can use other
public server, or provide your own.

Regards,
Ismael

[1] http://xmpp.org/rfcs/rfc3920.html & http://xmpp.org/rfcs/rfc3921.html

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


[android-developers] Re: Unparsed aapt error

2010-04-22 Thread Christopher
Doing "Project" > "Clean" in Eclipse helped clear up the problem for
me.

-- 
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] Change color of progressbar

2010-04-22 Thread vandy
hi

Is there any way to change the color of indeterminate progressbar.

i made changes in the progress_indeterminate.xml and saved it my
projects drawable folder and tried to set
progressBar.setProgressDrawable(R.drawable.progress_indeterminate)

but still the color did not change. it uses the default color.

Any help on 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] Re: geo fix in emulator - strange pattern in gps fix timestamps

2010-04-22 Thread f...@zcom.it
Hi,

The problem is that location.getTime() returns UTC timestamp.
You have to convert it in a GMT timestamp.

If you already solved the problem could you please post the solution.
thx

regards Fabi

On 12 Apr., 20:54, Lukasz  wrote:
> Hi,
>
> I am trying to implement some functionality using GPS in Android
> emulator. To set my current position I am using geo fix command
> invoked after telneting to localhost 5554. To fulfill my requirements,
> after receiving GPS location I am checking its timestamp (using
> location.getTime()) to invoke some action when location fix is older
> than 10 minutes.
>
> My intuitive assumption was that the timestamp is set to the time of
> invoking geo fix command in the emulator. Unfortunately it works in
> the following way: year, date and month are set for the current day,
> hours and minutes are zeroed and seconds are set as a sequence number
> increased after every invocation of geo fix command starting from 0
> (from midnight). For example when running my application today i get
> the following values:
>
> I invoke geo fix for the 1st time and location.getTime() returns:
> 127103040, which means Mon, 12 Apr 2010 00:00:00 GMT
> I invoke geo fix for the 2nd time and location.getTime() returns:
> 1271030401000, which means Mon, 12 Apr 2010 00:00:01 GMT
> I invoke geo fix for the 3rd time and location.getTime() returns:
> 1271030402000, which means Mon, 12 Apr 2010 00:00:02 GMT
> I invoke geo fix for the 4th time and location.getTime() returns:
> 1271030403000, which means Mon, 12 Apr 2010 00:00:03 GMT
> ...
>
> This behaviour means that I can test positive scenario in my
> application only in first 10 minutes after midnight everyday, which is
> quite inconvenient for me ;) Any idea how can I solve that problem?
>
> Thank you for your help,
> Lukasz.

-- 
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: Seeding program phones. Anyone tried to activate their droid on a private account yet?

2010-04-22 Thread BradVoy
My phone just arrived today.  I haven't tried calling Verizon yet to
activate it.  But I found it confusing that the 2 page from Google
that came with the phone say "Please refer to the enclosed "Read Me
First" leaflet from Verizon Wireless for instructions to activate the
enclosed Droid."  There was no "Read Me First" leaflet from Verizon in
my package.


On Apr 21, 11:39 am, David Orriss Jr  wrote:
> Apparently I'm unable to activate the one I received because it's
> "pending activation on another account".  And I have to have Google
> release it from that account to activate it.
>
> So, what do I do now?
>
> --
> David Orriss Jr.
>
> My blog:http://www.codethought.com/blog
>
> --
> 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 
> athttp://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] Android device VID/PIDs

2010-04-22 Thread kurt
Hi all,
Perhaps this is a misplaced question better suited for some other
forum, but I'm going to take my chances anyhow: Any idea where I can
find a credible and comprehensive list of VID/PIDs for Android
devices?

Any advice is welcome. 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] Allow only decimal numeric input and use phone soft keyboard?

2010-04-22 Thread Watter
I am trying to do something that I thought would be simple, yet I
still haven't found the right approach.

I have a EditText field that should only accept unsigned decimal
entries. Using android:inputType="numberDecimal" in my layout xml file
achieves this, however the soft keyboard that is raised with this
inputType is the standard keyboard but just uses the alternate view
with the number row on top. This is far from ideal for a field that
only allows numbers. A much better soft keyboard for numeric entry is
the "phone" one. It has all of the numbers and a decimal. Perfect!!
Well, except that for the life of me I cannot figure out how to use
both the phone keyboard AND allow only numeric entry. I've tried
everything I can think of but if I use the phone soft keyboard then
the input field also allows things like "(" and any of the other
symbols available on that keyboard.

Is there any way to get the nice big numeric buttons of the phone
keyboard along with only allowing decimal entry?

-- 
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] extending soft-keyboard with language switching support?

2010-04-22 Thread Henrik
I just got my HTC Desire with Android 2.1, and the first problem I'm
running into a lot is when using the visual keyboard.  Being
multilingual and having friends who only speak one particular
language, there's no single 'correct' input language setting for the
word prediction feature, so I started looking into how much work it
might be to extend the keyboard with two rather basic, though
essential, features:

1)  Showing the current language selection, so that I don't have to
type stuff, getting it mis-corrected, then discover the language
setting must be wrong, go into the settings, select to change
language, select language, etc... until I get back, erase the old text
and start over. That gets old real quick..

2)  Being able to simple change whatever language is used for the word
prediction by just having a button on the keyboard doing that
directly, i.e. a button that just cycles through the 'relevant'
languages with the key label showing which is currently active.

Improving it even further, one might imagine:

3)  Having a per contact setting, noting the word-prediction language
that should be used when communicating with that user.

But searching through the docs, I'm slowly coming to the realization
that the input text language setting may not even be available to be
changed outside the system settings dialog, making this impossible to
implement - is that correct?

Regards,
Henrik Gram

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

2010-04-22 Thread LTMOD
Other than DroidDraw, are there any tools that can help with Android
GUI design?  Are there any official tools planned, or web sites that
cater to this?

It seems that it should be easy enough to put together a visual tool
to do UIs, but I can't seem to find one.. and of course, while
starting out, and not aware of all of the properties available,
designing a "stunning" UI is less than easy.

Thanks in advance,
Alex T.

-- 
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: What happens with the registered broadcast receivers after the application is killed?

2010-04-22 Thread mmonibi
What if my receiver is registered for the ACTION_BATTERY_CHANGED
intent?

As stated in the documentation, "You can not receive this through
components declared in manifests, only by explicitly registering for
it with Context.registerReceiver()."

Is there anyway to make sure my receiver is always registered for this
intent, even if the process is destroyed? Would it make a difference
if I used the application context when registering the receiver
instead of the activity context? (frankly, I still don't have a good
grasp of the context object and don't quite understand how the
application and activity contexts differ)

I know that I may be able to use the new battery related broadcasts
that have been added to API level 4, but I'm trying to stick to level
3 to ensure compatibility with all devices.

Thanks!


On Mar 26, 6:21 am, Tughi  wrote:
> I had no idea I could do that with the components declared in the
> manifest.
>
> Thanks a lot!
>
> On Mar 25, 5:23 pm, Mark Murphy  wrote:
>
>
>
> > Tughi wrote:
> > > Hi guys,
> > > I want to optimize the CPU usage in my application.
>
> > > Currently my application is configured to always receive the
> > > CONNECTIVITY_CHANGED action to force an update if the previous update
> > > failed because there was no connectivity.
> > > What I don't like about this is that the broadcast receiver gets to be
> > > called too many times although it is not needed.
>
> > > I was thinking to register my broadcast receiver only if an update
> > > failed using the Context.registerReceiver(BroadcastReceiver receiver,
> > > IntentFilter filter) method. But I'm not so sure if this is a good
> > > idea.
>
> > > I'm concerned that if my application is evicted from memory the
> > > broadcast receiver will be unregistered or lost and my application
> > > will not be notified about the future CONNECTIVITY_CHANGED actions.
>
> > > The update is done in a short lived service. So if the update fails,
> > > the service will register the broadcast receiver just before it ends
> > > its execution time.
>
> > > Can somebody explain what happens to my broadcast receiver after the
> > > application is evicted from memory?
>
> > You will leak memory, as your BroadcastReceiver will keep the component
> > in RAM (even if it was destroyed) until such time as Android terminates
> > the process.
>
> > You might consider going with a manifest-registered receiver, but
> > enabling and disabling the component as needed via PackageManager.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Android Training...At Your Office: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


[android-developers] Ringtone picker calls onActivityResult() too early

2010-04-22 Thread hmph
I'm using the RingtoneManager to pick a ringtone. However, my
onActivityResult() method is getting invoked too soon. As soon as the
ringtone picker dialog appears, onActivityResult() is invoked with a
non-RESULT_OK result code, even before I select any ringtones or
select the "OK" button. Then, after choosing a ringtone and selecting
"OK", onActivityResult() doesn't get called any more.

Here are the pertinent sections of my code. Note that this.toast() is
just a wrapper to send a toast.

private boolean menuChoice(MenuItem item) {
switch (item.getItemId()) {
case 0:
this.ringtonePicker();
return (true);
}
return (false);
}

public void ringtonePicker() {
Intent intent = new
Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, "Select
ringtone");
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT,
false);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT,
true);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE,
RingtoneManager.TYPE_NOTIFICATION);
this.startActivityForResult(intent, 999);
}

@Override
public void onActivityResult(int requestCode, int resultCode,
Intent intent) {
this.toast("onActivityResult: " + requestCode + ", " +
resultCode);
if (resultCode != RESULT_OK) {
this.toast("result code not " + RESULT_OK);
return;
}
if (requestCode == 999) {
this.toast("request code is OK");
Uri uri =
intent.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
if (uri != null) {
String ringTonePath = uri.toString();
this.toast("ringtone path: " + ringTonePath);
}
else {
this.toast("no ringtone path");
}
}
else {
this.toast("request code not OK");
}
super.onActivityResult(requestCode, resultCode, intent);
}

The only toast messages I get are "onActivityResult: 999, 0" and
"result code not -1", and these occur when the ringtone picker first
shows up, and before I pick any ringtones or select "OK".

The onActivityResult() method doesn't get called any more, even after
I pick a ringtone and select "OK".

What could I be doing wrong which would cause onActivityResult() to be
called with a failure before I even pick a ringtone? ... even though
the ringtone picker shows up properly?

Thanks 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] Tabwidget graphical issues. Showing a thick white line??

2010-04-22 Thread Stephen
Having just moved to an Android 2.1u1 HTC Desire from an Android 1.5
HTC Hero, I've noticed that there a weird behaviour from TabWidget in
that it shows a thick white line under the tabs instead of what I
think it should do.  Difficult to explain so here are two URLs:

http://android.esstec.co.uk/images/how_it_should_be.png
http://android.esstec.co.uk/images/what_it_is.png

Initially the tabwidget looks like the first picture but when you do
anything with it (change tabs for example), it looks like the second.

These screenshots are from the Google provided API demos so I don't
think it's my code, but I wanted to paste here before filing a bug.
Anyone got any ideas?

Thanks,

Stephen

-- 
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] ListActivity does the ArrayAdapter class have to be an Inner Class

2010-04-22 Thread David Parry
Question:

I have a Concrete class that implements ListActivity in this class I
have an InnerClass extends ArrayAdapter. This came from an example
and works great i.e. displays my list of items on the screen.

The problem is that I tried pulling out the InnerClass and use it as a
standalone Concrete class. So now I pass in the array of Items i.e T[]
to the constructor but when I set the ListActivity classes
setListAdapter(my pulled out InnerClass); the screen comes up empty?

So is this by design that ArrayAdapter has to be an InnerClass in the
ListActivity class?

If no then how can i get the list to display and update.

Thank you,
David

-- 
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] Scrolling a dynamically filled AbsoluteLayout.

2010-04-22 Thread rocrail
Hi,

I'm searching for a few days now but I cannot find a scrolling
solution for the following layout:

http://schemas.android.com/apk/res/
android"
  android:id="@+id/levelScrollView"
  android:background="@drawable/solid_white"
  android:layout_width="fill_parent"
android:layout_height="fill_parent" >
  
  
  
  


The 1024px are set to test but should be dynamically set to the needed
width and height during runtime.
Vertically scrolling works, but I do not get it horizontally scrolling
too.
See the screen shot of the 'Layout level' view in action:
http://wiki.rocrail.net/doku.php?id=androc-intro-en#qvga_gallery

Any advice? Or do I have a design problem in this layout?

Best regards,
Rob Versluis.
http://www.rocrail.net

-- 
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] How many Android phones have touchscreens?

2010-04-22 Thread Aditya
Amost all devices released with android OD in it will support touch screen
functionality.

On Wed, Apr 21, 2010 at 2:54 PM, angushir...@googlemail.com <
angushir...@yahoo.co.uk> wrote:

> Hi all,
>a simple question from a beginner - how many of Android phones
> support touchscreen applications?
>
> Angus
>
> --
> 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] Small mistake in Android developers reference?

2010-04-22 Thread Daniel Wagner
Hi everyone,

it seems that there is a small mistake in the Android developers
reference. I was listening to ConnectivityChange events
(android.net.conn.CONNECTIVITY_CHANGE) when I saw that the supplied
NetworkInfo behaves differently than specified. It says that the
DetailedState of "scanning" maps to "connecting":http://
developer.android.com/reference/android/net/NetworkInfo.State.html
However, that is not true. "scanning" is mapped to "disconnected", as
can be easily seen in core/java/android/net/NetworkInfo.java (http://
android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/
java/android/net/NetworkInfo.java).

I believe the documentation should be updated to reflect this.

Best,
Daniel

-- 
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] Soft Keyboard imeAction 'next' not working with AutoCompleteTextView

2010-04-22 Thread Chris66
Hello,

  I have a layout with four AutoCompleteTextViews and the next button
on the soft keyboard doesn't work on either of them. I've tried
setting android:imeOptions and android:nextFocusRight/Down but it was
of no use. I also tried removing the FocusChanged/EditorAction/
TextChanged listeners of the views without success. Here is how one of
the views looks like:

numberTextView =
(AutoCompleteTextView)v.findViewById(R.id.street_number);
numberTextView.setOnFocusChangeListener(new OnFocusChangeListener() {
public void onFocusChange(View view, boolean hasFocus) {
if (hasFocus){  crossingText.setText("");  focused =
null;  recentList.setAdapter(null); }
}
});



Could anyone give me some advice, please?

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] EXTRA_SHORTCUT_NAME ignored in Android 2.1

2010-04-22 Thread Fabio Collini
Hi, some users are reporting me a strange issue on some device
(Samsung Moment M900 and Motorola Droid) with Android 2.1. With my app
(Apps Organizer) it's possible to create an home shortcut, when I
create it I set a custom EXTRA_SHORTCUT_NAME. After phone reboot the
label of the shortcut is reset to launched Activity label.
The same user has reported that if he use anyCut and create a shortcut
after reboot it has the wrong label. For example if he create a label
to Calculator with custom label "abc" after reboot the shortcut has
the default label "Calculator".
Has someone the same issue?
Regards, Fabio Collini

-- 
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 overlay text on video from camera (using Mediarecorder)

2010-04-22 Thread Сергей Мацак
How to overlay text or any other object(image or draw something)
during recording video from camera using Mediarecorder ?
For example I need to record video with date and time over.
Is it any way to overlay or draw something ?

-- 
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 scroll/move text within TextView on home screen widget ?

2010-04-22 Thread Ravi
Hi All,

I have created a widget to be displayed on android emulator's home
screen to display some long text. In my main.xml layout file i've
already set TextView properties like singleLine="true",
ellipsize="marquee", focusable="true" etc, but still when my widget is
displayed on home screen text does not move/scroll.


- main.xml layout file 


http://schemas.android.com/apk/res/
android"
android:layout_width="fill_parent"
androidrientation="vertical"
android:layout_gravity="center"
android:layout_height="wrap_content" android:background="@drawable/
background">




- end of main.xml layout file 



- My WidgetProvider.java file --

package com.android.weatherdata;

import android.util.Log;
import android.widget.RemoteViews;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.Context;
import android.content.Intent;
import android.app.PendingIntent;

public class WeatherWidget extends AppWidgetProvider{

private static final String TAG = "WeatherWidget";

@Override
public void onUpdate(Context context, AppWidgetManager
appWidgetManager, int[] appWidgetIds)
{
Log.d("WEATHER-WIDGET", "onUpdate(): ");

final int N = appWidgetIds.length;
// Perform this loop procedure for each App Widget that belongs to
this provider
for (int i=0; ihttp://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-04-22 Thread Lim Sim
So far all the suggestions/rumours of why we haven't got the phone have been
on the negative side.  How about a positive one.  Like...maybe the phones
are delayed because they want to get Froyo on it before sending it out to
us.

On 21 April 2010 09:37, Josef Pfleger wrote:

> I am from Austria and have not yet received a phone either. Will be a
> nice surprise if/when it gets here.
>
> On Apr 20, 8:51 pm, Chister Nordvik  wrote:
> > Couldn't agree more. How many people in here have contacted Google,
> > FedEx & Brightpoint just because of lack of information from Google? A
> > simple mail saying: "Sorry, you'll get your phone in May" would have
> > been enough.
> >
> > And don't get us started on the Android Market! The petition (
> http://www.petitiononline.com/androidm/) has most of it covered I guess.
> Even
> > though it seems to be ignored by any official comment then we can hope
> > that Google soon launches a brand new marketplace where all our wishes
> > have come through!
> >
> > -Christer
> >
> > On Apr 20, 10:17 am, Ove Olavgaard  wrote:
> >
> >
> >
> >
> >
> > > > It is, after all a free gift
> >
> > > So what? If only the developers in US got a free phone that would not
> bother
> > > me.
> > > I got a mail from Google saying they would give me a free phone in 2-4
> > > weeks!
> > > Great Then I dont have to purchase the phone Ive orginally planned,
> and
> > > I can test my new app  on yet another device.
> > > Well... After 7 weeks, no words and no phone, I had to buy the planned
> phone
> > > anyway.
> >
> > > If they know its been problems with delivery of all phones outside US,
> so
> > > send the developers a mail. They got all the e-mail-adresses.
> > > Should be an easy task.
> >
> > > >Ove, i understand your pain, it took a while for paid apps to get
> > > >here, and as an ex-South African, they don't even have paid app
> > > >downloads over there, so its bad.
> >
> > > Well, its the same same for most European countries. No paid apps
> available
> > > for download.
> > > It wouldn't be a problem if Google said that it would support Merchang
> > > Accounts and paid apps in 2011.
> > > Then we will at least know, and can plan according to that. The
> situation
> > > now is just silence for over 2 years.
> > > That is not taking your developers or customers seriously.
> >
> > > 2010/4/20 dgoemans 
> >
> > > > *stands up*
> >
> > > > Hi, my name's David, i'm in the Netherlands, and i haven't had a
> Nexus
> > > > One for 7 weeks now.
> >
> > > > Seriously tho, i think we need to be calm and strong. They'll arrive
> > > > ( hopefully before i move! ) and we just need patience. It is, after
> > > > all a free gift, which after 2 years as a day job iPhone dev, i can
> > > > say is more than i've been given before.
> >
> > > > Ove, i understand your pain, it took a while for paid apps to get
> > > > here, and as an ex-South African, they don't even have paid app
> > > > downloads over there, so its bad. That said, it's worth keeping in
> > > > mind that there are serious region restrictions on these things
> > > > ( unfortunately - i really hate that ). For example, look at
> > > > Microsoft's Xbox Live Indie Games, which is only accessible in a
> small
> > > > handful of countries to download for, and only a few more than that
> > > > can dev for it. This is due to (stupid) global financial
> restrictions.
> > > > Remember that it took Apple many years to get iTunes working across
> > > > the globe.
> >
> > > > On Apr 19, 10:24 pm, JDS  wrote:
> > > > > I would be very surprised if they do not arrive. If the intention
> > > > > never was to send any to europe, why would Google confirm that they
> > > > > will arrive over and over again? What is obvious is that they had,
> or
> > > > > still have, some major issues but I don't think we will never know
> > > > > what kind.
> >
> > > > > In the last response I got, they do confirm they had some issues
> and
> > > > > that I should (they don't use the word "will receive" anymore ;-) )
> > > > > receive my phone in 2 weeks, which will be on April 28 and I will
> wait
> > > > > patiently until then before I will contact them again.
> >
> > > > > On 19 Apr, 21:05, gambiting  wrote:
> >
> > > > > > Well,with each day I'm getting convinced more and more that the
> phones
> > > > > > will not arrive in europe,and it was only for the US.
> > > > > > But on the other side, we didn't pay anything for these phones,
> so it
> > > > > > doesn't hurt to wait - maybe one day there we will get them?
> > > > > > I just hope that people from europe will share info here if they
> > > > > > receive their phones.
> >
> > > > > > On 19 Kwi, 18:33, TomTasche  wrote:
> >
> > > > > --
> > > > > 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-de

  1   2   3   >