[android-developers] onDestroy/AlarmManager interaction on install?

2008-11-07 Thread songs

Hi,

I just tracked down a really hairy issue that made a lot of my users
think my app did nothing and made me really confused because I
couldn't recreate it on my phone.

In my onDestroy, an AlarmManager sets up a repeating alarm if a given
preference is set to true (defaults to true).  When the app is
installed for the first time, the onDestroy method is called.  Is this
expected?

I know that the onDestroy is called because I have a toast message
that shows when it is, and theoretically the AlarmManager is doing its
thing.  This causes some weird issue where the alarm and/or the
service it calls is permanently broken... until the app is
reinstalled.

This is why I didn't catch it until I tried really hard to look for it
using the emulator since I'd already tried several versions on my
phone and there was no way to put it back into the state where the
error would happen.  I'm now getting around this by checking another
preference variable and assuming it's an initial install if the pref
is null and immediately exiting out of the method.

Any ideas on why this is happening?  I don't see why the onDestroy is
called when the app is first installed, and I especially don't
understand why using the AlarmManager in onDestroy causes a basically
permanently broken state.

Regards,
Steve
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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 Database connectivity program

2008-11-07 Thread Ram Nataraaj Jayaraman
Hello guys,

   Thanks

On Wed, Nov 5, 2008 at 9:51 PM, Anders Rundgren
[EMAIL PROTECTED]wrote:


 Hello Ram,

 You could try to import the MSFT JDBC driver.  It is probably very
 big.

 But I would not.  The best is to create a web-service that talks to
 SQL server and returns the stuff you asked for.
 Few if anybody connects to SQL server over the Internet even if it is
 possible.
 Over VPN you can do that securely but direct SQL server access is not
 recommendable anyway.

 I hope that is of some utility even if it wasn't the answer you asked
 for :-)

 Anders

 On Nov 5, 6:51 am, Nataraaj [EMAIL PROTECTED] wrote:
  Hello guys,
 
   I want to connect android application with MS - SQL Server,
  where can i get sample code for this?
 
  Plz provide me with an web link for the source.
 
  Regards,
  Ram Nataraaj
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Thread Question

2008-11-07 Thread Guillaume Perrot
onCreate:
show the progress dialog in the main thread.
spawn your thread
when the thread completes, call dismiss() on the progress dialog from the
Thread using an Handler:
Handler mHandler = new Handler(); in the main thread
mHandler.post(new Runnable() {
   @Override
   public void run() {
  mProgressDialog.dimiss();
   }
}); in your thread when it completes.

You can also make intermediate refreshes if the operation is very long, for
example if you use a list view, you can post a refresh when adding a new
element.

Beware, when you call a function in another thread than the main one that
affect the UI, always use the Handler technique.

It should do the trick.

2008/11/7 joshbeck [EMAIL PROTECTED]


 First, thanks.
 I tried blocking the main thread, and quickly determined it wasn't
 a good idea.  Didn't solve anything, but hey at least I know now.

 Here's what I'm working on:
 I have an application.
 It downloads a bunch of data and then loads that data into variables
 which
 are used to present the user with an initial display.

 If I load the variables and show the display the screen just goes
 black for like
 20-30 seconds.

 If I background the thread, the variables aren't loaded prior to the
 display being drawn.

 Ideally, I'd like to use the progressbar  to show a loading screen,
 but the loading bar
 doesn't show up unless the primary view is ready.

 I'm think the solution is to have the program start an initial
 activity that is small and prompts
 the user for a button press. That button press then activates a thread/
 progress bar which
 in turn uses an intent to open the primary view.

 Make sense?

 If I have two separate activity files working in the same project, can
 I create public variables that are shared?

 Thanks,
 Josh Beck



 On Nov 6, 1:44 pm, Guillaume Perrot [EMAIL PROTECTED] wrote:
  You should not use the following in your case but there is a simple
  way to wait for a thread to complete, it's the Thread.join() function.
  This should be called only in a background thread which need to
  synchronize with another background thread for some reason.
  You should (i'd say must) never call blocking functions in the main
  thread.
 
  On Nov 6, 8:53 am, hackbod [EMAIL PROTECTED] wrote:
 
  http://code.google.com/android/intro/appmodel.html
 
   The last section is on threads, though it's strongly recommended you
   read the whole thing.
 
   On Nov 5, 9:58 pm, joshbeck [EMAIL PROTECTED] wrote:
 
I'm fairly new at this and just to the point where threading makes
sense.
So, my my main process is also considered a thread?
 
True --- False
 
I write a simple HelloWorld.java program.
This program has 1 thread, the main flow of execution.
 
?
 
Thanks,
Josh
 
On Nov 5, 7:26 pm, hackbod [EMAIL PROTECTED] wrote:
 
 If the thread takes a while to complete, your main application
 thread
 probably shouldn't wait for it to complete...  otherwise, what's
 the
 point of putting that work in the thread, if you're just going to
 block on it at some point.
 
 Instead, consider using a Handler to post a message back to the
 main
 thread when the background thread has finished its work.
 
 On Nov 5, 3:54 pm, joshbeck [EMAIL PROTECTED] wrote:
 
  I have a function that utilizes a thread.
 
  A variable the is needed for the program is populated after the
 thread
  call is made.
 
  The thread takes a while to complete.
 
  How can I make the program wait for a thread to complete before
 moving
  on?
 
  Thanks,
  Josh Beck
 


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



[android-developers] Re: Android on device GPS locate not working - code included

2008-11-07 Thread Guillaume Perrot
Our application also use GPS and it works as well as the maps application,
and we tested it on the G1.
Did you call requestUpdates on the LocationManager ?

2008/11/7 Amir [EMAIL PROTECTED]


 OK Android enthusiasts...here's where the GPS story has led us.  We
 figured out after hard-coding a location via finding latitude and
 longitude of my house that the application via the G1 does in-fact
 communicate flawlessly with our website.

 The issue though is turning on GPS capabilities on the device via
 private void updateLocation(Location loc).

 Basically, we did notice that when using the maps application on the
 G1, a 'GPS' icon is presented on the top right side of the phone.  We
 aren't seeing this through our application and we believe it's because
 the function, private void updateLocation(Location loc) never gets
 executed...

 Any thoughts?  Does anyone know what needs to be done to initiate this
 function?

 Cheers
 Amir

 On Nov 5, 9:48 am, Amir [EMAIL PROTECTED] wrote:
  Hah...no worries and good check on the permissions query, I'm trying
  something new today as well as hard-coding a location to see if my app
  can sniff it out.  I'll let everyone know about the outcome!
 
  Amir
 
  On Nov 4, 5:42 pm, C-LIS Keiji Ariyama [EMAIL PROTECTED] wrote:
 
  Amir, I'm sorry...
 
permissions are acquired:
Network communication (full)
Your location (fine (GPS), coarse (network-based) location)
 
   Keiji,
 
  Amirwrote:
Hi Guillaume,
 
Thanks for your reply and yes the standard map application manager
does display my location on the G1, but my application doesn't allow
display to my website just yet.  Any thoughts you may have that might
help?
 
What I see on the device is the GPS icon is turned on when my
application is running, but no data is transmitted to my Google map
that's on my website where I can track where I am.
 
Cheers
   Amir
 
On Nov 4, 12:17 pm, Guillaume Perrot [EMAIL PROTECTED]
wrote:
 
Did you check if the standard map application manages to display
 your
location ?
 
2008/11/4Amir[EMAIL PROTECTED]
 
Thanks, I'm still having issues, but now I do see the GPS 'icon' as
turned on when the application is running.  The issue though is
 that I
don't get anything on the map through our online site...no
 longitude
and latitude, or anything else.
 
Here's the revised code I'm using:
 
package org.gw.service;
 
import android.content.Context;
import android.location.Location;
import android.location.LocationManager;
 
public class LocationService extends AService {
 LocationManager lm = null;
 Location loc = null;
 public int excute() {
getDataMap().put(Command, LOCATION);
 
if (isOk()) {
  lm = (LocationManager)
getContext().getSystemService(Context.LOCATION_SERVICE);
  loc = lm.getLastKnownLocation(gps);
 if(loc == null)
   loc = lm.getLastKnownLocation(network);
 double sLatitude = loc.getLatitude();
   double sLongitude = loc.getLongitude();
String location = sLatitude+,+sLongitude;
 //location = 40.738412973944534,-73.98468017578125;
getDataMap().put(Des, OK);
getDataMap().put(Value, location);
 } else {
getDataMap().put(Des, error password!!);
}
 new ServiceClient(this).excute();
 
return 0;
}
}
 
On Nov 2, 8:46 am, Akbur [EMAIL PROTECTED] wrote:
 
   Amir,
 
I've developed a similar app just for kicks (so the wife can keep
track of me) ;)
 
I did the following:
 
LocationManager lm = (LocationManager)
context.getSystemService(Context.LOCATION_SERVICE);
 
Location loc =
 lm.getLastKnownLocation(gps);
if (loc == null)
{
locType = Network;
loc =
 lm.getLastKnownLocation(network);
}
 
In this case if the GPS service does not have a fix or is switched
off, the network, though not as accurate as GPS should be active
 and
give you an approximate location.
 
All the best,
Akbur
 
On Nov 2, 11:45 am, Guillaume Perrot [EMAIL PROTECTED]
 wrote:
 
