[android-developers] Simple Level App

2008-11-03 Thread joshbeck

Ok, so I wrote an app tonight that reads the 'Roll' data from the
compass and levels a line
on the screen. (It's on marketplace. It's also here: 
http://www.imakmud.com/level.apk
) --Source Code Below:

Here's how it works:
 -Basically every time the compass data changes, the canvas is
rotated and redrawn.  It's very fast I think.

Problems I'm experiencing:

What I've got there is a single view with a single canvas. I'd like to
incorporate some
static elements like a pointers that don't rotate with the rest of the
canvas.
I experimented with drawables, but I'm just not sure that's the
answer.

So, I'm looking to have multiple graphics on the screen. One rotates,
the others don't.
Any direction is appreciated. --God this device is awesome!

Here is the Simple Level Code with comments as I understand the
program to be working:
(Please correct me where I am wrong.) I hope it helps other, and I
hope other developers are
able to chime in.

-Look for the //LOOK HERE comment.-


--ALL IMPORTS CORRECT--

public class level extends Activity {

private static final String TAG = "Compass";
private Bitmap mBitmap;
private SensorManager mSensorManager;
private SampleView mView;
private float[] mValues;

//SensorListener is called by the SensorManager object returned in
OnCreate

private final SensorListener mListener = new SensorListener() {

public void onSensorChanged(int sensor, float[] values) {
if (Config.LOGD) Log.d(TAG, "sensorChanged (" + values[0]
+ ", " + values[1] + ", " + values[2] + ")");
  //mValues contains direction, yaw, and roll.
   mValues = values;
if (mView != null) {
 mView.invalidate();
}
}

public void onAccuracyChanged(int sensor, int accuracy) {
// TODO Auto-generated method stub

}
};

@Override
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
mSensorManager =
(SensorManager)getSystemService(Context.SENSOR_SERVICE);
mView = new SampleView(this);

//SampleView(); is called here. So is onDraw?
//Question: if a view is defined here through an xml file, is
onDraw still called by default?
// Is that even right to assume onDraw is called here?

 setContentView(mView);
}

@Override
protected void onResume()
{
if (Config.LOGD) Log.d(TAG, "onResume");
super.onResume();
mSensorManager.registerListener(mListener,
SensorManager.SENSOR_ORIENTATION,
SensorManager.SENSOR_DELAY_GAME);
}

@Override
protected void onStop()
{
if (Config.LOGD) Log.d(TAG, "onStop");
mSensorManager.unregisterListener(mListener);
super.onStop();
}

private class SampleView extends View {
private Paint   mPaint = new Paint();
private PathmPath = new Path();
private boolean mAnimate;
private longmNextTime;


public SampleView(Context context) {
super(context);
//Maybe onDraw is called at this point?

}

//Because mView.invalidate is called in SensorListener, we can count
on onDraw everytime
//there is a change of state.
@Override protected void onDraw(Canvas canvas) {
Paint paint = mPaint;

canvas.drawColor(Color.BLACK);

paint.setAntiAlias(true);
paint.setColor(Color.BLACK);
paint.setStyle(Paint.Style.FILL);


if (mValues != null) {
float rotateme = mValues[2];

   //LOOK HERE
  //Can I put two canvases in action?
  //Should I use a drawable for two separately rotating
objects?
  //??? --Any advice is appreciated.

canvas.rotate(rotateme, 160, 240 );
}
mBitmap = BitmapFactory.decodeResource(getResources(),
R.drawable.line2);
canvas.drawBitmap(mBitmap, 0, 0, mPaint);

}

@Override
protected void onAttachedToWindow() {
mAnimate = true;
super.onAttachedToWindow();
}

@Override
protected void onDetachedFromWindow() {
mAnimate = false;
super.onDetachedFromWindow();
}
}
}







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



[android-developers] Showing the options menu

2008-11-03 Thread Mark Wyszomierski

Hi,

How can we programatically show the options menu for an Activity? It
seems:

Activity.openOptionsMenu()

would do it, but it has no effect when I call it. I put a break point
in onPrepareOptionsMenu() expecting it to be called sometime
afterwards, but nothing in there either. I'm using the release windows
Android SDK. Is there some special method of calling it?

Sorry if this is a repeat, I thought I had posted this question
earlier but I cannot seem to find it any long to follow up on it,

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



[android-developers] How to set colors to table borders?

2008-11-03 Thread for android
How do i set a color to the border to a table in the layout example.

Is there something called border-color???







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



[android-developers] Re: camera events

2008-11-03 Thread spackest

Well, it actually looks like I should implement
android.hardware.Camera.PictureCallback.  However, when I implement
onPictureTaken, I don't get a callback.  Guessing I need to register
somewhere?  I tried RemoteCallbackList to no avail.

Thoughts?

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



[android-developers] Re: Can't return View derived class for BaseExpandableListAdapter? (used to work)

2008-11-03 Thread Mark Wyszomierski

Hi Jason,

Thanks for the help, I'll post the stack trace below. Maybe I'm
creating the view incorrectly. I tried something like:

public class MyChildView extends LinearLayout
{
public MyChildView(Context context)
{
super(context);
}
}

// Inside my BaseExpandableListAdapter extended class:
public View getChildView(int groupPosition,
 int childPosition,
 boolean isLastChild,
 View convertView,
 ViewGroup parent)
{
MyChildView mcv = new
MyChildView(MyAdapter.this.getContext());
mcv.setLayoutParams(new
LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT));
mcv.setOrientation(LinearLayout.HORIZONTAL);
mcv.addView(new ImageView(...));
mcv.addView(new TextView(...));
return mcv;  // <-- exception after return.
}

Returning a TextView like in the API sample works ok. Here's the stack
trace:

11-04 02:01:23.602: ERROR/AndroidRuntime(190): Uncaught handler:
thread main exiting due to uncaught exception
11-04 02:01:23.851: ERROR/AndroidRuntime(190):
java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.widget.ListView.setupChild(ListView.java:1646)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.widget.ListView.makeAndAddView(ListView.java:1619)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.widget.ListView.fillDown(ListView.java:601)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.widget.ListView.fillSpecific(ListView.java:1189)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.widget.ListView.layoutChildren(ListView.java:1454)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.widget.AbsListView.onLayout(AbsListView.java:937)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.view.View.layout(View.java:5637)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.widget.FrameLayout.onLayout(FrameLayout.java:294)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.view.View.layout(View.java:5637)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.widget.LinearLayout.layoutVertical(LinearLayout.java:999)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.widget.LinearLayout.onLayout(LinearLayout.java:920)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.view.View.layout(View.java:5637)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.widget.FrameLayout.onLayout(FrameLayout.java:294)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.view.View.layout(View.java:5637)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.widget.LinearLayout.layoutVertical(LinearLayout.java:999)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.widget.LinearLayout.onLayout(LinearLayout.java:920)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.view.View.layout(View.java:5637)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.widget.FrameLayout.onLayout(FrameLayout.java:294)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.view.View.layout(View.java:5637)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.view.ViewRoot.performTraversals(ViewRoot.java:771)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1103)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.os.Handler.dispatchMessage(Handler.java:88)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.os.Looper.loop(Looper.java:123)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
android.app.ActivityThread.main(ActivityThread.java:3742)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
java.lang.reflect.Method.invokeNative(Native Method)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
java.lang.reflect.Method.invoke(Method.java:515)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:739)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
11-04 02:01:23.851: ERROR/AndroidRuntime(190): at
dalvik.system.NativeStart.main(Native Method)


Thanks



On Nov 4, 12:47 am, "Jason Parekh" <[EMAIL PROTECTED]> wrote:
> Hi Mark,
>
> I just tried as you suggested with the ExpandableList1 sample, and I don't
> see any exceptions.  Can you print the stack of the exception you're seeing?
>
> You can browse the source athttp://git.source.android

[android-developers] Re: SDK 1.0: what about multipart entities

2008-11-03 Thread Declan Shanaghy

Im having a problem adding hese jars to my project for multipart form
posts.
I added commons io no problem.
But when i add httpmime or mime4j i dont receive the BOOT_COMPLETED
Intent.

This seems very strange, why would adding these jars affect receiving
this intent?



On Sep 28, 5:10 am, gjs <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Hmm, I think these jars are packaged into the .apk, I can see lot of
> references inside classes.dex to these libraries and the size of the
> generated .apk and .dex files would seem to indicate that this true.
>
> I would still like an answer re correct way to do this in V1.0.
>
> Google/Justin/Megha any assistance greatly appreciated.
>
> Regards
>
> On Sep 27, 2:28 pm, shotwave <[EMAIL PROTECTED]> wrote:
>
> > gjs, yeap it worksin the eumlator, but I wonder if it will work on the
> > real phone since emulator uses your classpath with the dedicated jars,
> > but these jars are not packed into apk I guess, so they might be not
> > available to the real world phone app
>
> > On Sep 26, 7:14 pm, gjs <[EMAIL PROTECTED]> wrote:
>
> > > I have found that the method described for V0.9 still works ok in
> > > V1.0...
>
> > > On Sep 26, 4:11 pm, gjs <[EMAIL PROTECTED]> wrote:
>
> > > > Hi,
>
> > > > Does this mean that we still have to use the method described for
> > > > V0,9 ?
>
> > > > As discussed in -
>
> > > >http://groups.google.com/group/android-developers/browse_frm/thread/e...
>
> > > > Anybody ?
>
> > > > Regards
>
> > > > On Sep 25, 3:48 pm, shotwave <[EMAIL PROTECTED]> wrote:
>
> > > > > umm, no, I do not tink that this affects te browser, it is all about
> > > > > the http clien api included into sdk
>
> > > > > On Sep 25, 12:44 am, "Shane Isbell" <[EMAIL PROTECTED]> wrote:
>
> > > > > > Does this mean that the browser itself also no longer 
> > > > > > supportsmultipart
> > > > > > content?
>
> > > > > > Thanks,
> > > > > > Shane
>
> > > > > > On Wed, Sep 24, 2008 at 9:38 PM, shotwave <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Hi,
> > > > > > > theMultipartentities were removed from http commons, so in order 
> > > > > > > to
> > > > > > > use them in SDK 0.9 we had to use external jars  apache-
> > > > > > > mime4j-0.3.jar, commons-io-1.4.jar, httpmime-4.0-alpha4.jar. This 
> > > > > > > was
> > > > > > > was fine for beta and android emulation. But now the phone is 
> > > > > > > here,
> > > > > > > the SDK is released and not beta anymore and it looks like the
> > > > > > >multipartentities API is not there. I wonder how this is intended 
> > > > > > >to
> > > > > > > work? Do we need to implement the http post for forms ourselves? 
> > > > > > > and
> > > > > > > advice anybody?

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



[android-developers] Better Aim & Virtual Keyboard

2008-11-03 Thread [EMAIL PROTECTED]

HERE ARE SOME GREAT IDEAS TO MAKE THUS PHONE THE BEST OUT THERE

1. AIM NEEDS TO IMPROVE DRAMATICALLY... MAKE A SIDEKICK VERSION OF AIM
ON THE G1 AND THATS IT.. THAT AIM IS THE BEST AND THIS PHONE IS THE
BEST AND NEEDS THE BEST AIM FOR IT.

2. ALSO A TOUCH KEYPAD ON THE SCREEN SO I WON'T HAVE TO CONSTANTLY
OPEN UP THE PHONE. AFTER A WHILE IT GETS KINDA ANNNOYING AND WOULD BE
NICE IF WE HAD A OPTION TO TYPE JUST LIKE THE IPHONE

3. PUT THIS THINGS INTO AFFECT AND THIS PHONE WOULD BE AWESOME
WE G1 CUSTOMERS HAVE SPOKEN !!! NOW MAKE IT HAPPEN!!

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



[android-developers] Can I build Android source code in RedHat Enterprise Linux Server?

2008-11-03 Thread Jerry

Can I build Android source code in RedHat Enterprise Linux Server?
Does anyone success the build on Redhat Linux?

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



[android-developers] disable item of list view in Alert Dialog

2008-11-03 Thread Justin

I want to disable some items in listview which is in the Alert Dialog
I implemet an Adapter and in getView() of Adapter I set item to
disable
but it is not work, how can I make this goal?

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



[android-developers] camera events

2008-11-03 Thread spackest

I run a free hosting web site which has functionality for emailing
photos to your site and having them show up on the web.  I would like
to write an android app that allows a user to authenticate to their
free website, then I would like to receive an event each time a photo
is saved.  I am hoping that I would then have enough information to
then access the photo and send it off to the user's site.

Just wondering how I can register to receive camera capture events,
and then get to the recently captured images.

Thanks,
Earl

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



[android-developers] Re: Drawing on MapView

2008-11-03 Thread Prestes

Hi all,

How do I that when every GeoPoint displays a description ?
can someone help me?

