[android-developers] Webview with progress and url overriding

2009-10-09 Thread Chister Nordvik

Hi!

I would like to add a Webview that both intercepts the URL clicks and
shows a progress when loading.

URL overriding:
myWebView.setWebViewClient(new WebViewClient() {
@Override public boolean shouldOverrideUrlLoading(WebView 
view,
String url) {
...

Progress:
myWebView.setWebChromeClient(new WebChromeClient(){
  @Override
  public void onProgressChanged(WebView view, int newProgress) {
...

But is there any way to combine these two? The WebViewClient only
offers OnPageFinished and then I can't show any real progress when
loading.

-Christer

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



[android-developers] Re: HTC phone for testng?

2009-10-09 Thread Miguel Paraz

On Oct 9, 12:28 pm, ian stilbit...@gmail.com wrote:
 I am almost ready to begin testing my apps on a real phone.

 I don't want a G1.

 If I got an unlocked HTC, can I use that for my testing, or do a need
 a specialized developer phone from Google\?

Hi,
You can use any phone to test SDK apps that only do standard things.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WiMAX for Android

2009-10-09 Thread JoaJP


I am only ware of a build wayback, based on the M3-rc37 release.
Performance was soso, and I am next to certain that out of the box,
Android could not be made run in conjunction with WiMax. It sure would
be a nice feat.


On Oct 8, 12:42 pm, Michael Cheselka chese...@gmail.com wrote:
 Hello,

 I think android does run on the Nokia N810 WiMax edition.  I'm not
 sure if the WiMax works.

 http://elinux.org/Android_on_OMAP

 Regards,
 Michael Cheselka
 650-488-4820

 On Thu, Oct 8, 2009 at 08:55, JoaJP joachim.pfeif...@gmail.com wrote:

  One could try to put a Nokia N810 WiMax edition on it. It won't run
  Android, but would be infinitely more interesting than a notebook PC,
  for sure.

  On Oct 8, 8:14 am, Marco Nelissen marc...@android.com wrote:
  You also need a phone that can act as a USB host.

  On Wed, Oct 7, 2009 at 6:11 PM, Roman ( T-Mobile USA)

  roman.baumgaert...@t-mobile.com wrote:

   Yep, you would have to implement the usb driver support for your WiMax
   card on Android which also includes platform/framework changes to
   recognize WiMax as a data interface.

   --
   Roman Baumgaertner
   Sr. SW Engineer-OSDC
   ·T· · ·Mobile· stick together
   The views, opinions and statements in this email are those of the
   author solely in their individual capacity, and do not necessarily
   represent those of T-Mobile USA, Inc.

   On Oct 7, 2:50 pm, Bala california.b...@gmail.com wrote:
   I am submitting this post from the Palo Alto Cal-train station, using
   Clearwire WiMax Innovation Network in Silicon Valley. The speed is
   unbelievable. Perhaps it is because the network is open only for the
   developers. If this kind of connectivity and speed is available to the
   public, then it will be awesome.

   Instead of the PC, can I use Android phone to access this network. I
   can connect the WiMAX modem through the USB on my phone. But I may
   need the WiMAX system software. Any help will be highly appreciated.

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



[android-developers] Rating Bar Dialog API

2009-10-09 Thread Subba

I know Market application has Rating Bar Dialog. Is there any API to
create Rating Bar Dialog in Android SDK 1.5 or 1.6.?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] using customized UI components in XML

2009-10-09 Thread Susan

When I use customized components in XML, could I use a short name
of component instead of a fully qualified class name?  I wonder if
some configuration file exists to do that work.
For example, my customized components is ex.object.RoundRect,   I
should use it in xml file like this:
 ex.object.RoundRect
   android:id=@+id/mainRoundRect01
   ...
 /
 But I want to use it like this:
 RoundRect
  android:id=@+id/mainRoundRect01
   ...
 /

Is it possible? Is there a configuration file that can map the
fully qualified class name to a short name?
Thanks for your prompt.

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



[android-developers] Can we change the status Bar's background?

2009-10-09 Thread chen ji

Hi All,

We can add some icons in the status Bar but I can not find the way to
modify the status Bar's background. E.G. I want to use one image to
replace its current white background.

Can anyone provide some advices? Thanks a lot.

B. R.

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



[android-developers] Can WebView be used inside a Service?

2009-10-09 Thread tomei.ninge...@gmail.com

I want to run part of my app logic in a background service. However,
much of the app uses JavaScript. Currently I run the JavaScript inside
a WebView.

Is it possible to have an invisible WebView while running inside a
Service?

If the answer is no, is there any way to run JavaScript inside a
Service?

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



[android-developers] Re: Can we change the status Bar's background?

2009-10-09 Thread Romain Guy

You cannot without changing the system image.

On Thu, Oct 8, 2009 at 11:56 PM, chen ji chenjihz...@gmail.com wrote:

 Hi All,

 We can add some icons in the status Bar but I can not find the way to
 modify the status Bar's background. E.G. I want to use one image to
 replace its current white background.

 Can anyone provide some advices? Thanks a lot.

 B. R.

 Ji
 




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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



[android-developers] Re: using customized UI components in XML

2009-10-09 Thread Romain Guy

Sorry you can't :)

On Thu, Oct 8, 2009 at 11:49 PM, Susan smxb...@gmail.com wrote:

    When I use customized components in XML, could I use a short name
 of component instead of a fully qualified class name?  I wonder if
 some configuration file exists to do that work.
    For example, my customized components is ex.object.RoundRect,   I
 should use it in xml file like this:
     ex.object.RoundRect
           android:id=@+id/mainRoundRect01
           ...
     /
     But I want to use it like this:
     RoundRect
          android:id=@+id/mainRoundRect01
           ...
     /

    Is it possible? Is there a configuration file that can map the
 fully qualified class name to a short name?
    Thanks for your prompt.

 




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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



[android-developers] Re: Question about the appwidget update period

2009-10-09 Thread Thote Gowda

Mark

AppWidgetProvider being a BroadcastReceiver, it can't register for
AlarmManager with broadcast intent. So how to handle this.
Am I missing something obvious here? How to achieve this?

// Thote Gowda GR

On Oct 4, 5:28 pm, Mark Murphy mmur...@commonsware.com wrote:
  I need to provider an access for the user to customize theupdate
 period.
  But the appwidgetpoviderinfo just can be defined in XML.
  How to implement this?

 Step #1: Set updatePeriodMillis to be 0

 Step #2: Use AlarmManager (and perhaps PowerManager.WakeLock) to set up
 your own alarm to invoke your code toupdatethe widget

 Step #3: There is no step #3

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to create a Icon on Home screen through Activity

2009-10-09 Thread jeelani

Murphy

I am not looking for shortcut. Let me rephrase my question.
I want an icon on home screen , upon clicking this icon my application
should be launched.
As of now when i create an activity and executes it, i need to open
menu and click on the activity name to launch my application. I know i
can create a shortcut for this, instead can i have the same icon on
home screen instead inside menu through my activity program.

Thanks,
Jeelani


On Oct 7, 9:39 pm, Mark Murphy mmur...@commonsware.com wrote:
  I would like to haveiconcreated onhomescreenthrough an activity .
  All the icons of my activities are on main menu, once i click it my
  activity will be launched instead i need anicononhomescreenwhich
  when clicked activity should be launched.

  Any inputs on above appreciated.

 Users createhomescreenshortcuts; applications do not.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to create a Icon on Home screen through Activity

2009-10-09 Thread Romain Guy

You can drag icons from the drawer and drop them on the workspace.

On Fri, Oct 9, 2009 at 12:11 AM, jeelani jeelanibashas...@gmail.com wrote:

 Murphy

 I am not looking for shortcut. Let me rephrase my question.
 I want an icon on home screen , upon clicking this icon my application
 should be launched.
 As of now when i create an activity and executes it, i need to open
 menu and click on the activity name to launch my application. I know i
 can create a shortcut for this, instead can i have the same icon on
 home screen instead inside menu through my activity program.

 Thanks,
 Jeelani


 On Oct 7, 9:39 pm, Mark Murphy mmur...@commonsware.com wrote:
  I would like to haveiconcreated onhomescreenthrough an activity .
  All the icons of my activities are on main menu, once i click it my
  activity will be launched instead i need anicononhomescreenwhich
  when clicked activity should be launched.

  Any inputs on above appreciated.

 Users createhomescreenshortcuts; applications do not.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.html
 




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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



[android-developers] Release scheduling on android market

2009-10-09 Thread Mike

Hello,

How long does it take until an application is available to the public
once it has been uploaded to android market? I need to know to create
a release/marketing schedule.

Thanks,
Mike


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



[android-developers] Re: error creating avd with --force

2009-10-09 Thread Cyryl Płotnicki-Chudyk

2009/10/4 Cyryl Płotnicki-Chudyk sharph...@gmail.com:

 PS C:\Users\cyryl\workspace android create avd --name test --target 2
 Android 1.6 is a basic Android platform.
 Do you wish to create a custom hardware profile [no]
 Error: Folder C:\Users\cyryl\.android\avd\test.avd is in the way. Use
 --force if you want to overwrite.


 PS C:\Users\cyryl\workspace android create avd --name test --target 2
 --force
 Android 1.6 is a basic Android platform.
 Do you wish to create a custom hardware profile [no]
 Exception in thread main java.lang.StackOverflowError
        at java.io.WinNTFileSystem.list(Native Method)
        at java.io.File.list(Unknown Source)
        at java.io.File.listFiles(Unknown Source)
        at com.android.sdklib.internal.avd.AvdManager.recursiveDelete
 (AvdManager.java:952)
        at com.android.sdklib.internal.avd.AvdManager.recursiveDelete
 (AvdManager.java:954)
        at com.android.sdklib.internal.avd.AvdManager.recursiveDelete
 (AvdManager.java:954) \

 [[and so on]


anyone else experiencing similar behavior ?
should I report it as a bug ?

-- 
Cyryl Płotnicki-Chudyk
+48 697 088 885

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



[android-developers] start ACTION_VIEW with memory data

2009-10-09 Thread jmh

Hello all,


I would like to run an ACTION_VIEW with memory data.

The first solution is to write data in a file on sdcard but ... it
does not seem so efficient.
I was thinking to implement my own content provider, but as far as I
understand I need to return an ParcelFileDescriptor.
I found a MemoryFile implementation in SDK, however I don't know how
to get a ParcelFileDescriptor for a  MemoryFile.

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



[android-developers] Why this http url could not be played,but the video that is downloaded could be played?

2009-10-09 Thread yjshi

url:http://61.135.181.186/wwwdl/outPutFileName.mp4
I use the mediaplayer to play this url.
It shows that this streaming is not supported.
But when I download the video,it plays ok。
Could somebody give me an explaination why this could be happened?

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



[android-developers] Sound in games

2009-10-09 Thread yarik...@gmail.com

Hi all!

I have pretty common question:
is there any bug-free way to implement sound effects in a game?

Or we only have unpredictable SoundPool with its horrible bugs?
Or MediaPlayer that can only play one sound at once and which
is not solution for a game at all?

In fact, it is disturbing question for numerous developers right now!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Sound in games

2009-10-09 Thread sleith

how about allocate many MediaPlayer? is it bad?

On Oct 9, 4:07 pm, yarik...@gmail.com yarik...@gmail.com wrote:
 Hi all!

 I have pretty common question:
 is there any bug-free way to implement sound effects in a game?

 Or we only have unpredictable SoundPool with its horrible bugs?
 Or MediaPlayer that can only play one sound at once and which
 is not solution for a game at all?

 In fact, it is disturbing question for numerous developers right now!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Single threaded GL example

2009-10-09 Thread Ivan Volosyuk

I was using for sometime now OpenGL initialization code from Api demos
and it was quite hard to exchange events between View and Renderer.
So, I read pieces of documentation from GLES, EGL from jsr239 and
finally made the single threaded GL initialization code which is much
simpler than in ApiDemos. Here it is:

import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.egl.EGLDisplay;
import javax.microedition.khronos.egl.EGLSurface;
import javax.microedition.khronos.opengles.GL10;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.SurfaceHolder.Callback;


public class MainActivitity extends Activity {
@Override
protected void onCreate(Bundle saved) {
  super.onResume();
  final EGL10 egl = (EGL10) EGLContext.getEGL();
  final EGLDisplay eglDisplay =
egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
  int[] version = new int[2];
  egl.eglInitialize(eglDisplay, version);

  int[] configSpec = {
  // EGL10.EGL_DEPTH_SIZE, 8,
  EGL10.EGL_NONE
  };

  final EGLConfig[] config = new EGLConfig[1];
  int num_configs[] = new int[1];
  egl.eglChooseConfig(eglDisplay, configSpec, config, 1, num_configs);
  final EGLContext eglContext =
egl.eglCreateContext(eglDisplay, config[0], EGL10.EGL_NO_CONTEXT, null);

  // Setting up layouts and views
  SurfaceView view = new SurfaceView(this);
  setContentView(view);

  SurfaceHolder holder = view.getHolder();
  holder.setType(SurfaceHolder.SURFACE_TYPE_GPU);
  final GL10 gl = (GL10) eglContext.getGL();
  final Handler handler = new Handler();

  holder.addCallback(new Callback() {
private EGLSurface surface;
private Runnable painter;

@Override
public void surfaceChanged(SurfaceHolder holder, int format, int width,
int height) {
  // initialize GL projection and other stuff
  // gl.glMatrixMode(GL10.GL_PROJECTION);
  // gl.glFrustumf(left, right, bottom, top, zNear, zFar);
  // ...
  painter = new Runnable() {
@Override
public void run() {
  drawFrame(gl);
  egl.eglSwapBuffers(eglDisplay, surface);
  handler.post(this);
}
  };
  handler.post(painter);
}
@Override
public void surfaceCreated(SurfaceHolder holder) {
  surface =
egl.eglCreateWindowSurface(eglDisplay, config[0], holder, null);
  egl.eglMakeCurrent(eglDisplay, surface, surface, eglContext);
}
@Override
public void surfaceDestroyed(SurfaceHolder holder) {
  handler.removeCallbacks(painter);
}
  });
}

private void drawFrame(GL10 gl) {
  // Frame drawing...
  long t = System.currentTimeMillis() % 1;
  gl.glClearColor(t / (float) 1, t / (float) 1 ,1 , 1);
  gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
}
}

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



[android-developers] Re: regarding phone calling

2009-10-09 Thread manoj

is anybody dont know how to intercept out going calls.

I mean when we dial a phone number instead of going to the android's
InCallScreen app, my own app should be launched.

how to do it?

Thanks,
Manoj.

On Oct 9, 10:15 am, manoj manojkumar.m...@gmail.com wrote:
 Hi basically, what I am looking for is when some one dials a phone
 number, then my app should be activated.

 How can I achieve this?

 thanks,
 Manoj.

 On Oct 9, 9:50 am, manoj manojkumar.m...@gmail.com wrote:



  Hi all,

  I have a requirement as given below:

  1. I have to show the phone dialer screen. after giving the phone
  number and pressing on that number should return to a new activity.

  How can I achieve this?

  can any one please help me.

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



[android-developers] Re: Sound in games

2009-10-09 Thread yarik

MediaPlayer cuts last few milliseconds in short sounds after first
playing, at least with wma files.

On Oct 9, 12:28 pm, sleith raysle...@gmail.com wrote:
 how about allocate many MediaPlayer? is it bad?

 On Oct 9, 4:07 pm, yarik...@gmail.com yarik...@gmail.com wrote:



  Hi all!

  I have pretty common question:
  is there any bug-free way to implement sound effects in a game?

  Or we only have unpredictable SoundPool with its horrible bugs?
  Or MediaPlayer that can only play one sound at once and which
  is not solution for a game at all?

  In fact, it is disturbing question for numerous developers right now!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Media player

2009-10-09 Thread rahulp

Is there a way that I can get the media information (song title,
genre, artist, etc) that is being played in the default music player?

Does the default music player allows sharing of these kind of
information?



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



[android-developers] Re: Publishing both free and paid versions of app on Android Market

2009-10-09 Thread abarinoff

Thanks for pointing to those topic - it's quite interesting. But
unfortunately solution of Justin Anderson doesn't help me much as I
don't need any additional
key application. What I need is to publish both free and paid versions
of application on Android Market and ideally user would be able to
first download free
version and then update to paid version later.

From what I've seen in different forums the only solution would be
creating free and paid applications with different package name
specified in
AndroidManifest.xml file, for example:

org.test.appname.bfree/b - for free version

and

org.test.appname.bpaid/b - for paid version

but is it allowed to specify package name which actually doesn't exist
really in my java sources ? What I mean is that my
classes are actually laid under iorg.test.appname/i package and
the iorg.test.appname.bfree/b/i doesn't really exist.
If it's allowed - I would be able to use same codebase for both
versions of application but simply provide different package names
in AndroidManifest.xml file. This still will lead to the problem that
if user downloads free version first and later downloads paid
version - then there would be actually two applications on user's
phone instead of one.

Please advice.

On Oct 8, 8:59 pm, RichardC richard.crit...@googlemail.com wrote:
 Have a read of:

 http://groups.google.com/group/android-beginners/browse_thread/thread...

 specifically pos4 by Justin Anderson)

 It looks like a very nice solution and stops you haveing to maintain
 your code base in 2 projects.

 --
 RichardC

 On Oct 8, 12:51 am, abarinoff abarin...@gmail.com wrote:

  Hi all,

  Could someone give me a hint how should I publish bothfreeandpaid
  versions of application on Android Market so the user would be able to
  installFreeversion first and then upgrade toPaidversion if he
  likes to.

  I saw few articles which are saying that there should be difference in
  package names forfreeandpaidversions on order to be able to
  perform upgrade later, but what if I publish thefreeversion with
  android:versionCode set to 1 and thepaidversion with
  android:versionCode set to 2 - wouldn't that allow to perform update
  fromfreetopaidapplication without changing the package name ?

  Unfortunately I didn't find any article neither on android developers
  site nor on android market site describing the best practices of
  solving this problem, so any help from the android community members
  would be very much appreciated !

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



[android-developers] Re: Can WebView be used inside a Service?

2009-10-09 Thread Miguel Paraz

Hi,
I looked into this myself...

On Oct 9, 3:00 pm, tomei.ninge...@gmail.com
tomei.ninge...@gmail.com wrote:
 I want to run part of my app logic in a background service. However,
 much of the app uses JavaScript. Currently I run the JavaScript inside
 a WebView.

 Is it possible to have an invisible WebView while running inside a
 Service?

No, only only an Activity can have Views.

 If the answer is no, is there any way to run JavaScript inside a
 Service?

If it's the JavaScript language, it may be possible to port Rhino to
Android. But, the performance won't be so good because JIT compiling
must be disabled.

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



[android-developers] Re: Sound in games

2009-10-09 Thread yarik

At the same time playing mp3 or ogg with MediaPlayer it is too slow
for games, it causes lags.

On Oct 9, 12:46 pm, yarik yarik...@gmail.com wrote:
 MediaPlayer cuts last few milliseconds in short sounds after first
 playing, at least with wma files.

 On Oct 9, 12:28 pm, sleith raysle...@gmail.com wrote:



  how about allocate many MediaPlayer? is it bad?

  On Oct 9, 4:07 pm, yarik...@gmail.com yarik...@gmail.com wrote:

   Hi all!

   I have pretty common question:
   is there any bug-free way to implement sound effects in a game?

   Or we only have unpredictable SoundPool with its horrible bugs?
   Or MediaPlayer that can only play one sound at once and which
   is not solution for a game at all?

   In fact, it is disturbing question for numerous developers right now!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Do MapView Overlays get painted at angle?

2009-10-09 Thread Ne0

When an overlay is put on a MapView, the shadow suggest that its at an
angle and not flat on the map.

I have been creating scaled bitmaps to overlay on a mapview, but i am
either geting the scale wrong or the overlay is being painted at a
slight angle, sitting up a bit, rather then being flat to the map.

Does anyone know if this is true? and if so, is there a way to stop it
painting at an angle or do you know the angle so i can compensate for
it when creating the bitmapped overlay?

Thanks,

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



[android-developers] Android WebView and HTML5

2009-10-09 Thread Anton Pirker

Hey fellow Androids!

I am experimenting with Androids WebView[1] and its HTML5 features.
I have written a little webpage with does the features detection like 
described here:
http://diveintohtml5.org/detect.html

And now I see (I am on a SDK1.6 Emulator) that the LocalStorage, the 
WebWorkers and Offline Web Applications are not supported!

Does anyone know when these features will be supported? Or does anyone 
know the exact version (or build) of the webkit engine, that is used in 
Android 1.6?

Any hints are greatly appreciated!

Thanks,
Anton

[1] http://developer.android.com/reference/android/webkit/WebView.html

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



[android-developers] Android SDK google maps api issue

2009-10-09 Thread Raja Nagendra Kumar

Hi,

Has any one tried building maps application using the target 1 or 2.

I see the size of the maps.jar is just 22kb where as for 1.6 with 3
and 4 it is 384kb.

D:\Apps\java\mobile\android\sdk16\add-ons\google_apis-3\libs

Is some thing wrong here..

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



[android-developers] To read doc,exl,ppt without using MSoffice in android

2009-10-09 Thread santhu

HI Guys,


   I want to read edit and write word document, excel and
powerpoint without using Ms office installed in the android. i am
trying to develop a application in android. did any one have already
done this please send the source code of it. if not can u guide me  to
do the application.

Thanks in advance

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



[android-developers] Re: Android WebView and HTML5

2009-10-09 Thread Anton Pirker

As a explanation.

I have written an app which displays an WebView that loads my html
page with the features-testing scripts describet here:
http://diveintohtml5.org/detect.html

As a workaround for the missing features i had the idea that i could
write my own WebView with an nightly version of webkit.
Do you think this is a good idea to do? I do not know how big a
compiled version of webkit is and if android has its own optimized
version of webkit.
Has anyone done something similiar?

Thanks,
Anton



On Oct 9, 12:37 pm, Anton Pirker an...@ignaz.at wrote:
 Hey fellow Androids!

 I am experimenting with Androids WebView[1] and its HTML5 features.
 I have written a little webpage with does the features detection like
 described here:http://diveintohtml5.org/detect.html

 And now I see (I am on a SDK1.6 Emulator) that the LocalStorage, the
 WebWorkers and Offline Web Applications are not supported!

 Does anyone know when these features will be supported? Or does anyone
 know the exact version (or build) of the webkit engine, that is used in
 Android 1.6?

 Any hints are greatly appreciated!

 Thanks,
 Anton

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



[android-developers] monkey script

2009-10-09 Thread Deepak Arul

I am trying to use the -f scriptfile option for monkey tool. In this
manner, the key events generated by the monkey tool can be controlled
according to the tester's requirements. I could not find any
documentation on the scriptfile option. I need to know the syntax and
format of the scriptfile. Where can I find this information ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: regarding phone calling

2009-10-09 Thread Mark Murphy

manoj wrote:
 is anybody dont know how to intercept out going calls.

It is not possible from the SDK.

 I mean when we dial a phone number instead of going to the android's
 InCallScreen app, my own app should be launched.
 
 how to do it?

You can create your own firmware based on http://source.android.com,
make whatever changes you desire, and put that firmware on your own phone.

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

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

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



[android-developers] Re: Release scheduling on android market

2009-10-09 Thread Mark Murphy

Mike wrote:
 How long does it take until an application is available to the public
 once it has been uploaded to android market?

In my one test, about 1-2 minutes.

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

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

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



[android-developers] Re: Webview with progress and url overriding

2009-10-09 Thread Mark Murphy

Chister Nordvik wrote:
 Hi!
 
 I would like to add a Webview that both intercepts the URL clicks and
 shows a progress when loading.
 
 URL overriding:
 myWebView.setWebViewClient(new WebViewClient() {
   @Override public boolean shouldOverrideUrlLoading(WebView 
 view,
 String url) {
 ...
 
 Progress:
 myWebView.setWebChromeClient(new WebChromeClient(){
 @Override
 public void onProgressChanged(WebView view, int newProgress) {
 ...
 
 But is there any way to combine these two?

They are separate objects. What do you mean by combined?

 The WebViewClient only
 offers OnPageFinished and then I can't show any real progress when
 loading.

What makes you say that? Is your WebChromeClient object being ignored?

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

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

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



[android-developers] Re: Rating Bar Dialog API

2009-10-09 Thread Mark Murphy

Subba wrote:
 I know Market application has Rating Bar Dialog. Is there any API to
 create Rating Bar Dialog in Android SDK 1.5 or 1.6.?

Use AlertDialog.Builder and its setView() method to put a RatingBar in
the dialog.

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

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

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



[android-developers] Re: Supressing Key presses in Activity, especially in Options Menu

2009-10-09 Thread Mark Murphy

Raman wrote:
 Thanks for that suggestion. I'll take that but my problem is still not
 solved. My problem is when Options menu is opened.
 In that scenario, pressing of Call key does not call the callback
 function onKeyDown() and I do not know why.

The options menu probably intercepts all keys and, for whatever reason,
does not propagate the Call key to be intercepted. IMHO, this is a good
thing.

 I could not find a way to catch that key event, so if you have a
 solution, please let me know...

Don't intercept the Call key. As Megha indicated, I'm surprised it is
even possible.

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

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

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



[android-developers] Re: Android WebView and HTML5

2009-10-09 Thread Mark Murphy

Anton Pirker wrote:
 As a workaround for the missing features i had the idea that i could
 write my own WebView with an nightly version of webkit.
 Do you think this is a good idea to do?

Only if you have a team of ~10 engineers and a substantial budget.

 I do not know how big a
 compiled version of webkit is and if android has its own optimized
 version of webkit.

Android has a number of optimizations for its use of WebKit, not the
least of which is using Skia for the rendering engine.

 And now I see (I am on a SDK1.6 Emulator) that the LocalStorage, the
 WebWorkers and Offline Web Applications are not supported!

LocalStorage might work with the full Browser application with Google
Gears enabled -- I'm a little fuzzy as to whether Gears offers official
HTML5 LocalStorage support.

WebView does not support Gears.

 Does anyone know when these features will be supported?

The Android project is not fond of forward-looking statements like
project plans and timelines. I have to imagine it is relatively high on
their list, since Google as a whole is seriously behind HTML5 (see
Google Wave). However, even then, I imagine that some features (e.g.,
Offline Web Applications) might be a wee bit tricky to add to Android,
so complete HTML5 support may not be easy.

 Or does anyone
 know the exact version (or build) of the webkit engine, that is used in
 Android 1.6?

I am under the impression that there is a way to determine this, as
somebody mentioned a WebKit version in passing at MOTODEV Summit, but I
don't remember what he said the version was nor how to figure it out.
Sorry I don't have any more info on that facet of your question.

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

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

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



[android-developers] Re: Single threaded GL example

2009-10-09 Thread Mike

Hi Ivan,

thanks for sharing this. It can be usefull to get something rendered
with as least code as possible. But for a performance critical
application (which almost all opengl games/apps are) you must keep the
multithreaded approach, or else you'll spend a lot of time refactoring
your code.
Take a look at the following link/video. It contains a lot of
valueable informations and explains why the OpenGL api examples are
multithreaded and why you should stick to the multithreaded approach.
http://code.google.com/intl/de-DE/events/io/sessions/WritingRealTimeGamesAndroid.html





On 9 Okt., 11:39, Ivan Volosyuk ivan.volos...@gmail.com wrote:
 I was using for sometime now OpenGL initialization code from Api demos
 and it was quite hard to exchange events between View and Renderer.
 So, I read pieces of documentation from GLES, EGL from jsr239 and
 finally made the single threaded GL initialization code which is much
 simpler than in ApiDemos. Here it is:

 import javax.microedition.khronos.egl.EGL10;
 import javax.microedition.khronos.egl.EGLConfig;
 import javax.microedition.khronos.egl.EGLContext;
 import javax.microedition.khronos.egl.EGLDisplay;
 import javax.microedition.khronos.egl.EGLSurface;
 import javax.microedition.khronos.opengles.GL10;

 import android.app.Activity;
 import android.os.Bundle;
 import android.os.Handler;
 import android.view.SurfaceHolder;
 import android.view.SurfaceView;
 import android.view.SurfaceHolder.Callback;

 public class MainActivitity extends Activity {
     @Override
     protected void onCreate(Bundle saved) {
       super.onResume();
       final EGL10 egl = (EGL10) EGLContext.getEGL();
       final EGLDisplay eglDisplay =
 egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
       int[] version = new int[2];
       egl.eglInitialize(eglDisplay, version);

       int[] configSpec = {
           // EGL10.EGL_DEPTH_SIZE, 8,
           EGL10.EGL_NONE
       };

       final EGLConfig[] config = new EGLConfig[1];
       int num_configs[] = new int[1];
       egl.eglChooseConfig(eglDisplay, configSpec, config, 1, num_configs);
       final EGLContext eglContext =
         egl.eglCreateContext(eglDisplay, config[0], EGL10.EGL_NO_CONTEXT, 
 null);

       // Setting up layouts and views
       SurfaceView view = new SurfaceView(this);
       setContentView(view);

       SurfaceHolder holder = view.getHolder();
       holder.setType(SurfaceHolder.SURFACE_TYPE_GPU);
       final GL10 gl = (GL10) eglContext.getGL();
       final Handler handler = new Handler();

       holder.addCallback(new Callback() {
         private EGLSurface surface;
         private Runnable painter;

         @Override
         public void surfaceChanged(SurfaceHolder holder, int format, int 
 width,
             int height) {
           // initialize GL projection and other stuff
           // gl.glMatrixMode(GL10.GL_PROJECTION);
           // gl.glFrustumf(left, right, bottom, top, zNear, zFar);
           // ...
           painter = new Runnable() {
             @Override
             public void run() {
               drawFrame(gl);
               egl.eglSwapBuffers(eglDisplay, surface);
               handler.post(this);
             }
           };
           handler.post(painter);
         }
         @Override
         public void surfaceCreated(SurfaceHolder holder) {
           surface =
             egl.eglCreateWindowSurface(eglDisplay, config[0], holder, null);
           egl.eglMakeCurrent(eglDisplay, surface, surface, eglContext);
         }
         @Override
         public void surfaceDestroyed(SurfaceHolder holder) {
           handler.removeCallbacks(painter);
         }
       });
     }

     private void drawFrame(GL10 gl) {
       // Frame drawing...
       long t = System.currentTimeMillis() % 1;
       gl.glClearColor(t / (float) 1, t / (float) 1 ,1 , 1);
       gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
     }

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



[android-developers] Re: Release scheduling on android market

2009-10-09 Thread Mike

Hi Mark,

thanks for the information!

On 9 Okt., 13:50, Mark Murphy mmur...@commonsware.com wrote:
 Mike wrote:
  How long does it take until an application is available to the public
  once it has been uploaded to android market?

 In my one test, about 1-2 minutes.

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

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



[android-developers] Re: Android WebView and HTML5

2009-10-09 Thread Anton Pirker

Hi Mark!

Thanks for the reply!


Mark Murphy wrote:
 Anton Pirker wrote:
   
 As a workaround for the missing features i had the idea that i could
 write my own WebView with an nightly version of webkit.
 Do you think this is a good idea to do?
 

 Only if you have a team of ~10 engineers and a substantial budget.

   
 I do not know how big a
 compiled version of webkit is and if android has its own optimized
 version of webkit.
 

 Android has a number of optimizations for its use of WebKit, not the
 least of which is using Skia for the rendering engine.
   
Ok, so i skip that idea ;)

   
 And now I see (I am on a SDK1.6 Emulator) that the LocalStorage, the
 WebWorkers and Offline Web Applications are not supported!
   

 LocalStorage might work with the full Browser application with Google
 Gears enabled -- I'm a little fuzzy as to whether Gears offers official
 HTML5 LocalStorage support.

 WebView does not support Gears.

   
It should be possible without gears. The iphones version of webkit does 
in fact support LocalStorage and Offlien Web Applications.

 Does anyone know when these features will be supported?
   

 The Android project is not fond of forward-looking statements like
 project plans and timelines. I have to imagine it is relatively high on
 their list, since Google as a whole is seriously behind HTML5 (see
 Google Wave). However, even then, I imagine that some features (e.g.,
 Offline Web Applications) might be a wee bit tricky to add to Android,
 so complete HTML5 support may not be easy.
   

yes, google never tells stuff about release plans (not even on the 
developer days)
so we are in the dark here...
   
 Or does anyone
 know the exact version (or build) of the webkit engine, that is used in
 Android 1.6?
   

 I am under the impression that there is a way to determine this, as
 somebody mentioned a WebKit version in passing at MOTODEV Summit, but I
 don't remember what he said the version was nor how to figure it out.
 Sorry I don't have any more info on that facet of your question.
   

Thanks for all your comments.


Have a nice day,
Anton





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



[android-developers] Re: Android WebView and HTML5

2009-10-09 Thread Miguel Paraz

Hi,
You can see a comparison of the different WebKit implementations here:
http://www.quirksmode.org/webkit.html

On Oct 9, 8:00 pm, Mark Murphy mmur...@commonsware.com wrote:
  And now I see (I am on a SDK1.6 Emulator) that the LocalStorage, the
  WebWorkers and Offline Web Applications are not supported!

 LocalStorage might work with the full Browser application with Google
 Gears enabled -- I'm a little fuzzy as to whether Gears offers official
 HTML5 LocalStorage support.

It's a different API with the same features (practically), thus this
abstraction project:
http://code.google.com/p/webstorageportabilitylayer/

which I believe is what GMail for WebKit uses.

  Or does anyone
  know the exact version (or build) of the webkit engine, that is used in
  Android 1.6?

 I am under the impression that there is a way to determine this, as
 somebody mentioned a WebKit version in passing at MOTODEV Summit, but I
 don't remember what he said the version was nor how to figure it out.
 Sorry I don't have any more info on that facet of your question.

It's in the open source tree, ./external/webkit/configure.ac - right
now it's 1.0.3. See the top part of:
http://android.git.kernel.org/?p=platform/external/webkit.git;a=blob_plain;f=configure.ac;hb=HEAD


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



[android-developers] Re: HTC phone for testng?

2009-10-09 Thread ian

Uh, by standard things do you mean using GPS location and Mapview?
Pardon me if it is a silly question.




On Oct 9, 3:12 am, Miguel Paraz mpa...@gmail.com wrote:
 On Oct 9, 12:28 pm, ian stilbit...@gmail.com wrote:

  I am almost ready to begin testing my apps on a real phone.

  I don't want a G1.

  If I got an unlocked HTC, can I use that for my testing, or do a need
  a specialized developer phone from Google\?

 Hi,
 You can use any phone to test SDK apps that only do standard things.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: HTC phone for testng?

2009-10-09 Thread Mark Murphy

ian wrote:
 Uh, by standard things do you mean using GPS location and Mapview?
 Pardon me if it is a silly question.

An ordinary Android device can be used for anything except easily
testing replacement firmware.

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

_Android Programming Tutorials_ Version 1.0 In Print!

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



[android-developers] does shake google phone(HTC magic) pauses application?

2009-10-09 Thread huanwu

as the title
i am implementing a app that can sense shaking and then do something
but whenever i shake my phone, the screen becomes dark ( the app puase
(), i suppose?)
i have to press back key to return
is there any solution?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ID of Apps and meta information

2009-10-09 Thread Mark Murphy

mboehmer wrote:
 do applications have an identifier, that is unique in the market
 store?

It is their package, as declared in their manifest.

 And is is possible to query any meta information from the
 market store about applications, e.g. title and description?

There is no official API to the Android Market.

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

Need help for your Android OSS project? http://wiki.andmob.org/hado

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



[android-developers] ID of Apps and meta information

2009-10-09 Thread mboehmer

Hello,

do applications have an identifier, that is unique in the market
store? And is is possible to query any meta information from the
market store about applications, e.g. title and description?

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



[android-developers] RNDIS working in Android

2009-10-09 Thread Joe Petruchi
Hi All

Is there anyone who know how RNDIS works inorder to share an Internet
Connection ?

Any help is this regards will be great..

Best Regards
Petruchi

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



[android-developers] Re: Where have all the Google employees gone?

2009-10-09 Thread Rud

Please don't confuse me with the facts. LOL

Rud


On Oct 9, 12:06 am, Shawn Brown big.coffee.lo...@gmail.com wrote:
 On Fri, Oct 9, 2009 at 1:45 PM, Rud rudmerr...@gmail.com wrote:

  My web site got hit by 68 people looking at my game page. Since the
  only reference, pretty much, to the site is on the game I am assuming
  around that many people tested it.

  Hopefully I'm not being overly optimistic thinking they liked it
  otherwise they would not have bothered to visit the site.

 Hello?  Anyone there?

 maybe 100 people reviewed it and 2 people liked it and they each told
 34 friends whom they know like similar things.

 You can't conclude anything other than somebody likes it!!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] AppWidget TextView question.

2009-10-09 Thread Abhilash

I have an AppWidget that contains a TextView. If there is more text in
TextView than what can be shown on the AppWidget, I want to indicate
that to user in some way (like showing more.. in last line of the
AppWidget).
I know how this can be done in an activity but cannot figure out how
to do it in a AppWidget. Can someone suggest how this can be done?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Rating Bar Dialog API

2009-10-09 Thread AJ

Hi Subba,

check the following link:-
http://www.anddev.org/viewtopic.php?p=25186

Hope this helps you

Thanks,
AJ

On Oct 9, 4:52 pm, Mark Murphy mmur...@commonsware.com wrote:
 Subba wrote:
  I know Market application has Rating Bar Dialog. Is there any API to
  create Rating Bar Dialog in Android SDK 1.5 or 1.6.?

 Use AlertDialog.Builder and its setView() method to put a RatingBar in
 the dialog.

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

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



[android-developers] Re: Do MapView Overlays get painted at angle?

2009-10-09 Thread Ne0

Yes they do, i figured it out to be 50 degrees. If it is Documented
some where i must have missed it!

On 9 Oct, 11:32, Ne0 liamjamesalf...@googlemail.com wrote:
 When an overlay is put on a MapView, the shadow suggest that its at an
 angle and not flat on the map.

 I have been creating scaled bitmaps to overlay on a mapview, but i am
 either geting the scale wrong or the overlay is being painted at a
 slight angle, sitting up a bit, rather then being flat to the map.

 Does anyone know if this is true? and if so, is there a way to stop it
 painting at an angle or do you know the angle so i can compensate for
 it when creating the bitmapped overlay?

 Thanks,

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



[android-developers] Defining layout resources in a modular way?

2009-10-09 Thread Mark Wyszomierski

Hi,

Is there a way to define xml layout resources in a modular way? I am
building individual 'panels' through code only, it would probably make
sense if each were defined in their own xml file, which I can pull at
runtime, something like the following psuedocode:

// PanelFarm.xml
LinearLayout
   TextView
   EditView
/LinearLayout

// PanelCity.xml
LinearLayout
  ScrollView
/LinearLayout

// ActivityMain.xml
LinearLayout
/LinearLayout

// ActivityMain.java
public void buildUI() {
  LinearLayout llFarm1 = R.layout.PanelFarm.xml;
  addView(llFarm);
  LinearLayout llFarm2 = R.layout.PanelFarm.xml;
  addView(llFarm2);

  LinearLayout llCity = R.layout.PanelCity.xml;
  addView(llCity);
}

if it's possible to do something like that, would it be slowing
constantly reading from the xml files at runtime, or does android
cache all our layout xml files in memory anyway?

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



[android-developers] Re: Should we still force our apps to API level 2?

2009-10-09 Thread Greivin Lopez

I have a question related to backward compatibility in Android. My
applications uses SmsManager class that was deprecated in SDK 1.5 and
moved to other package in SDK 1.6 to support CDMA. That's OK.

The problem is I want to support 1.5 SDK and also being able to use
the new SmsManager class. I think the only way to do that is using the
solution suggested by EboMike (with reflection), but I think is more a
patch than the correct way around.  Other solution could be to compile
the code to the desire target and keep two different releases of the
application but I don't like the idea to maintain two versions of my
code.

I think a must elegant design for this is to use some sort of compiler
directives that let us developers to differentiate parts of our code
associated to one version of the SDK or another one, but I don't see
anything in Android to accomplish that.

Is there a way to achieve this? I suppose there isn't but maybe
someone could share some new ideas on this scenario. I would
appreciate any help. Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Rating Bar Dialog API

2009-10-09 Thread AJ

Hi All

I tried that example on my local system and its working.

Thanks to Google
AJ


On Oct 9, 6:45 pm, AJ ajeet.invinci...@gmail.com wrote:
 Hi Subba,

 check the following link:-http://www.anddev.org/viewtopic.php?p=25186

 Hope this helps you

 Thanks,
 AJ

 On Oct 9, 4:52 pm, Mark Murphy mmur...@commonsware.com wrote:

  Subba wrote:
   I know Market application has Rating Bar Dialog. Is there any API to
   create Rating Bar Dialog in Android SDK 1.5 or 1.6.?

  Use AlertDialog.Builder and its setView() method to put a RatingBar in
  the dialog.

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

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


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



[android-developers] Re: HTC phone for testng?

2009-10-09 Thread Miguel Paraz

On Oct 9, 8:51 pm, ian stilbit...@gmail.com wrote:
 Uh, by standard things do you mean using GPS location and Mapview?
 Pardon me if it is a silly question.

GPS - yes, as long as the hardware supports it. All Android phones to
my knowledge do.

MapView - the phone needs to have Google Mobile Services. Some may
ship without it in some regions. (Example: the HTC Magic here in
Southeast Asia)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Should I update game physics/mechanics in onDrawFrame() ?

2009-10-09 Thread Lance Nanek

There's a neat blog post about using an extra thread to get around
some hardware blocking here:
http://replicaisland.blogspot.com/2009/10/rendering-with-two-threads.html

On Oct 9, 1:42 am, hzakimoto hzakim...@gmail.com wrote:
 Hi. Please excuse me for being new. I'll try my best to explain.

 I read the Android Developer blog about GLSurfaceView here:

 http://android-developers.blogspot.com/search/label/OpenGL%20ES

 It said one of the advantage we get from using GLSurfaceView is
 Creating and managing a separate rendering thread to enable smooth
 animation.

 Question:

 Currently I'm doing this in my game.
 public void onDrawFrame(GL10 gl) {

                 //update game mechanics/physics
                 updateGame(gl);

                 //draw game
                 gl.glDisable(GL10.GL_DITHER);
                 gl.glClear(GL10.GL_COLOR_BUFFER_BIT | 
 GL10.GL_DEPTH_BUFFER_BIT);
                 gl.glMatrixMode(GL10.GL_MODELVIEW);
                 gl.glLoadIdentity();
                 .

 }

 Is this what it's supposed to be? (I handled 'elapsed time' in my
 updateGame() )

 Or should I create another thread to do the update? Like this:

 �...@override
         public void run() {
             while (mRun) {

                 //update game mechanics/physics
                 updateGame(gl);

               }
         }

 public void onDrawFrame(GL10 gl) {
                 //draw game
                 gl.glDisable(GL10.GL_DITHER);
                 gl.glClear(GL10.GL_COLOR_BUFFER_BIT | 
 GL10.GL_DEPTH_BUFFER_BIT);
                 gl.glMatrixMode(GL10.GL_MODELVIEW);
                 gl.glLoadIdentity();
                 .

 }

 Which one will produce best result for a game?

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



[android-developers] Re: AppWidget TextView question.

2009-10-09 Thread AJ

Hi Abhilash,

try using :-

TextView tv = (TextView)findViewById(R.id.textv);
tv.setEllipsize(  TextUtils.TruncateAt.END);

this sets the ellipses at the end.

Thanks,
AJ

On Oct 9, 6:39 pm, Abhilash abhilash.ramakris...@gmail.com wrote:
 I have an AppWidget that contains a TextView. If there is more text in
 TextView than what can be shown on the AppWidget, I want to indicate
 that to user in some way (like showing more.. in last line of the
 AppWidget).
 I know how this can be done in an activity but cannot figure out how
 to do it in a AppWidget. Can someone suggest how this can be done?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: VerifyError and Content Providers

2009-10-09 Thread jsdf

Does anyone have suggestions on this?
Has anyone encountered this issue and corrected it?
Thanks,
jsdf

On Oct 8, 3:17 pm, jsdf jasons...@gmail.com wrote:
 Hi all,
 I've been struggling with what seems like a straightforward issue for
 some time now, and any suggestions would be appreciated.

 - I created a very simple content provider that extends
 ContentProvider and does the basic six tasks (onCreate, query, etc.).
 - I created a Constants class as such:
 public class Constants {
         public static final String AUTHORITY = content://
 com.companyname.provider.provider;
         public static final Uri CONTENT_URI = Uri.parse(AUTHORITY);

         public static final String DEFAULT_SORT_ORDER = contactid ASC;

         public static final String _ID = _id;
         public static final String CONTACTID = contactid;
         public static final String TYPE = type;

 }

 - Finally, I created a _separate_ content provider test application,
 with a separate package name.  It runs the following test:
         String[] projection = new String[] {
                         Constants._ID,
                         Constants.CONTACTID,
                         Constants.TYPE
         };

         Uri contacts =  Constants.CONTENT_URI;

 }

 - When the URI contacts = Constants.CONTENT_URI line is active, as
 shown above, I consistently receive the following errors:

 W/dalvikvm(  590): VFY: unable to resolve static field 5 (CONTENT_URI)
 in Lcom/companyname/provider/Constants;
 W/dalvikvm(  590): VFY:  rejecting opcode 0x62 at 0x001b
 W/dalvikvm(  590): VFY:  rejected Lcom/companyname/contentprovidertest/
 ContentProviderTest;.testContentProvider ()V
 W/dalvikvm(  590): Verifier rejected class Lcom/companyname/
 contentprovidertest/ContentProviderTest;
 W/dalvikvm(  590): Class init failed in newInstance call (Lcom/
 companyname/contentprovidertest/ContentProviderTest;)
 D/AndroidRuntime(  590): Shutting down VM
 W/dalvikvm(  590): threadid=3: thread exiting with uncaught exception
 (group=0x4001da28)
 E/AndroidRuntime(  590): Uncaught handler: thread main exiting due to
 uncaught exception
 E/AndroidRuntime(  590): java.lang.VerifyError:
 com.companyname.contentprovidertest.ContentProviderTest
 E/AndroidRuntime(  590):        at java.lang.Class.newInstanceImpl(Native
 Method)
 (and more)

 - When the URI contacts = Constants.CONTENT_URI line is commented
 out, the simple test succeeds, and I am able to access the strings.

 - The second, test application was built with the original app (with
 the content provider) in the Projects build path.

 Is this an issue with using complex data sources (e.g.
 android.net.Uri)?
 Is this a build or link problem?
 What build suggestions do you all have to getting around this?

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



[android-developers] Re: HEADSET_PLUG not registering as receiver

2009-10-09 Thread skyman

*bump*

On 7 Paź, 14:53, skyman krzysiek.bieli...@gmail.com wrote:
 I have solved the problem by starting service on boot which (service)
 is registering Receiver, but hope that there is a better solution...

 On 7 Paź, 00:54, skyman krzysiek.bieli...@gmail.com wrote:

  Hello,

  I'm trying to create application fixing problem with audio volume in
  headset/handset (I cannot find such application in the market).

  There is ACTION_HEADSET_PLUG intent, but I cannot register it in
  manifest. Registering it using registerReceiver does not make sense
  becouse app should be run always when headset is plugged/unplugged,
  app will also have no GUI/Activity.

  How can I solve this problem?

  Regs,

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



[android-developers] recall interface help

2009-10-09 Thread android


I have developed an interface that displays a map hours I should call
a listview what should I do? I put it to sleep the map?
I can hardly recall the map
I ask you help thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Publishing both free and paid versions of app on Android Market

2009-10-09 Thread String

On Oct 9, 11:16 am, abarinoff abarin...@gmail.com wrote:

 Thanks for pointing to those topic - it's quite interesting. But
 unfortunately solution of Justin Anderson doesn't help me much as I
 don't need any additional
 key application. What I need is to publish both free and paid versions
 of application on Android Market and ideally user would be able to
 first download free
 version and then update to paid version later.

I think the point is that there's no good way to do this in the
current Market. If you insist on having free and paid versions,
they're separate apps, and there's no way to upgrade from one to the
other. Correspondingly, there's nothing to stop a user having both
installed on their phone at once.

The approach of using a separate key/license app is an alternate
solution to the problem. It's still not perfect, but it avoids the
double-installation problem, as well as any trickery to keep a single
code base. It's not the solution you ideally want, but it does
accomplish an equivalent result, and it works. IMO, it's cleaner -
it's the approach I use for one of my own apps.

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



[android-developers] Re: Can WebView be used inside a Service?

2009-10-09 Thread tomei.ninge...@gmail.com

Thanks Miguel,

Can a service launch an activity? I need to run something periodically
using JavaScript (say every 4 hours). Porting Rhino probably won't
work for me because I use a lot of large Strings, and putting that in
the Java heap will soon fragment it very bad ...


On Oct 9, 3:26 am, Miguel Paraz mpa...@gmail.com wrote:
 Hi,
 I looked into this myself...

 On Oct 9, 3:00 pm, tomei.ninge...@gmail.com

 tomei.ninge...@gmail.com wrote:
  I want to run part of my app logic in a background service. However,
  much of the app uses JavaScript. Currently I run the JavaScript inside
  a WebView.

  Is it possible to have an invisible WebView while running inside a
  Service?

 No, only only an Activity can have Views.

  If the answer is no, is there any way to run JavaScript inside a
  Service?

 If it's the JavaScript language, it may be possible to port Rhino to
 Android. But, the performance won't be so good because JIT compiling
 must be disabled.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: HEADSET_PLUG not registering as receiver

2009-10-09 Thread Mark Murphy

skyman wrote:
 *bump*
 
 On 7 Paź, 14:53, skyman krzysiek.bieli...@gmail.com wrote:
 I have solved the problem by starting service on boot which (service)
 is registering Receiver, but hope that there is a better solution...

 On 7 Paź, 00:54, skyman krzysiek.bieli...@gmail.com wrote:

 Hello,
 I'm trying to create application fixing problem with audio volume in
 headset/handset (I cannot find such application in the market).
 There is ACTION_HEADSET_PLUG intent, but I cannot register it in
 manifest. Registering it using registerReceiver does not make sense
 becouse app should be run always when headset is plugged/unplugged,
 app will also have no GUI/Activity.
 How can I solve this problem?

The better solution is to contribute changes to the Android open
source project to resolve whatever problem you are experiencing with the
headset volume. The ACTION_HEADSET_PLUG Intent would appear to not be
designed for your scenario.

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

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

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



[android-developers] Multiple screens in one activity (like home screen)

2009-10-09 Thread Marc Reichelt

Hi there!

I am working on an application where I wish to have multiple screens
(each of full display size) attached to each other horizontally, and
switch between them by using the finger (swipe right / swipe left).
The home screen does exactly what I want, but its implementation seems
to be more complex than I thought.

What would be your preferred way to achieve this functionality? Is
there any Layout or View that I could reuse?
More generally, it should work with the 1.5 SDK, so the gesture
interface is not available. :-/


Great thanks in advance

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



[android-developers] Re: VerifyError and Content Providers

2009-10-09 Thread Mark Murphy

jsdf wrote:
 Does anyone have suggestions on this?

Pretty much all VerifyErrors are build errors. In your case, I have no
idea how your code even compiles, considering that Constants.CONTENT_URI
is defined in one APK and is referenced in another APK, from your
description.

 Has anyone encountered this issue and corrected it?

Have your client APK use the Uri directly, rather than through a public
static data member in a class that is not in its APK.

Or, use a common JAR that contains the CONTENT_URI definition, and
reference that JAR from both APKs.

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

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

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



[android-developers] Re: Can WebView be used inside a Service?

2009-10-09 Thread Mark Murphy

tomei.ninge...@gmail.com wrote:
 Can a service launch an activity? 

Yes, but your user will shoot you if you interrupt what they are doing
by popping up an activity asynchronously.

 I need to run something periodically
 using JavaScript (say every 4 hours). Porting Rhino probably won't
 work for me because I use a lot of large Strings, and putting that in
 the Java heap will soon fragment it very bad ...

Then, eliminate your dependency on Javascript.

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

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

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



[android-developers] Re: Multiple screens in one activity (like home screen)

2009-10-09 Thread Mark Murphy

Marc Reichelt wrote:
 I am working on an application where I wish to have multiple screens
 (each of full display size) attached to each other horizontally, and
 switch between them by using the finger (swipe right / swipe left).
 The home screen does exactly what I want, but its implementation seems
 to be more complex than I thought.
 
 What would be your preferred way to achieve this functionality? Is
 there any Layout or View that I could reuse?

Try ViewFlipper. You'll need to handle the touch events yourself, but it
will handle the rest.

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

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

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



[android-developers] Re: Should we still force our apps to API level 2?

2009-10-09 Thread EboMike

I haven't tried using a deprecated class in 1.6 - is it marked as
deprecated, and the compiler refuses to process it? There is a
compiler flag for that. Or is it gone completely?

You need to consider the way the JVM works. The class manager will not
load a class until it is referenced (in ANY way - you create an
instance of that class, or you access a static variable or method). As
soon as that happens, the class loader will initialize that class and
resolve EVERY method and referenced class in it, so as soon as you
reference class Foo which has a 1.6-specific method in it, your app
will crash under 1.5.

You can still put all your 1.6-specific code into one class, and stay
away from it with a 10-foot-pole if you detect that you can't use it
(the proper way would be to try to resolve the 1.6 methods it uses via
reflection in your main class, and if that fails, never use the 1.6
class).

-Mike



On Oct 9, 7:09 am, Greivin Lopez greivin.lo...@gmail.com wrote:
 I have a question related to backward compatibility in Android. My
 applications uses SmsManager class that was deprecated in SDK 1.5 and
 moved to other package in SDK 1.6 to support CDMA. That's OK.

 The problem is I want to support 1.5 SDK and also being able to use
 the new SmsManager class. I think the only way to do that is using the
 solution suggested by EboMike (with reflection), but I think is more a
 patch than the correct way around.  Other solution could be to compile
 the code to the desire target and keep two different releases of the
 application but I don't like the idea to maintain two versions of my
 code.

 I think a must elegant design for this is to use some sort of compiler
 directives that let us developers to differentiate parts of our code
 associated to one version of the SDK or another one, but I don't see
 anything in Android to accomplish that.

 Is there a way to achieve this? I suppose there isn't but maybe
 someone could share some new ideas on this scenario. I would
 appreciate any help. Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Defining layout resources in a modular way?

2009-10-09 Thread Romain Guy

Hi,

You can use the LayoutInflater class or, from XML, use the include/ tag.

On Fri, Oct 9, 2009 at 7:04 AM, Mark Wyszomierski mar...@gmail.com wrote:

 Hi,

 Is there a way to define xml layout resources in a modular way? I am
 building individual 'panels' through code only, it would probably make
 sense if each were defined in their own xml file, which I can pull at
 runtime, something like the following psuedocode:

 // PanelFarm.xml
 LinearLayout
   TextView
   EditView
 /LinearLayout

 // PanelCity.xml
 LinearLayout
  ScrollView
 /LinearLayout

 // ActivityMain.xml
 LinearLayout
 /LinearLayout

 // ActivityMain.java
 public void buildUI() {
  LinearLayout llFarm1 = R.layout.PanelFarm.xml;
  addView(llFarm);
  LinearLayout llFarm2 = R.layout.PanelFarm.xml;
  addView(llFarm2);

  LinearLayout llCity = R.layout.PanelCity.xml;
  addView(llCity);
 }

 if it's possible to do something like that, would it be slowing
 constantly reading from the xml files at runtime, or does android
 cache all our layout xml files in memory anyway?

 Thanks
 




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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



[android-developers] How to record the audio from mic in raw pcm format into a buffer, using the native libraries directly?

2009-10-09 Thread Vishal

Hello,

My application cannot handle the JNIE overhead, as I need to make 2
JNIE calls to the native C/C++ code for every 20msec. So I am trying
to use the native media libraries and the realted C/C++ files provided
by Android in the folder //external/srec/audio/test of the donut
build. Ex. AudioHardwareRecord, AudioInRecord etc.. I am implementing
all the calls in the native layer.

I am using the sampling rate as 8000 and want to read 160 samples (320
bytes) at a time.

I used the following values to create the AudioRecord..

record = new android::AudioRecord(
android::AudioRecord::MIC_INPUT, /* Input Source */
sampleRate, /* Sample Rate - 8000 */
android::AudioSystem::PCM_16_BIT, /* Format */
numChannels, /* Channel Count - 1 */
1, /* Frame Count */
android::AudioRecord::RECORD_AGC_ENABLE, /* Flags*/
NULL, /* Callback Function */
NULL, /* Context for use by the callback receiver*/
1 /* Notification Frames */ );

It says success after creating this interface but I am getting the
error Bad Value if I am doing the InitCheck.

And it is crashing once I start reading the samples or if I try to
retrieve the configured sampling rate.

Has anybody tried to access this native code? Any clue in this regard
will be very helpful.

Thanks in advance.

Vishal Gaonkar

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



[android-developers] R.java not compiling properly? need help :(

2009-10-09 Thread JasonMP

Im having an issue with Eclipse where it will suddenly not be able to
read my R.java file and all of my resource references get errors.  Ive
tried doing a fresh install of Eclipse and that did not help.
Rebuilding apps does not help.  Fixing project properties does not
help.  Here's an example of one of my errors within my R.java {Illegal
modifier for the class id; only public, abstract  final are
permitted}...there arent any modifiers other than what is permitted b/
c its automatically generated and i cant edit it.  What in the world
have I done?  And is there a way to fix it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to record the audio from mic in raw pcm format into a buffer, using the native libraries directly?

2009-10-09 Thread Vishal

My Code Samples:

#define SAMPLING_RATE   8000
#define N_FRAMES_PER_BUFFER 1 /* low-level driver counts in terms
of frames, not samples */
#define N_TUPLES_PER_FRAME  1 /* tuple: a set of samples (set of 1
if mono, set of 2 if stereo */
#define N_CHANNELS_PER_TUPLE1  /* 1: mono; 2: stereo */
#define N_TUPLES_PER_BUFFER (N_FRAMES_PER_BUFFER *
N_TUPLES_PER_FRAME) /* 160 = 160 * 1 */
#define N_SAMPLES_PER_BUFFER(N_TUPLES_PER_BUFFER *
N_CHANNELS_PER_TUPLE) /* 160 = 160 * 1 */
#define N_SECONDS_TO_RECORD 10
#define N_SAMPLES_TO_RECORD (SAMPLING_RATE * N_SECONDS_TO_RECORD *
N_CHANNELS_PER_TUPLE) /* 8 = 8000 * 10 * 1 */

int AudioCap(void)
{
/* Audio record - Start */
short AudBuf[N_SAMPLES_TO_RECORD * 1];
int AudBufSize = 160;
int rc;
unsigned int i;

memset(AudBuf, 0, (N_SAMPLES_TO_RECORD * sizeof(short)));

rc = AudioSetInputFormat(SAMPLING_RATE, N_CHANNELS_PER_TUPLE);
if (rc != 0) {
LOGE(AudioSetInputFormat() Failed! RetVal: %d, rc);
exit(1);
}
else {
LOGE(AudioSetInputFormat() Success! RetVal: %d, rc);
}

rc = AudioOpen();
if (rc  0) {
LOGE(AudioOpen() Failed! RetVal: %d, rc);
exit(1);
}
else {
LOGE(AudioOpen() Success! RetVal: %d, rc);
}

/*i = 0;
while (i = N_SAMPLES_TO_RECORD - N_SAMPLES_PER_BUFFER)
{
rc = AudioRead((AudBuf[i]), N_FRAMES_PER_BUFFER);
if (rc  0) {
i += (rc * N_TUPLES_PER_FRAME * N_CHANNELS_PER_TUPLE);
LOGE(AudioRead() Success);
}
else {
LOGE(ERROR: AudioRead() returns %d\n, rc);
}
}*/

rc = AudioRead(AudBuf, AudBufSize);
if (rc == AudBufSize) {
LOGE(AudioRead() Success! Read Samples: %d , rc);
}
else {
LOGE(AudioRead() Error! Read Samples: %d , rc);
}

rc = AudioClose();
if (rc != 0) {
LOGE(AudioClose() Failed! RetVal: %d, rc);
exit(1);
}
else {
LOGE(AudioClose() Success! RetVal: %d, rc);
}

return 0;
}



using namespace android;

extern C
{

static AudioRecord* record;
static int sampleRate;
static int numChannels;

typedef void (*callback_t)(int event, void* user, void *info);

int AudioSetInputFormat(int sample_rate, int channel_count)
{
sampleRate = sample_rate;
numChannels = channel_count;
LOGE ( AudioSetInputFormat Success! SampleRate: %d, 
ChannelCount:
%d , sampleRate, numChannels );
return 0;
}

int AudioOpen(void)
{
int retVal = NO_ERROR;
unsigned int Val = 0;

record = new android::AudioRecord(
android::AudioRecord::MIC_INPUT, /* Input 
Source */
sampleRate, /* Sample Rate */
android::AudioSystem::PCM_16_BIT, /* Format */
numChannels, /* Channel Count */
1, /* Frame Count */
android::AudioRecord::RECORD_AGC_ENABLE, /* 
Flags */
NULL, /* Callback Function */
NULL, /* Context for use by the callback 
receiver */
1 /* Notification Frames */ );
if (!record) {
LOGE ( AudioOpen-AudioRecord Failed! RetVal: 0x%x , 
record );
return -1;
}
else {
LOGE ( AudioOpen-AudioRecord Success! RetVal: 0x%x , 
record );
}

retVal = record-set(
android::AudioRecord::MIC_INPUT, /* Input 
Source */
sampleRate, /* Sample Rate */
android::AudioSystem::PCM_16_BIT, /* Format */
numChannels, /* Channel Count */
1, /* Frame Count */
android::AudioRecord::RECORD_AGC_ENABLE, /* 
Flags */
NULL, /* Callback Function */
NULL, /* Context for use by the callback 
receiver */
1 /* Notification Frames */ );
if (retVal == NO_ERROR) {
LOGE ( AudioOpen-set Success! retVal: %d , retVal );
}
else if (retVal == INVALID_OPERATION) {
LOGE ( AudioOpen-set Invalid Operation! retVal: %d , 
retVal );
}

[android-developers] Re: How to record the audio from mic in raw pcm format into a buffer, using the native libraries directly?

2009-10-09 Thread Mark Murphy

Vishal wrote:
 My application cannot handle the JNIE overhead, as I need to make 2
 JNIE calls to the native C/C++ code for every 20msec. So I am trying
 to use the native media libraries and the realted C/C++ files provided
 by Android in the folder //external/srec/audio/test of the donut
 build. Ex. AudioHardwareRecord, AudioInRecord etc.. I am implementing
 all the calls in the native layer.

Try the [android-ndk] list if you are trying to use the NDK, or
[android-porting] if you are trying to modify firmware for your own
device, or [android-platform] if you are trying to modify firmware for
contribution back to the AOSP.

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

_Android Programming Tutorials_ Version 1.0 Available!

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



[android-developers] Re: Application context

2009-10-09 Thread Gopal Biyani
If you want to call getApplicationContext in your Foo class, it better to
pass Context reference as a parameter in method DoSomethingWithCurrentContext()
or you can pass in constructor while instantiating the Foo class.
I think there is no other way to access the context object.

On Thu, Oct 8, 2009 at 8:16 PM, Mark Murphy mmur...@commonsware.com wrote:


 Phillip wrote:
  I'm trying to retrieve the current application's context indirectly
  from an object that my application uses.  For example, I have a MyApp
  class that extends Activity which itself extends Context.  From within
  MyApp I declare a variable of type Foo, where Foo is a utility class I
  define for whatever purpose.  Is there any way for
  DoSomethingWithCurrentContext() to retrieve MyApp's context without
  explicitly passing the context into it as a parameter using
  getApplicationContext()?

 There is no such thing as current context, unless you track that
 yourself.

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

 _Android Programming Tutorials_ Version 1.0 Available!

 


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



[android-developers] Re: AppWidget TextView question.

2009-10-09 Thread Abhilash

I believe that findViewById(int) can only be called from an Activity.
Hence its not useful for my purpose i.e: for AppWidget.
setEllipsize(TextUtils.TruncateAt) causes words that are too wide to
be ellipsized, hence cannot be reliably used to indicate that there is
more content present (in subsequent lines).

Regards,
Abhilash

On Oct 9, 7:36 pm, AJ ajeet.invinci...@gmail.com wrote:
 Hi Abhilash,

 try using :-

 TextView tv = (TextView)findViewById(R.id.textv);
 tv.setEllipsize(  TextUtils.TruncateAt.END);

 this sets the ellipses at the end.

 Thanks,
 AJ

 On Oct 9, 6:39 pm, Abhilash abhilash.ramakris...@gmail.com wrote:

  I have an AppWidget that contains a TextView. If there is more text in
  TextView than what can be shown on the AppWidget, I want to indicate
  that to user in some way (like showing more.. in last line of the
  AppWidget).
  I know how this can be done in an activity but cannot figure out how
  to do it in a AppWidget. Can someone suggest how this can be done?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Archos 5 Android PMP

2009-10-09 Thread Gopal Biyani
I bought Archos 5 few days back. Was very disappointed when I opened the
package. Because the Archos device with Android OS is not ready yet and
supposed to be launched somewhere in december :(

On Thu, Oct 8, 2009 at 6:02 PM, Wayne Wenthin wa...@fuligin.com wrote:

 I got this back from them.
 http://appslib.com/developers/index.html
 http://appslib.com/developers/index.html

 On Thu, Oct 8, 2009 at 1:45 PM, Mark Murphy mmur...@commonsware.comwrote:


  Have been looking at getting one to develop/test with BUT it does not
  support debugging.  There is no support on the device to connect DDMS/
  debugger etc.  So as far as I am concerned it is not worth the
  investement so far.

 MOTODEV Studio for Android is supposed to have an IP-based way to do
 debugging. I don't know the details, but that might be an option for you.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com
 Android App Developer Books: http://commonsware.com/books.html







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

 http://www.fuligin.com

 


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



[android-developers] READ/WRITE HISTORY BOOKMARKS permissions broken???

2009-10-09 Thread John B. Hansen

I've been using the following permissions since SDK 1.1:

uses-permission
android:name=com.android.browser.permission.READ_HISTORY_BOOKMARKS /

uses-permission
android:name=com.android.browser.permission.WRITE_HISTORY_BOOKMARKS /


Now, while migrating to 1.6 I'm seeing two things that are surprising:

1. The 1.6 release notes are saying those permissions are new (have
been added)

http://developer.android.com/sdk/android-1.6.html#api-changes

2. I'm getting the following warnings in Logcat and my activities that
use them are crashing:
10-09 09:11:40.476: WARN/PackageManager(74): Unknown permission
com.android.browser.permission.READ_HISTORY_BOOKMARKS in package
com.jbheng
10-09 09:11:40.476: WARN/PackageManager(74): Unknown permission
com.android.browser.permission.WRITE_HISTORY_BOOKMARKS in package
com.jbheng

Is this broke or did I miss something in the 1.6 release notes

Any help appreciatedjh


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



[android-developers] Re: Should we still force our apps to API level 2?

2009-10-09 Thread Greivin Lopez

Thanks Mike.

Your answer was very useful.  I think I'm going to keep a version
supporting CDMA and another one for GSM. At least until new CDMA
Android devices reach the market.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Supressing Key presses in Activity, especially in Options Menu

2009-10-09 Thread Dianne Hackborn
Apps can intercept the call key to let the user press it when on a phone
number or other thing that makes sense to perform a call on.  They can't
intercept end call and home, though, so regardless of whether you consume
the call key you still need to deal with the user leaving your app at any
point.

On Fri, Oct 9, 2009 at 4:53 AM, Mark Murphy mmur...@commonsware.com wrote:


 Raman wrote:
  Thanks for that suggestion. I'll take that but my problem is still not
  solved. My problem is when Options menu is opened.
  In that scenario, pressing of Call key does not call the callback
  function onKeyDown() and I do not know why.

 The options menu probably intercepts all keys and, for whatever reason,
 does not propagate the Call key to be intercepted. IMHO, this is a good
 thing.

  I could not find a way to catch that key event, so if you have a
  solution, please let me know...

 Don't intercept the Call key. As Megha indicated, I'm surprised it is
 even possible.

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

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

 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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



[android-developers] Re: READ/WRITE HISTORY BOOKMARKS permissions broken???

2009-10-09 Thread John B. Hansen

Here is the message I'm seeing when the activity crashes (which is
strange because I still have those exact permissions requested in my
manifest):

 10-09 09:42:05.616: INFO/ActivityManager(74): Starting activity:
Intent { cmp=com.jbheng/.BookmarkInfo (has extras) }
  2 10-09 09:42:06.126: WARN/ActivityManager(74): Activity pause
timeout for HistoryRecord{433b9ad0 com.jbheng/.KeyDirector}
  3 10-09 09:42:06.236: WARN/InputManagerService(74): Starting input
on non-focused client com.android.internal.view.IInputMethodClient$Stub
$pr...@43376078 (uid=10004 pid=16398)
  4 10-09 09:42:06.316: INFO/ActivityManager(74): Start proc
com.android.browser for content provider
com.android.browser/.BrowserProvider: pid=16597 uid=10003 gids={3003}
  5 10-09 09:42:06.406: INFO/dalvikvm(16597): Debugger thread not
active, ignoring DDM send (t=0x41504e4d l=38)
  6 10-09 09:42:06.426: INFO/dalvikvm(16597): Debugger thread not
active, ignoring DDM send (t=0x41504e4d l=42)
  7 10-09 09:42:06.696: INFO/ActivityThread(16597): Publishing
provider browser: com.android.browser.BrowserProvider
  8 10-09 09:42:06.896: ERROR/DatabaseUtils(16597): Writing exception
to parcel
  9 10-09 09:42:06.896: ERROR/DatabaseUtils(16597):
java.lang.SecurityException: Permission Denial: reading
com.android.browser.BrowserProvider uri content://browser/bookmarks
from pid=16398, uid=10004 requires
com.android.browser.permission.READ_HISTORY_BOOKMARKS
 10 10-09 09:42:06.896: ERROR/DatabaseUtils(16597): at
android.content.ContentProvider$Transport.enforceReadPermission
(ContentProvider.java:222)
 11 10-09 09:42:06.896: ERROR/DatabaseUtils(16597): at
android.content.ContentProvider$Transport.bulkQuery
(ContentProvider.java:115)
 12 10-09 09:42:06.896: ERROR/DatabaseUtils(16597): at
android.content.ContentProviderNative.onTransact
(ContentProviderNative.java:97)
 13 10-09 09:42:06.896: ERROR/DatabaseUtils(16597): at
android.os.Binder.execTransact(Binder.java:287)
 14 10-09 09:42:06.896: ERROR/DatabaseUtils(16597): at
dalvik.system.NativeStart.run(Native Method)
 15 10-09 09:42:07.026: DEBUG/AndroidRuntime(16398): Shutting down VM
 16 10-09 09:42:07.026: WARN/dalvikvm(16398): threadid=3: thread
exiting with uncaught exception (group=0x4001da28)
 17 10-09 09:42:07.036: ERROR/AndroidRuntime(16398): Uncaught handler:
thread main exiting due to uncaught exception
 18 10-09 09:42:07.106: INFO/DumpStateReceiver(74): Added state dump
to 1 crashes
 19 10-09 09:42:07.126: INFO/ActivityManager(74): Process
com.android.settings (pid 16423) has died.
 20 10-09 09:42:07.326: ERROR/AndroidRuntime(16398):
java.lang.RuntimeException: Unable to start activity ComponentInfo
{com.jbheng/com.jbheng.BookmarkInfo}: java.lang.SecurityException:
Permission Denial: reading com.android.browser.BrowserProvider uri
content://browser/bookmarks from pid=16398, uid=10004 requires
com.android.browser.permission.READ_HISTORY_BOOKMARKS


On Oct 9, 9:37 am, John B. Hansen jnahan...@gmail.com wrote:
 I've been using the following permissions since SDK 1.1:

 uses-permission
 android:name=com.android.browser.permission.READ_HISTORY_BOOKMARKS /

 uses-permission
 android:name=com.android.browser.permission.WRITE_HISTORY_BOOKMARKS /



 Now, while migrating to 1.6 I'm seeing two things that are surprising:

 1. The 1.6 release notes are saying those permissions are new (have
 been added)

 http://developer.android.com/sdk/android-1.6.html#api-changes

 2. I'm getting the following warnings in Logcat and my activities that
 use them are crashing:
 10-09 09:11:40.476: WARN/PackageManager(74): Unknown permission
 com.android.browser.permission.READ_HISTORY_BOOKMARKS in package
 com.jbheng
 10-09 09:11:40.476: WARN/PackageManager(74): Unknown permission
 com.android.browser.permission.WRITE_HISTORY_BOOKMARKS in package
 com.jbheng

 Is this broke or did I miss something in the 1.6 release notes

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



[android-developers] Re: start ACTION_VIEW with memory data

2009-10-09 Thread Dianne Hackborn
The data needs to be either in persistent storage (with the reference to it
being a URI) or copied in the intent (which means relatively small say 
100K).  We don't allow open file descriptors to be placed at all in an
intent used with startActivity().

On Fri, Oct 9, 2009 at 1:40 AM, jmh 0x22...@gmail.com wrote:


 Hello all,


 I would like to run an ACTION_VIEW with memory data.

 The first solution is to write data in a file on sdcard but ... it
 does not seem so efficient.
 I was thinking to implement my own content provider, but as far as I
 understand I need to return an ParcelFileDescriptor.
 I found a MemoryFile implementation in SDK, however I don't know how
 to get a ParcelFileDescriptor for a  MemoryFile.

 Any ideas ?
 Regards,
 jim
 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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



[android-developers] Re: VerifyError and Content Providers

2009-10-09 Thread jsdf



On Oct 9, 10:30 am, Mark Murphy mmur...@commonsware.com wrote:
 jsdfwrote:
  Has anyone encountered this issue and corrected it?

 Have your client APK use the Uri directly, rather than through a public
 static data member in a class that is not in its APK.

 Or, use a common JAR that contains the CONTENT_URI definition, and
 reference that JAR from both APKs.

Great, thanks.
I appreciate the help, Mark.
jsdf

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



[android-developers] Re: Supressing Key presses in Activity, especially in Options Menu

2009-10-09 Thread Mark Murphy

Dianne Hackborn wrote:
 Apps can intercept the call key to let the user press it when on a phone
 number or other thing that makes sense to perform a call on.

H...

I've opened an issue on this, as I worry that apps might start eating
KEYCODE_CALL and confuse the heck out of users, particularly in cases of
needing to make an emergency call (e.g., 911). A permission
(android.permission.OVERRIDE_CALL_KEY, perhaps?) would at least alert
the user to the fact that the app is overriding the key.

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

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

_Android Programming Tutorials_ Version 1.0 Available!

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



[android-developers] Re: Android 1.6 SDK is here!

2009-10-09 Thread Tom

Hi everyboy,

I've just updated for 1.6.

I previously developped some applications with 1.5 which use
org.apache.http package for downloading some informations from web
server.
With the the new firmware (1.6), I've some strange issue for
connecting to my server. Indeed, sometimes it works, sometime it
doesn't, and sometimes it doesn't with UnknowingException (Unknown
host...).

May have to do something with my applications and the new firmware?

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



[android-developers] how to run emulator to get 1-1 pixel mapping with WVGA854

2009-10-09 Thread x17y19

How do I run the emulator with WVGA854 skin so I get a 1-1 mapping of
device to screen pixels ?

The WVGA854/layout file has width 480 height 854 but when I run the
emulator, I get these values for DeviceMetrics:
 density = 1.5
 densityDpi = 240
 scaledDensity = 1.5
 heightPixels = 569
 widthPixels = 320
 xdpi = 240.0
 ydpi = 240.0

I'd like to run the emulator so that I see heightPixels/widthPixels
values
of 854/480 in the code.

I tried playing with the -dpi-device option but doesn't seem to help.

Thanks for any help.

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



[android-developers] Re: Physics engines for Android

2009-10-09 Thread Dan Sherman
Which physics engine you use should have nothing to do with which drawing
style you want to use (OpenGL vs canvas).  As far as I can guess, there
might not be much documentation for those, as they're probably direct
ports.  In the sense that the original documentation should get you 95% of
the way there...

On Fri, Oct 9, 2009 at 1:52 AM, mmkr manutd...@gmail.com wrote:


 Hi,

 I want to try any physics engine for 2D and 3D in Android. So far
 I have learnt that JBullet and JBox2d can be used, and JBox2d is a
 better one among them. But there in not much available documentation
 available and it even uses some concepts which are not supported by
 Android like Applets.Even some posts in various forums suggested that
 there are still no ideal physics engines available for Android. Are
 there any plans for implementing specific physics engines for Android?
 Can OpenGL be used for these ?

   Help me out in deciding which physics engine is best suitable
 for Android.

 Thanks in advance.
 


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



[android-developers] Re: Where have all the Google employees gone?

2009-10-09 Thread bellapariah

Hi Brian,

I am looking at the usage data from my server which includes how many
people signed up for an account as well as how many games they played
(my app is not available in the market yet so anyone that signs up for
an account should be an ADC2 tester). My final numbers were 102
testers, 29 of which were force-quits due to 1.6 upgrade. (so around
30% of testers were using 1.6)

Also, here is the change made to 1.6 that is causing my app to not
work properly if anyones interested:

2009-05-20 Jean-Baptiste Queru donut snapshot

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=history;f=core/java/android/os/RemoteCallbackList.java;hb=a8675f67e33bc7337d148358783b0fd138b501ff

RemoteCallbackList.java:

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blobdiff;f=core/java/android/os/RemoteCallbackList.java;h=584224fccc8b0959a2580a14411536855b1423cc;hp=23c0a7bf473c48c2c93f6f4d9f97881a3c1315cd;hb=a8675f67e33bc7337d148358783b0fd138b501ff;hpb=843ef36f7b96cc19ea7d2996b7c8661b41ec3452

@@ -222,7 +224,12 @@ public class RemoteCallbackListE extends
IInterface {

 public int beginBroadcast() {
 synchronized (mCallbacks) {
-final int N = mCallbacks.size();
+if (mBroadcastCount  0) {
+throw new IllegalStateException(
+beginBroadcast() called while already in a
broadcast);
+}
+
+final int N = mBroadcastCount = mCallbacks.size();
 if (N = 0) {
 return 0;
 }

1.6 will throw this exception to let developers know if one of their
calls to beginBroadcast() was not terminated w/ a call to
finishBroadcast(). In 1.5, not calling finishBroadcast() is unchecked,
and although this is a programming mistake (cut and paste typo in my
case), my app, and probably several others, can still operate in 1.5
without any noticeable consequence. This sort of thing is easily seen
and corrected within 5 - 10 minutes of testing on 1.6, but, of course,
we weren't given the 1.6 update to test with for the contest.

Shelby

On Oct 8, 1:58 pm, Brian Wright brian.n.wri...@gmail.com wrote:
 How did you determine you had  95 people test my app for Round 1
 judging, but 27 of those were force closes due to the 1.6 update. 

 I have not been told anything?  Where is this data?

 On Oct 6, 8:48 pm, bellapariah bellapar...@gmail.com wrote:



  Thread for developers to discuss problems with 1.6 update and effects
  on ADC2. If you see other forums or articles on the issue or if you
  are one of the unlucky developers affected by the the untimely 1.6
  update, please post is here!

  Releasing 1.6 in the middle of a contest is unacceptable. According to
  the official terms and conditions:

  a. SUBMISSION OF ENTRIES: To qualify for a Prize, an Entry to the
  Challenge consists of an original application that is written using a
  version of the Android Software Development Kit (SDK) (available 
  athttp://developer.android.com) that validly executes on Android version
  1.5. The SDK contains instructions, documentation, and all necessary
  tools to enable a Participant to build an Android application.

  My App as well as many other ADC2 apps worked fine on 1.5 but started
  force closing after the 1.6 update. Programmers were told to develop
  an application for 1.5, not 1.6, and were not given the tools or
  opportunity to test our apps with 1.6. In my case, I have had 95
  people test my app for Round 1 judging, but 27 of those were force
  closes due to the 1.6 update. This is because of an issue with a
  Google API that was updated with 1.6. Here are links to other people
  discussing the 1.6 issue:

 http://groups.google.com/group/android-discuss/browse_thread/thread/7...

 http://groups.google.com/group/android-discuss/browse_thread/thread/a...

 http://groups.google.com/group/android-discuss/browse_thread/thread/5...

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

 http://www.google.com/support/forum/p/Android+Market/thread?tid=5d754...

 http://androidandme.com/2009/10/news/did-google-fumble-the-android-1-...

 http://polyclefsoftware.blogspot.com/

  One suggestion would be to remove the last 25% of reviews of every app
  in the contest (the ones most likely to have been affected by 1.6
  upgrades) to reduce the negative effects of the 1.6 release.

  How many others were affected? Any solutions to fix the problem?

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



[android-developers] from home

2009-10-09 Thread London


=

Work on internet !
-

from home, free schedule, and a good earnings.

http://www.search-for-jobs.co.cc
http://www.search-for-jobs.co.cc
http://www.search-for-jobs.co.cc

=

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



[android-developers] detecting application loss of screen control

2009-10-09 Thread David Bernstein

How can an application detect when it's lost control of the screen?
The reason I ask is that my application has an appwidget whose visible
state should be consistent with user actions within the application.
In addition to the application exiting, I'd like to know when other
applications take over the screen.

Simply noticing in onPause() in the root activity isn't enough because
the user can, for example, press the home key or receive a phone
call.  Noticing in onPause() in every single activity is overkill
because the user will move between multiple activities in the same
application.

If this is documented or discussed already, I'll humbly accept an RTFM
pointer, but I didn't find anything when I looked.

Thanks.

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



[android-developers] Re: Where have all the Google employees gone?

2009-10-09 Thread Dianne Hackborn
Yep I put in that change, and all it did was make it guaranteed the app
would crash instead of sometimes crashing.

On Fri, Oct 9, 2009 at 10:09 AM, bellapariah bellapar...@gmail.com wrote:


 Hi Brian,

 I am looking at the usage data from my server which includes how many
 people signed up for an account as well as how many games they played
 (my app is not available in the market yet so anyone that signs up for
 an account should be an ADC2 tester). My final numbers were 102
 testers, 29 of which were force-quits due to 1.6 upgrade. (so around
 30% of testers were using 1.6)

 Also, here is the change made to 1.6 that is causing my app to not
 work properly if anyones interested:

 2009-05-20 Jean-Baptiste Queru donut snapshot


 http://android.git.kernel.org/?p=platform/frameworks/base.git;a=history;f=core/java/android/os/RemoteCallbackList.java;hb=a8675f67e33bc7337d148358783b0fd138b501ff

 RemoteCallbackList.java:


 http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blobdiff;f=core/java/android/os/RemoteCallbackList.java;h=584224fccc8b0959a2580a14411536855b1423cc;hp=23c0a7bf473c48c2c93f6f4d9f97881a3c1315cd;hb=a8675f67e33bc7337d148358783b0fd138b501ff;hpb=843ef36f7b96cc19ea7d2996b7c8661b41ec3452

 @@ -222,7 +224,12 @@ public class RemoteCallbackListE extends
 IInterface {

 public int beginBroadcast() {
 synchronized (mCallbacks) {
 -final int N = mCallbacks.size();
 +if (mBroadcastCount  0) {
 +throw new IllegalStateException(
 +beginBroadcast() called while already in a
 broadcast);
 +}
 +
 +final int N = mBroadcastCount = mCallbacks.size();
 if (N = 0) {
 return 0;
 }

 1.6 will throw this exception to let developers know if one of their
 calls to beginBroadcast() was not terminated w/ a call to
 finishBroadcast(). In 1.5, not calling finishBroadcast() is unchecked,
 and although this is a programming mistake (cut and paste typo in my
 case), my app, and probably several others, can still operate in 1.5
 without any noticeable consequence. This sort of thing is easily seen
 and corrected within 5 - 10 minutes of testing on 1.6, but, of course,
 we weren't given the 1.6 update to test with for the contest.

 Shelby

 On Oct 8, 1:58 pm, Brian Wright brian.n.wri...@gmail.com wrote:
  How did you determine you had  95 people test my app for Round 1
  judging, but 27 of those were force closes due to the 1.6 update. 
 
  I have not been told anything?  Where is this data?
 
  On Oct 6, 8:48 pm, bellapariah bellapar...@gmail.com wrote:
 
 
 
   Thread for developers to discuss problems with 1.6 update and effects
   on ADC2. If you see other forums or articles on the issue or if you
   are one of the unlucky developers affected by the the untimely 1.6
   update, please post is here!
 
   Releasing 1.6 in the middle of a contest is unacceptable. According to
   the official terms and conditions:
 
   a. SUBMISSION OF ENTRIES: To qualify for a Prize, an Entry to the
   Challenge consists of an original application that is written using a
   version of the Android Software Development Kit (SDK) (available
 athttp://developer.android.com) that validly executes on Android version
   1.5. The SDK contains instructions, documentation, and all necessary
   tools to enable a Participant to build an Android application.
 
   My App as well as many other ADC2 apps worked fine on 1.5 but started
   force closing after the 1.6 update. Programmers were told to develop
   an application for 1.5, not 1.6, and were not given the tools or
   opportunity to test our apps with 1.6. In my case, I have had 95
   people test my app for Round 1 judging, but 27 of those were force
   closes due to the 1.6 update. This is because of an issue with a
   Google API that was updated with 1.6. Here are links to other people
   discussing the 1.6 issue:
 
  http://groups.google.com/group/android-discuss/browse_thread/thread/7.
 ..
 
  http://groups.google.com/group/android-discuss/browse_thread/thread/a.
 ..
 
  http://groups.google.com/group/android-discuss/browse_thread/thread/5.
 ..
 
  http://groups.google.com/group/android-developers/browse_thread/threa.
 ..
 
  http://www.google.com/support/forum/p/Android+Market/thread?tid=5d754.
 ..
 
  http://androidandme.com/2009/10/news/did-google-fumble-the-android-1-.
 ..
 
  http://polyclefsoftware.blogspot.com/
 
   One suggestion would be to remove the last 25% of reviews of every app
   in the contest (the ones most likely to have been affected by 1.6
   upgrades) to reduce the negative effects of the 1.6 release.
 
   How many others were affected? Any solutions to fix the problem?
 
   Shelby
 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted 

[android-developers] jar files shared by multiple apps

2009-10-09 Thread Dan Raaka

If there are multiple apps using the same jar file, it makes sense NOT
to package the jar in EACH app.
However since the jar file cannot be pre-installed on the device, what
are other alternatives for developer ..



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



[android-developers] Re: Where have all the Google employees gone?

2009-10-09 Thread Shelby Troxell
Hi Dianne,
We did intensive testing on 1.5 and never had a problem with it. The change
is definitely good for those developing on 1.6, but it never caused problems
on 1.5 so it is difficult to know the issue exists without the ability to
test on 1.6 (and there wouldn't have been an issue if the platform hadn't
been updated in the middle of a contest). It would be fine if we could
update our ADC2 submission, but we can't and the terms and conditions state
we are developing an app that works on 1.5 (not 1.6), which ours does.

Shelby


On Fri, Oct 9, 2009 at 10:32 AM, Dianne Hackborn hack...@android.comwrote:

 Yep I put in that change, and all it did was make it guaranteed the app
 would crash instead of sometimes crashing.


 On Fri, Oct 9, 2009 at 10:09 AM, bellapariah bellapar...@gmail.comwrote:


 Hi Brian,

 I am looking at the usage data from my server which includes how many
 people signed up for an account as well as how many games they played
 (my app is not available in the market yet so anyone that signs up for
 an account should be an ADC2 tester). My final numbers were 102
 testers, 29 of which were force-quits due to 1.6 upgrade. (so around
 30% of testers were using 1.6)

 Also, here is the change made to 1.6 that is causing my app to not
 work properly if anyones interested:

 2009-05-20 Jean-Baptiste Queru donut snapshot


 http://android.git.kernel.org/?p=platform/frameworks/base.git;a=history;f=core/java/android/os/RemoteCallbackList.java;hb=a8675f67e33bc7337d148358783b0fd138b501ff

 RemoteCallbackList.java:


 http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blobdiff;f=core/java/android/os/RemoteCallbackList.java;h=584224fccc8b0959a2580a14411536855b1423cc;hp=23c0a7bf473c48c2c93f6f4d9f97881a3c1315cd;hb=a8675f67e33bc7337d148358783b0fd138b501ff;hpb=843ef36f7b96cc19ea7d2996b7c8661b41ec3452

 @@ -222,7 +224,12 @@ public class RemoteCallbackListE extends
 IInterface {

 public int beginBroadcast() {
 synchronized (mCallbacks) {
 -final int N = mCallbacks.size();
 +if (mBroadcastCount  0) {
 +throw new IllegalStateException(
 +beginBroadcast() called while already in a
 broadcast);
 +}
 +
 +final int N = mBroadcastCount = mCallbacks.size();
 if (N = 0) {
 return 0;
 }

 1.6 will throw this exception to let developers know if one of their
 calls to beginBroadcast() was not terminated w/ a call to
 finishBroadcast(). In 1.5, not calling finishBroadcast() is unchecked,
 and although this is a programming mistake (cut and paste typo in my
 case), my app, and probably several others, can still operate in 1.5
 without any noticeable consequence. This sort of thing is easily seen
 and corrected within 5 - 10 minutes of testing on 1.6, but, of course,
 we weren't given the 1.6 update to test with for the contest.

 Shelby

 On Oct 8, 1:58 pm, Brian Wright brian.n.wri...@gmail.com wrote:
  How did you determine you had  95 people test my app for Round 1
  judging, but 27 of those were force closes due to the 1.6 update. 
 
  I have not been told anything?  Where is this data?
 
  On Oct 6, 8:48 pm, bellapariah bellapar...@gmail.com wrote:
 
 
 
   Thread for developers to discuss problems with 1.6 update and effects
   on ADC2. If you see other forums or articles on the issue or if you
   are one of the unlucky developers affected by the the untimely 1.6
   update, please post is here!
 
   Releasing 1.6 in the middle of a contest is unacceptable. According to
   the official terms and conditions:
 
   a. SUBMISSION OF ENTRIES: To qualify for a Prize, an Entry to the
   Challenge consists of an original application that is written using a
   version of the Android Software Development Kit (SDK) (available
 athttp://developer.android.com) that validly executes on Android version
   1.5. The SDK contains instructions, documentation, and all necessary
   tools to enable a Participant to build an Android application.
 
   My App as well as many other ADC2 apps worked fine on 1.5 but started
   force closing after the 1.6 update. Programmers were told to develop
   an application for 1.5, not 1.6, and were not given the tools or
   opportunity to test our apps with 1.6. In my case, I have had 95
   people test my app for Round 1 judging, but 27 of those were force
   closes due to the 1.6 update. This is because of an issue with a
   Google API that was updated with 1.6. Here are links to other people
   discussing the 1.6 issue:
 
  http://groups.google.com/group/android-discuss/browse_thread/thread/7.
 ..
 
  http://groups.google.com/group/android-discuss/browse_thread/thread/a.
 ..
 
  http://groups.google.com/group/android-discuss/browse_thread/thread/5.
 ..
 
  http://groups.google.com/group/android-developers/browse_thread/threa.
 ..
 
  http://www.google.com/support/forum/p/Android+Market/thread?tid=5d754.
 ..
 
  

[android-developers] ADP will not recognize my phone (in Ubuntu 9.04 or Fedora 11)

2009-10-09 Thread Douglas Whitfield

I found 
https://groups.google.com/group/android-developers/browse_thread/thread/1d3488c601243686/541573842e904727#541573842e904727
but I cannot respond to that thread anymore (perhaps they expire?).
I've tried with both the 1.5 SDK and the 1.6 SDK.  I have tried all
the suggestions in the aforementioned thread.  I can mount the device
just fine, but adb does not work whether it is mounted or not.  I've
tried it both as root and as myself and with it in $PATH as well as
using ./ in the dir.  Adb appears to work as it tells me List of
devices attached.  At some point right after I installed 1.5 I
remember setting something up to make the USB connection easier, but I
don't remember what that was...oops.  My hypothesis at this point is
that that is somehow interfering, but any help you can give either way
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Contacts extension - Further developments ?

2009-10-09 Thread Sarab

Dear Fellow Developers,

I would like to request your comments on : How to add new field(s) in
to android's contacts.db database ?

After going through existing discussion on this topic; I could find
that the deveopers recommend creating a new database for the new
fields and simultaneously provide a custom contacts content provider.
This custom content provider will join SQl queries from the new
databse and contacts.db.The id field being the link between the
contacts database and new databse.Pls see the link.

http://groups.google.com/group/android-developers/browse_thread/thread/19de2b2ac8640b4c/9e4d1f9723831875?lnk=gstq=contacts+extension#9e4d1f9723831875

So I have following queries :

1. Is any simpler way out for this problem. Since the thread is quite
old; I was wondering whether google provided any new API , interface
to sort this problem?

2. Can someone explain me the purpose of Contacts.Extensions and
Contacts.People.Extensions. I guess these are for extending contact
fields but not much information is available online.

3. If the above classes serves the purpose of extending the contacts
database (i.e. add field columns) , then Do i need to modify standard
contacts content provider for retrieving my custom field's data?


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



[android-developers] Android RTSP Streaming

2009-10-09 Thread ani

Hi All,
 Does somebody know any sample/free media player on Andoird
like Meridian Video
Player or something which can recieve and play rtsp streamed video
data??

Regards
Ani

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



[android-developers] Thread lifecycle

2009-10-09 Thread Tiger

A new thread is created to do some time-consuming tasks and may take a
long time, When the thread is active, the orientation of the phone is
changed, the activity will be killed and re-created. How about the
thread? Will the thread be destoryed?

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



[android-developers] Voice recognition

2009-10-09 Thread ani rudh
hi all ,

im trying to write an app which uses speech recognition.As per the
introduction video , i can see a 'mike' next to the quick search box.
But cant be seen in the emulator(1.6).do i need to do any
configuration for the same or any application needs to be installed to
enable that??
Or, is it not supported for emulator (1.6)??

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



[android-developers] Re: Geting SMS Center number

2009-10-09 Thread flywalker

How can I get the SMSC number in sdk 1.6, I also want to know the
answer ?


On Oct 8, 10:30 am, Delirium id.delir...@gmail.com wrote:
 Is it possible to get currentSMSCenternumber inside application on
 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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] I get the unable to start wifi

2009-10-09 Thread Ryck

I have just installed Donut version 1.6 on my HTC Dream. The install
went smoothly. But when I try to start my WiFi I get the unable to
start wifi message. Never had a problem in 1.5.

The log reports:

D/SettingsWifiEnabler( 303): Received wifi state changed from Unknown
to Enabling
E/WifiHW ( 74): Cannot access /data/misc/wifi/wpa_supplicant.conf:
Permission denied
E/WifiHW ( 74): Wi-Fi will not be enabled
E/vold ( 47): Unable to lookup media '/devices/platform/msm_sdcc.1/
mmc_host/mmc0/mmc0:0001'
E/vold ( 47): Error processing uevent msg (No such file or directory)
E/WifiService( 74): Failed to start supplicant daemon.
D/SettingsWifiEnabler( 303): Received wifi state changed from Enabling
to Unknown
D/dalvikvm( 303): GC freed 4090 objects / 272600 bytes in 118ms
I/ActivityManager( 74): Starting activity: Intent
{ act=android.intent.action.

I see wpa_supplicant doesn't have access to others, I tried changing
the permissions of the directories and wpa_supplicant.conf file to 777
but they keep getting set back again so that other doesn't have
access.

Do I need to set up a special user?

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



[android-developers] this.getApplication() returns NULL pointer

2009-10-09 Thread Stefan

I'm running the following line in an Activity, which is within the
same application, but in a different package:
AppObject appObj = (AppObject)this.getApplication();  // FYI:
AppObject is my extension class of Application.

It returns only a null pointer, while when I move it to the main
package and run it from there it returns the application reference as
expected.

I've defined the activity in my AndroidManifest.xml  with the full
qualified class name, since it is in another package: activity
android:name=com.foo.bar.TestActivity/activity

Any ideas of what I've to do different?

Thanks

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



  1   2   >