It can take a while to the G1 to init the gps and return a fix.
And you must see the sky for the GPS to work.
Your code and permissions seem correct, try using the network
 provider
to test (which is faster and work in buildings unlike the GPS).
Make sure GPS location provider is enabled on the phone settings.
You can check your location with the standard map application.
 
On Nov 2, 5:42 am, C-LIS Keiji Ariyama [EMAIL PROTECTED]
 wrote:
 
HiAmir,
 
I had encountered a same situation. But my case is about
getLastKnownLocation(String) 
 

[android-developers] Re: adb shell permissions on real G1 device

2008-11-07 Thread Bradley Kite

Thanks for the info hackbod.

I feel my G1 is perhaps not as open as I was led to believe when purchasing.

Has any one managed to put their own image (built from source) onto the G1 yet?

Regards
--
Brad.

On 06/11/2008, hackbod [EMAIL PROTECTED] wrote:

  Unfortunately there is no way to get to app-private files from the
  shell in 1.0.  You can create those files as word readable though.


  On Nov 6, 11:18 am, Bradley Kite [EMAIL PROTECTED] wrote:
   Hi there,
  
   Yes there is a reason. I'm working on an application that requires
   wifi access and cannot be used within the emulator.
  
   There must be a way around this?
  
   Regards
   --
   Brad.
  

  On 06/11/2008, Michael [EMAIL PROTECTED] wrote:
  
  
  
 That's pretty intentional.  Is there some reason you can't use the
 emulator for this?
  


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



[android-developers] chatterbean

2008-11-07 Thread alberto

Hello!
I´m trying to use chatterbean or program D, with android. I just want
to be able to send a text message to the chatterbean and get response
from it.
Thank you for your help.

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



[android-developers] Re: Improved support for camera on Android emulator.

2008-11-07 Thread blindfold

Yes, I already noticed from the newly released source that the camera
preview image on the G1 cannot be resized, unlike the camera preview
image on the emulator. That explains why my app shows a garbled
preview on the G1. Plenty of other camera issues still be tracked
down.

On Nov 6, 8:04 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
 The source for the Qualcomm camera has been 
 released:http://review.source.android.com/1776. The camera itself , and the
 functionality in the native interface are excellent, the problem is
 that very little of the available functionality is implemented in the
 Android 1.0 sdk. We are very interested in having this fixed, so we'll
 keep pushing for better camera sdk support.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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

2008-11-07 Thread petunio


Hi people!

I am having problems drawing things with opengl...
I have two functions, one that sets up all the environment (initOGL),
and other that actually draws something using that environment
(onDraw)
in order to make it easy to understand, at the moment I am just trying
to paint the screen with a pink color (255, 0, 126, 80), using
glClearColor().

This seems quite straight forward, but so far I get nothing but a
frustrating blank screen...

does anybody have any ideas about what I am missing?

Thanks a lot!!




class myView extends SurfaceView implements SurfaceHolder.Callback
{

GL10 gl;
EGL10 egl;
EGLDisplay display;
EGLConfig config;
EGLContext glc;
EGLSurface surface;

public boolean initOGL()
{

egl = (EGL10)EGLContext.getEGL();

display = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);

int[] version = new int[2];
egl.eglInitialize(display, version);

int[] configSpec =
{
EGL10.EGL_RED_SIZE, 5,
EGL10.EGL_GREEN_SIZE, 6, EGL10.EGL_BLUE_SIZE, 5,
EGL10.EGL_DEPTH_SIZE, 16, EGL10.EGL_NONE
};

EGLConfig[] configs = new EGLConfig[1];
int[] num_config = new int[1];
egl.eglChooseConfig(display, configSpec, configs, 1, 
num_config);
EGLConfig config = configs[0];

glc = egl.eglCreateContext(display, config,EGL10.EGL_NO_CONTEXT,
null);

surface = egl.eglCreateWindowSurface(display,
config,this.getHolder(), null);

egl.eglMakeCurrent(display, surface, surface, glc);

gl = (GL10) (glc.getGL());

gl.glViewport(0, 0, babelView.screenWidth, 
babelView.screenHeight);
gl.glMatrixMode(GL10.GL_PROJECTION);
gl.glLoadIdentity();
float ratio = (float) myView.screenWidth / myView.screenHeight;
GLU.gluPerspective(gl, 45.0f, ratio, 1, 100f);

gl.glEnable(GL10.GL_DEPTH_TEST);
gl.glDepthFunc(GL10.GL_LEQUAL);
gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);

gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
gl.glEnable(GL10.GL_TEXTURE_2D);
gl.glDisable(GL10.GL_DITHER);
}

@Override
protected void onDraw(Canvas canvas)
{
egl.eglWaitNative(EGL10.EGL_NATIVE_RENDERABLE, null);

gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);

gl.glClearColor(255, 0, 126, 80);

egl.eglWaitGL();

egl.eglSwapBuffers(display, surface);
}


}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Updating From HTTP

2008-11-07 Thread alan

runt he http request in a thread then send a message back to the ui to
update it

On Nov 7, 1:51 pm, Bobbie [EMAIL PROTECTED] wrote:
 Hey all, thanks for all your help so far!  I have the following
 function running on a timer every 20 seconds or so.  However, every
 time it runs, my user interface for this program (an EditText box and
 a submit Button) freezes until the HttpPost is finished.  Is there a
 way for me to run this function in the background or something so it
 doesn't freeze the interface?  Is there a more efficient way to do
 what I'm trying to do here?  The chatscreen variable is a TextView.
 Thanks for your help!

          public void updateChat() {
                 // get chat updates
                 HttpClient updateclient = new DefaultHttpClient();
                 HttpPost updatepost = new 
 HttpPost(https://www.mysite.com/chat.php?
 action=updatechat);
         ResponseHandlerString responseHandler = new
 BasicResponseHandler();
         String responseBody;
                 try {
                         // send message
                         responseBody = updateclient.execute(updatepost, 
 responseHandler);
                         if (responseBody != )
                         {
                                 chatscreen.append(responseBody);
                                 chatview.fullScroll(View.FOCUS_DOWN);
                                 mytext.setText();
                                 mytext.requestFocus();
                         }
                 } catch (ClientProtocolException e) {
                         // error sending message
                         chatscreen.append(There was an error retrieving the 
 message.\n);
                 } catch (IOException e) {
                         // error sending message
                         chatscreen.append(There was an error retrieving the 
 message.\n);
                 }
         }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Updating From HTTP

2008-11-07 Thread David Given

Bobbie wrote:
 Hey all, thanks for all your help so far!  I have the following
 function running on a timer every 20 seconds or so.  However, every
 time it runs, my user interface for this program (an EditText box and
 a submit Button) freezes until the HttpPost is finished.  Is there a
 way for me to run this function in the background or something so it
 doesn't freeze the interface?  Is there a more efficient way to do
 what I'm trying to do here?  The chatscreen variable is a TextView.

Yes, run it in another thread --- look up java.lang.Thread. Be aware
that methods in another thread can't call anything in the UI directly,
though; look up Handler.

void doSomethingInBackground()
{
  /* Here we're in the UI thread. */
  final Handler handler = new Handler();
  Thread thread = new Thread()
  {
public void run()
{
   /* Here we're in the background thread. */
   /* perform blocking operation here */
   handler.post(
 new Runnable()
 {
public void run()
{
  /* Back in the UI thread again. Tell the user we're
   * finished. */
}
 }
   );
}
  };

  /* Start background thread, don't wait (will return immediately). */
  thread.start();
}

If you think the syntax is nasty, you're not the only one. Bear in mind
that your activity may have finished by the time the thread completes.
Also, if you're going to do this a lot, you'll want to reuse the Handler
and Thread objects.

-- 
David Given
[EMAIL PROTECTED]

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Updating From HTTP

2008-11-07 Thread zl25drexel

see my post at
http://bend-ing.blogspot.com/2008/11/properly-handle-progress-dialog-in.html