On 29 set, 21:11, Prash <[EMAIL PROTECTED]> wrote:
> Thanks Peter for the post! I was lost with getting a basic Map display
> - turns out its an issue with the "uses-permission" in the
> AndroidManifest.xml file which seems to be a fairly new development.
>
> In the Location based API documentation, it would help if they add the
> fact that these permissions should be setup before you can do
> something useful.
>
> - Prash
>
> On Sep 29, 2:21 am, Peter Stevenson <[EMAIL PROTECTED]> wrote:
>
> > Peter Wrote
> > hope this help   if not email me again  and I see if I  can  help
> > Also add a screen shot
>
> > You should be able to load data on to your map  based on this code
> > use a dbHelper Class to help with database control
>
> > Peter
>
> > package com.cyberspace.testing.out;
>
> > import android.graphics.Canvas;
> > import android.graphics.drawable.Drawable;
>
> > import java.io.DataOutputStream;
> > import java.io.OutputStream;
> > import java.lang.reflect.Array;
> > import java.net.HttpURLConnection;
> > import java.net.URL;
> > import java.util.Vector;
> > import org.apache.http.protocol.HTTP;
> > import android.os.Bundle;
> > import android.view.*;
> > import com.google.android.maps.GeoPoint;
> > import com.google.android.maps.MapActivity;
> > import com.google.android.maps.MapView;
>
> > public class prueba extends MapActivity {
>
> >      WhereAmIOverlayWhereAmIOverlay;
> >      View zoomView;
> >      Drawable defaultMarker;
> >      MapView map;
>
> >        GeoPoint Point = new GeoPoint((int) (-1.416402 * 100), (int)
> >            (-78.025078 * 100));
>
> >        GeoPoint Point1 = new GeoPoint((int) (-1.616402 * 100), (int)
> >                (-78.025078 * 100));
> >        GeoPoint Point2 = new GeoPoint((int) (-1.516402 * 100), (int)
> >                (-78.025078 * 100));
> >        GeoPoint Point3 = new GeoPoint((int) (-1.716402 * 100), (int)
> >                (-78.025078 * 100));
>
> >         @Override
> >         public void onCreate(Bundle savedInstanceState) {
> >             super.onCreate(savedInstanceState);
> >             setContentView(R.layout.main);
> >             map = (MapView) findViewById(R.id.map);
> >             defaultMarker =
> > getResources().getDrawable(R.drawable.mappin_red);
> >             defaultMarker.setBounds(0,
> > 0,defaultMarker.getIntrinsicWidth(), defaultMarker.getIntrinsicHeight());
>
> >        //     map.getController().setCenter(Point);
> >          //  map.getController().animateTo(Point);
> >         //    map.displayZoomControls(false);
> >         //    map.getController().setZoom(7);
> >          }
> >     public boolean onKeyDown(int keyCode, KeyEvent event) {
> >             switch(keyCode){
> >             case KeyEvent.KEYCODE_I:
> >                     int level = map.getZoomLevel();
> >         map.getController().setZoom(level + 1);
> >                     return true;
> >             case KeyEvent.KEYCODE_O:
> >                     int level2 = map.getZoomLevel();
> >         map.getController().setZoom(level2 + 1);
> >                     return true;
> >             case KeyEvent.KEYCODE_S:
> >                     map.setSatellite(true);
> >                     return true;
> >             case KeyEvent.KEYCODE_T:
> >                     map.setSatellite(false);
> >                     return true;
> >             }
> >             return false;
> >     }
>
> >     @Override
> >     public boolean onCreateOptionsMenu(Menu menu) {
> >     super.onCreateOptionsMenu(menu);
> >             menu.add(0,1,2, "My Location");
> >             //menu 1
> >             SubMenu sub1 = menu.addSubMenu(3, 2, 3,"Vistas");
> >             sub1.add(3,3,1, "Satelite");
> >             sub1.add(3,4,2, "Trafico");
> >             //menu 2
> >             SubMenu sub = menu.addSubMenu(2, 5, 1,"Zoom");
> >             sub.add(2,6,1, "In");
> >             sub.add(2,7,2, "Out");
> >             return true;
> >     }
> >     @Override
> >     public boolean onMenuItemSelected(int featureId, MenuItem item) {
> >     super.onMenuItemSelected(featureId, item);
> >     switch (item.getItemId()) {
> >     case 1:
> >        WhereAmIOverlay= newWhereAmIOverlay(this,defaultMarker);
> >         map.getController().animateTo(Point);
> >         map.getOverlays().add(WhereAmIOverlay);
> >         zoomView = map.getZoomControls();
> >         zoomView.setLayoutParams(new ViewGroup.LayoutParams
> >         (ViewGroup.LayoutParams.WRAP_CONTENT,
> >         ViewGroup.LayoutParams.WRAP_CONTENT));
> >         map.addView(zoomView);
> >         map.displayZoomControls(true);
> >            map.getController().setZoom(10);
> >            map.setClickable(true);
> >            map.setEnabled(true);
> >            map.invalidate();  
> >     return true;
> >     case 3:
> >             map.setSatellite(true);
> >     return true;
> >     case 4:
> >    

[android-developers] Executing a different android application through intents.

2008-11-03 Thread sush

Hello,

I am working in intents specifically,I found that there are intent
Actions such as DIAL, CALL, ANSWER etcwhich can be accessed by any
Android Application whenever required. Similar type of Actions I want
to create,  which I can access from a different project just passing
the Action Name, say for Example for a MediaPlayer Application the
customized Actions should be  ACTION_SelectSong, ACTION_Play,
ACTION_Stop etc rather then using Android APIs directly.

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



[android-developers] Updating /system/etc/hosts has no effect

2008-11-03 Thread Anders Rundgren

I managed through help from Google (thanks!) make /system writeable by
issuing adb remount.
I also managed updating /system/etc/hosts so that the magical address
10.0.2.2 would point to my hosts symbolic name.

ping to the magical address works
ping to the symbolic address does not - unknown host

What am I missing here?

Since these changes are only temporary, restart of the emulator is not
an option either.

Any help would be very much appreciated!

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



[android-developers] My new issue...How can I select a song from playlist available in phone (or) Emulator ...

2008-11-03 Thread yasmin afrose
Hi All,

Greetings!!!

I've played .mp3 songs using MediaPlayer in Android 1.0.

*My code was*:

1:* PrankActivity.java*
--

package com.aspire.android.prankapp;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
public class *PrankActivity* extends Activity {
/** Called when the activity is first created. */
@Override
   /* public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}*/
public void onCreate(Bundle icicle)
{
super.onCreate(icicle);
Intent i = getIntent();
String action = i.getAction();
if (action != null &&
action.equals("com.aspire.android.prankapp.WAKE_UP"))
{
setContentView(R.layout.splash);
//We'll need to start the music service here
 startService(new Intent
  ("com.aspire.android.prankapp.START_AUDIO_SERVICE"));
}
else
finish();
}
public boolean onKeyDown(int keyCode, KeyEvent event)
{
stopService(new Intent(
"com.aspire.android.prankapp.START_AUDIO_SERVICE"));
finish();
return true;
}
}

2 .* PrankSMSReceiver.java*

*

package* com.aspire.android.prankapp;

*

import* android.content.BroadcastReceiver;
*

import* android.content.Context;
*

import* android.content.Intent;
*

import* *android*.os.Bundle;
*

import* android.telephony.gsm.SmsMessage;
*

import* android.util.Log;
*

public* *class* *PrankSMSReceiver* *extends* BroadcastReceiver

{

@Override
*

public* *void* onReceive(Context context, Intent intent) {

// *TODO* Auto-generated method stub

*if*(!intent.getAction().equals("android.provider.Telephony.SMS_RECEIVED"))

{

*return*;

}

SmsMessage msg[] = getMessagesFromIntent(intent);

*for*(*int* i = 0; i < msg.length; i++)

{

String msgTxt = msg[i].getMessageBody();

*if* (msgTxt.equals("welcome"))

{ //0xBADCAT0_Fire_The_Missiles!

//Start the Activity

Log.*i*("Message Body : ",msgTxt);

Intent broadcast = *new* Intent("com.aspire.android.prankapp.WAKE_UP");

broadcast.addFlags(Intent.*FLAG_ACTIVITY_NEW_TASK*);

context.startActivity(*new* Intent(broadcast));

Log.*i*("StartActivity",broadcast.getAction());

}

}

}
*

private* SmsMessage[] getMessagesFromIntent(Intent intent)

{

SmsMessage retMsgs[] = *null*;

Bundle bdl = intent.getExtras();

Log.*i*("Intent :",intent.toString());

Log.*i*("Bundle : ",intent.getExtras().toString());

*try*{

Object pdus[] = (Object [])bdl.get("pdus");

retMsgs = *new* SmsMessage[pdus.length];

Integer len = pdus.length;

Log.*i*("PDU Length :",len.toString());

*for*(*int* n=0; n < pdus.length; n++)

{

*byte*[] byteData = (*byte*[])pdus[n];

retMsgs[n] = SmsMessage.*createFromPdu*(byteData);

}

}*catch*(Exception e)

{

Log.*e*("GetMessages", "fail", e);

}

*return* retMsgs;

}

}

 3*. PrankService.java*


*

package* com.aspire.android.prankapp;

*

import* java.io.IOException;

*

import* android.app.Service;
*

import* android.content.Intent;
*

import* android.media.MediaPlayer;
*

import* android.os.IBinder;

*

public* *class* *PrankService* *extends* Service{

 MediaPlayer player;

@Override

*public* IBinder onBind(Intent arg0) {

*return* *null*;

}

*public* *void* onStart(Intent intent,*int* startId)

{

*super*.onStart(intent, startId);

player = MediaPlayer.*create*(*this*, R.raw.*airtel*);   // *Here I'm
referring the song under  folder "/res/raw/airtel.mp3"*

  player.start();*Now , I would like to select the song
from the playlist available in mobile (for testing* *purpose   in Emulator)
*

}




*public* *void* onDestroy()

{

*super*.onDestroy();

//super.onStart(intent, startId)

player.stop();

}

}

 Can any body help me to achieve my goal?

Thanks in advance!!!

Thanks Again!

Yasmin




-- 
Everything is Possible For U only

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



[android-developers] Re: how to stay in webview without opening new browser window

2008-11-03 Thread Grace Kloba
Create an implementation of WebViewClient and register it with WebView. That
will prevent the default behavior of triggering Browser window.

On Mon, Nov 3, 2008 at 8:56 PM, hao <[EMAIL PROTECTED]> wrote:

>
> anyone?
>
> On Oct 26, 8:55 pm, hao <[EMAIL PROTECTED]> wrote:
> > if i make the webview load a web page, and in that web page i press on
> > a form submit button, then another browser window is open. How can i
> > make everything stay in my app instead of opening a new browser window?
> >
>


-- 
thanks,
Grace

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



[android-developers] Re: Can't return View derived class for BaseExpandableListAdapter? (used to work)

2008-11-03 Thread Jason Parekh
Hi Mark,

I just tried as you suggested with the ExpandableList1 sample, and I don't
see any exceptions.  Can you print the stack of the exception you're seeing?

You can browse the source at http://git.source.android.com

jason



On Mon, Nov 3, 2008 at 2:33 PM, Mark Wyszomierski <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> Trying to implement BaseExpandableListAdapter.getChildView() but it
> throws a class cast exception if I try returning any descendant of
> View, such as LinearLayout, or ViewGroup:
>
> public View BaseExpandableListAdapter.getChildView()
> {
>  return new LinearLayout(..);
> }
>
> The API sample returns a TextView, which doesn't crash. What's special
> about TextView that works, but ViewGroup will not? I thought they both
> derive from View? This used to work in earlier versions of the SDK.
>
> Is there anything like browse source in svn that will let me just look
> at the source of TextView online or do I have to download the entire
> source tree to do 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to stay in webview without opening new browser window

2008-11-03 Thread hao

anyone?

On Oct 26, 8:55 pm, hao <[EMAIL PROTECTED]> wrote:
> if i make the webview load a web page, and in that web page i press on
> a form submit button, then another browser window is open. How can i
> make everything stay in my app instead of opening a new browser window?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] RC-29: access to 3G data network going down after onResume()?

2008-11-03 Thread JP

Anybody willing to check out a problem I found on the G1 I have?

When testing the app I am working on, I am mainly using WLAN in order
to have relatively constant up-/download characteristics (speed/
latency). No need to weight T-mobile's network down either. One
concern is the coming back to live after receiving an onResume(). I've
tested this on WLAN and it checks out fine.
Then on to test on T-Mobile's 3G network. This test coincided with an
OTA update to RC-29 this morning. I am seeing strange things now. Of
particular concern is the following: Access to the 3G data network
completely breaks down (without the network going down (;->)). This
happens with any app that accesses the Internet, including Maps or the
browser. Here's what happens on my G1: Put the phone to sleep. Let it
sit for maybe 15 or 30 minutes, then bring it back to life (e.g. push
Menu button twice) and without delay start requesting data by moving
the map around. This seems to fall into a window where the phone is
not quite ready to access the data network. It's perfectly fine to
require a couple of seconds to reconnect to the network, but once it
has, everything should be back to normal. Not on my phone. When I
perform the above test, the phone/Android completely loses access to
the data network. I can reproduce this all time, assuming the phone
has been sleeping long enough. The only remedy is to restart the
phone.  TIA.


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



[android-developers] ActivityManager: Starting: Intent - ActivityManger [1] Killed Problem. Not able to Run the App.

2008-11-03 Thread Dhiwakar M
Hi Friends,

I am trying to run the yahoo messenger code(which is already posted in the
Google Code), but i am trying for the new SDK 1.0 version. (Note the same
code is working like a charm with the previous version). There is no errors
in the code. But while running the app. its not showing up in the emulator.
I am pasting the errors and the log files.

Please suggest me what is wrong?
Am i missing something ?

Thank you for your time.

I included



But during the run time i am getting the following errror.

[2008-11-02 23:17:13 - ClientMain] Success!
[2008-11-02 23:17:13 - ClientMain] Starting activity
org.if_itb.ui.ClientLogin on device
[2008-11-02 23:17:15 - ClientMain] ActivityManager: Starting: Intent {
comp={org.if_itb.client/org.if_itb.ui.ClientLogin} }
[2008-11-02 23:17:15 - ClientMain] ActivityManager: [1]
Killed  am start -n org


Log File:

11-03 07:17:09.038: ERROR/AndroidRuntime(512): Uncaught handler: thread main
exiting due to uncaught exception
11-03 07:17:09.038: ERROR/AndroidRuntime(512): *** EXCEPTION IN SYSTEM
PROCESS.  System will crash.
11-03 07:17:09.038: ERROR/AndroidRuntime(512): java.lang.SecurityException:
Permission Denial: starting Intent { flags=0x1000
comp={org.if_itb.client/org.if_itb.ui.ClientLogin} } from null (pid=-1,
uid=-1) requires null
11-03 07:17:09.038: ERROR/AndroidRuntime(512): at
android.os.Parcel.readException(Parcel.java:1234)
11-03 07:17:09.038: ERROR/AndroidRuntime(512): at
android.os.Parcel.readException(Parcel.java:1222)
11-03 07:17:09.038: ERROR/AndroidRuntime(512): at
android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:998)
11-03 07:17:09.038: ERROR/AndroidRuntime(512): at
com.android.commands.am.Am.runStart(Am.java:197)
11-03 07:17:09.038: ERROR/AndroidRuntime(512): at
com.android.commands.am.Am.run(Am.java:73)
11-03 07:17:09.038: ERROR/AndroidRuntime(512): at
com.android.commands.am.Am.main(Am.java:51)
11-03 07:17:09.038: ERROR/AndroidRuntime(512): at
com.android.internal.os.RuntimeInit.finishInit(Native Method)
11-03 07:17:09.038: ERROR/AndroidRuntime(512): at
com.android.internal.os.RuntimeInit.main(RuntimeInit.java:186)
11-03 07:17:09.038: ERROR/AndroidRuntime(512): at
dalvik.system.NativeStart.main(Native Method)
11-03 07:17:09.048: ERROR/JavaBinder(512): Unknown binder error code.
0xfff7
11-03 07:17:09.058: ERROR/AndroidRuntime(512): Crash logging skipped, no
checkin service


-- 
Dhiwakar (dhiku)
http://www.simori.com/
http://dhiku.tend.10.googlepages.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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: "hooking" to the PHONE button

2008-11-03 Thread Declan Shanaghy
It shouldnt be "stolen" but it should be overridable.
Much like the app picker behaves when multiple apps are registered for an
Intent.

I dont know how the internals of how the off hook button works but couldnt
it broadcast an Intent to go "off hook" which then can be handled like any
other intent. To avoid the annoying situation of having to choose an app
every time a changeable default could be setup.
(Like how RingDroid replaces the default ringtone picker)



On Mon, Nov 3, 2008 at 3:15 PM, hackbod <[EMAIL PROTECTED]> wrote:

>
> Correct, you can't steal it from other apps.  When your apps is in the
> foreground, however, you will see the key as a normal key event that
> you can process however you want.
>
> On Nov 3, 1:11 pm, "Shawn" <[EMAIL PROTECTED]> wrote:
> > I don't think you would be allowed to remap the phone button that would
> force people to use your app even if they didn't want to and my be
> considered malacious. That's just an opinion though
> >
> > -Original Message-
> > From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> >
> > Date: Mon, 3 Nov 2008 13:09:53
> > To: Android Developers
> > Subject: [android-developers] "hooking" to the PHONE button
> >
> > Hi,
> >
> > How can I make my own application run whenever the user presses the
> > green PHONE button ?
> >
> > TIA
> >
>

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



[android-developers] Re: G1 treated as disk... All the time

2008-11-03 Thread Stephen Chambers
I don't where you are supposed to find this out, but this URL saved me. Your
set up is not complete.
http://androidcommunity.com/forums/f4/how-to-install-apps-using-adb-4482/

Steve

On Mon, Nov 3, 2008 at 1:17 PM, Alvin Yates <[EMAIL PROTECTED]> wrote:

>
> Nothing.  ADB doesn't detect the phone as being attached.  Does
> Windows typically let ADB respond while using it as a disk drive?  If
> so, then I probably have something wrong with the drivers, and that's
> probably not going to resolve nicely.
>
> On Nov 3, 11:00 am, ecompositor <[EMAIL PROTECTED]> wrote:
> > What happends when you type in adb devices
> >
> > On Nov 3, 1:37 pm, Alvin Yates <[EMAIL PROTECTED]> wrote:
> >
> > > I downloaded the driver for the G1 and attached it to my PC so I could
> > > resume development after my MacBook decided off was better than on.
> > > Was test driving the phone via USB and attached it as a storage
> > > device.
> >
> > > The problem now is, Windows won't stop treating the phone as a USB
> > > drive, even when the USB option is unchecked (It treats it as having
> > > no capacity).
> >
> > > Has anyone else run into this problem?  Is there a way to fix it?
> >
>

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



[android-developers] getCurrentLocation

2008-11-03 Thread Bobbie

I have the latest SDK download and the SDK throws errors when I try to
use "getCurrentLocation", I can only use "getLastKnownLocation" and
can only get a "network" location, can't even get a GPS location
(which is what I want)... What's the deal here?  Was this deprecated
or something?  I have tried sample code and everything and it throws
an error before I can even launch the 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How open Android will be?

2008-11-03 Thread blues

Now you should understand what the meaning of "open".
The G1 phone doesn't give the "root" permission. You won't be able to
run most of the commands under /bin. It is like you buy a PC, but you
are merely a guest trying to browse the system.

Simply, the software I developed on Windows Mobile, won't be able to
be ported to Android. But I would say, I will be able to port to a
linux PC, which is real open.


On Oct 17, 8:30 am, Mark Murphy <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Google will release the source code soon. Can we build the source code
> > and load the image into the phone?
>
> That is a question for the device manufacturers. HTC, makers of the
> T-Mobile G1, have a good track record in this area. We will see how the
> G1 pans out, just as we will see how other devices pan out over time.
>
>  > I guess not... otherwise, how
>
> > google and wireless carriers can control the phone?
>
> And your proof of this assertion is...what, exactly?
>
>  > Just read the news
>
> > that google have a backdoor in the phone so they can uninstall an app
> > if they don't like it.
>
> For apps installed by the Android Market, as far as we know. If you
> don't like the "backdoor", don't buy off the Android Market. Use one of
> the alternative markets (SlideME, AndAppStore, Handango, etc.).
>
> > But as a developer, I do want to do anything which is possible. For
> > example: communicate with the Qualcomm cellar chip to provide better
> > phone experince, or capture the screen image..., or develop a video
> > telephony stack etc. All these need to access to the native system, or
> > even modify the driver...
>
> Since others have been successful in getting Android running on other
> equipment, there is no particular reason you won't be able to do this
> yourself...to any phones you own, make, or sell.
>
> Or, if theopensource Android project accepts contributions or patches,
> submit your changes for review and possible inclusion in future editions
> of the OS.
>
> > At this point, I would say Windows Mobile is a moreopensystem, since
> > I can make native app or even create a new device driver...
>
>  >???
>
> It's not like with Windows Mobile you can:
>
> -- get the source code for free
> -- deploy modifications of that source code on any device you have
> access to for free
> -- have a shot of getting your changes put back in the core OS to the
> benefit of all
>
> There are two tiers to Android development. Work with the raw source
> code and firmware images, and you should be able do pretty much whatever
> you want, but distribution in the form of firmware and hardware is up to
> you. Or, work within the confines of the SDK, and your apps will run on
> all sorts of devices with a wide range of distribution options, but you
> need to work within a set of constraints designed to maximize stability
> and security. And none of this requires any cash outlay, other than your
> time and the equipment you want to use.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 1.3 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: some audio problems

2008-11-03 Thread [EMAIL PROTECTED]

thanks a lot, I'll keep trying with that stuff!

On Nov 4, 8:59 am, Dave <[EMAIL PROTECTED]> wrote:
> SoundPool is not recommended in 1.0. There are deadlock issues that
> can cause your app thread to lock up.
>
> On Nov 3, 1:24 pm, Robert Green <[EMAIL PROTECTED]> wrote:
>
> > For games use small, low bitrate OGGs with SoundPool.
>
> > On Nov 3, 2:09 pm, Dave <[EMAIL PROTECTED]> wrote:
>
> > > It's likely that the CPU is saturated and can't keep up with audio. If
> > > you have a choice, I suggest using OGG files because there is less
> > > overhead involved in playing them.
>
> > > On Nov 2, 8:10 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > > dear all,
>
> > > > I've been writing a game and need to play an audio effect with some
> > > > event trigged,
> > > > and i use MediaPlayer class and mp3 source files to implement it.
>
> > > > i first create the MediaPlayer instance in the constructor and invoke
> > > > play() when the event is trigged.
>
> > > > but it happened again oftentimes to show the warning message in the
> > > > DDMS
>
> > > > obtainBuffer timed out (is CPU pegged?) user=0101, server=0001
> > > > write blocked for XX msecs
>
> > > > these two message,  the sound would still played, but delayed, so the
> > > > sound and visual  effect won't synchronized.
>
> > > > please give some commons to help, 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Flash Player

2008-11-03 Thread ______

There is a Flash plugin for microB on the N810, so the porting to ARM
has been done.  I would imagine it is just a matter of time.  Of
course it would be easier if the Flash plugin were open source and the
G1 were unlocked, since you'll probably need T-Mobile to sign the apk
to get native code installed and integrated.

One other porting issue: the N810 Flash plugin probably uses a lot of
X calls to update the screen, these would need to be ported as X
doesn't exist on Android.


On Nov 3, 3:06 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I want to know if someone is willing to work with me on getting a
> mobile flash player working on the android, not only will it need to
> work great with all flash and current android apps it would need to be
> optimized so not to drain too much battery life.
>
> And help, or advise on this project, contact 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Proper way of handling orientation change + async thread

2008-11-03 Thread Greg

When you change orientation your Activity is destroyed and then re-
created.  When you re-create the dialog view object that was sent to
the background process is no longer valid, thus the error.

There are probably several ways to handle this but the first that
comes to my mind is:

1) The background thread should not be trying to manipulate views
directly.  Have it send a 'cancel' message to a handler in one of your
UI classes (like the main activity).  The UI class can then take the
appropriate action to cancel the dialog.

2) If orientation can change while you have the dialog up (which it
can), then you need to save that state when the activity is stopped
and have your restart handler take care of recreating the dialog and
displaying it when the activity is restarted (after orientation
change).

Your message handler should then take the cancel message from the
background thread and dismiss the dialog if it exists.

Hope this helps,

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



[android-developers] Re: Layout like android's Home Screen

2008-11-03 Thread Rohit Mordani

How do I attach this scroller to the ViewGroup? Does the constructor
with the context do this?

Rohit


On Nov 3, 2:20 pm, Rohit Mordani <[EMAIL PROTECTED]> wrote:
> Hey Romain Guy,
>         Can you tell me how to use a scroller? I tried to create a
> scroller and then I called the startScroll() method on it but it
> didn't do anything. I am trying to scroll a Viewgroup (that is larger
> than the screen size) and has multiple children laid out side by
> side.
>
>          mScroller = new Scroller(this.getContext());
>
> and then I called the startScroll in the onFling() as follows:
>
>          mScroller.startScroll(0, 0, 800, 0, 800);
>
> I dont see the scrolling happening when I do the above.
>
> Thanks
> Rohit
>
> On Sep 15, 7:56 am, Kavi <[EMAIL PROTECTED]> wrote:
>
> > I'll try that out.
> > 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is there a way to run an application when android boots up?

2008-11-03 Thread Ernest

Hi,
  You could extend the BroadcastReceiver to detect the system  intent
action 'android.intent.action.BOOT_COMPLETED'  ,and in Mainfest
file,you should define your receiver like
   






Best Regards
 Ernest
On 11月4日, 上午9时01分, moazzamk <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am writing an application which needs to check a data source
> periodically and set alarm on the phone. If the phone is turned off,
> the alarmManager clears the alarms set. Is there any way I can start
> my application as soon as the phone is turned on?
>
> Thanks,
>
> Moazzam
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: mute the phone

2008-11-03 Thread Dave

When you say "mute the voice call", do you mean uplink audio, i.e.
transmitted from the local phone to the network? If so, you can call:

AudioService.setMicrophoneMute(True);

However, there is no path to transmit audio from the application
processor to the uplink, for example, to play a sound effect on the
local phone that will be heard by the caller on the other end.

Also, it's not advisable to call AudioManager directly. If you're app
crashes and leaves the audio in a weird state, there may be no way to
recover without rebooting the phone. Always call through AudioService
which will usually restore the phone to a usable state if the app
crashes.

On Nov 3, 12:11 am, hyuen <[EMAIL PROTECTED]> wrote:
> I am trying to mute the voice call and play something else, but seems
> that
>
> AudioManager.setStreamSolo()
>
> is not working.
>
> Am I doing something totally incorrectly? is this even supported by
> the current API?
>
> -h
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] GalleryPicker Crash

2008-11-03 Thread Gil

I'm using MediaStore.Images.insertImage to insert an image into the
images content provider. The insert reports no errors yet when I try
to open the Pictures application I get the following crash:

11-03 16:09:38.196: ERROR/AndroidRuntime(980):
java.lang.RuntimeException: Unable to resume activity
{com.android.camera/com.android.camera.GalleryPicker}:
java.lang.NullPointerException
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.ActivityThread.performResumeActivity(ActivityThread.java:
2504)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.ActivityThread.handleResumeActivity(ActivityThread.java:
2519)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2159)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.os.Handler.dispatchMessage(Handler.java:88)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.os.Looper.loop(Looper.java:123)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.ActivityThread.main(ActivityThread.java:3742)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
java.lang.reflect.Method.invokeNative(Native Method)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
java.lang.reflect.Method.invoke(Method.java:515)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:739)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
dalvik.system.NativeStart.main(Native Method)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): Caused by:
java.lang.NullPointerException
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
com.android.camera.GalleryPicker
$GalleryPickerAdapter.init(GalleryPicker.java:251)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
com.android.camera.GalleryPicker.rebake(GalleryPicker.java:96)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
com.android.camera.GalleryPicker.onResume(GalleryPicker.java:435)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.Instrumentation.callActivityOnResume(Instrumentation.java:
1224)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.Activity.performResume(Activity.java:3359)
11-03 16:09:38.196: ERROR/AndroidRuntime(980): at
android.app.ActivityThread.performResumeActivity(ActivityThread.java:
2491)


I tried to use bot forms of insertImage (using bitmap or a filename).
They behave identically.