On Nov 7, 9:30 am, David Given [EMAIL PROTECTED] wrote:
 Bobbie wrote:
  Hey all, thanks for all your help so far!  I have the following
  function running on a timer every 20 seconds or so.  However, every
  time it runs, my user interface for this program (an EditText box and
  a submit Button) freezes until the HttpPost is finished.  Is there a
  way for me to run this function in the background or something so it
  doesn't freeze the interface?  Is there a more efficient way to do
  what I'm trying to do here?  The chatscreen variable is a TextView.

 Yes, run it in another thread --- look up java.lang.Thread. Be aware
 that methods in another thread can't call anything in the UI directly,
 though; look up Handler.

 void doSomethingInBackground()
 {
   /* Here we're in the UI thread. */
   final Handler handler = new Handler();
   Thread thread = new Thread()
   {
     public void run()
     {
        /* Here we're in the background thread. */
        /* perform blocking operation here */
        handler.post(
          new Runnable()
          {
             public void run()
             {
               /* Back in the UI thread again. Tell the user we're
                * finished. */
             }
          }
        );
     }
   };

   /* Start background thread, don't wait (will return immediately). */
   thread.start();

 }

 If you think the syntax is nasty, you're not the only one. Bear in mind
 that your activity may have finished by the time the thread completes.
 Also, if you're going to do this a lot, you'll want to reuse the Handler
 and Thread objects.

 --
 David Given
 [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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 can I set selection highlight in a ListActivity

2008-11-07 Thread zl25drexel

you can, but it's much more work

you need to implement a custom listadapter, then when you inflat the
view, keep a local reference to them, then implement an
onclicklistener on the item selection to perform any custom
highlighting. the following code show how to implement that custom
listadapter

private class CategoryAdapter extends BaseAdapter{

@Override
public int getCount() {
return searchResult.getCategories().size();
}

@Override
public Object getItem(int position) {
return searchResult.getCategories().get(position);
}

@Override
public long getItemId(int position) {
return position;
}

@Override
public View getView(int position, View convertView, ViewGroup
parent) {
final LayoutInflater inflater =
LayoutInflater.from(AndroidResults.this);
final View view = inflater.inflate(
R.layout.results_row, parent, false);
  //keep a array of 'views', add onclick listener callback
to the view
  itemsViews.add(view);
  //
view.setOnClickListener(  { itemsViews.get(position).highlight()   })

Category cat = searchResult.getCategories().get(position);
TextView txt = ((TextView)view.findViewById(R.id.name));
txt.setText(cat.getName());
return view;
}

}

On Nov 6, 10:19 pm, NY [EMAIL PROTECTED] wrote:
 Such as I click the the first select item
 but I want to highlight the second and the third
 Can I do this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Going back to Activity Stack on App Restart

2008-11-07 Thread GHack

I'm working with the Notepadv3 tutorial. The way it works now, if the
user hits the home button from the edit screen, then relaunches the
app via the icon from the home screen (or app drawer), the app starts
up at the very begining (i.e. Main Activity) instead of loading the
last used activity, which should be the NoteEdit activity in this
case.  I'm trying to figure out how to maintain the Activity Stack's
state when the app is relaunched via it's icon. (Please correct me if
I got any of the terminology wrong).

Thanks
G
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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 question about layout xml and view class

2008-11-07 Thread Brian

just changing subject to be more accurate

On Nov 7, 9:37 am, Brian [EMAIL PROTECTED] wrote:
 late reply, but wanted to say thanks, this fixed it.  On to my next
 problem:

 I'm trying to write my own View class to handle various events, using
 LunarLander as an example.  Here's my simple layout and class:

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

 com.my.package.BoardView
   android:id=@+id/board
   android:layout_width=fill_parent
   android:layout_height=fill_parent/

 TextView  android:id=@+id/TopText
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:text=play area
 /
 LinearLayout android:id=@+id/rowButtons
 android:orientation=horizontal
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 
 Button android:id=@+id/btnPlay
 android:text=Play
 android:layout_width=wrap_content
 android:layout_height=wrap_content /
 Button android:id=@+id/btnInfo
 android:text=Info
 android:layout_width=wrap_content
 android:layout_height=wrap_content /
 Button android:id=@+id/btnSetup
 android:text=Setup
 android:layout_width=wrap_content
 android:layout_height=wrap_content /
 /LinearLayout

 TextView  android:id=@+id/InfoText
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:text=screen size:
 /

 /LinearLayout

 public class BoardView extends SurfaceView {

 public BoardView(Context context, AttributeSet attrs) {
 super(context, attrs);
 }

 @Override
 protected void onSizeChanged(int w, int h, int oldw, int oldh) {
 // TODO Auto-generated method stub
 super.onSizeChanged(w, h, oldw, oldh);

 TextView info = (TextView) findViewById(R.id.InfoText);
 //info.setText(width :  + w + , height :  + h);
 }

 }

 When I first ran it, it blew up with a NPE in onSizeChanged.  So at
 least I knew it was getting there.  I commented out the info.setText
 line and it ran fine, but the view is blank on the screen.  Why are
 the various TextViews and buttons not visible?  I couldn't find any
 guidelines in the docs as to how/where to place your View class in the
 layout.xml.

 On Nov 3, 5:01 pm, Mark Murphy [EMAIL PROTECTED] wrote:

  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 throughlayoutfiles, 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] Re: AACPlus - Decoding a Stream? - Anyone Shoutcast?

2008-11-07 Thread Jona

Dave thanks so much for your reply! I really appreciate it!

I'm trying to understand why it wouldn't work... I handled my
connection properly to one of the radios on ShoutCast and stored
around 1MB of data to be later tested if the correct information was
sent...  It was successful on playing the file on my PC but not
MediaPlayer on android... So that would tell me I achieved a proper
connection via HTTP... maybe I'm confusing my self?

About the metadata tags I  could just write a function to parse my
stream data and give me my metadata tags... right?

Thanks for your time and patience ^.^

Jona


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Use Bundle to Pass Bitmap

2008-11-07 Thread Jake Maui
Josh,
I tried that before ...it copies the bitmap by value into the bundle so
it brings the app to it's knees and completely fails for larger bitmaps.

-jm




On Fri, Nov 7, 2008 at 9:14 AM, joshbeck [EMAIL PROTECTED] wrote:


 --Solved--

 The answer seems to be. 'No.'
 It's inefficient, and the phone needs all the resources you can give
 it.

 Josh Beck

 On Nov 6, 5:42 pm, joshbeck [EMAIL PROTECTED] wrote:
  Is it possible to pass a bitmap between activities using a bundle?
 
  Thanks,
  Josh Beck
 


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



[android-developers] Re: adb shell permissions on real G1 device

2008-11-07 Thread Michael

It seems that too many people have believed the media hype, or were
under the incorrect impression that T-Mobile's G1 would be completely
open and free.  *Android* (made by Google and the community) is open
source and free for use, but the T-Mobile G1 is somewhat locked down,
which is what T-Mobile wanted.

Perhaps take this issue up with T-Mobile, it's not really an Android
issue.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Updating From HTTP

2008-11-07 Thread Bobbie

@ zl25drexel

Here is my code, I tried your tutorial, it doesn't work...?  I'm
guessing I have something wrong.  Where should I call this?  Which
function do I call?  Sorry, I'm a beginner at this.

// Need handler for callbacks to the UI thread
final Handler mHandler = new Handler();

// Create runnable for posting
final Runnable mUpdateResults = new Runnable() {
public void run() {
chatscreen.append((CharSequence) mHandler);
}
};

protected void chatUpdater() {

// Fire off a thread to do some work that we shouldn't do
directly in the UI thread
Thread t = new Thread() {
public void run() {
// get chat updates
HttpClient updateclient = new 
DefaultHttpClient();
HttpPost updatepost = new 
HttpPost(https://www.net/chatpost.php?
action=updatechat);
ResponseHandlerString responseHandler = new
BasicResponseHandler();
String responseBody;
try {
// send message
responseBody = 
updateclient.execute(updatepost,
responseHandler);
mHandler.post(mUpdateResults);
} catch (ClientProtocolException e) {
// error sending message
mHandler.post(mUpdateResults);
} catch (IOException e) {
// error sending message
mHandler.post(mUpdateResults);
}
}
};
t.start();
}











On Nov 7, 9:38 am, zl25drexel [EMAIL PROTECTED] wrote:
 see my post 
 athttp://bend-ing.blogspot.com/2008/11/properly-handle-progress-dialog-...

 On Nov 7, 9:30 am, David Given [EMAIL PROTECTED] wrote:

  Bobbie wrote:
   Hey all, thanks for all your help so far!  I have the following
   function running on a timer every 20 seconds or so.  However, every
   time it runs, my user interface for this program (an EditText box and
   a submit Button) freezes until the HttpPost is finished.  Is there a
   way for me to run this function in the background or something so it
   doesn't freeze the interface?  Is there a more efficient way to do
   what I'm trying to do here?  The chatscreen variable is a TextView.

  Yes, run it in another thread --- look up java.lang.Thread. Be aware
  that methods in another thread can't call anything in the UI directly,
  though; look up Handler.

  void doSomethingInBackground()
  {
    /* Here we're in the UI thread. */
    final Handler handler = new Handler();
    Thread thread = new Thread()
    {
      public void run()
      {
         /* Here we're in the background thread. */
         /* perform blocking operation here */
         handler.post(
           new Runnable()
           {
              public void run()
              {
                /* Back in the UI thread again. Tell the user we're
                 * finished. */
              }
           }
         );
      }
    };

    /* Start background thread, don't wait (will return immediately). */
    thread.start();

  }

  If you think the syntax is nasty, you're not the only one. Bear in mind
  that your activity may have finished by the time the thread completes.
  Also, if you're going to do this a lot, you'll want to reuse the Handler
  and Thread objects.

  --
  David Given
  [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] copy / paste programatically

2008-11-07 Thread androide22

Is there any way of copying and/or pasting programatically (instead of
the long click method)?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Updating From HTTP

2008-11-07 Thread zl25drexel

post your error messages