This crash occurs on a device and in the emulator. The only way to get
rid of the Pictures app crash is to unmount the SD card and then
remount it. The funny thing is that after I do this my image does
appear in the Pictures app.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Is there a way to run an application when android boots up?

2008-11-03 Thread moazzamk

Hi,

I am writing an application which needs to check a data source
periodically and set alarm on the phone. If the phone is turned off,
the alarmManager clears the alarms set. Is there any way I can start
my application as soon as the phone is turned on?

Thanks,

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



[android-developers] Re: some audio problems

2008-11-03 Thread Dave

SoundPool is not recommended in 1.0. There are deadlock issues that
can cause your app thread to lock up.

On Nov 3, 1:24 pm, Robert Green <[EMAIL PROTECTED]> wrote:
> For games use small, low bitrate OGGs with SoundPool.
>
> On Nov 3, 2:09 pm, Dave <[EMAIL PROTECTED]> wrote:
>
> > It's likely that the CPU is saturated and can't keep up with audio. If
> > you have a choice, I suggest using OGG files because there is less
> > overhead involved in playing them.
>
> > On Nov 2, 8:10 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > dear all,
>
> > > I've been writing a game and need to play an audio effect with some
> > > event trigged,
> > > and i use MediaPlayer class and mp3 source files to implement it.
>
> > > i first create the MediaPlayer instance in the constructor and invoke
> > > play() when the event is trigged.
>
> > > but it happened again oftentimes to show the warning message in the
> > > DDMS
>
> > > obtainBuffer timed out (is CPU pegged?) user=0101, server=0001
> > > write blocked for XX msecs
>
> > > these two message,  the sound would still played, but delayed, so the
> > > sound and visual  effect won't synchronized.
>
> > > please give some commons to help, 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Camera causing crash

2008-11-03 Thread Jason Proctor

others agree with your conclusion and are even pulling their apps 
from the market until there is a fix. i'm not spending any 
significant time with it until something happens, either.



>I must conclude that camera support with Android is currently too
>immature for serious and sustainable work.


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



[android-developers] Re: What's the best way to save a picture?

2008-11-03 Thread Robert Green

Can I get a code snippet for getting a handle on the data folder?

On Nov 3, 4:58 pm, Christine <[EMAIL PROTECTED]> wrote:
> You can create a file in your app's data folder and store the picture
> there.
> That's what I do to store pics temporarily.
>
> On Nov 3, 11:35 pm, "Dan B." <[EMAIL PROTECTED]> wrote:
>
> > I think the appropriate place to store user content is actually the
> > Download folder, otherwise the image view and camera app will think
> > the files belong to the camera
>
> > On Nov 3, 12:52 pm, Robert Green <[EMAIL PROTECTED]> wrote:
>
> > > I'm working on a drawing app and need to get some "Save" functionality
> > > in.  What I'd like to do is:
>
> > > 1)  Prompt the user for a filename
> > > 2)  Check for existing file - confirm overwrite
> > > 3)  Save to SD.
>
> > > I would think this should save in the same spot as Photos taken by the
> > > camera, unless you guys think it should have its own spot.  I want the
> > > drawings to come up with the photos in the Photos app.
>
> > > I tried to use
> > > MediaStore.Images.Media.insertImage(getContentResolver(), bitmap, "My
> > > Drawing", "description");
>
> > > but that just gives me a URI error.  Any ideas?  Isn't there a built
> > > in filechooser of some sort?  I tried to find it but came up empty.
>
> > > 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Simple game menu implementation help

2008-11-03 Thread Robert Green

I did mine the wrong way - by having 1 activity that flips the visible
view and knows its state.

For my next game I am having a Game Menu activity and then the Game
activity.  This will keep things much more clean and is easier to work
with state management.  I used the single instance model which I
believe is good for games (depending on the type of game) and that has
some implications for lifecycle management.

On Nov 3, 4:46 pm, AaronBC <[EMAIL PROTECTED]> wrote:
> Okay, here's how I implemented the resume game function:
>
> In the onPause method I save the game state (Object) to a file:
>
> private void SaveGame()
> {
>         FileOutputStream fileOutputStream = null;
>         ObjectOutputStream objOutStream = null;
>         try
>         {
>                 fileOutputStream = openFileOutput(PlayActivity.SAVE_FILE_NAME,
> Context.MODE_PRIVATE);
>                 objOutStream = new ObjectOutputStream(fileOutputStream);
>                 objOutStream.writeObject((Deck)this.gameDeck);
>                 objOutStream.close();
>                 Log.v(this.getLocalClassName(), "writing file");
>         }
>         catch (Exception FileNotFoundException)
>         {
>                 Log.v(this.getLocalClassName(), "File not found exception!:" +
> PlayActivity.SAVE_FILE_NAME);
>         }
>
> }
>
> In the onCreate() method I restore the game state from the file:
>
> try
> {
>         fileInputStream = openFileInput(PlayActivity.SAVE_FILE_NAME);//
> this.openFileInput(PlayActivity.SAVE_FILE_NAME);
>         objInStream = new ObjectInputStream(fileInputStream);
>         this.gameDeck = (Deck)objInStream.readObject();
>         objInStream.close();
>         displayCard = gameDeck.GetCurrentCard();}
>
> catch (Exception FileNotFoundException)
> {
>         Log.v(this.getLocalClassName(), "File not found exception!:" +
> PlayActivity.SAVE_FILE_NAME);
>         this.gameDeck = new Deck();
>         displayCard = gameDeck.GetNextCard();
>
> }
>
> I am using an ObjectOutput/ObjectInput stream to handle saving and
> loading the card deck.  A 1.8Kb file is created when I save the
> object.  This seems like a resource heavy implementation.  Is there a
> better way of doing this for an embedded application?
>
> Also, in order for the main menu to know whether a game has already
> been started, it just checks whether the file exists or not:
> protected void onStart()
> {
>         String[] fileList,gameMenu;
>         super.onStart();
>         fileList = this.fileList();
>         gameMenu = mStrings;
>         for (String e: fileList)
>         {
>                 if (e.equals(PlayActivity.SAVE_FILE_NAME))
>                 {
>                         gameMenu = mStringsResume;
>                 }
>         }
>         // Prepare the ListView
>         final ArrayAdapter adapter = new
> ArrayAdapter(this,
>                 android.R.layout.simple_list_item_1, gameMenu);
>
>         setListAdapter(adapter);
>
> }
>
> Another question:  Rather than using fileList() to determine if the
> file exists, could I just try to open the file and catch the exception
> if it doesn't exist, or is this more resource heavy as well?
>
> Thx for any input,
> Aaron
>
> On Oct 29, 12:08 pm, AaronBC <[EMAIL PROTECTED]> wrote:
>
> > I'm writing a simplegameso I can learn more about android
> > development.  I need a little help designing themenusystem.  When
> > you start the application you will see a simplemenu:
>
> > Start NewGame
> > ResumeGame(Dynamically shown after agamehas been started)
> > Scoreboard
> > Instructions
> > About
>
> > When you click on "Start NewGame" it starts a new "Play" activity
> > (This works fine)
>
> > The "ResumeGame" option should only be visible when agamehas
> > already been started and the user returns to the mainmenu.  How do I
> > determine whether the "Play" activity has been started or not in order
> > to display thismenuitem?  Also, how do I handle the back button
> > press when in the "Play" activity so that thegamestate is paused and
> > not lost when returning to the mainmenu?
>
> > Example:
> > Thegameapplication is started and the user sees the following screen
>
> > NewGame
> > Scoreboard
> > Instructions
> > About
>
> > The user then taps NewGameand starts to play. In the middle of thegamethe 
> > user hits the back button (or receives a phone call, starts
> > another app, etc.) and sees the following screen when returning to 
> > thegameapp:
>
> > NewGame
> > ResumeGame
> > Scoreboard
> > Instructions
> > About
>
> > The user either taps "NewGame" and starts a newgameor taps "ResumeGame" and 
> > continues where he left off.
>
> > How should I approach this using multiple Activities?
>
> > Thx,
> > Aaron
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL 

[android-developers] Re: Keeping my activity from being destroyed when changing my orientation

2008-11-03 Thread Romain Guy

Note that there are good reasons for restarting activities on
orientation change and unless your application really requires to
handle the change itself (a good example would be the web browser or a
game), you should really keep it that way. This allows the system to
reload the resources that match the new configuration (so you can use
layout-land, drawable-land, etc.)

On Mon, Nov 3, 2008 at 3:59 PM, zl25drexel <[EMAIL PROTECTED]> wrote:
>
> yes
>
> add a couple of attributes in your manifest file
> android:screenOrientation="portrait"
>android:configChanges="orientation|keyboardHidden" />
>
> and then override a method
>@Override
>public void onConfigurationChanged(Configuration newConfig) {
>  //ignore orientation change
>  super.onConfigurationChanged(newConfig);
>}
>
> to ignore any orientation change.
>
> On Nov 3, 4:54 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>> Hello every time i change the orientation on my emulator my activity
>> gets restated. is their any way to keep this from happing?
> >
>



-- 
Romain Guy
www.curious-creature.org

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



[android-developers] Re: Keeping my activity from being destroyed when changing my orientation

2008-11-03 Thread zl25drexel

yes

add a couple of attributes in your manifest file


and then override a method
@Override
public void onConfigurationChanged(Configuration newConfig) {
  //ignore orientation change
  super.onConfigurationChanged(newConfig);
}

to ignore any orientation change.

On Nov 3, 4:54 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hello every time i change the orientation on my emulator my activity
> gets restated. is their any way to keep this from happing?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Camera causing crash

2008-11-03 Thread blindfold

Thanks Jason! It came as a big surprise to me that the G1 uses 411
instead of the emulator's sole 422 format. That is most welcome
information that is not publicly documented anywhere as far as I know,
making it a recipe for misery in camera-based image processing. If you
run my app on the emulator and press key "g" for the green filter (my
default decoding is in grayscale to save CPU time), then you will see
that it shows a color preview where the SDK 1.0 r1's built-in emulator
only shows the Y (grayscale) component. Of course further work is now
needed to also decode the G1's 411 format (my app still assumes 422).
I must conclude that camera support with Android is currently too
immature for serious and sustainable work.

On Nov 3, 6:59 pm, Jason Proctor <[EMAIL PROTECTED]> wrote:
> >It is yuv422sp, which is equivalent to Android's YCbCr_422_SP.
>
> on the G1, Camera claims the preview format is number 16,
> YCbCr_422_SP, but it isn't. it's YCbCr, but in 411 format. hence
> smaller relative frame size than the emulator. it's close to YUV
> 411p, but the colour transform function is different for YUV than it
> is for YCbCr. in YUV the colour portion is absolute, whereas in YCbCr
> it's a correction from green.
>
> (i'm no expert, so feel free to correct any of the above!)
>
> >I've now done both, being forced to because the still image capture
> >was a near guarantee for OutOfMemoryError crashes, but it requires a
> >bit of reverse engineering. The SDK 1.0 r1 emulator only displays the
> >Y part, but the preview data also contains the color information for
> >the moving colored rectangle.
>
> this is interesting because i *think* i'm only getting b&w preview
> data on the emulator *and* the G1.
>
> on the emulator, i get straight-up b&w regardless of whether i add in
> the UV component. which makes sense, because the Y component is
> greyscale.
>
> on the G1, in my yuv411p decoder, if i leave out the CbCr portion, i
> get big time green, which is right. if i put them back in, i get a
> greyscale image, correcting the green. this makes sense, but i'm
> wondering why i'm not getting the colour i'm seeing on the screen.
>
> btw my G1 might be broken. the camera always displays previews in the
> wrong orientation. in portrait, i have to turn my head 90deg to see
> the image upright. in landscape, i can hold the camera in portrait
> and see the image fine. other G1s here don't have this problem...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Comment spam in android market :(

2008-11-03 Thread Bradley Kite


Hi all (especially googlers)

I've noticed a fair bit of comment spam appearing within the android market. 
Is there any way that these horrible people can be blocked from making 
further comments/spam next to other peoples applications?

I 'spose its inevitable that people will always try to abuse an otherwise 
very good system, but I think a strong clear message needs to be sent out to 
those responsible.

Kind Regards
--
Brad

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



[android-developers] Re: "hooking" to the PHONE button

2008-11-03 Thread hackbod

Correct, you can't steal it from other apps.  When your apps is in the
foreground, however, you will see the key as a normal key event that
you can process however you want.

On Nov 3, 1:11 pm, "Shawn" <[EMAIL PROTECTED]> wrote:
> I don't think you would be allowed to remap the phone button that would force 
> people to use your app even if they didn't want to and my be considered 
> malacious. That's just an opinion though
>
> -Original Message-
> From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
>
> Date: Mon, 3 Nov 2008 13:09:53
> To: Android Developers
> Subject: [android-developers] "hooking" to the PHONE button
>
> Hi,
>
> How can I make my own application run whenever the user presses the
> green PHONE button ?
>
> TIA
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Keeping my activity from being destroyed when changing my orientation

2008-11-03 Thread [EMAIL PROTECTED]

Hello every time i change the orientation on my emulator my activity
gets restated. is their any way to keep this from happing?

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



[android-developers] how to set the screen always in HVGA

2008-11-03 Thread Hw3699

When we open the keyboard on G1, it automatically changes to HVGA-L.
Is that posible to still set it always on HVGA mode.

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



[android-developers] Re: What's the best way to save a picture?

2008-11-03 Thread Christine

You can create a file in your app's data folder and store the picture
there.
That's what I do to store pics temporarily.

On Nov 3, 11:35 pm, "Dan B." <[EMAIL PROTECTED]> wrote:
> I think the appropriate place to store user content is actually the
> Download folder, otherwise the image view and camera app will think
> the files belong to the camera
>
> On Nov 3, 12:52 pm, Robert Green <[EMAIL PROTECTED]> wrote:
>
> > I'm working on a drawing app and need to get some "Save" functionality
> > in.  What I'd like to do is:
>
> > 1)  Prompt the user for a filename
> > 2)  Check for existing file - confirm overwrite
> > 3)  Save to SD.
>
> > I would think this should save in the same spot as Photos taken by the
> > camera, unless you guys think it should have its own spot.  I want the
> > drawings to come up with the photos in the Photos app.
>
> > I tried to use
> > MediaStore.Images.Media.insertImage(getContentResolver(), bitmap, "My
> > Drawing", "description");
>
> > but that just gives me a URI error.  Any ideas?  Isn't there a built
> > in filechooser of some sort?  I tried to find it but came up empty.
>
> > 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Flash Player

2008-11-03 Thread Shawn
There a java based flash system I think sony eriicsson has had in development 
for years

-Original Message-
From: BikingBill <[EMAIL PROTECTED]>

Date: Mon, 3 Nov 2008 14:55:15 
To: Android Developers
Subject: [android-developers] Re: Flash Player



Not Gonna Happen.

Two reasons:

1. Java apps don't have the performance to become a Flash Player.

2. Google would have to add this to the OS itself.  Since they already
have an application platform, why would they?

Now it is possible to build a Flash player in the iPhone native app
platform but Apple's not going to approve it.



On Nov 3, 12:06 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I want to know if someone is willing to work with me on getting a
> mobile flash player working on the android, not only will it need to
> work great with all flash and current android apps it would need to be
> optimized so not to drain too much battery life.
>
> And help, or advise on this project, contact 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Flash Player

2008-11-03 Thread BikingBill

Not Gonna Happen.

Two reasons:

1. Java apps don't have the performance to become a Flash Player.

2. Google would have to add this to the OS itself.  Since they already
have an application platform, why would they?

Now it is possible to build a Flash player in the iPhone native app
platform but Apple's not going to approve it.



On Nov 3, 12:06 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I want to know if someone is willing to work with me on getting a
> mobile flash player working on the android, not only will it need to
> work great with all flash and current android apps it would need to be
> optimized so not to drain too much battery life.
>
> And help, or advise on this project, contact 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Simple game menu implementation help

2008-11-03 Thread AaronBC

Okay, here's how I implemented the resume game function:

In the onPause method I save the game state (Object) to a file:

private void SaveGame()
{
FileOutputStream fileOutputStream = null;
ObjectOutputStream objOutStream = null;
try
{
fileOutputStream = openFileOutput(PlayActivity.SAVE_FILE_NAME,
Context.MODE_PRIVATE);
objOutStream = new ObjectOutputStream(fileOutputStream);
objOutStream.writeObject((Deck)this.gameDeck);
objOutStream.close();
Log.v(this.getLocalClassName(), "writing file");
}
catch (Exception FileNotFoundException)
{
Log.v(this.getLocalClassName(), "File not found exception!:" +
PlayActivity.SAVE_FILE_NAME);
}
}

In the onCreate() method I restore the game state from the file:

try
{
fileInputStream = openFileInput(PlayActivity.SAVE_FILE_NAME);//
this.openFileInput(PlayActivity.SAVE_FILE_NAME);
objInStream = new ObjectInputStream(fileInputStream);
this.gameDeck = (Deck)objInStream.readObject();
objInStream.close();
displayCard = gameDeck.GetCurrentCard();
}
catch (Exception FileNotFoundException)
{
Log.v(this.getLocalClassName(), "File not found exception!:" +
PlayActivity.SAVE_FILE_NAME);
this.gameDeck = new Deck();
displayCard = gameDeck.GetNextCard();
}

I am using an ObjectOutput/ObjectInput stream to handle saving and
loading the card deck.  A 1.8Kb file is created when I save the
object.  This seems like a resource heavy implementation.  Is there a
better way of doing this for an embedded application?

Also, in order for the main menu to know whether a game has already
been started, it just checks whether the file exists or not:
protected void onStart()
{
String[] fileList,gameMenu;
super.onStart();
fileList = this.fileList();
gameMenu = mStrings;
for (String e: fileList)
{
if (e.equals(PlayActivity.SAVE_FILE_NAME))
{
gameMenu = mStringsResume;
}
}
// Prepare the ListView
final ArrayAdapter adapter = new
ArrayAdapter(this,
android.R.layout.simple_list_item_1, gameMenu);

setListAdapter(adapter);
}

Another question:  Rather than using fileList() to determine if the
file exists, could I just try to open the file and catch the exception
if it doesn't exist, or is this more resource heavy as well?

Thx for any input,
Aaron

On Oct 29, 12:08 pm, AaronBC <[EMAIL PROTECTED]> wrote:
> I'm writing a simplegameso I can learn more about android
> development.  I need a little help designing themenusystem.  When
> you start the application you will see a simplemenu:
>
> Start NewGame
> ResumeGame(Dynamically shown after agamehas been started)
> Scoreboard
> Instructions
> About
>
> When you click on "Start NewGame" it starts a new "Play" activity
> (This works fine)
>
> The "ResumeGame" option should only be visible when agamehas
> already been started and the user returns to the mainmenu.  How do I
> determine whether the "Play" activity has been started or not in order
> to display thismenuitem?  Also, how do I handle the back button
> press when in the "Play" activity so that thegamestate is paused and
> not lost when returning to the mainmenu?
>
> Example:
> Thegameapplication is started and the user sees the following screen
>
> NewGame
> Scoreboard
> Instructions
> About
>
> The user then taps NewGameand starts to play. In the middle of thegamethe 
> user hits the back button (or receives a phone call, starts
> another app, etc.) and sees the following screen when returning to thegameapp:
>
> NewGame
> ResumeGame
> Scoreboard
> Instructions
> About
>
> The user either taps "NewGame" and starts a newgameor taps "ResumeGame" and 
> continues where he left off.
>
> How should I approach this using multiple Activities?
>
> Thx,
> Aaron
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: What's the best way to save a picture?

2008-11-03 Thread Dan B.

I think the appropriate place to store user content is actually the
Download folder, otherwise the image view and camera app will think
the files belong to the camera

On Nov 3, 12:52 pm, Robert Green <[EMAIL PROTECTED]> wrote:
> I'm working on a drawing app and need to get some "Save" functionality
> in.  What I'd like to do is:
>
> 1)  Prompt the user for a filename
> 2)  Check for existing file - confirm overwrite
> 3)  Save to SD.
>
> I would think this should save in the same spot as Photos taken by the
> camera, unless you guys think it should have its own spot.  I want the
> drawings to come up with the photos in the Photos app.
>
> I tried to use
> MediaStore.Images.Media.insertImage(getContentResolver(), bitmap, "My
> Drawing", "description");
>
> but that just gives me a URI error.  Any ideas?  Isn't there a built
> in filechooser of some sort?  I tried to find it but came up empty.
>
> 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Can't return View derived class for BaseExpandableListAdapter? (used to work)

2008-11-03 Thread Mark Wyszomierski

Hi,

Trying to implement BaseExpandableListAdapter.getChildView() but it
throws a class cast exception if I try returning any descendant of
View, such as LinearLayout, or ViewGroup:

 public View BaseExpandableListAdapter.getChildView()
 {
  return new LinearLayout(..);
 }

The API sample returns a TextView, which doesn't crash. What's special
about TextView that works, but ViewGroup will not? I thought they both
derive from View? This used to work in earlier versions of the SDK.

Is there anything like browse source in svn that will let me just look
at the source of TextView online or do I have to download the entire
source tree to do 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Layout like android's Home Screen

2008-11-03 Thread Rohit Mordani

Hey Romain Guy,
Can you tell me how to use a scroller? I tried to create a
scroller and then I called the startScroll() method on it but it
didn't do anything. I am trying to scroll a Viewgroup (that is larger
than the screen size) and has multiple children laid out side by
side.

 mScroller = new Scroller(this.getContext());