On Nov 7, 11:16 am, Bobbie [EMAIL PROTECTED] wrote:
 @ zl25drexel

 Here is my code, I tried your tutorial, it doesn't work...?  I'm
 guessing I have something wrong.  Where should I call this?  Which
 function do I call?  Sorry, I'm a beginner at this.

         // Need handler for callbacks to the UI thread
     final Handler mHandler = new Handler();

     // Create runnable for posting
     final Runnable mUpdateResults = new Runnable() {
         public void run() {
                 chatscreen.append((CharSequence) mHandler);
         }
     };

     protected void chatUpdater() {

         // Fire off a thread to do some work that we shouldn't do
 directly in the UI thread
         Thread t = new Thread() {
             public void run() {
                 // get chat updates
                                 HttpClient updateclient = new 
 DefaultHttpClient();
                                 HttpPost updatepost = new 
 HttpPost(https://www.net/chatpost.php?
 action=updatechat);
                             ResponseHandlerString responseHandler = new
 BasicResponseHandler();
                             String responseBody;
                                 try {
                                         // send message
                                         responseBody = 
 updateclient.execute(updatepost,
 responseHandler);
                                         mHandler.post(mUpdateResults);
                                 } catch (ClientProtocolException e) {
                                         // error sending message
                                         mHandler.post(mUpdateResults);
                                 } catch (IOException e) {
                                         // error sending message
                                         mHandler.post(mUpdateResults);
                                 }
             }
         };
         t.start();
     }

 On Nov 7, 9:38 am, zl25drexel [EMAIL PROTECTED] wrote:

  see my post 
  athttp://bend-ing.blogspot.com/2008/11/properly-handle-progress-dialog-...

  On Nov 7, 9:30 am, David Given [EMAIL PROTECTED] wrote:

   Bobbie wrote:
Hey all, thanks for all your help so far!  I have the following
function running on a timer every 20 seconds or so.  However, every
time it runs, my user interface for this program (an EditText box and
a submit Button) freezes until the HttpPost is finished.  Is there a
way for me to run this function in the background or something so it
doesn't freeze the interface?  Is there a more efficient way to do
what I'm trying to do here?  The chatscreen variable is a TextView.

   Yes, run it in another thread --- look up java.lang.Thread. Be aware
   that methods in another thread can't call anything in the UI directly,
   though; look up Handler.

   void doSomethingInBackground()
   {
     /* Here we're in the UI thread. */
     final Handler handler = new Handler();
     Thread thread = new Thread()
     {
       public void run()
       {
          /* Here we're in the background thread. */
          /* perform blocking operation here */
          handler.post(
            new Runnable()
            {
               public void run()
               {
                 /* Back in the UI thread again. Tell the user we're
                  * finished. */
               }
            }
          );
       }
     };

     /* Start background thread, don't wait (will return immediately). */
     thread.start();

   }

   If you think the syntax is nasty, you're not the only one. Bear in mind
   that your activity may have finished by the time the thread completes.
   Also, if you're going to do this a lot, you'll want to reuse the Handler
   and Thread objects.

   --
   David Given
   [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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.0 Porting problem

2008-11-07 Thread Mark Murphy

You will have better luck with porting questions if you ask them on an 
appropriate list, such as one of the Open source mailing lists found on:

http://source.android.com/discuss

This list is for application development, not porting.

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

Android Training on the Ranch! -- Mar 16-20, 2009
http://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: Request for developers HTC G1 (T-Mobile) review

2008-11-07 Thread JP

I can't necessarily fill you in on the categories, but here's my take
(including the occasional reference to other devel platform I've
worked with)

The good
- I found Dalvik is completely adhering to original Java SE. Pretty
sensational in my view.
- SDK capabilities far surpass anyhting else out there (for what I am
doing, location/map-based work).
- Emulator is an accurate representation of Android on the device,
minus device specific properties of course, such as dynamics of
location providers, telco network access in pause/resume cycles, tilt
sensor and so on
- After having worked with cross-compilation environments
(scratchbox), I am impressed with the ease of loading and running/
debugging apps on the device. Select Run in Eclipse, select target
(handset connected with USB) and off you go. Very refreshing because
it's built like one would expect.
- Speaking of scratchbox. Setting up the Android development
environment in general is a breeze. Simple and straightforward
- No NDA's and other proprietaries a la Apple

The bad
- Poor community support, despite the occassional bright spot. We've
seen Kafkaesque situations between Google (The castle) and developer
community (villagers) without signs of significant improvement. Now
that devices are out, there are many constraints, so things should
settle now
- Restrictions on the use of the Maps API. I am under the impression
this is driven by prior agreements with suppliers of data, and
Google's interest. No location-based search (although exposed in the
first release of Android and demonstrated in Maps), no street view in
API (propably premature to ask for)
- Security appears vulnerable and untested as of yet. I get the sense
something bad's going to happen sooner than later
- Android market comments not moderated, i.e. rating system is flooded
by trolls posting prophanities, becoming increasingly useless.

The irrelevant
- From a plain app development perspective, the open source aspect of
Android is actually pretty irrelevant. The binaries of Android are
preloaded with the shipped handsets, and the users will not tinker
with it, i.e. this is the target for app development, open source, or
not. Having said that, having released private SDK releases last
summer hurt Google's reputation in the community. Now that devices are
out, that's materially irrelevant as well.



On Nov 5, 12:34 pm, Droid [EMAIL PROTECTED] wrote:
 Hi Android developers,

 Can someone make a brief review of G1 mobile from a developer point of view?

 Think about:
 - G1 features not working properly
 - issues when uploading custom applications
 - does an application running in the emulator behaves as expected in the
 real mobile (G1)?
 - is it a true open source OS or are there some restrictions?
 - issues when compiling the Android OS source code from scratch and updating
 the G1 OS
 - ...

 many 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] Correct usage of getNetworkInfo(int networkType)

2008-11-07 Thread Breno

Hey all,

 reading google documentation about NetworkInfo class, i found the
method

public NetworkInfo  getNetworkInfo(int networkType) ;

This will be very usefull for me, to get info about the network.

 but there is no documentation about this method. I'm trying to get
the network info, doing

NetworkInfo netInfo = new
NetworkInfo(ConnectivityManager.TYPE_MOBILE);

ConnectivityManager  connManager =
(ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);

netInfo = connManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);


Actually, I'm capable to get those information usign

String extra_info;
extra_info =  +
intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO);

But, when running this piece of code, in Android Screen appear that
error Sorry application (software) is not responding and in LogCat
no info about this. When debugging, an error appear Source not
found. What is the correct usage of this method?

thanks a lot

Breno
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Download counts frozen

2008-11-07 Thread dbradby

Hi,

Is anyone else seeing their download counts frozen for their apps in
the Market place? I am 100% certain I have downloads occurring due to
updated behaviour on our servers. But our downloads counts have been
stuck for the past 4 days now.

Regards,

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



[android-developers] Re: adb shell permissions on real G1 device

2008-11-07 Thread Bradley Kite

Indeed.

I appreciate your feedback. A search elsewhere has helped me debug my
issues further.

Regards
--
Brad.

On 07/11/2008, Michael [EMAIL PROTECTED] wrote:

  It seems that too many people have believed the media hype, or were
  under the incorrect impression that T-Mobile's G1 would be completely
  open and free.  *Android* (made by Google and the community) is open
  source and free for use, but the T-Mobile G1 is somewhat locked down,
  which is what T-Mobile wanted.

  Perhaps take this issue up with T-Mobile, it's not really an Android
  issue.

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] create multi page form

2008-11-07 Thread marchinram

Hello, I have to create a multi page form (with a field on each page
and a next and previous button on each one) for work, and I'm not sure
about the best way to implement this (should I use multiple activites
or do it all in one and dynamically change textviews, etc.), I'm
pretty lost on this one and any advice would be greatly appreciated.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: The method onOptionsItemSelected(MenuItem) of type AndroidViews must override or implement a supertype method

2008-11-07 Thread Rashad Ladson

add the following import:
import android.view.MenuItem;

you should also change the parameter on your switch to
item.getItemId()

On Oct 27, 6:14 pm, disappearedng [EMAIL PROTECTED] wrote:
 Hi everyone,

 I am encountering the following error from eclipse:

 The method onOptionsItemSelected(MenuItem) of type AndroidViews must
 override or implement a supertype method

 import android.app.Activity;
 import android.os.Bundle;
 import android.view.Menu;

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

 @Override
 public boolean onCreateOptionsMenu(Menu menu)   {
 super.onCreateOptionsMenu(menu);
 menu.add(0, 0, 0, AutoComplete);
 menu.add(0, 1, 1, Button);
 menu.add(0, 2, 2, CheckBox);
 menu.add(0, 3, 3, EditText);
 menu.add(0, 4, 4, RadioGroup);
 menu.add(0, 5, 5, Spinner);

 return super.onCreateOptionsMenu(menu);
 }

 @Override
 public boolean onOptionsItemSelected(MenuItem item) { //ECLIPSE
 STARTS COMPLAINING HERE

 switch (item.getId())   {
 case 0:
 return super.onOptionsItemSelected(item);
 case 1:
 return super.onOptionsItemSelected(item);
 case 2:
 return super.onOptionsItemSelected(item);
 case 3:
 return super.onOptionsItemSelected(item);
 case 4:
 return super.onOptionsItemSelected(item);
 case 5:
 return super.onOptionsItemSelected(item);
 }
 }

 }

 I tried to google for an answer for The method
 onOptionsItemSelected(MenuItem) of type AndroidViews must override or
 implement a supertype method but there isn't any lead

 What gives/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Icons - Recommended size, format, etc?

2008-11-07 Thread g1bb

Hello,

Is there a recommended size or format for an application's icon? I've
been using .PNG at 190x141 px, but I can never seem to get them as
'cool' looking as the other applications I've seen.

Thanks in advance.

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



[android-developers] Call an application from another application in android

2008-11-07 Thread Cattivik

Can I call an application from another application in android?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Customizing builtin applications

2008-11-07 Thread Richard Levasseur