and then I called the startScroll in the onFling() as follows:

 mScroller.startScroll(0, 0, 800, 0, 800);

I dont see the scrolling happening when I do the above.

Thanks
Rohit




On Sep 15, 7:56 am, Kavi <[EMAIL PROTECTED]> wrote:
> I'll try that out.
> 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Mouse Gesture for Navigation?

2008-11-03 Thread Rohit Mordani

yi, doing that will disable all normal touch event dispatching for
that view and any of its children.  It's really rare that you should
override a dispatch method, especially doing so and never calling
through to the super class.

The correct thing is almost always to override onTouchEvent().

Rohit


On Oct 31, 1:05 pm, Rohit Mordani <[EMAIL PROTECTED]> wrote:
> In addition you need to do the following in your view:
>
> @Override
> public boolean dispatchTouchEvent(MotionEvent ev){
>         return mGestureDetector.onTouchEvent(ev);
>
> }
>
> Thanks
> Rohit
>
> On Oct 31, 2:01 pm, Rohit Mordani <[EMAIL PROTECTED]> wrote:
>
> > I got fling/swipe to work. In one of my other posts someone told me to
> > do the following to make the onFling and Scroll methods to be called:
>
> > 1) Set View.setLongClickable to true for the view you are using
> > 2) Set GestureHandler.setIsLongpressEnabled to true
> > 3) Return true in your onDown method
>
> > Thanks for all the help
> > Rohit
>
> > On Oct 30, 5:12 pm, Romain Guy <[EMAIL PROTECTED]> wrote:
>
> > > A fling is just an ACTION_DOWN, one or more ACTION_MOVE and an
> > > ACTION_UP. It has nothing to do with running in the emulator or not.
> > > (For what it's worth, a large part of the touch UI and APIs have been
> > > developed in the emulator.)
>
> > > On Thu, Oct 30, 2008 at 4:18 PM, Rohit Mordani <[EMAIL PROTECTED]> wrote:
>
> > > > I THINK the problem is that in the emulator, pressing the left mouse
> > > > button is more like a tap and that sets the MotionEvent.Action to be
> > > > ACTION_DOWN. As a result the onDown() method of the OnGestureListener
> > > > is called instead of onFling(). There might be a way to emulate the
> > > > fling in the emulator but I am not sure of it. If anyone finds out
> > > > then please let me know. That would then call onFling() correctly I
> > > > think
>
> > > > Rohit
>
> > > > On Sep 22, 6:40 am, kingtut <[EMAIL PROTECTED]> wrote:
> > > >> Any luck in getting the onFling or onScroll event to fire? I am facing
> > > >> the same problem.
>
> > > >> On Sep 12, 5:14 pm, Mark Hansen <[EMAIL PROTECTED]> wrote:
>
> > > >> > Ok, I'll keep trying it.. for some reason the events aren't firing
> > > >> > such as Fling etc.
>
> > > >> > On Sep 12, 10:12 am, Kavi <[EMAIL PROTECTED]> wrote:
>
> > > >> > > ListView is a kind of View, so you should be able to attach the
> > > >> > > GestureDetector to your ListView as well.
>
> > > --
> > > Romain Guywww.curious-creature.org
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: OnTouchListener

2008-11-03 Thread Rohit Mordani

yi, doing that will disable all normal touch event dispatching for
that view and any of its children.  It's really rare that you should
override a dispatch method, especially doing so and never calling
through to the super class.

The correct thing is almost always to override onTouchEvent().

Rohit


On Oct 31, 1:05 pm, Rohit Mordani <[EMAIL PROTECTED]> wrote:
> In addition you need to do the following in your view:
>
> @Override
> public boolean dispatchTouchEvent(MotionEvent ev){
>         return mGestureDetector.onTouchEvent(ev);
>
> }
>
> Thanks
> Rohit
>
> On Oct 31, 2:02 pm, Rohit Mordani <[EMAIL PROTECTED]> wrote:
>
> > I got fling/swipe to work. In one of my other posts someone told me to
> > do the following to make fling/swipe work
>
> > 1) Set View.setLongClickable to true for the view you are using
> > 2) Set GestureHandler.setIsLongpressEnabled to true
> > 3) Return true in your onDown method
>
> > Thanks
> > Rohit
>
> > On Oct 13, 4:55 pm, skink <[EMAIL PROTECTED]> wrote:
>
> > > On 13 Paź, 23:15, Rishi
>
> > > > I still don't understand why it acts differently for button. Either
> > > > way, what appears to have been happening is it does not reach to
> > > > ACTION_MOVE or ACTION_UP unless ACTION_DOWN is consumed by listener.
>
> > > it's not documented (i think) but in my opinion google designers treat
> > > down/move/up actions as a sequence of events. if you are not
> > > interested in down event the rest (move/up) won't appear.
>
> > > skink
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Gesture detection

2008-11-03 Thread Rohit Mordani

Yes - that also works ! Thanks for letting us know that !

Rohit


On Oct 31, 1:34 pm, hackbod <[EMAIL PROTECTED]> wrote:
> Fyi, doing that will disable all normal touch event dispatching for
> that view and any of its children.  It's really rare that you should
> override a dispatch method, especially doing so and never calling
> through to the super class.
>
> The correct thing is almost always to override onTouchEvent().
>
> On Oct 31, 2:05 pm, Rohit Mordani <[EMAIL PROTECTED]> wrote:
>
> > In addition I had to do the following in my view:
>
> > @Override
> > public boolean dispatchTouchEvent(MotionEvent ev){
> >         return mGestureDetector.onTouchEvent(ev);
>
> > }
>
> > Thanks
> > Rohit
>
> > On Oct 31, 1:59 pm, Rohit Mordani <[EMAIL PROTECTED]> wrote:
>
> > > Hey Adam and Jason - thanks ! I tried out the things that you guys
> > > said and they make fling / swipe work now !
>
> > > Rohit
>
> > > On Oct 31, 12:59 pm, "Jason Parekh" <[EMAIL PROTECTED]> wrote:
>
> > > > If you haven't already, can you try returning true in your onDown 
> > > > method?
>
> > > > jason
>
> > > > On Thu, Oct 30, 2008 at 4:18 PM, Rohit Mordani <[EMAIL PROTECTED]> 
> > > > wrote:
>
> > > > > I am facing the same problem. The onFling() method is never called.
>
> > > > > I THINK the problem is that in the emulator, pressing the left mouse
> > > > > button is more like a tap and that sets the MotionEvent.Action to be
> > > > > ACTION_DOWN. As a result the onDown() method of the OnGestureListener
> > > > > is called instead of onFling(). There might be a way to emulate the
> > > > > fling in the emulator but I am not sure of it. If anyone finds out
> > > > > then please let me know. That would then call onFling() correctly I
> > > > > think
>
> > > > > Rohit
>
> > > > > On Oct 29, 2:12 pm, zl25drexel <[EMAIL PROTECTED]> wrote:
> > > > > > Erik,
>
> > > > > > I tried your codes, the onScroll and onFling method are still not
> > > > > > being called.
>
> > > > > > On Oct 11, 7:10 pm, Erik Calissendorff <[EMAIL PROTECTED]>
> > > > > > wrote:
>
> > > > > > > Hi Kingtut,
>
> > > > > > > I believe that this code should work for you, I use this solution 
> > > > > > > in
> > > > > > > my Activity:
>
> > > > > > > @Override
> > > > > > > public boolean dispatchTouchEvent(MotionEvent ev) {
> > > > > > >   boolean returnValue=false;
> > > > > > >   returnValue=returnValue | mGestureDetector.onTouchEvent(ev);
> > > > > > >   returnValue=returnValue | super.dispatchTouchEvent(ev);
> > > > > > >   return returnValue;
>
> > > > > > > }
>
> > > > > > > Good luck with the development.
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: delete my app on G1

2008-11-03 Thread Ric Higgins


Thank you for that! How would I have learned that unless u told me? Much 
appreciated!

On Nov 3, 2008 1:53 PM, "Kipling Inscore" <[EMAIL PROTECTED]> wrote:


If you mean removing the desktop icon, hold the icon until your phone
vibrates and the application pane tab turns into a trash bin, then
drag the icon to the trash bin.

On Mon, Nov 3, 2008 at 1:41 PM, ric <[EMAIL PROTECTED]> wrote: > > I 
have removed applications ...


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



[android-developers] Re: newb layout problem

2008-11-03 Thread Mark Murphy

Brian wrote:
> I've gone through the Notepad tutorials and thought I had a grasp of
> the basics, but apparently not.  I'm trying to create a screen with a
> TextView on top with a row of buttons beneath it, but only the
> TextView is displaying.  The buttons are not.  What am I missing?

You have the TextView height set to fill_parent. Android makes a single 
pass through layout files, so by the time it gets to your buttons, there 
is no more vertical space available.

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

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



[android-developers] newb layout problem

2008-11-03 Thread Brian

I've gone through the Notepad tutorials and thought I had a grasp of
the basics, but apparently not.  I'm trying to create a screen with a
TextView on top with a row of buttons beneath it, but only the
TextView is displaying.  The buttons are not.  What am I missing?

Here's my layout.xml

http://schemas.android.com/apk/res/
android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>









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



[android-developers] Re: delete my app on G1

2008-11-03 Thread Kipling Inscore

If you mean removing the desktop icon, hold the icon until your phone
vibrates and the application pane tab turns into a trash bin, then
drag the icon to the trash bin.

On Mon, Nov 3, 2008 at 1:41 PM, ric <[EMAIL PROTECTED]> wrote:
>
> I have removed applications from my G1 and now how do i remove the
> imprint of the applications left on the 'desktop' of the phone? Thanks
> or the info if you can help.. hope someone has the answer. :)
>
> On Nov 2, 4:49 am, zero <[EMAIL PROTECTED]> wrote:
>> you should be able to delete anything thru adb shell.
>> it's a bit tricky, but works.
>>
>> On Nov 2, 12:41 pm, Guillaume Perrot <[EMAIL PROTECTED]> wrote:
>>
>> > Do not uninstall applications from the adb shell,
>> > Run the following in a shell:
>> > adb -d uninstall applicationpackagename (not the appplication name)
>>
>> > On Nov 1, 6:05 am, sd <[EMAIL PROTECTED]> wrote:
>>
>> > > I am able to delete my app on the emulator either using adb or the
>> > > file explorer on ddms. However,  I have been having trouble deleting
>> > > my app on G1. I get 'permission denied' when I use adb to browse the
>> > > data directory. I cannot expand the 'data' folder on the file explorer
>> > > either.
>>
>> > > Any ideas what I am missing?
>>
>> > > Thanks in advance for your help!
>> > > sd
>
> >
>

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



[android-developers] how to get AIDL to gen .java in Eclipse?

2008-11-03 Thread DulcetTone

trying to resolve an issue and I hurt myself:

I removed an AIDL file and synced the project.
I restored the AIDL file and synced the project.  The .java did not
get regenerated.  I did a "build all".  Nothing.

How do I get Eclipse to do the right thing?

tone


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



[android-developers] Re: Sending email

2008-11-03 Thread Daniel Bradby

I'm assuming you meant to say it only works on the phone, not the  
emulator :)



On 04/11/2008, at 1:13 AM, john <[EMAIL PROTECTED]> wrote:

>
> Unfortunately yes, this only seems to work on the emulator. We had to
> break down and buy a G1 (as well as a two-year plan) so we could
> realistically get our software tested and released. It would be
> interesting, though, to see if you could install the email program on
> the emulator. If you do, you might want to post it to help some people
> out.
>
> Good luck!
>
> On Oct 31, 4:04 pm, dbradby <[EMAIL PROTECTED]> wrote:
>> John - I'm assuming this only works on the real device and not the
>> emulator?
>>
>> I'm trying
>>
>> Intent sendIntent = new  
>> Intent(Intent.ACTION_SEND);
>> sendIntent.putExtra(Intent.EXTRA_TEXT,  
>> "email text");
>> sendIntent.putExtra(Intent.EXTRA_SUBJECT,  
>> "Subject");
>> sendIntent.setType("message/rfc822");
>>
>>  
>> startActivity(Intent.createChooser(sendIntent, "Title:"));
>>
>> and am getting "No Applications can perform this action" which is the
>> same when you select the email address in the contact list of the
>> emulator. Prob because there is not email client in the emulator
>> right?
>>
>> Justin - Is it possible to have access to the .apk for the mail
>> programs that come with the G1 so we can install them on the  
>> emulator?
>>
>> Thanks
>>
>> On Nov 1, 12:36 am, john <[EMAIL PROTECTED]> wrote:
>>
>>> Hey, that did it! I set the the mime type to 'message/rfc822' and it
>>> worked right away. Brings up the default mail application with the
>>> fields that I specified populated.
>>
>>> I had been trying to send it with a mime of text/plain and text/ 
>>> html.
>>> I thought that by specifying an EXTRA_EMAIL it would fire the right
>>> broadcast receivers, but I guess the mime type is what counts.
>>
>>> Thanks again!
>>
>>> On Oct 30, 3:20 pm, "Justin" <[EMAIL PROTECTED]> wrote:
>>
 John,
>>
 Take a look athttp://code.google.com/android/reference/android/ 
 content/Intent.html,
 there are several e-mail related fields you probably want to set.  
 For a
 mime type try 'message/rfc822' or 'message/rfc2822'. I haven't  
 tried this
 myself, so let me know how it works.
>>
 Cheers,
 Justin
 Android Team @ Google
>>
 Original Message Follows:
 
 From: john <[EMAIL PROTECTED]>
 Subject: [android-developers] Sending email
 Date: Thu, 30 Oct 2008 08:02:36 -0700 (PDT)
>>
 Hello!
>>
 Thanks in advance for trying to help me out. It doesn't seem like
 anyone has found a solution to this problem yet, so hopefully we  
 can
 figure this out and help a lot of people.
>>
 I'm trying to get my application to send an email, but i can't  
 seem to
 find any solutions. Here's what I'm trying:
>>
 I've got an Intent (called sender in this example) set to
 Intent.ACTION_SEND, with various email extras.