On Nov 5, 4:19 am, Karra [EMAIL PROTECTED] wrote:
 Tried without luck at android-beginners...

 Is there any documentation on the built-in applications and how they
 can be extended? I have a couple of ideas for features that I would
 love to have as
 part the default address book application, but make little sense as a
 full blown application. Can someone point me in the right direction?

I know how you feel.  I want to tweak text notifications by displaying
them on the keyguard, but as far as i can tell, there isn't any way to
access that screen.  Very frustrating.

FWIW, I read that if you register the right receiver, then other apps
will pick up those intents and display them (if you install the
myspace app, the 'share picture' button has myspace as a new option).
Of course, you first have to know what intents they're sending, which
is a complete frustrating mystery in and of itself.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Saving a file to a system directory?

2008-11-07 Thread mm

Hey folks,

I'm trying to save a file to a system folder. I know the default
directory for saving files to the device is in your local data folder,
as so:

String dir = getFilesDir().toString();
// dir is /data/data/app/files

I'm wondering if it's possible to save files to another directory,
such as: /system/media/audio/ringtones ?

This doesn't seem to work: getFileStreamPath(/system/media/audio/
ringtones/).mkdirs();

Any help would be much appreciated - thanks!

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



[android-developers] DOWNLOADING MUSIC FROM WINDOWS VISTA MEDIA P;AYER FOR G1 PHONE

2008-11-07 Thread [EMAIL PROTECTED]

I WAS UNABLE TO DOWNLOAD MUSIC FROM MY WINOWS MEDIA PLAYER USING
WINDOWS. FIRST, I WAS ALWAYS ASKED FOR DRIVERS, WHICH THERE ARE'NT
ANY!
THREE HOURS W/T-MOBILE SUPPORT DID NOT HELP EITHER, SO I JUST PLAYED
WITH THE PHONE BY MYSELF. HERE IS HOW TO DO IT!
FIRST PLUG PHONE INTO THE COMPUTER AND WHEN ASKED FOR DRIVERS CLICK
DO NOT ASK AGAIN. THEN DISCONECT THE PHONE. GO TO THE MEDIA PLAYER
AND DRAG THE MUSIC THAT YOU WANT TO SYNC TO YOUR PHONE. CONECT THE
PHONE AND WHEN THE SIGNAL LETS YOU KNOW THAT YOU HAVE A USB CONECTION,
DRAG DOWN THE CONECTION PAGE, CLICK OR TAP THE ORANGE USB CONECTED
BAR. THEN CLICK MOUNT. CLICK ON MUSIC ICON, ON MEDIA PLAYER CLICK
SYNC. A DROPDOWN WILL APPEAR ASKING TO REFRESH DEVICES CLICK THIS
BAR.  IT MIGHT TAKE MORE THAN ONCE IN THE BEGINING BUT IN THE SYNC
AREA YOU WILL SEE THE INFORMATION ABOUT THE PHONE SHOWING THAT IT HAS
BEEN RECOGNIZED.  IT WILL ALSO SHOW HOW MUCH SPACE YOU HAVE LEFT IF
YOU DOWNLOAD THE MUIC SELECTED.  AT THE BOTOM HIT START SYNC AND
YOUR ON YOUR WAY!!  GOOD LUCK AND ENJOY!!  NO CHARGE!
chefbigbear52

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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 is google's official position on JNI ?

2008-11-07 Thread pasquale.anatriello

I would like to know this too.
We are willing to port our project in android too but we have all our
HUGE library written in C.
Is there a hope to have a native support soon enough?
Is it official that this support will be relased?
We managed to run some code on the Emulator but as it is now it's not
possible to run native code on the device without hacking it
Thank you for your patience (and sorry for my poor english)
Pasquale Anatriello

On 21 Ott, 19:37, StephC [EMAIL PROTECTED] wrote:
 On 1 oct, 17:23, Romain Guy [EMAIL PROTECTED] wrote:

  First of all,JNIis not used in our apps. Only in the framework.
  Then, we are working on a native SDK that will provide official and
  correct support forJNI. Just be patient :)

 This is very good news for games developers!

 We're working on Augmented Reality games with real time image analysis
 not doable inside a VM.

 We'll be glad to port it on the Android platform.

 How long will we have to wait for this native SDK?



  On Wed, Oct 1, 2008 at 2:53 AM, MrSnowflake [EMAIL PROTECTED] wrote:

   I believeJNIis not supported for developers, because 1: It would
   require developers to build libs for every different android platform
   out and 2: While Google (probably) usesJNI, they can just change the
  JNIinterface and fix their code, but say if youJNIable program
   works on SDK 1.0r1 and then suddenly, when r2 gets released (and
   Google changed theJNI) your program wouldn't work anymore. This is
   something google really wants to avoid.

   On 1 okt, 11:42, Tauno T [EMAIL PROTECTED] wrote:
   Oh, sorry, I misunderstood you there :)

   On Oct 1, 12:37 pm, Volker Gropp [EMAIL PROTECTED] wrote:

Hi,

you may call it unfair of course. But please keep in mind, they did
not tell us that they use it in their apps. But they use it in their
API to delegate calls to native libs.

Regards
Volker

On Oct 1, 11:18 am, Tauno T [EMAIL PROTECTED] wrote:

 Isn't it a little .. how do I say it.. unfair to tell us thatJNIis
 not supported at all and then use it in their own apps to make them
 better and give them more features than are available to the rest of
 the developers?

 On Oct 1, 11:49 am, Volker Gropp [EMAIL PROTECTED] wrote:

  Hi Ranjeet,

  although I'm not the Android Dev Team i can tell you what ive been
  told last weeks about this topic:JNIis currently not supported in
  SDK 1.0. The reason is not quite clear, some say cause it may not 
  work
  at all, or may break in the (near) future. Plus your app wont be
  portable and needs special versions for every hw platform. 
  Actually i
  bet Android Dev Team will just tell you: native libs andJNIis not
  supported!.

  On the other handJNIis working and Android uses it internally a lot
  [google talks]. But you may have problems to link against the 
  stripped
  down libc they are using, or may run into other problems you cannot
  resolve. Plus please keep in mind there is no real solution to 
  deploy
  your app on real phones, because /system/lib is read only. You 
  might
  add your .so into the apk as a raw resource and extract it into 
  your
  app writable directory under /data. Loading the .so works for me 
  using
  System.load(). But this way the .so is stored on your phone in 2
  locations, using a lot unnecessary space.

  Currently for a real world app on real phones i would'nt useJNIand
  native libs at all due to those problems. Either wait forJNIsupport
  in future SDK versions or port your library to Java.

  Regards
  Volker

  On Oct 1, 4:02 am, Ranjeet [EMAIL PROTECTED] wrote:

   Dear Android Dev Team,

   My apologies if I am asking a question that's already been 
   answered.
   Unfortunately I haven't been able to find any documentation 
   within
   Android's reference that officially states Google's position on 
   usage
   ofJNI/SharedObjects (written in C++ and compiled via a cross
   compiler) from within Java ui code.  To clarify what I am trying 
   to
   accomplish, we are building an application with the user 
   interface
   completely written using the java/android classes/controls and it
   would use the shared library thats written in C++. There is just 
   so
   much effort gone in to making that library that it would be a 
   LOT of
   effort on our side rewriting it in Java. The library connects to 
   our
   backend web server to fetch XML files over HTTP, stores some of 
   the
   information from it on disk in files, and exposes the features 
   via
   methods.

   Is this currently officially supported in Android(I have seen 
   hello
   world C++ apps that run on the emulator with some security/chmod
   tweaks).
   Any information is sincerely appreciated.

   Thanks,
   

[android-developers] How shall I need design my application when the device be rotated?

2008-11-07 Thread [EMAIL PROTECTED]

Hi ,
I mean,  If the device be rotated, android shall auto-adjust my
application to fit screen, but how can I get the notification in my
program?? especially It's a base web-browser's application,  and
whether can I cancel this auto-adjustment ?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Capabilities of Location API

2008-11-07 Thread ahmdalitaha

i have the same problem as yours and i was hoping if you did find a
way around to get the Towers IDs around your location to share that
information

On Oct 20, 2:28 pm, NickDG [EMAIL PROTECTED] wrote:
 On Oct 16, 10:29 am, NickDG [EMAIL PROTECTED] wrote:



  We're investigating the possibility of creating a smart phone
  application that uses the GSM network to determine the location of the
  phone.

  We will study different methods of calculating positions and to do
  that we need extensive data about the network such as IDs, signal
  strengths, etc of cell towers, not just of the currently connected one
  but of all visible towers. Does the Android API allow us to get these?

  The class 'android.location.LocationManager' seems to provide the
  functionality to do get a position via the network. The JavaDoc of the
  constant NETWORK_PROVIDER (http://code.google.com/android/reference/
  android/location/LocationManager.html#NETWORK_PROVIDER) states
  Results are retrieved by means of a network lookup.. What does this
  mean? How is the positioning done technically?

 It seems nobody in this group can answer my questions. Do you know
 another place I can look for answers?

 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: android market publish button does not work

2008-11-07 Thread sori

Yes, it worked with Mac Safari.  Thanks!


On Nov 6, 6:53 pm, samlu [EMAIL PROTECTED] wrote:
 I had the same problem on IE.
 Please use Google's web browser or Firefox. It should be ok.

 Sam

 On Nov 7, 10:03 am, sori [EMAIL PROTECTED] wrote:



  I finally got my application ready for distribution.
  I filled up all fields in the market upload page, then pressed
  Publish button.
  There is no reaction.  No confirmation or no error message at all.

  Is this expected behavior or the server temporarily down?
  Please let me know if I miss anything here.
  Thanks.- Hide quoted text -

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



[android-developers] Re: Intercept Call

2008-11-07 Thread Bruno Z. Pereira

Any idea why ??

Or can I change the Android, so at this way I do not need to develop a 
program ?

Thanks

- Original Message - 
From: CJ [EMAIL PROTECTED]
To: Android Developers android-developers@googlegroups.com
Sent: Thursday, November 06, 2008 9:28 PM
Subject: [android-developers] Re: Intercept Call



i don't think that is going to happen.

On Nov 6, 8:57 am, BrunoZP.com [EMAIL PROTECTED] wrote:
 Hi,

 How can I intercept a user call, change it number and dial again ?
 Any example code ??

 For example: The user dial 32546048 and press send, my application get
 this number, cancel the dialing, change this number to
 3*2*5*4*6*0*4*8* and then dial !

 This needs to happen automatically, without the need of confirmations
 and other things..

 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] Need help in Android - WSDL web service.