>>
 When I try startActivity(Intent.createChooser(sender, "Select send
 method."));
 I get "No application can handle this request"
>>
 And when I try sendBroadcast(Intent.createChooser(sender, "Select  
 send
 method."));
Nothing happens at all.
>>
 Is there something I need to put in my manifest file, or am I doing
 this completely wrong?
>>
 Any help anyone can offer would be greatly appreciated. Happy  
 coding!
>>
 -John
> >

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



[android-developers] AppMarket: does changing title/description of an app wipe out ratings and reviews?

2008-11-03 Thread zl25drexel

Hi all

I know putting a new version upgrade will clear out ratings and
reviews. Does anyone knows if changing title/description of an app
will wipe out ratings and reviews?

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



[android-developers] Re: some audio problems

2008-11-03 Thread Robert Green

For games use small, low bitrate OGGs with SoundPool.

On Nov 3, 2:09 pm, Dave <[EMAIL PROTECTED]> wrote:
> It's likely that the CPU is saturated and can't keep up with audio. If
> you have a choice, I suggest using OGG files because there is less
> overhead involved in playing them.
>
> On Nov 2, 8:10 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > dear all,
>
> > I've been writing a game and need to play an audio effect with some
> > event trigged,
> > and i use MediaPlayer class and mp3 source files to implement it.
>
> > i first create the MediaPlayer instance in the constructor and invoke
> > play() when the event is trigged.
>
> > but it happened again oftentimes to show the warning message in the
> > DDMS
>
> > obtainBuffer timed out (is CPU pegged?) user=0101, server=0001
> > write blocked for XX msecs
>
> > these two message,  the sound would still played, but delayed, so the
> > sound and visual  effect won't synchronized.
>
> > please give some commons to help, 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Flash Player

2008-11-03 Thread [EMAIL PROTECTED]

I want to know if someone is willing to work with me on getting a
mobile flash player working on the android, not only will it need to
work great with all flash and current android apps it would need to be
optimized so not to drain too much battery life.

And help, or advise on this project, contact 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: delete my app on G1

2008-11-03 Thread ric

I have removed applications from my G1 and now how do i remove the
imprint of the applications left on the 'desktop' of the phone? Thanks
or the info if you can help.. hope someone has the answer. :)

On Nov 2, 4:49 am, zero <[EMAIL PROTECTED]> wrote:
> you should be able to delete anything thru adb shell.
> it's a bit tricky, but works.
>
> On Nov 2, 12:41 pm, Guillaume Perrot <[EMAIL PROTECTED]> wrote:
>
> > Do not uninstall applications from the adb shell,
> > Run the following in a shell:
> > adb -d uninstall applicationpackagename (not the appplication name)
>
> > On Nov 1, 6:05 am, sd <[EMAIL PROTECTED]> wrote:
>
> > > I am able to delete my app on the emulator either using adb or the
> > > file explorer on ddms. However,  I have been having trouble deleting
> > > my app on G1. I get 'permission denied' when I use adb to browse the
> > > data directory. I cannot expand the 'data' folder on the file explorer
> > > either.
>
> > > Any ideas what I am missing?
>
> > > Thanks in advance for your help!
> > > sd

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



[android-developers] "return after calls"

2008-11-03 Thread [EMAIL PROTECTED]

Hi,

I would like my application to re-launch when a call started from
within it is dropped.

I am listening to 'onCallStateChanged', but cant figure out how to
launch my app from the _IDLE case.

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



[android-developers] Re: "hooking" to the PHONE button

2008-11-03 Thread Shawn
I don't think you would be allowed to remap the phone button that would force 
people to use your app even if they didn't want to and my be considered 
malacious. That's just an opinion though
-Original Message-
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>

Date: Mon, 3 Nov 2008 13:09:53 
To: Android Developers
Subject: [android-developers] "hooking" to the PHONE button



Hi,

How can I make my own application run whenever the user presses the
green PHONE button ?

TIA


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



[android-developers] "hooking" to the PHONE button

2008-11-03 Thread [EMAIL PROTECTED]

Hi,

How can I make my own application run whenever the user presses the
green PHONE button ?

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



[android-developers] "hooking" to the PHONE button

2008-11-03 Thread [EMAIL PROTECTED]

Hi,

How can I make my own application run whenever the user presses the
green PHONE button ?

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



[android-developers] pop up user input field

2008-11-03 Thread Shawn Burkit


Can anyone show me the proper way to call a popup dialog with a user input 
text field. I understand it needs to be its on class but do not understand 
how its being called when the menu option is selected.  The exaple I'm 
looking at is the notepad included in the sdk and the option to edit the 
title. Since the menu is being created dynamically I cannot see how its 
being connected

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



[android-developers] Re: Does Android have a PIM API for developers?

2008-11-03 Thread friedger

The calendar content provider uses authority "calendar".

So you can use something like getContentResolver() with e.g.
content://calendar/events or 
content://calendar/instances/when//

More details can be found by code reading
http://android.git.kernel.org/?p=platform/packages/providers/CalendarProvider.git;a=blob_plain;f=src/com/android/providers/calendar/CalendarProvider.java;hb=refs/heads/release-1.0

Friedger

On 3 Nov., 18:44, ppcinfo <[EMAIL PROTECTED]> wrote:
> I'm looking for an API that will allow me to access calendar and tasks
> information (Similar to Pocket-Outlook (POOM) for the Windows Mobile
> device), however, I can't seem to find any reference to such an API.
>
> Does something exist that will allow me to query, insert, delete,
> modify, etc. calendar and task items in the Android OS?
>
> Thanks,
>
> ppcinfo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: some audio problems

2008-11-03 Thread Dave

It's likely that the CPU is saturated and can't keep up with audio. If
you have a choice, I suggest using OGG files because there is less
overhead involved in playing them.

On Nov 2, 8:10 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> dear all,
>
> I've been writing a game and need to play an audio effect with some
> event trigged,
> and i use MediaPlayer class and mp3 source files to implement it.
>
> i first create the MediaPlayer instance in the constructor and invoke
> play() when the event is trigged.
>
> but it happened again oftentimes to show the warning message in the
> DDMS
>
> obtainBuffer timed out (is CPU pegged?) user=0101, server=0001
> write blocked for XX msecs
>
> these two message,  the sound would still played, but delayed, so the
> sound and visual  effect won't synchronized.
>
> please give some commons to help, 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WPA support

2008-11-03 Thread Dan B.

you won't find EAP/PEAP support because Cisco themselves (the
developers of PEAP) have not only stopped developing and supporting
it, but are warning away from it's use due to false sense of security
that it brings. Cisco's recommendations are to use other connections
types and session based authentication if needed. If your school or
business is still using PEAP, refer them to Cisco's website.

On Oct 23, 7:31 pm, hyc <[EMAIL PROTECTED]> wrote:
> So I just got a shiny new G1 yesterday. Much to my disappointment I
> found that its wifi menu only supports WPA-PSK, while I need WPA-EAP/
> PEAP support. I see from the recent source code release that the
> freeware wpa_supplicant is underneath all this, and that project
> supports EAP etc. so why is that functionality missing from the UI?
>
> Next question is, what would it take to fix this and enable the
> support in the UI?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: All apps are free right now?

2008-11-03 Thread BikingBill

Q1 2009 by all reports.

On Nov 3, 5:35 am, Mark Murphy <[EMAIL PROTECTED]> wrote:
> joshbeck wrote:
> > It seems like all of tha apps on the marketplace are free right now.
> > I'm trying to find some information about why this is.
>
> The Android Market is in a beta release and is only supporting free apps
> at this time. It should start supporting paid apps eventually, though
> I'm not sure if there's been an official date set for that yet.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 1.4 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Urgent: MapActivity - Couldn't get connection factory client (API key does not work)

2008-11-03 Thread Shahbaz Khalid
Hi,

Very frustrated about this error since we can reproduce this on a number of
machines.

The error is self explanatory, googlemaps don't appear at all. This was
working perfectly (albeit all the IOException warnings) before the API key
requirement. Moving to another coordinate in googlemaps (Sending gps
latitude/longitude coordinates through DDMS) doesn't work either (this
worked before).

Is there anyone who can post a working sample (with xmls) that works for
them? Would also appreciate if they can post their platform/eclipse/jdk
version details.

Thanks

On Mon, Nov 3, 2008 at 2:48 PM, ams163 <[EMAIL PROTECTED]> wrote:

>
> Hello,
>
> We've tried this on a number of our development machines, but so far
> this is not working for us.
>
> We are consistently getting the following errors in DDMS LogCat :
>
> 'MapActivity - Couldn't get connection factory client'
>
> and a LOT of :
>
> 'WARN/AndroidHttpConnectionFactory(167): IOException in HttpClient:
> The target server failed to respond'
>
> warnings. A few days ago this was working for us when there wasn't the
> googlemaps API key requirement, although we still had these HttpClient
> warning messages coming up for us.
>
> We are using Android SDK Debug certificate in eclipse as instructed
> here:
>
> http://code.google.com/android/toolbox/apis/mapkey.html
>
> Eclipse version is : Version: 3.3.2, Build id: M20080221-1800
> JDK: jdk1.6.0_06
> Latest Android SDK and Eclipse Plugin
> Platform, Windows XP SP2
>
> Would appreciate any help.
>
> 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: G1 treated as disk... All the time

2008-11-03 Thread Alvin Yates

Nothing.  ADB doesn't detect the phone as being attached.  Does
Windows typically let ADB respond while using it as a disk drive?  If
so, then I probably have something wrong with the drivers, and that's
probably not going to resolve nicely.

On Nov 3, 11:00 am, ecompositor <[EMAIL PROTECTED]> wrote:
> What happends when you type in adb devices
>
> On Nov 3, 1:37 pm, Alvin Yates <[EMAIL PROTECTED]> wrote:
>
> > I downloaded the driver for the G1 and attached it to my PC so I could
> > resume development after my MacBook decided off was better than on.
> > Was test driving the phone via USB and attached it as a storage
> > device.
>
> > The problem now is, Windows won't stop treating the phone as a USB
> > drive, even when the USB option is unchecked (It treats it as having
> > no capacity).
>
> > Has anyone else run into this problem?  Is there a way to fix it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Android Security Paper Now Available

2008-11-03 Thread Alex Stamos

Howdy, Android Devs-

We would like to announce the availability of “Developing Secure
Mobile Applications for Android” by Jesse Burns of iSEC Partners.
It’s available here:
http://www.isecpartners.com/files/iSEC_Securing_Android_Apps.pdf
iSEC was excited to be a part of the Android project and to have the
opportunity to work on this cool new platform.  Android has added a
great deal of new framework features and operating system
functionality to the base Linux kernel, and introduces new security
considerations for developers building mobile applications.   Our
paper includes an overview of Android’s security model and offers
recommendations on how to use the new Android facilities, such as
BroadcastReceivers and Binder, more securely.
If you have any questions or comments about the paper, please let us
know at [EMAIL PROTECTED] or ask a question on
Android-Security-Discuss.
   -Alex Stamos
Partner, iSEC Partners

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



[android-developers] Re: WPA support

2008-11-03 Thread KKing

I am looking for this progam supported on the G1 for tmobile, not for
the other HTC phones

On Oct 23, 5:31 pm, hyc <[EMAIL PROTECTED]> wrote:
> So I just got a shiny new G1 yesterday. Much to my disappointment I
> found that its wifi menu only supports WPA-PSK, while I need WPA-EAP/
> PEAP support. I see from the recent source code release that the
> freeware wpa_supplicant is underneath all this, and that project
> supports EAP etc. so why is that functionality missing from the UI?
>
> Next question is, what would it take to fix this and enable the
> support in the UI?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Proper way of handling orientation change + async thread

2008-11-03 Thread zl25drexel

hi,

my app has a search function which when a button is clicked, it
creates a new dialog and then start a new background thread that
performs an asynchronous http request, when the http request is
finished, the background thread cancels the dialog and the data is
displayed on screen.

I notice however, if i change the orientation of the screen while the
background thread is running, the app will crash. The error log shows
the following:

W/dalvikvm(  292): threadid=3: thread exiting with uncaught exception
(group=0x40010e28)
E/AndroidRuntime(  292): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(  292): java.lang.IllegalArgumentException: View not
attached to window manager
E/AndroidRuntime(  292):at
android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:
331)
E/AndroidRuntime(  292):at
android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:200)
E/AndroidRuntime(  292):at android.view.Window
$LocalWindowManager.removeView(Window.java:401)
E/AndroidRuntime(  292):at
android.app.Dialog.dismissDialog(Dialog.java:249)
E/AndroidRuntime(  292):at android.app.Dialog.access
$000(Dialog.java:59)
E/AndroidRuntime(  292):at android.app.Dialog
$1.run(Dialog.java:93)
E/AndroidRuntime(  292):at
android.app.Dialog.dismiss(Dialog.java:233)
E/AndroidRuntime(  292):at
android.app.Dialog.cancel(Dialog.java:838)
E/AndroidRuntime(  292):at com.yellowbook.android2.SearchHelper
$3.handleMessage(SearchHelper.java:97)
E/AndroidRuntime(  292):at
android.os.Handler.dispatchMessage(Handler.java:88)
E/AndroidRuntime(  292):at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime(  292):at
android.app.ActivityThread.main(ActivityThread.java:3742)
E/AndroidRuntime(  292):at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  292):at
java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(  292):at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:739)
E/AndroidRuntime(  292):at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
E/AndroidRuntime(  292):at
dalvik.system.NativeStart.main(Native Method)

Does anyone knows a better way to do async processing that wont crash
on orientation change?

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



[android-developers] Re: RFCOMM or USB Serial on G1

2008-11-03 Thread Mark Murphy

Jim wrote:
> On the G1 is it possible to get access to an external device over
> either bluetooth RFCOMM or vie a serial port?  I have a device that
> offers data in either form and I'd like to get this data into a G1
> cell phone.

Not in Android 1.0, AFAIK.

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

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



[android-developers] Re: G1 treated as disk... All the time

2008-11-03 Thread ecompositor

What happends when you type in adb devices

On Nov 3, 1:37 pm, Alvin Yates <[EMAIL PROTECTED]> wrote:
> I downloaded the driver for the G1 and attached it to my PC so I could
> resume development after my MacBook decided off was better than on.
> Was test driving the phone via USB and attached it as a storage
> device.
>
> The problem now is, Windows won't stop treating the phone as a USB
> drive, even when the USB option is unchecked (It treats it as having
> no capacity).
>
> Has anyone else run into this problem?  Is there a way to fix it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: looking for a developer to write an app for me

2008-11-03 Thread Michael

You want this to be a real functional app, or just be what's
essentially spam advertising?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] What's the best way to save a picture?

2008-11-03 Thread Robert Green

I'm working on a drawing app and need to get some "Save" functionality
in.  What I'd like to do is:

1)  Prompt the user for a filename
2)  Check for existing file - confirm overwrite
3)  Save to SD.

I would think this should save in the same spot as Photos taken by the
camera, unless you guys think it should have its own spot.  I want the
drawings to come up with the photos in the Photos app.

I tried to use
MediaStore.Images.Media.insertImage(getContentResolver(), bitmap, "My
Drawing", "description");

but that just gives me a URI error.  Any ideas?  Isn't there a built
in filechooser of some sort?  I tried to find it but came up empty.

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



[android-developers] G1 treated as disk... All the time

2008-11-03 Thread Alvin Yates

I downloaded the driver for the G1 and attached it to my PC so I could
resume development after my MacBook decided off was better than on.
Was test driving the phone via USB and attached it as a storage
device.

The problem now is, Windows won't stop treating the phone as a USB
drive, even when the USB option is unchecked (It treats it as having
no capacity).

Has anyone else run into this problem?  Is there a way to fix it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android 1.0r1, MapView not found

2008-11-03 Thread mikew5673

Greg, great hint. The problem seems to be solved, I can proceed with
the key to use Google Maps. Thanks

On 3 Nov., 18:22, Greg <[EMAIL PROTECTED]> wrote:
> Did you make sure that the  manifest entry is contained
> WITHIN the  tags rather than outside of it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] RFCOMM or USB Serial on G1

2008-11-03 Thread Jim

On the G1 is it possible to get access to an external device over
either bluetooth RFCOMM or vie a serial port?  I have a device that
offers data in either form and I'd like to get this data into a G1
cell phone.

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



[android-developers] cannot change size of TextView inside FrameLayout

2008-11-03 Thread Dave Kong

I have a layout file where part of it is below. 2 TextViews nested
inside the same FrameLayout so that the 1st one (being lower in the Z-
order) shows up behind the text (which has transparent background).






My goal is to change the width of the first TextView so that it
represents the HP of a player. But no matter what I do programatically
(e.g. setWidth(x), measure(), requestLayout(), etc.) nothing seems to
change the size of the TextView.

Can someone help? I must be missing something stupid and the
documentation doesn't point me anywhere.

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



[android-developers] Re: OpenGL Basics

2008-11-03 Thread DSmith

If you just want to get some animation running quickly, don't worry
about understanding GLSurfaceView: reuse it as is and concentrate on
understanding the CubeRenderer class.  You can even reuse most of that
class, just rewrite the drawFrame method to draw what you want.

DSmith

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



[android-developers] DatagramSocket.receive() does not receive datagrams when the socket is opened in connected mode

2008-11-03 Thread bloodycorner

In-bound datagrams are not received in the code below. When I comment
out the call to DatagramSocket.connect() and specify the server+port
in the DatagramPacket  constructor it works fine.

// connect to echo server at _hostName and _port
 InetAddress serverAddr =
InetAddress.getByName(_hostName);
DatagramSocket socket = new DatagramSocket();
socket.setSoTimeout( 5000 );

   // this causes socket.receive to timeout
   socket.connect(serverAddr,_port);

   byte[] buffer = ("Hello from Client").getBytes();

DatagramPacket packet = new
DatagramPacket(buffer,buffer.length);