2008-11-07 Thread Avinash Patil
Hi I have done following steps and need further help.
1. Created new WSDL for web service. - Need to pass a parameter and get
response back.
2. Added WSDL file in Android project.
3. Right clicked on WSDL file in project and Clicked for Generate Client -
Thiss has generated auto all the classes/interfaces of WSDL file
== having all address/port/method to be executed/in-out parameters details.

Now I need to use WSDL web service method  in Android startup class.
Will appriciate if anybody can send sample code to access WSDL method and
pass value to input parameter and get response back.
Thanks.
Avi.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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 use oprofile on android?

2008-11-07 Thread alei

I find there is a profiling tool called oprofile ported on newest
android edition.

but I don't know how to use it.

I can't find the --init option in its usage help.

When I type opcontrol start, it shows

couldn't set start profiling, is the oprofile driver installed?

It is  really different from x86 edition.

Did anyone  use the profiling tool on android.

Thank you for your kindness in advance.

Best Regards,

Alex

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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

2008-11-07 Thread petunio

Hi mate
yes, I did implement the surfaceHolder.callback thing.
I am actually getting the message when the surface is created, but
even though I keep getting the blank screen

and yes, I based my example on the GLSurfaceView...

thanks anyway


On Nov 7, 6:09 pm, DSmith [EMAIL PROTECTED] wrote:
 This isn't the whole class, is it?  You haven't implemented
 SurfaceHolder.Callback.

 I don't pretend to understand all the details behind setting up the
 OpenGL context (GLUT spoiled me early on), but the GLSurfaceView from
 the API Demo makes it a breeze.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Icons - Recommended size, format, etc?

2008-11-07 Thread hackbod

But please  make it 48x48.  Otherwise it's just wasting time and
space, and if a lot of apps start doing larger sizes it will have a
noticeable impact.  The app icon size is 48x48.

On Nov 7, 9:44 am, Romain Guy [EMAIL PROTECTED] wrote:
 Hi,

 Home currently displays icons at 48x48, so your icon file should be at
 least this size. If you make it bigger, you should make it twice as
 big for better rendering.

 On Fri, Nov 7, 2008 at 6:23 AM, g1bb [EMAIL PROTECTED] wrote:

  Hello,

  Is there a recommended size or format for an application's icon? I've
  been using .PNG at 190x141 px, but I can never seem to get them as
  'cool' looking as the other applications I've seen.

  Thanks in advance.

 --
 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: AACPlus - Decoding a Stream? - Anyone Shoutcast?

2008-11-07 Thread Dave

The reason you can't play the file is the media player doesn't support
raw AAC files. You could wrap them in a M4A format and that should
work, but you won't be able to get a seamless playback stream.

I know there are use cases we can't adequately support and I will be
pushing hard to fill in the gaps in future releases.

On Nov 7, 7:44 am, Jona [EMAIL PROTECTED] wrote:
 Dave thanks so much for your reply! I really appreciate it!

 I'm trying to understand why it wouldn't work... I handled my
 connection properly to one of the radios on ShoutCast and stored
 around 1MB of data to be later tested if the correct information was
 sent...  It was successful on playing the file on my PC but not
 MediaPlayer on android... So that would tell me I achieved a proper
 connection via HTTP... maybe I'm confusing my self?

 About the metadata tags I  could just write a function to parse my
 stream data and give me my metadata tags... right?

 Thanks for your time and patience ^.^

 Jona
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Intercept Call

2008-11-07 Thread hackbod

http://code.google.com/android/reference/android/content/Intent.html#ACTION_NEW_OUTGOING_CALL

On Nov 6, 5:57 am, BrunoZP.com [EMAIL PROTECTED] wrote:
 Hi,

 How can I intercept a user call, change it number and dial again ?
 Any example code ??

 For example: The user dial 32546048 and press send, my application get
 this number, cancel the dialing, change this number to
 3*2*5*4*6*0*4*8* and then dial !

 This needs to happen automatically, without the need of confirmations
 and other things..

 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: Intercept Call

2008-11-07 Thread j

It is possible. Voxofon app on the G1 does that.

On Nov 7, 11:24 am, hackbod [EMAIL PROTECTED] wrote:
 http://code.google.com/android/reference/android/content/Intent.html#...

 On Nov 6, 5:57 am, BrunoZP.com [EMAIL PROTECTED] wrote:

  Hi,

  How can I intercept a user call, change it number and dial again ?
  Any example code ??

  For example: The user dial 32546048 and press send, my application get
  this number, cancel the dialing, change this number to
  3*2*5*4*6*0*4*8* and then dial !

  This needs to happen automatically, without the need of confirmations
  and other things..

  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: adb shell permissions on real G1 device

2008-11-07 Thread Live Crunch

This OpenMoko looks cool tho! Love Nix distro.

On Nov 7, 1:45 pm, Fish Kungfu [EMAIL PROTECTED] wrote:
 You may want to look at the OpenMoko FreeRunner handset:http://openmoko.com/
 ~~Fish~~

 On Fri, Nov 7, 2008 at 2:11 PM, brs [EMAIL PROTECTED] wrote:

  On Nov 7, 11:02 am, Michael [EMAIL PROTECTED] wrote:
   It seems that too many people have believed the media hype, or were
   under the incorrect impression that T-Mobile's G1 would be completely
   open and free.  *Android* (made by Google and the community) is open
   source and free for use, but the T-Mobile G1 is somewhat locked down,
   which is what T-Mobile wanted.

   Perhaps take this issue up with T-Mobile, it's not really an Android
   issue.

  As the freedom of the press is sometimes said to be the privilege of
  those who own it, the openness of Android is primarily for the benefit
  of those who can build their own hardware. It would be nice if
  somebody came out with an Android based handset which lets users boot
  whatever image they want to install. The T-Mobile/HTC G1 isn't exactly
  that. In all fairness, the G1 provides a larger than usual sand-box
  for application developers to play in, with far less restriction than
  we are used to from US mobile operators - but wanting to install your
  own OS may be pushing it a bit...

  Bernhard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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 preview on G1 only works in landscape ?

2008-11-07 Thread Jason Proctor

this problem appears to be unit dependent. on my G1, the camera 
orientation is always wrong. on the G1 belonging to a colleage, it's 
correct. this would suggest that if i set rotation, it would fix some 
phones and break others.

are the G1 hardware camera parameters documented anywhere apart from 
the source code? log messages indicate that there are many more 
parameters than the base API allows access to.

tx


Did you try using parameters.set(rotation, 90) for the G1?

On Nov 6, 1:00 am, Kipling Inscore [EMAIL PROTECTED] wrote:
  As can be discovered by using the built in camera (no need to look at
  the source code), it always useslandscapemode, even when the
  keyboard is closed and the home screen and most other apps are 
inportraitmode.
  I've tried using CameraPreview inportrait, found the same issue as
  jarkman and apkdev, and decided to see what the built-in camera did,
  which is to simply forcelandscapemode. So I decided to do the same.
  I would guess that it's possible to somewhat manually rotate the
  image, using a view- or image-related class, but I don't think there's
  anything like that in the camera-related classes.



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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 /proc/meminfo show the correct memory info?

2008-11-07 Thread Brendon Drew
So how do I get the total amount of RAM on the system?

On Fri, Nov 7, 2008 at 2:19 PM, hackbod [EMAIL PROTECTED] wrote:


 This is the amount of RAM available to the kernel and higher-level
 system as regular memory.  The rest is used for various other things
 like the radio image, frame buffers and surfaces, etc.

 On Nov 7, 8:45 am, Brendon [EMAIL PROTECTED] wrote:
  I'm working on a System Monitor app (first version is already in the
  market)  to get my feet wet with Android.  When getting RAM totals, I
  grab MemTotal from /proc/meminfo, however this only shows 99129KB.
  Doesn't the G1 have 192MB of RAM?  Is there another field from this
  file I should add to this total, or is this just not the right way to
  figure it out.  I think I remember reading that some changes were made
  to the kernel to handle memory more efficiently, could this have an
  impact?
 
  On any other Linux system I've used, meminfo shows the correct total
  for system RAM, so could we have been shorted on the G1?
 



-- 

Brendon

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] telling the difference between G1 and emulator

2008-11-07 Thread Jason Proctor

is there a simple call to programmatically tell the difference? i was 
hoping that the System properties would have something, but they come 
back generic.

tx


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: modal dialogs

2008-11-07 Thread Michael


Eh, blocking on user input is rarely the way to do things.  Your
activity has to be able to respond to other events - such as being
killed or put to sleep when the phone rings.  A mobile phone is an
event driven environment - so Google built Android that way.

If I read your post right, I'd be doing anything that's a long server
transaction in a thread, and if the user must wait for that, I'd
present them with a progress dialog, which is dismissed when the
thread completes (i.e. posts via a Runnable).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] modal dialogs

2008-11-07 Thread Jason Proctor

sigh. please read the message fully? thanks. it wasn't about blocking 
as a UI concept.

Eh, blocking on user input is rarely the way to do things.  Your
activity has to be able to respond to other events - such as being
killed or put to sleep when the phone rings.  A mobile phone is an
event driven environment - so Google built Android that way.

If I read your post right, I'd be doing anything that's a long server
transaction in a thread, and if the user must wait for that, I'd
present them with a progress dialog, which is dismissed when the
thread completes (i.e. posts via a Runnable).


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Head-scratcher: NullPointerException from startActivity(ACTION_CALL)

2008-11-07 Thread dreamerBoy

Hi,

I'm attempting to initiate an outgoing call from inside a Service.

In onStart(), I create an ACTION_CALL Intent, then attempt to start an
Activity

 myIntent = new Intent(Intent.ACTION_CALL, Uri.parse(tel: +
phoneNumber));

 initiateCall.startActivityForResult(myIntent,
CALL_SETUP_ACTIVITY_ID);

However, when I run the code I get a NullPointerException.  Clearly,
the intent and activity are non-null, so I'm wondering what Android is
lacking here.

11-07 13:24:19.801: INFO/PhoneTestService(1250): onCreate called
11-07 13:24:19.801: INFO/PhoneTestService(1250): onStart called
11-07 13:24:19.801: INFO/PhoneTestService(1250): doIt called
11-07 13:24:19.811: DEBUG/PhoneTestService(1250): creating
initiateCall activity
11-07 13:24:19.811: DEBUG/PhoneTestService(1250): initiateCall is NOT
NULL!
11-07 13:24:19.820: INFO/PhoneTestService(1250): phone state is:
CALL_STATE_IDLE
11-07 13:24:21.601: INFO/PhoneTestService(1250): starting to listen
Fri Nov 07 13:24:19 PST 2008
11-07 13:24:21.622: INFO/PhoneTestService(1250): starting call intent.
11-07 13:24:21.622: DEBUG/PhoneTestService(1250): myIntent is NOT
NULL!
11-07 13:24:21.632: ERROR/PhoneTestService(1250): ERROR:
java.lang.NullPointerException
11-07 13:24:21.632: ERROR/PhoneTestService(1250):
java.lang.NullPointerException
11-07 13:24:21.632: ERROR/PhoneTestService(1250): at
android.app.Activity.startActivityForResult(Activity.java:2528)
11-07 13:24:21.632: ERROR/PhoneTestService(1250): at
test.phone.PhoneTestService.doIt(PhoneTestService.java:254)
11-07 13:24:21.632: ERROR/PhoneTestService(1250): at
test.phone.PhoneTestService.onStart(PhoneTestService.java:145)
11-07 13:24:21.632: ERROR/PhoneTestService(1250): at
android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2429)
11-07 13:24:21.632: ERROR/PhoneTestService(1250): at
android.app.ActivityThread.access$3100(ActivityThread.java:112)
11-07 13:24:21.632: ERROR/PhoneTestService(1250): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1640)
11-07 13:24:21.632: ERROR/PhoneTestService(1250): at
android.os.Handler.dispatchMessage(Handler.java:88)
11-07 13:24:21.632: ERROR/PhoneTestService(1250): at
android.os.Looper.loop(Looper.java:123)
11-07 13:24:21.632: ERROR/PhoneTestService(1250): at
android.app.ActivityThread.main(ActivityThread.java:3742)
11-07 13:24:21.632: ERROR/PhoneTestService(1250): at
java.lang.reflect.Method.invokeNative(Native Method)
11-07 13:24:21.632: ERROR/PhoneTestService(1250): at
java.lang.reflect.Method.invoke(Method.java:515)
11-07 13:24:21.632: ERROR/PhoneTestService(1250): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:739)
11-07 13:24:21.632: ERROR/PhoneTestService(1250): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
11-07 13:24:21.632: ERROR/PhoneTestService(1250): at
dalvik.system.NativeStart.main(Native Method)

Don't know where to go from here...

?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=test.phone
  android:versionCode=1
  android:versionName=1.0.0
application
activity android:name=.PhoneTest
  android:label=@string/app_name
intent-filter
action android:name=android.intent.action.MAIN /
category
android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity
activity android:name=.PhoneTestActivity
intent-filter
action
android:name=android.intent.action.ACTION_CALL /
category
android:name=android.intent.category.DEFAULT /
/intent-filter
   /activity
service android:name=.PhoneTestService/service
/application

uses-permission android:name=android.permission.CALL_PHONE/uses-
permission
uses-permission
android:name=android.permission.SET_ACTIVITY_WATCHER/uses-
permission
uses-permission android:name=android.permission.STATUS_BAR/uses-
permission
uses-permission android:name=android.permission.SET_DEBUG_APP/
uses-permission
uses-permission android:name=android.permission.CALL_PRIVILEGED/
uses-permission
uses-permission
android:name=android.permission.PROCESS_OUTGOING_CALLS/uses-
permission
uses-permission android:name=android.permission.READ_PHONE_STATE/
uses-permission

/manifest

Any ideas appreciated.

Thanks,

Paul
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: modal dialogs

2008-11-07 Thread Michael

Fine.  Yes, the only way to get a response from a button is via the
onClick() handler.  So yes, you use that to start up a thread and put
up a progress dialog, then close it when the thread has done its long
transaction.

Or not have the progress dialog - then the rest of the UI is still
active while the other stuff is going on in the background, if that's
what you prefer.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] modal dialogs

2008-11-07 Thread Jason Proctor

thanks for the response.

ok so that's the accepted way to do it. great.


Fine.  Yes, the only way to get a response from a button is via the
onClick() handler.  So yes, you use that to start up a thread and put
up a progress dialog, then close it when the thread has done its long
transaction.

Or not have the progress dialog - then the rest of the UI is still
active while the other stuff is going on in the background, if that's
what you prefer.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: telling the difference between G1 and emulator

2008-11-07 Thread Eric

 but they come back generic.

Yes, that's exactly how you tell.  The real phone isn't generic.

But why do you need to tell?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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 /proc/meminfo show the correct memory info?

2008-11-07 Thread Eric

 So how do I get the total amount of RAM on the system?

From the published specifications for the phone.

What's the point of knowing how much memory *isn't* available for use?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Adding an external Jar error

2008-11-07 Thread [EMAIL PROTECTED]

Hey guys,

I'm adding an external jar to my project through eclipse.
However, I am encountering an error:

java.lang.IllegalArgumentException: already added: Lcom/package/class;
[2008-11-07 14:34:59 - HelloAndroid]at
com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:
123)
[2008-11-07 14:34:59 - HelloAndroid]at
com.android.dx.dex.file.DexFile.add(DexFile.java:143)
[2008-11-07 14:34:59 - HelloAndroid]at
com.android.dx.command.dexer.Main.processClass(Main.java:299)
[2008-11-07 14:34:59 - HelloAndroid]at
com.android.dx.command.dexer.Main.processFileBytes(Main.java:276)
[2008-11-07 14:34:59 - HelloAndroid]at
com.android.dx.command.dexer.Main.access$100(Main.java:56)
[2008-11-07 14:34:59 - HelloAndroid]at
com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:228)
[2008-11-07 14:34:59 - HelloAndroid]at
com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:
245)
[2008-11-07 14:34:59 - HelloAndroid]at
com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:
130)
[2008-11-07 14:34:59 - HelloAndroid]at
com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:
108)
[2008-11-07 14:34:59 - HelloAndroid]at
com.android.dx.command.dexer.Main.processOne(Main.java:245)
[2008-11-07 14:34:59 - HelloAndroid]at
com.android.dx.command.dexer.Main.processAllFiles(Main.java:183)
[2008-11-07 14:34:59 - HelloAndroid]at
com.android.dx.command.dexer.Main.run(Main.java:139)
[2008-11-07 14:34:59 - HelloAndroid]at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2008-11-07 14:34:59 - HelloAndroid]at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
[2008-11-07 14:34:59 - HelloAndroid]at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
[2008-11-07 14:34:59 - HelloAndroid]at
java.lang.reflect.Method.invoke(Method.java:585)
[2008-11-07 14:34:59 - HelloAndroid]at
com.android.ide.eclipse.adt.build.DexWrapper.run(Unknown Source)
[2008-11-07 14:34:59 - HelloAndroid]at
com.android.ide.eclipse.adt.build.ApkBuilder.executeDx(Unknown Source)
[2008-11-07 14:34:59 - HelloAndroid]at
com.android.ide.eclipse.adt.build.ApkBuilder.build(Unknown Source)
[2008-11-07 14:34:59 - HelloAndroid]at
org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:
624)
[2008-11-07 14:34:59 - HelloAndroid]at
org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
[2008-11-07 14:34:59 - HelloAndroid]at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
166)
[2008-11-07 14:34:59 - HelloAndroid]at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
197)
[2008-11-07 14:34:59 - HelloAndroid]at
org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:
246)
[2008-11-07 14:34:59 - HelloAndroid]at
org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
[2008-11-07 14:34:59 - HelloAndroid]at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
249)
[2008-11-07 14:34:59 - HelloAndroid]at
org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:
302)
[2008-11-07 14:34:59 - HelloAndroid]at
org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
334)
[2008-11-07 14:34:59 - HelloAndroid]at
org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:
137)
[2008-11-07 14:34:59 - HelloAndroid]at
org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:
235)
[2008-11-07 14:34:59 - HelloAndroid]at
org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
[2008-11-07 14:34:59 - HelloAndroid] 1 error; aborting
[2008-11-07 14:34:59 - HelloAndroid] Conversion to Dalvik format
failed with error 1