socket.send( packet );
Date timeSent = new Date();
Logger.getLogger().info("sent packet at 
"+timeSent.toString());
socket.receive( packet );
Date timeReceived = new Date();
Logger.getLogger().info("received packet at
"+timeReceived.toString());

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



[android-developers] Camera causing crash

2008-11-03 Thread Jason Proctor

>It is yuv422sp, which is equivalent to Android's YCbCr_422_SP.

on the G1, Camera claims the preview format is number 16, 
YCbCr_422_SP, but it isn't. it's YCbCr, but in 411 format. hence 
smaller relative frame size than the emulator. it's close to YUV 
411p, but the colour transform function is different for YUV than it 
is for YCbCr. in YUV the colour portion is absolute, whereas in YCbCr 
it's a correction from green.

(i'm no expert, so feel free to correct any of the above!)

>I've now done both, being forced to because the still image capture
>was a near guarantee for OutOfMemoryError crashes, but it requires a
>bit of reverse engineering. The SDK 1.0 r1 emulator only displays the
>Y part, but the preview data also contains the color information for
>the moving colored rectangle.

this is interesting because i *think* i'm only getting b&w preview 
data on the emulator *and* the G1.

on the emulator, i get straight-up b&w regardless of whether i add in 
the UV component. which makes sense, because the Y component is 
greyscale.

on the G1, in my yuv411p decoder, if i leave out the CbCr portion, i 
get big time green, which is right. if i put them back in, i get a 
greyscale image, correcting the green. this makes sense, but i'm 
wondering why i'm not getting the colour i'm seeing on the screen.

btw my G1 might be broken. the camera always displays previews in the 
wrong orientation. in portrait, i have to turn my head 90deg to see 
the image upright. in landscape, i can hold the camera in portrait 
and see the image fine. other G1s here don't have this problem...


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



[android-developers] Re: "Cannot finish download. There is not enough space."

2008-11-03 Thread Kipling Inscore

Is that 48MB on the device's internal memory or on the SD card in the
device? Downloads go to the SD card.

On Sun, Nov 2, 2008 at 10:22 PM, GasBot <[EMAIL PROTECTED]> wrote:
>
> I'm trying to set up my IIS server to serve out my APK for anyone who
> wants to download it directly from my site.  I added the .apk
> extension and mime type to my site which changed the error I was
> getting in the android's browser from not compatible with the device,
> to not enough space on the device.  However it's showing that I have
> more than enough space (the apk is only 9KB and device shows over 48MB
> available).  I'm guessing there's some other kind of configuration
> error going on with this.  Has anyone seen this issue 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Does Android have a PIM API for developers?

2008-11-03 Thread ppcinfo

I'm looking for an API that will allow me to access calendar and tasks
information (Similar to Pocket-Outlook (POOM) for the Windows Mobile
device), however, I can't seem to find any reference to such an API.

Does something exist that will allow me to query, insert, delete,
modify, etc. calendar and task items in the Android OS?

Thanks,

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



[android-developers] DatePicker widget element

2008-11-03 Thread Gil

I need a widget that allows the user to increment/decrement an integer
value, identical to the ones used by the DatePicker. Is one element
(change day/month/year) of the DatePicker available as a widget that I
can use in my application?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Join via ContentProvider

2008-11-03 Thread jtaylor

To change the indicator when expanded, you can do something with the
state_expanded state. In the drawable which indicates the Drawable
parameter of setGroupIndicator(drawable), you set the state_expanded
state in the context of a stateful Drawable. Don't see any examples of
how do do this.

http://code.google.com/android/reference/android/R.styleable.html#ExpandableListGroupIndicatorState_state_expanded


- Juan T.



On Nov 3, 12:25 am, "for android" <[EMAIL PROTECTED]> wrote:
> Also i was interested in know when I expand a group ,is there any way i
> change image other than implementing the
> public void setOnGroupExpandListener(
> ExpandableListView.OnGroupExpandListeneronGroupExpandListener)
> and then chagning the image through the api reference
> u  provided.
>
> Also,can I have different images as indicators to each item of the group in
> an expandable list.Thats something like this
>
> Image1  
> Image2  
> Image3  
>
> Thanks for your time
>
> On Mon, Nov 3, 2008 at 10:39 AM, jtaylor <[EMAIL PROTECTED]> wrote:
>
> > public void setGroupIndicator(Drawable groupIndicator)
>
> >http://code.google.com/android/reference/android/widget/ExpandableLis...)
>
> > - Juan T.
>
> > On Oct 29, 4:00 am, "for android" <[EMAIL PROTECTED]> wrote:
> > > How can i create a customised Expandable list where the group identifer
> > > image is different than the already given ones in the apis..
>
> > > On Mon, Oct 27, 2008 at 6:46 PM, jtaylor <[EMAIL PROTECTED]> wrote:
>
> > > > I'm just supposing that each class is a table. I don't know how
> > > > android.provider is set up, though I guess one can now see from the
> > > > source code.
>
> > > > - Juan
>
> > > > On Oct 27, 9:15 am, jtaylor <[EMAIL PROTECTED]> wrote:
> > > > > That looks like two tables.
>
> > > > > Contacts.People
> > > > > Contacts.People.Phones
>
> > > > > - Juan
>
> > > > > On Oct 26, 12:52 pm, Anm <[EMAIL PROTECTED]> wrote:
>
> > > > > > jtaylor,
> > > > > > Did you read the example?  It does not do a joint.  Instead it uses
> > a
> > > > > > Uri subpath notation for its child query, within the same table
> > rather
> > > > > > than joining multiple tables.  The references to "group" in the
> > code
> > > > > > are not contact group membership, but rather ExpandableList parent
> > > > > > node/"groups".
>
> > > > > > On Oct 25, 11:51 am, jtaylor <[EMAIL PROTECTED]> wrote:
>
> > > > > > > ExpandableList2.java has the getChildrenCursor() (in the
> > > > > > > MyExpandableListAdapter inner class) which has the code for
> > obviously
> > > > > > > a contentprovider Join.
>
> > > >http://code.google.com/android/samples/ApiDemos/src/com/example/andro.
> > ..
>
> > > > > > > - Juan
>
> > > > > > > On Oct 25, 2:47 pm, jtaylor <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > ExpandableList2.
> > > >http://code.google.com/android/samples/ApiDemos/src/com/example/andro.
> > ..
>
> > > > > > > > - Juan
>
> > > > > > > > On Oct 24, 3:05 am, Anm <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > I'm struggling to understand how to do a join, if its
> > possible,
> > > > with
> > > > > > > > > the decomposed SQL arguments of the ContentProvider APIs.  Is
> > > > there an
> > > > > > > > > example out there?
>
> > > > > > > > > Or if not, could some code up a quick example, say joining
> > People
> > > > with
> > > > > > > > > GroupMembership?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android 1.0r1, MapView not found

2008-11-03 Thread Greg

Did you make sure that the  manifest entry is contained
WITHIN the  tags rather than outside of it?

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



[android-developers] opengl changes in new sdk

2008-11-03 Thread petunio

Hi there

I used to use the following sentence:
OpenGLContext mGLContext = new OpenGLContext(0);
in the old (3) sdk.

Now, with the new one, it seems that this function is not there
anymore...

does anybody knows an easy way of getting an opengl context?

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



[android-developers] Re: How to draw fliped & mirror image?

2008-11-03 Thread Guolong

Great! the answer is really helpful for me.
Thanks a lot.

BTW, it would be better if there are clear explain of  android api
document.


On Nov 4, 12:14 am, Mike Reed <[EMAIL PROTECTED]> wrote:
> canvas.drawBitmap(bitmap, matrix, ...)
>
> This is really just a more efficient way to do...
>
> canvas.save(Canvas.MATRIX_SAVE_FLAG);
> canvas.concat(matrix);
> drawBitmap(bitmap, 0, 0, ...);
> canvas.restore();
>
> In the original example, the matrix had a -1 scale in X. This means
> that all X coordinates will be negated. Thus the image will draw
> flipped in X, but it will also appear to the left of the Y axis, which
> defaults to the left edge of the view. Thus the fix was to post-
> translate everything to the right by at least the width of the bitmap,
> to make it appear on screen.
>
> Another fix could have been
>
> matrix.setScale(-1, 1);
> matrix.postTranslate(bitmap.getWidth(), 0);
> canvas.drawBitmap(bitmap, matrix, ...);
>
> mike
>
> On Nov 3, 2008, at 10:46 AM, Guolong wrote:
>
> thanks, it do work.
>
> On Nov 3, 1:44 pm, Romain Guy <[EMAIL PROTECTED]> wrote:
>
> >  sprite =
> > BitmapFactory
> > .decodeResource(appContext.getResources(),R.drawable.spritegfx);
> >  canvas.save();
> >  canvas.scale(-1.0f, 1.0f);
> >  canvas.drawBitmap(sprite, 0,0, null);
> >  canvas.restore();
>
> > This will work but you also need to translate the image too. You are
> > just drawing it outside of the canvas.
>
> > On Sun, Nov 2, 2008 at 8:42 AM, Guolong <[EMAIL PROTECTED]>
> > wrote:
>
> >> hello,
>
> >> I want to draw a fliped image and try following code:
>
> >>  sprite =
> >> BitmapFactory
> >> .decodeResource(appContext.getResources(),R.drawable.spritegfx);
> >>  Matrix temp1=new Matrix();
> >>  temp1.preScale(-1.0f,1.0f);
> >>  canvas.drawBitmap(sprite, temp1, null);
>
> >> But it does not work. neither work for the following code:
>
> >>  sprite =
> >> BitmapFactory
> >> .decodeResource(appContext.getResources(),R.drawable.spritegfx);
> >>  canvas.save();
> >>  canvas.scale(-1.0f, 1.0f);
> >>  canvas.drawBitmap(sprite, 0,0, null);
> >>  canvas.restore();
>
> >> Any idea for this problem please?
>
> >> Any way, following code do work.
> >>  sprite =
> >> BitmapFactory
> >> .decodeResource(appContext.getResources(),R.drawable.spritegfx);
> >>  Matrix temp1=new Matrix();
> >>  temp1.preScale(-1.0f,1.0f);
> >>  flipedSprite = Bitmap.createBitmap(sprite , 0, 0,
> >> sprite .getWidth(),
> >>   sprite .getHeight(), temp1, false);
> >>  canvas.drawBitmap(flipedSprite , 0,0, null);
>
> >> But I just don't want to create a new bitmap for every fliped image
> >> because there're a lot of fliped or mirrored image in my program.
>
> > --
> > Romain Guywww.curious-creature.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: INSTALL_FAILED_UPDATE_INCOMPATIBLE

2008-11-03 Thread Cheryl Sedota

What do you mean by "uninstall it fully"?  I did an "adb uninstall
" but that does not appear to "fully" uninstall it :)
This is on the G1 so I have no access to the /system or /data folders.

Thanks,
Cheryl

On Nov 3, 10:32 am, Michael <[EMAIL PROTECTED]> wrote:
> Did you sign different versions of your app with different keys?  I
> had this error message when I changed from the debug key to a real
> key, and what I had to do was reinstall the old version, uninstall it
> fully, then install my new version.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] com.google.wireless.* Google APIs and how to login to Google

2008-11-03 Thread Miguel Paraz

Hi,
How can I use the com.google.wireless.* APIs with source in source
code?

I found the AndroidGDataClient. I would like to use for Spreadsheets.
But, I see it uses com.google.android.googlelogin.* which has no
source.

Is this a separate product?
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] CSS Transform in Android Webkit Browser

2008-11-03 Thread 默默

When I use css transform ( -webkit-transform: scale(0.5)) in my html
page,
the dom object will become blank.
I have check the android's webkit porting.
The android graphics call the SkMatrix to do the real transform.
But it doesn't work. Does anyone have try the CSS transform in the
android webkit browser?

Here is my html code



#haha{
width: 100px;
height: 100px;
background-color: red;
opacity: 1.0;
-webkit-transition: opacity 1s linear;
-webkit-transform: scale(0.5);
}


test



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



[android-developers] Re: INSTALL_FAILED_UPDATE_INCOMPATIBLE

2008-11-03 Thread Michael

Did you sign different versions of your app with different keys?  I
had this error message when I changed from the debug key to a real
key, and what I had to do was reinstall the old version, uninstall it
fully, then install my new version.

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



[android-developers] Re: INSTALL_FAILED_UPDATE_INCOMPATIBLE

2008-11-03 Thread Cheryl Sedota

I am getting this error on the G1 (so the advice to "-wipe-data" is
not possible) and need help getting around it.

   Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]

   Package com.frogdesign.test1 signatures do not match the previously
installed version; ignoring
   Package couldn't be installed in /data/app/com.frogdesign.test1.apk

I have a few apps with a 'shared user id' - I installed two apps that
use the same shared user id and the two apps were built on different
machines so I realize that is the source of the problem.

However, I am stuck!  I uninstalled (via "adb uninstall ") all of my apps and tried to re-install a new build (suite of
apps) which was completely built on the same machine.  It appears that
the system is keeping around some old data (maybe in the cache?) for
the apps that I uninstalled because I get that error when I try to
install the fresh apps.

If anyone can please help I would really appreciate it, it's
completely blocking us from testing our apps on the G1.

Thanks,
Cheryl



On Oct 6, 6:26 am, Mark Murphy <[EMAIL PROTECTED]> wrote:
> Christine wrote:
> > However, now I can't install from Eclipse any more. Have to do a wipe
> > again. Is it possible to have two different emulator instances, one
> > for testing, one for development?
>
> I haven't tried this, but, quoting from the emulator documentation:
>
> "To run multiple emulator instances and let each maintain user data
> across sessions, start the instances with the -data option (see Startup
> Options) and supply the path to a user-data file. "
>
> http://code.google.com/android/reference/emulator.html
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Running draw9patch on Windows

2008-11-03 Thread Romain Guy

This looks like a Java SE bug to me :( You could try to get
draw9patch's source code and change the look and feel to the cross
platform look and feel and see if it works.

On Mon, Nov 3, 2008 at 7:36 AM, Ludwig <[EMAIL PROTECTED]> wrote:
> Can someone just confirm that in principle the utility draw9patch runs on
> Windows (Vista 32bit)?
> I can start it with draw9patch.bat, but I cannot open or write files with
> the FileChooser (which triggers an exception, as below).
> Dragging a file onto the application after start works, but then I cannot
> save it.
> Is this just my configuration somehow?
> Ludwig
>
> I just get:
> C:\Software\android\tools\draw9patch.bat
> Exception in thread "AWT-EventQueue-0"
> java.lang.ArrayIndexOutOfBoundsException:
>  3184
> at
> sun.awt.shell.Win32ShellFolder2.getFileChooserIcon(Win32ShellFolder2.
> java:748)
> at
> sun.awt.shell.Win32ShellFolderManager2.get(Win32ShellFolderManager2.j
> ava:248)
> at sun.awt.shell.ShellFolder.get(ShellFolder.java:221)
> at
> com.sun.java.swing.plaf.windows.WindowsLookAndFeel$LazyWindowsIcon.cr
> eateValue(WindowsLookAndFeel.java:1873)
> at javax.swing.UIDefaults.getFromHashtable(UIDefaults.java:185)
> at javax.swing.UIDefaults.get(UIDefaults.java:130)
> at javax.swing.MultiUIDefaults.get(MultiUIDefaults.java:44)
> at javax.swing.UIDefaults.getIcon(UIDefaults.java:411)
> at javax.swing.UIManager.getIcon(UIManager.java:613)
> at
> javax.swing.plaf.basic.BasicFileChooserUI.installIcons(BasicFileChoos
> erUI.java:237)
> at
> javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(BasicFileCh
> ooserUI.java:219)
> at
> javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserU
> I.java:135)
> at
> com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(Window
> sFileChooserUI.java:126)
> >
>



-- 
Romain Guy
www.curious-creature.org

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



  1   2   >