I was looking through some posts and they said that android doesn't
like annotations and generics so I got rid of them but the jar still
won't load properly.

Any help would be appreciated.

Regards,

Josh

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Adding an external Jar error

2008-11-07 Thread [EMAIL PROTECTED]

Hey guys,

alittle more info,

I do not have the jar loaded twice or have multiples of the same
classes.
I am using the HelloAndroid sample to try to load a jar so the only
classes I have is the HelloAndroid and the R class.
Even after i unload the jar and re-load it, I still get the error.

Thanks,

Josh

On Nov 7, 2:51 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
 Hey guys,

 I'm adding an external jar to my project through eclipse.
 However, I am encountering an error:

 java.lang.IllegalArgumentException: already added: Lcom/package/class;
 [2008-11-07 14:34:59 - HelloAndroid]    at
 com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:
 123)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 com.android.dx.dex.file.DexFile.add(DexFile.java:143)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 com.android.dx.command.dexer.Main.processClass(Main.java:299)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 com.android.dx.command.dexer.Main.processFileBytes(Main.java:276)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 com.android.dx.command.dexer.Main.access$100(Main.java:56)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:228)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:
 245)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:
 130)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:
 108)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 com.android.dx.command.dexer.Main.processOne(Main.java:245)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 com.android.dx.command.dexer.Main.processAllFiles(Main.java:183)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 com.android.dx.command.dexer.Main.run(Main.java:139)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
 39)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
 25)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 java.lang.reflect.Method.invoke(Method.java:585)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 com.android.ide.eclipse.adt.build.DexWrapper.run(Unknown Source)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 com.android.ide.eclipse.adt.build.ApkBuilder.executeDx(Unknown Source)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 com.android.ide.eclipse.adt.build.ApkBuilder.build(Unknown Source)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:
 624)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 166)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 197)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:
 246)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 249)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:
 302)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
 334)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:
 137)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:
 235)
 [2008-11-07 14:34:59 - HelloAndroid]    at
 org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
 [2008-11-07 14:34:59 - HelloAndroid] 1 error; aborting
 [2008-11-07 14:34:59 - HelloAndroid] Conversion to Dalvik format
 failed with error 1

 I was looking through some posts and they said that android doesn't
 like annotations and generics so I got rid of them but the jar still
 won't load properly.

 Any help would be appreciated.

 Regards,

 Josh
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Custom Parcelables in external JARs... how to get this working?

2008-11-07 Thread DulcetTone

I have a custom Parcelable which I have gotten working internally in
the project in which it is compiled.

That project is then exported as a JAR in Eclipse, and this JAR is in
turn referenced by another project which wants to pass the custom
Parcelable as a parameter in AIDL calls.

However, when interfaces try to use this, the import statement for the
custom parcelable in the interfaces' .aidl files show a little red no
go sign which a mouseover details as meaning couldn't find import
for class com.foo.MyCustomParcelable

Is the aidl not smart enough to look to find these items in the JAR
file the failing project uses externally?

How might I work around this?

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: Does /proc/meminfo show the correct memory info?

2008-11-07 Thread Brendon Drew
Well, it's not available to the user directly, but it is used by the system
as a whole.  I'm simply curious how to determine total physical RAM.

On Fri, Nov 7, 2008 at 6:04 PM, Eric [EMAIL PROTECTED] wrote:


  So how do I get the total amount of RAM on the system?

 From the published specifications for the phone.

 What's the point of knowing how much memory *isn't* available for use?

 



-- 

Brendon

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: telling the difference between G1 and emulator

2008-11-07 Thread blindfold

Ugly, but the default getPreviewSize() is different for G1 versus
emulator...

On Nov 8, 12:08 am, Jason Proctor [EMAIL PROTECTED] wrote:
 i need to tell because both cameras report their preview format as
 number 16, and one of them is lying.

 what is the way to tell?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] telling the difference between G1 and emulator

2008-11-07 Thread Jason Proctor

barf. there has to be a nicer way. didn't someone way back discover 
that the unique ID of the hardware is null for the emulator? my 
memory is hazy...

Ugly, but the default getPreviewSize() is different for G1 versus
emulator...

On Nov 8, 12:08 am, Jason Proctor [EMAIL PROTECTED] wrote:
  i need to tell because both cameras report their preview format as
  number 16, and one of them is lying.

  what is the way to tell?



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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 AlarmManager wake up to do scheduled work when phone is asleep?

2008-11-07 Thread j

According to API doc for AlarmManager.set :
Alarm intents are delivered with a data extra of type int called
Intent.EXTRA_ALARM_COUNT that indicates how many past alarm events
have been accumulated into this intent broadcast. Recurring alarms
that have gone undelivered because the phone was asleep may have a
count greater than one when delivered. 

Does this imply when my phone is asleep, AlarmManager does not wake up
to do its scheduled work until the phone wakes up?   Can someone
clarify?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Custom Parcelables in external JARs... how to get this working?

2008-11-07 Thread hackbod

You'll need to make the source .aidl files available for them to
import.

On Nov 7, 3:21 pm, DulcetTone [EMAIL PROTECTED] wrote:
 I have a custom Parcelable which I have gotten working internally in
 the project in which it is compiled.

 That project is then exported as a JAR in Eclipse, and this JAR is in
 turn referenced by another project which wants to pass the custom
 Parcelable as a parameter in AIDL calls.

 However, when interfaces try to use this, the import statement for the
 custom parcelable in the interfaces' .aidl files show a little red no
 go sign which a mouseover details as meaning couldn't find import
 for class com.foo.MyCustomParcelable

 Is the aidl not smart enough to look to find these items in the JAR
 file the failing project uses externally?

 How might I work around this?

 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: Custom Parcelables in external JARs... how to get this working?

2008-11-07 Thread DulcetTone

Hi, hackbod.
Can you be more explicit in this?

tone

On Nov 7, 11:53 pm, hackbod [EMAIL PROTECTED] wrote:
 You'll need to make the source .aidl files available for them to
 import.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Arabic support

2008-11-07 Thread Dark pp

Arabic will change your phone style, right to left.

On 11月8日, 上午6时49分, meetmas.com [EMAIL PROTECTED] wrote:
 Please help me
 i have 2 probleams
 1. i don't know how can i connect my mobile to pc
 2.can anyone help me please to install arabic language on my Android
 G1 (( t-mobile))
 i realy need install this language.

 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] Bugs in android ListIterator class

2008-11-07 Thread Dark pp

Hi,
I found there are two bugs in ListIterator, which are the next() and
nextIndex() functions. The two functions can't give the right result.
But the prev() function is OK.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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 SDK 0.7

2008-11-07 Thread Suhas Kaundinya

Hello,

Can anyone of you provide me with the 0.7 version of Android SDK
Eclipse plugin ?

Best,
Suhas

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] polite request for better error messages

2008-11-07 Thread Jason Proctor

hey, give me a break - for once i'm celebrating a *great* error message :-)



Just to amplify a bit on Dianne's point, Android is a heterogeneous
system that includes subsystems that were originally open source,
third party proprietary IP (much of which is now open source), Google
propietrary IP, and new IP that was created by Google specifically for
Android. Some of these subsystems have very transparent error
reporting, and some are quite opaque. There are ongoing efforts to
improve error reporting, but they have to be balanced against the
demand for bug fixes and new features.

On Nov 7, 3:41 pm, Jason Proctor [EMAIL PROTECTED] wrote:
  happy to report that MediaRecorder, at least, helpfully logs --

  11-07 15:39:08.848: ERROR/AudioFlinger(33): Request requires
  android.permission.RECORD_AUDIO

  -- when an attempt to record is made without the proper permission.

  bravo! i live in hope that all of Android logs such messages someday.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] trying to test applications

2008-11-07 Thread [EMAIL PROTECTED]

Hi,

I have got some time to kill and would be happy to help some one to
test in G1 emulator.

Thanks and Regards,
Madhuri

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Custom Parcelables in external JARs... how to get this working?

2008-11-07 Thread hackbod

Well, you need to have the source .aidl file in the sources of the app
that is using it, just like you have it in the library.  These don't
work like Java files where you can link to the generated jar or
whatever without the source; the source is needed for everyone that is
compiling against it.

On Nov 7, 9:02 pm, DulcetTone [EMAIL PROTECTED] wrote:
 Hi, hackbod.
 Can you be more explicit in this?

 tone

 On Nov 7, 11:53 pm, hackbod [EMAIL PROTECTED] wrote:

  You'll need to make the source .aidl files available for them to
  import.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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
-~--~~~~--~~--~--~---