[android-developers] Where to find native resources?

2009-07-10 Thread doubleslash

Hi,
Could someone please tell me how to access android's native resources?
In particular, I would like to use the camera icon and shutter sound
in my own app.
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: Map Problem on Android emulator

2009-07-10 Thread Ian

did you figure this out?  I have a similar problem... thanks

On May 28, 6:19 am, Kamal  wrote:
> Hi all,
>
> I am using android SDK1.0 and trying to load google map.
> I am able to browse maps.google.com site from android emulator so I
> feel internet may not be the problem.
> I also have obtained the Map API key as mentioned in the the
> document.
>
> My AndroidManifest.xml file looks like this.
> 
> http://schemas.android.com/apk/res/android";
> package="bst.GoogleMap"
> android:versionCode="1"
> android:versionName="1.0.0">
> 
> 
> 
>  android:label="@string/app_name">
> 
> 
> 
> 
> 
> 
> 
>
> main.xml file
> 
> http://schemas.android.com/apk/res/
> android"
> android:layout_width="fill_parent"
> android:layout_height="fill_parent">
>
>  android:id="@+id/mapView"
> android:layout_width="fill_parent"
> android:layout_height="fill_parent"
> android:enabled="true"
> android:clickable="true"
> android:apiKey = "012_Xi3bU6NpfpRxR11DEmea0n9wLHPgD1ThJ2w"
>
> />
> 
>
> Java Codes :
>
> package bst.GoogleMap;
>
> import android.os.Bundle;
>
> import com.google.android.maps.MapActivity;
> import com.google.android.maps.MapView;
>
> public class MapsActivity extends MapActivity
> {
> /** Called when the activity is first created. */
> @Override
> public void onCreate(Bundle savedInstanceState)
> {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
>
> }
>
> @Override
> protected boolean isRouteDisplayed() {
> return false;
>
> }
> }
>
> As mentioned, this should display Map on map view. But I see only Gids
> nothing else.
>
> What could be the problem...
>
> Helps are appreciated..
>
> I also would like to add that we have firewall in our office
>
> after few settings, I am able to browse internet from android
> emulator..
>
> Can we assume that now there is no internet problem ?
>
> Log file indicates.
>
> 05-28 13:47:58.237: INFO/ActivityManager(51): Start proc bst.GoogleMap
> for activity bst.GoogleMap/.MapsActivity: pid=651 uid=10024 gids=
> {3003}
> 05-28 13:47:58.326: INFO/jdwp(651): received file descriptor 13 from
> ADB
> 05-28 13:47:58.677: WARN/Maps_Persistence(651): Couldn't find file: /
> data/data/bst.GoogleMap/files/DATA_Tiles
> 05-28 13:47:58.917: INFO/MapActivity(651): Handling network change
> notification:CONNECTED
> 05-28 13:47:58.917: ERROR/MapActivity(651): Couldn't get 
> connectionfactoryclient
> 05-28 13:47:59.048: INFO/ActivityManager(51): Displayed activity
> bst.GoogleMap/.MapsActivity: 924 ms
> 05-28 13:47:59.647: WARN/AndroidHttpConnectionFactory(651):
> IOException in HttpClient: Host is unresolved:www.google.com:80
> 05-28 13:48:00.156: DEBUG/dalvikvm(651): GC freed 5140 objects /
> 336944 bytes in 78ms
> 05-28 13:48:00.207: WARN/AndroidHttpConnectionFactory(651):
> IOException in HttpClient: Host is unresolved:www.google.com:80
> 05-28 13:48:00.457: WARN/AndroidHttpConnectionFactory(651):
> IOException in HttpClient: Host is unresolved:www.google.com:80
> 05-28 13:48:00.717: WARN/AndroidHttpConnectionFactory(651):
> IOException in HttpClient: Host is unresolved:www.google.com:80
> 05-28 13:48:00.986: WARN/AndroidHttpConnectionFactory(651):
> IOException in HttpClient: Host is unresolved:www.google.com:80
>
> Regards,
> Kamal
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Couldn't get connection factory client

2009-07-10 Thread Ian

Help!!

I cannot release my app because Maps aren't working in the released
version.

I believe I have the right maps signature, which I added after setting
up my private key, then recompiled and signed.  Everything works when
I run in Debug mode, although I get a "dalvik" error whcih I get rid
of by reloading and rebuilding, as suggested by people in other
threads.

A grid of X'es appears most of the time, but I do sometimes see an
image of Africa which leads me to believe the signing was correct.

However, I see these error messages:

07-11 05:13:48.969: ERROR/ZoomButtonsController(776): Cannot make the
zoom controller visible if the owner view is not attached to a window.
07-11 05:13:49.379: ERROR/MapActivity(776): Couldn't get connection
factory client

I'm using Eclipse Galileo, SDK 1.5_r2 and ADT 0.9.

thanks!!!


larger LogCat excerpt:

07-11 05:13:23.108: INFO/ActivityManager(567): Starting activity:
Intent { comp={com.eatandrun/com.eatandrun.JogMap} }
07-11 05:13:23.559: WARN/MapActivity(776): Recycling dispatcher
com.google.common.datarequestdispatc...@437dbd38
07-11 05:13:33.173: WARN/ActivityManager(567): Launch timeout has
expired, giving up wake lock!
07-11 05:13:33.339: WARN/ActivityManager(567): Activity idle timeout
for HistoryRecord{437490a8 {com.eatandrun/com.eatandrun.JogMap}}
07-11 05:13:48.969: ERROR/ZoomButtonsController(776): Cannot make the
zoom controller visible if the owner view is not attached to a window.
07-11 05:13:49.367: INFO/MapActivity(776): Handling network change
notification:CONNECTED
07-11 05:13:49.379: ERROR/MapActivity(776): Couldn't get connection
factory client
07-11 05:13:49.878: INFO/ActivityManager(567): Displayed activity
com.eatandrun/.JogMap: 26764 ms


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 hide the scrollbar, please

2009-07-10 Thread 单单

The requirements is the scrollbar of a list is usually unvisible.
Only when user scroll it, the scrollbar shows.

Could anyone tell me how to achieve this?

Any help will be highly appriciated!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Singles dating online

2009-07-10 Thread bride

Singles dating online
Click below the link and see how to prepare
For dating with online soulmate.
www.reallyfreee.blogspot.com
Everything for clear details about online
Dating preferences

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Cannot load maps with Production API Key.

2009-07-10 Thread Ian

yes please!

my release is blocked for similar reason.

I got the maps key, compiled with new key, signed, but now it's all
grey.

when I redo with debug key, it works... help!


On Jun 9, 3:38 am, wulongr  wrote:
> Hi, Hunter Peress
>
> Could you share what you've done for this issue? Thanks!
>
> On 5月27日, 上午7時42分, Hunter  Peress  wrote:
>
>
>
> > FIXED!  I carefully redid the steps. I had success with the eclipse
> > tool, FYI.
>
> > On May 26, 10:11 am, Hunter  Peress  wrote:
>
> > > FYI, I have one clue:
> > > 05-26 10:09:05.191: ERROR/MapActivity(4070): Couldn't get connection
> > > factory client
>
> > > On May 26, 9:40 am, Hunter  Peress  wrote:
>
> > > > Hi.
>
> > > > I obtained a productionmapsAPI key. I thensignedthe .apk with the
> > > > production keystore cert, but when I load it onto my phone there is no
> > > >mapsdata.
>
> > > > I do, however, getmapsdata with the dev key. What am I missing
> > > > here?? This is literally blocking my release here.- Hide quoted 
> > > > text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to make ImageView fill vertically within RelativeLayout

2009-07-10 Thread an0

I put an ImageView and a TextView within a RelativeLayout, and want
the ImageView to grow vertically with the line number of TextView. The
drawable of the ImageView is a png picture of vertical bar.

With the following layout, the ImageView does not fill the height of
the RelativeView. Instead, it alway keeps the original picture's
height.

Why does it not work as I expect?

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





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



[android-developers] Re: How can I use the hidden provider?

2009-07-10 Thread Dianne Hackborn
Because there is a good chance they will change in the future.

On Fri, Jul 10, 2009 at 7:00 PM, android.bu...@gmail.com <
android.bu...@gmail.com> wrote:

>
> Thanks a lot! But it is really bad news. Why google can not make all
> the APIs public?
>
> On Jul 10, 11:36 pm, Romain Guy  wrote:
> > You cannot, that's the whole point. These are private APIs that will
> > change from version to version, if you use them your application will
> > NOT run on "all public android systems."
> >
> > On Fri, Jul 10, 2009 at 5:19 AM,
> >
> > android.bu...@gmail.com wrote:
> >
> > > As we know, Google has hidden some APIs on newer SDKs, some of
> > > providers(i.e. Telephony provider) are hidden, we can only seen in
> > > source code, but we can not use on the current SDK. So I wonder how we
> > > can use these providers. I know we integrate our own firmware,
> > > however, I wonder if we can solver this problem on the current SDK, so
> > > that my app can run on all public android system.
> >
> > --
> > 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
> >
>


-- 
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: why would InputStreamReader returns null

2009-07-10 Thread Hong

you are using j2me... wrong group... this is for android...

2009/2/26 silver :
>
> Hi People;
>
> I am trying to solve my problem about InputStreamReader returns
> null..I have a Login screen which checks the configuration file.
> and here is the configuration class
>
> import java.io.*;
>
> import j2me.microtools.BufferedReader;
> import j2me.microtools.BufferedWriter;
> import j2me.microtools.FileReader;
> import j2me.microtools.FileWriter;
>
>
> /** Configure helps the loading and saving of configuration data.
>  */
> public class Configure
> {
>  protected void loadFile(String file,boolean define)
>   {
>      if (file==null)
>      {
>         return;
>      }
>      //else
>      BufferedReader in=null;
>      FileInputStream fIn = null;
>      String root = new String("//data//data//com.sam.nos//files//");
>      InputStreamReader isr = null;
>
>      try
>      {
>          //define null degilse burası android
>          if(define != false){
>
>                  fIn = Login.me.getApplicationContext().openFileInput(file);
>                 // fIn = new FileInputStream(root + file);
>
>                  isr = new InputStreamReader(fIn);
>
>               in = new BufferedReader(isr);
>
>          }
>
>
> As you can see i use the context of Login widget  I can see the fIn
> constructs correct but isr is null..
> What would be the problem.. any suggestion?
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 Magic

2009-07-10 Thread Nima

Hi,

Thanks a lot for your quick response.
We are not able to see the option "settings->applications->development-
>"USB Debugging" in device
Please advice.

Thanks & Regards,

On Jul 10, 10:33 pm, "Yusuf T. Mobile" 
wrote:
> As a T-Mobile employee, I discourage you in the strongest possible
> terms from rooting yourMagicand upgrading it to 1.5 at the same time
> using this link:http://android-dls.com/wiki/index.php?title=Magic_Rooting
>
> Yusuf Saib
> Android
> ·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 Jul 10, 8:22 am, Nima  wrote:
>
>
>
> > hi,
>
> > We have bought newHTCMagicwith the following specifications:
>
> > 1.Firmware version- 1.5
> > 2.Baseband Version - 62.52s.20.18U_3.22.20.17
> > 3.Kernel Version- 2.6.27-cb85e129htc-ker...@and18-2 #3
> > 4.Build number-2.16.720.2 146733 CL#38755 release-keys
>
> > Can any one please tell us  whether we can flash Android1.5 image
> > under the following linkhttp://www.htc.com/www/support/android/adp.html
>
> > Where we can get factory image forHTCMagic?
>
> > Thanks&Regards,- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How can I use the hidden provider?

2009-07-10 Thread android.bu...@gmail.com

Thanks a lot! But it is really bad news. Why google can not make all
the APIs public?

On Jul 10, 11:36 pm, Romain Guy  wrote:
> You cannot, that's the whole point. These are private APIs that will
> change from version to version, if you use them your application will
> NOT run on "all public android systems."
>
> On Fri, Jul 10, 2009 at 5:19 AM,
>
> android.bu...@gmail.com wrote:
>
> > As we know, Google has hidden some APIs on newer SDKs, some of
> > providers(i.e. Telephony provider) are hidden, we can only seen in
> > source code, but we can not use on the current SDK. So I wonder how we
> > can use these providers. I know we integrate our own firmware,
> > however, I wonder if we can solver this problem on the current SDK, so
> > that my app can run on all public android system.
>
> --
> 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] ACCURACY_COARSE and ACCURACY_FINE

2009-07-10 Thread Maps.Huge.Info (Maps API Guru)

I've been toying with these two concepts for a while and was wondering
what the consensus is on how to handle accuracy changes.

I would like to be able to use the FINE but if not available use
COARSE. The issue is how to handle these two. I thought about using
two listeners and that seems like a good idea but it seems a bit of
overkill if there is a simpler method.

Any ideas? Code examples?

Thanks in advance.

-John Coryat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 obtain bitmap from data in onPreviewFrame method of previewCallback and display on surface using canvas

2009-07-10 Thread newbyca

you need to tell me a little more about the issue ... but my guess is
you were seeing something like "Bitmap to big for allocated memory" or
something or other? i forgot exactly, but i've seen an error like that
before trying to write to bitmaps. again, this is just a guess, but
are you creating a new Bitmap object in each call to onPreviewFrame?
If so, that's a no-no :)

Instead, make your Bitmap class scoped and flush it out each time.

hth, chris

On Jul 4, 5:22 am, lori  wrote:
> thanks for the reply,
>
> I tried to convert the YUV data in first preview frame in
> onPreviewFrame() to RGB and then convert it to bitmap using the YUV
> conversion provided.
> But I get an out of memory issue within a second. Can you please help
> me out?
>
> On Jul 2, 3:15 am, newbyca  wrote:
>
>
>
> > here's an example of the YUV 
> > conversion:http://blog.tomgibara.com/post/132956174/yuv420-to-rgb565-conversion-...
>
> > On Jul 1, 2:30 am, newbyca  wrote:
>
> > > i'm working with the camera preview in my current project ... one
> > > thing that has helped me out *a lot* is the zebra crossing (zx) code:
>
> > >http://code.google.com/p/zxing/source/browse/
>
> > > specifically, zx parses a small region from the preview data to
> > > determine if it contains a barcode. if a barcode is found, the region
> > > is then passed around as a bitmap ... so your answer is *kinda* there.
> > > i say *kinda* because its a little more complicated than that, and too
> > > complicated to just post a code snippet ... or at least it is as far
> > > as I know :)
>
> > > one thing you'll notice from the zx code is that the preview data is
> > > not RGB color encoded. that is, if you read the preview data byte for
> > > byte, it won't be laid out in simple frames of RGB triplets. in fact,
> > > their code assumes the preview data is encoded using a YUV scheme
> > > (http://en.wikipedia.org/wiki/YUV). this is normal for video\camera
> > > equipment and a safe assumption. but the reason i bring it up is that
> > > if you want to draw a bitmap using preview data, you must do it in
> > > terms of RGB. i.e., you will have to translate from YUV to RGB at some
> > > point. this translation isn't too hard tho ... the wiki contains the
> > > formulas.
>
> > > HTH//
>
> > > On May 16, 6:53 am, "loril...@gmail.com"  wrote:
>
> > > > Hi there,
>
> > > > I need to capture an image from camera and display on surfaceview for
> > > > my project. I am trying to obtain bitmap from data inonPreviewFrame
> > > > method of previewCallback and display on surface using canvas.
>
> > > > Can someone please help me?
>
> > > > Following steps were done:
>
> > > > - created a Preview class extending SurfaceView and implementing
> > > > SurfaceHolder.Callback set it as the content of activity.
>
> > > > - installed a SurfaceHolder.Callback in my Preview to get notified
> > > > when the underlying surface is created and destroyed.
> > > > mHolder = getHolder();
> > > > mHolder.addCallback(this);
> > > > //mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
>
> > > > - started a thread in surfaceCreated method described as follows:
>
> > > > public void run() {
> > > >                                 // Open the Camera
> > > >                                 camera = Camera.open();
>
> > > >                                 if (camera != null) {
> > > >                                          try {
> > > >                                                
> > > > camera.setPreviewDisplay(mHolder);
> > > >                                          } catch (IOException e) {
> > > >                                                         // TODO 
> > > > Auto-generated catch block
> > > >                                                         
> > > > e.printStackTrace();
> > > >                                         }
>
> > > >                                 camera.startPreview();
> > > >                                 ImageCaptureCallback iccb = new 
> > > > ImageCaptureCallback ();
> > > >                                 camera.setPreviewCallback(iccb);
> > > >                                 }
>
> > > > --
>
> > > > public class ImageCaptureCallback implements PreviewCallback {
>
> > > >                 public voidonPreviewFrame(byte[] data, Camera camera) {
> > > >                //ToDo
> > > >             }
>
> > > > Please help. I can explain my problem in detail if anybody wish to
> > > > solve 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: Signing APK and "Conversion to Dalvik format failed with error 1"

2009-07-10 Thread Ian

here's an end log excerpt after clean and build for first time:

I don't like how it "ignored resource" ... that file has the guts of
my app...

again, refresh and build afterwards works but it signs with debug api.

export wizard doesn't work unless I do the refresh/rebuild
("missing .apk")

your help is greatly appreciated... I am recently unemployed and need
a new source of income... you're helping a man learn how to fish
instead of suck on society... thanks


[2009-07-10 19:35:03 - EatAndRunDroid] Writing all files...
[2009-07-10 19:35:03 - EatAndRunDroid]   'assets/
health.db' (compressed 66%)
[2009-07-10 19:35:03 - EatAndRunDroid]   'res/drawable/
eatandrun.png' (not compressed)
.files.
[2009-07-10 19:35:03 - EatAndRunDroid]   'resources.arsc' (not
compressed)
[2009-07-10 19:35:03 - EatAndRunDroid] Generated 18 files
[2009-07-10 19:35:03 - EatAndRunDroid] Included 0 files from jar/zip
files.
[2009-07-10 19:35:03 - EatAndRunDroid] Checking for deleted files
[2009-07-10 19:35:03 - EatAndRunDroid] Done!
[2009-07-10 19:35:03 - EatAndRunDroid] ignored resource C:\Documents
and Settings\palecoldfire\work2\EatAndRunDroid\bin\.\resources.ap_
[2009-07-10 19:35:03 - EatAndRunDroid] no classfiles specified
[2009-07-10 19:35:03 - EatAndRunDroid] Conversion to Dalvik format
failed with error 1


On Jul 10, 7:10 pm, Ian  wrote:
> thanks for the response...
>
> I did a full clean reinstall of Eclipse Galileo + ADT 0.9.1 + SDK
> 1.5_r2
>
> I created a new project called "Test" with no user code and referenced
> Google Maps api.
>
> I compiled and got this:
>
> [2009-07-10 18:56:39 - Test] no classfiles specified
> [2009-07-10 18:56:39 - Test] Conversion to Dalvik format failed with
> error 1
>
> If I try "export unsignedapk" it says "no Test.apk" so cannot export.
>
> Then, I "refreshed" and built again with no errors.
>
> [2009-07-10 19:06:09 - Test] Using default debug key to sign package
> [2009-07-10 19:06:09 - Test] Packaging classes.dex
> [2009-07-10 19:06:09 - Test] Build Success!
>
> Now, export works, but theapkwas signed with debug key and I think
> you cannot resign with private key... am I wrong?
>
> Checking the news boards, it seems this problem was never fixed but
> people worked around by "refreshing" then rebuilding, but I don't see
> how they could make a public release with this issue.  Am I to assume
> everyone used ant manually to release onto the market?  Looking at the
> Google I/O videos, it seems internally they only use Ant and nobody is
> keeping Eclipse plugin up to date.
>
> The export wizard works if there is anapkfile... it doesn't care if
> it's already signed with the debug key... maybe this doesn't matter?
>
> -Ian
>
> On Jul 10, 2:24 pm, Roman  wrote:
>
>
>
> > Based on your description I assume that you can build successfully 
> > theAPKwhich is located in the bin folder of your project (of course it's
> > signed with the developer key).
>
> > Normally when you select the option "Android Tools->export unsigned
> > application package" a window pops up where you specify the location
> > of your new unsigned application. If this step does not work with your
> > application, did you try the steps with other applications to find out
> > whether it is related to your project or Eclipse setup?
>
> > You could also try to use the export Wizard to use your own keystore
> > to sign your application with your own key. The export wizard can be
> > found in the overview tab of your Manifest file. In this view you can
> > select exporting an unsignedAPKor use your own created signature. Of
> > course to load an unsignedAPKon a device you would have to go
> > through the signing process with your own created key.
>
> > --
> > 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 Jul 9, 3:49 pm, Ian Gavalakis  wrote:
>
> > > update:
>
> > > when I try to "export unsigned" it fails because noAPKwas generated,
> > > likely due to the error.  again, reloas/build-again creates an exportable 
> > > ak
> > > but it's signed with debug key... useless...
>
> > > p.s. Romain, please forgive me for including you, but you seem to be one 
> > > of
> > > the best responders for Google on Android.  I spent a day on this issue 
> > > w/o
> > > success.
>
> > > [2009-07-09 18:41:13 - EatAndRunDroid] ignored resource C:\Documents and
> > > Settings\gavalakis\workspace\EatAndRunDroid\bin\.\resources.ap_
> > > [2009-07-09 18:41:13 - EatAndRunDroid] Using default debug key to sign
> > > package
> > > [2009-07-09 18:41:13 - EatAndRunDroid] Packaging C:\Documents and
> > > Settings\gavalakis\workspace\EatAndRunDroid\bin\resources.ap_
> > > [2009-07-09 18:41:13 - EatAndRunDroid] Packaging classes.dex
> > > [2009-07-09 18:41:14 - EatAndRunDroid] Packaging
> > > /EatAndRunDroid/src/com/e

[android-developers] Re: Low accuracy of the accelerometer Sensor

2009-07-10 Thread newbyca

D, I'm having many of the same issues, though my app is a little
different in nature ... i don't know that this will help much, but
here's my thoughts so far:

- when determining the sample time rate use event.timestamp in your
sensor listener callback. you'll see more or less the same results,
but more accurate all the same.

- i found the same with subtracting G from the three acceleration
components, that is, you can't rely on SensorManager.GRAVITY_EARTH,
you're better off having your app calibrate a local G on each handset.

- note that when filtering out G you need orientation data as well.
this posed a problem for me though: SensorManager has a method,
getOrientation, however I couldn't get it working. So instead I set 2
listeners, one for accelerometer and one for orientation ... meaning
when I filter G, i don't really know that I'm using the right
orientation data to calculate the different components of G because
the two callbacks are called independantly, so I can only make a best-
guess based on event.timestamp. How are you filtering out G?

- there's a simple free app on the market called "Accelerometer xyz
values" or something like that, just search for "Accelerometer" ...
gives a simple line chart of all three accelerometer axiis over time.

- from what i found around the net, this is a common issue with
accelerometers, even the more sophisticated ones used in robotics, tho
i couldn't actly find specs on the accelerometer used in G1. but don't
be too mad at HTC, i'd imagine iPhone has similar issues :)

- as for noise filtering, up to now i've tried a simple High Pass
filter. In this case, I set the device down flat and allow my app to
measure the range of noise coming from the sensors to create a
threshold. Then I only admit values with a higher absolute value than
the the threshold. I just built this app this week and so far have had
mixed results tho.

Now for Kalman filtering. I do have a little experience with Kalman
filtering and here's some issues to consider:
1) *performance*, Kalman is efficient, however we're dealing with a
managed runtime and limited hardware. even if we get a Kalman filter
running, it's hard to say now that it would perform well enough
without moving to the Android NDK (native development kit)
2) Kalman assumes noise is normally distributed (like a bell curve),
however I've seen evidence that the noise is biased somehow. you even
noted that motion seemed to change the noise characteristics of the
sensor, tho i didn't see the same thing. but i *have* seen that
playing any audio will *definitely* change the noise characteristics
of the sensor (although technically it's not inherent noise, it's the
sensor reacting the EM field of the speaker's driver).
3) Kalman is efficient because it is "hard-coded" with a sense of what
you expect your data to look like. So say you always want to track a
circular motion: you'd tell your Kalman filter "i'm expecting
something vaguely circular, now do your stuff and de-emphasize the
data that makes this look like something that's not a circle (the
noise)". So in your case, if I can assume you want to track arbitrary
motion, i'm not sure Kalman is useful. However, one possibility: if
you restricted your application to a handful of basic gestures you
could have a two-stage filter in which 1st you determine if the
gesture is even close to something you handle, then apply an
appropriate Kalman filter to it to remove noise. Then, this handful of
basic gestures could be composited together to allow more
sophisticated gestures like: arc -> sharp angel -> inward sprial, etc
4) Unless you're experienced with the math used in Kalman, you could
spend a few weeks getting it right ... it's not the simplest thing in
the world i'm afraid :)

anyway, i feel your pain. at the moment i have a decent app built up
for analyzing the characteristics of the acceleromater ... if you're
interested let me know and we mite post it to the market sometime
soon.

hth, chris





On Jul 9, 5:23 pm, dilit  wrote:
> Sounds like some signal processing/filter math is in 
> order.http://www.cs.unc.edu/~welch/kalman/
>
> Anyone with experience?
> D
>
> On Jul 9, 1:18 pm, dilit  wrote:
>
>
>
> > Just in case,
>
> > We did calibrate our phones.
> > E.g. My phone's Gravity value is more like 8.7 vs 9.81.
> > While static, the phone's accel values were acceptable.
> > As soon as the phone was in motion, the acceleration (position)
> > data went out to lunch.
>
> > FYI,  marketing = lying 99% of the time.  IMO
>
> > On Jul 9, 1:05 pm, dilit  wrote:
>
> > > We are writing an application that uses acceleration sensor data to
> > > plot phone's movement in 3D.
> > > We are finding  gross inconsistencies in the actual data output by the
> > > sensor.  Also,  sampling rates
> > > vary greatly from 8 to 200 millis. (using System.currentTimeMillis())
>
> > > Specifically, when we try to draw a circle with G1 flat on the table
> > > all the time (filtering out gravity accel 9.8),
>

[android-developers] Re: Speech Recognition application

2009-07-10 Thread iPaul Pro

Just in case you are unaware:
http://developer.android.com/reference/android/speech/RecognizerIntent.html

On Jul 10, 5:41 am, campi  wrote:
> Hi,
> such as the name of the topic says, I am developping an application
> based on speech recognition. I intend to develop the recognition part.
> Since it requires quite a lot of operations, I was wondering wether an
> Android Phone, such as the Dev Phone 1, could handle it. So could I
> develop such an application directly on the phone, or should I use a
> server to take care of the recognition ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Signing APK and "Conversion to Dalvik format failed with error 1"

2009-07-10 Thread Ian

thanks for the response...

I did a full clean reinstall of Eclipse Galileo + ADT 0.9.1 + SDK
1.5_r2

I created a new project called "Test" with no user code and referenced
Google Maps api.

I compiled and got this:

[2009-07-10 18:56:39 - Test] no classfiles specified
[2009-07-10 18:56:39 - Test] Conversion to Dalvik format failed with
error 1

If I try "export unsigned apk" it says "no Test.apk" so cannot export.

Then, I "refreshed" and built again with no errors.

[2009-07-10 19:06:09 - Test] Using default debug key to sign package
[2009-07-10 19:06:09 - Test] Packaging classes.dex
[2009-07-10 19:06:09 - Test] Build Success!

Now, export works, but the apk was signed with debug key and I think
you cannot resign with private key... am I wrong?

Checking the news boards, it seems this problem was never fixed but
people worked around by "refreshing" then rebuilding, but I don't see
how they could make a public release with this issue.  Am I to assume
everyone used ant manually to release onto the market?  Looking at the
Google I/O videos, it seems internally they only use Ant and nobody is
keeping Eclipse plugin up to date.

The export wizard works if there is an apk file... it doesn't care if
it's already signed with the debug key... maybe this doesn't matter?

-Ian


On Jul 10, 2:24 pm, Roman  wrote:
> Based on your description I assume that you can build successfully 
> theAPKwhich is located in the bin folder of your project (of course it's
> signed with the developer key).
>
> Normally when you select the option "Android Tools->export unsigned
> application package" a window pops up where you specify the location
> of your new unsigned application. If this step does not work with your
> application, did you try the steps with other applications to find out
> whether it is related to your project or Eclipse setup?
>
> You could also try to use the export Wizard to use your own keystore
> to sign your application with your own key. The export wizard can be
> found in the overview tab of your Manifest file. In this view you can
> select exporting an unsignedAPKor use your own created signature. Of
> course to load an unsignedAPKon a device you would have to go
> through the signing process with your own created key.
>
> --
> 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 Jul 9, 3:49 pm, Ian Gavalakis  wrote:
>
>
>
> > update:
>
> > when I try to "export unsigned" it fails because noAPKwas generated,
> > likely due to the error.  again, reloas/build-again creates an exportable ak
> > but it's signed with debug key... useless...
>
> > p.s. Romain, please forgive me for including you, but you seem to be one of
> > the best responders for Google on Android.  I spent a day on this issue w/o
> > success.
>
> > [2009-07-09 18:41:13 - EatAndRunDroid] ignored resource C:\Documents and
> > Settings\gavalakis\workspace\EatAndRunDroid\bin\.\resources.ap_
> > [2009-07-09 18:41:13 - EatAndRunDroid] Using default debug key to sign
> > package
> > [2009-07-09 18:41:13 - EatAndRunDroid] Packaging C:\Documents and
> > Settings\gavalakis\workspace\EatAndRunDroid\bin\resources.ap_
> > [2009-07-09 18:41:13 - EatAndRunDroid] Packaging classes.dex
> > [2009-07-09 18:41:14 - EatAndRunDroid] Packaging
> > /EatAndRunDroid/src/com/eatandrun/bft.gpx into com/eatandrun/bft.gpx
> > [2009-07-09 18:41:14 - EatAndRunDroid] Build Success!
>
> > -- Forwarded message --
> > From: Ian 
> > Date: Thu, Jul 9, 2009 at 6:28 PM
> > Subject: SigningAPKand "Conversion to Dalvik format failed with error 1"
> > To: Android Developers 
>
> > Help!
>
> > I've been trying to use Eclipse and the Export Wizard to create a
> > signedapk.
>
> > unfortunately, I cannot seem to generate an UNSIGNEDapk.  Every time
> > I "clean and build" I get the error below, which I read I can get rid
> > of by "reload" or refresh then building again.  however, the debugger
> > automatically signs with the debug key after I do this, defeating the
> > purpose.
>
> > > how do I build theapkw/o signing it?
>
> > -
> > log excerpt:
> > [2009-07-09 18:19:09 - EatAndRunDroid] Creating 'C:\Documents and
> > Settings\gavalakis\workspace\EatAndRunDroid\bin\resources.ap_'
> > [2009-07-09 18:19:09 - EatAndRunDroid] Writing all files...
> > .STUFF.
> > [2009-07-09 18:19:09 - EatAndRunDroid] Generated 18 files
> > [2009-07-09 18:19:09 - EatAndRunDroid] Included 0 files from jar/zip
> > files.
> > [2009-07-09 18:19:09 - EatAndRunDroid] Checking for deleted files
> > [2009-07-09 18:19:09 - EatAndRunDroid] Done!
> > [2009-07-09 18:19:09 - EatAndRunDroid] ignored resource C:\Documents
> > and Settings\gavalakis\workspace\EatAndRunDroid\bin\.\resources.ap_
> > [2009-07-09 18:19:09 - EatAndRunDroid] no classfiles specified

[android-developers] Re: android developers challenge 2

2009-07-10 Thread jonathan

Yusuf,
thanks for the reply.would a website designed for gphone/smart
phone be eligible?

-Jonathan


On Jul 10, 9:41 am, "Yusuf T. Mobile"  wrote:
> I am not an official nor a judge, but from my reading of the
> preliminary rules posted so far, leveraging a server does not render
> your entry ineligible.
>
> Yusuf Saib
> Android
> ·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 Jul 9, 11:15 pm, jonathan  wrote:
>
> > I can not find a dedicated group for android developers challenge 2,
> > so I'm posting the questions here:
> > 1.are apps that rely on web service or do heavy backend processing on
> > a remote server eligible?
> > 2.are web sites that's optimized for android/smart phone eligible?  so
> > the client side may simply be a light weight gui that opens the
> > browser to the site.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] BlurMaskFilter

2009-07-10 Thread Sharmila

Does the BlurMaskFilter works?I am trying to blur a greyscale image
captured by the camera using BlurMaskFilter...
Bitmap bm=Bitmap.createBitmap(bm.getWidth(),bm.getHeight
(),Bitmap.Config.ARGB_);
Canvas c=new Canvas(bm);
Paint p=new Paint();
p.setMaskFilter(new BlurMaskFilter
(radius,BlurMaskFilter.Blur.NORMAL));
p.setFilterBitmap(true);
c.drawBitmap(bm,0,0,p);
the image does not appear to be blurred?
Do I need to design my own filter for blurring?
Thanks,
Sharmila
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 Intent to view specific App in Android Market

2009-07-10 Thread iPaul Pro

To do this in a future-proof way, you would set the  on
the receiver app to handle your type of data and sending extras with
the intent from the sending app.

For example: if you are making an app that SEND's plain text:

In the java of the app to send the text:

final Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.setType("text/plain");
sendIntent.putExtra(Intent.EXTRA_SUBJECT, EXTRA_SUBJECT);
sendIntent.putExtra(Intent.EXTRA_TEXT, EXTRA_TEXT);
   try {
startActivity(Intent.createChooser(sendIntent, "Send"));
   } catch (
android.content.ActivityNotFoundException ex) {}


In the manifest, in the appropriate activity:








In the java file's onCreate() check for the standard SEND EXTRAS:

final String EXTRA_SUBJECT = getIntent().getStringExtra
(Intent.EXTRA_SUBJECT);
final String EXTRA_TEXT = getIntent().getStringExtra
(Intent.EXTRA_TEXT);


This concept can be used for other data and intents as well.

Hopes this helps,

Paul Burke
supp...@ipaulpro.com
347.695.1295

On Jul 10, 3:30 pm, Mike  wrote:
> OK, thanks for the head start.  I'll play around with this and see
> what I can do.
>
> On Jul 9, 1:37 pm, "nEx.Software"  wrote:
>
> > I don't know how exactly, but I can tell you the class name. You'll
> > have to figure out the extras though.
>
> > Intentintent= newIntent();intent.setClassName
> > ("com.android.vending", "com.android.vending.AssetInfoActivity");
>
> > On Jul 9, 12:29 pm, Mike  wrote:
>
> > > Can you tell me how?  I am the owner of the other app I am trying to
> > > open in themarketfrom the first app.
>
> > > - Mike
>
> > > On Jul 9, 12:42 pm, "nEx.Software"  wrote:
>
> > > > Presumably, if you knew the ClassName and the extras it was expecting,
> > > > you could accomplish this.
>
> > > > On Jul 9, 10:39 am, Mike  wrote:
>
> > > > > Does no one know the answer to this question?  Even a "no you can't do
> > > > > that." response would be better than nothing.  Google framework
> > > > > engineers - where are you?  :)
>
> > > > > It seems based on the other threads that have been started on this
> > > > > subject that there is a reasonable amount of interest surrounding it.
>
> > > > > On Jul 8, 10:17 am, Mike  wrote:
>
> > > > > > I've seen a few other threads on this subject, but none that 
> > > > > > addresses
> > > > > > my need which is to not only find the app in themarketvia themarket
> > > > > > uri, but display it as if the user had navigated to it.
>
> > > > > > The closest anyone has gotten to this answer is to show how to bring
> > > > > > up the AndroidMarketapp and browse for the app you want which shows
> > > > > > the single result in a list that the user must still select to get 
> > > > > > to
> > > > > > the screen I want to display.
>
> > > > > > Here's my existing code that does exactly that:
>
> > > > > > private static final String MY_MARKET_APP = "com.some.silly.name";
>
> > > > > >IntentmarketLaunch = newIntent(Intent.ACTION_VIEW);
> > > > > > marketLaunch.setData(Uri.parse("market://search?q=pname:" +
> > > > > > MY_MARKET_APP));
> > > > > > startActivity(marketLaunch);
>
> > > > > > I don't want to have to force the user to select this single item 
> > > > > > from
> > > > > > the list - just bypass that and bring up the next screen.
>
> > > > > > Has anyone been able to successfully do this?
>
> > > > > > Regards,
>
> > > > > > - 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: EMMA Code coverage and JUnit

2009-07-10 Thread Haritha

Brett
first of all thanks for all the information on Emma coverage.
I have written my own instrument testcase for Setting  app and added
these to /packages/apps/Settings/tests/
with export EMMA_INSTRUEMNT=true;and mmm packages/apps/Setting
coverage.em,Settings.apk,SettingsTests.apk are generated.
But when i do adb shell am instrument -w -e coverage true
com.android.settings.tests/android.test.InstruementationTestRunner
 all the tests are performed on emulator but its giving error Error:
Failed to generate emma coverage.

i was able to generate reports for all apps that come with build
(apidemos,Calculator etc).
Is it possible to generate coverage through the tests that wont come
with android.If so what am i missing?
Are there any suggested solutions?
Any help is really appreciated.
thanks and regards
haritha



On May 28, 1:09 pm, Brett Chabot  wrote:
> + android-platform
>
> Its great to see people interested in EMMA code coverage on Android.
> However, note that EMMA code coverage support on Android is currently quite
> preliminary. Its not supported from within the SDK yet. The support that is
> in place is for apps and tests that are part of the android source tree.
>
> That being said, if you still want to give it a try, download the android
> source for cupcake, do a full build, and give the instructions below a try.
> There are a couple helper scripts that have been created which will
> hopefully make this a bit easier.
> 1. Generating code coverage for your own tests using runtest script
>
> First, you need to add the target system/framework/emma.jar to the device's
> boot classpath. Modify the BOOTCLASSPATH variable in
> /system/core/rootdir/init.rc. The system/framework/emma.jar entry needs to
> be added in the exact position shown below:
>
>  export BOOTCLASSPATH=/system/framework/core.jar:/system/framework/ext.jar:
> */system/framework/emma.jar:*
> /system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
>
>  Rebuild the bootimage to pick up the init.rc changes:
>
> make bootimage
>
>   Start an emulator with a simulated sdcard:
>
> emulator -sdcard &
>
>   Note that the emulator will not fully boot up at this point since the
> emma.jar file is not present yet.
>
> Next, use the runtest.py script. Runtest will do all the necessary steps to
> instrument your test and target package, run the test, and generate the code
> coverage report.
>
> % runtest_py --coverage apidemos
> ...
> Coverage report generated at  root>/out/emma/ApiDemos/apidemos/apidemos.html
>
>  When testing on the emulator, you must launch the emulator with a simulated
> sdcard (-sdcard option), as code coverage results are stored to the sdcard.
> To use runtest_py, the test must be defined in
> development/testrunner/test_defs.xml.
> To generate code coverage results, the test must have a "coverage_target"
> attribute, which must refer to a target defined in
> development/testrunner/coverage_targets.xml
>
> 2. Generating code coverage for your own tests - The Hard Way
>
> The following steps will use apidemos tests as an example, and will assume
> the current working path is the android build root.
>
> Modify the targets BOOTCLASSPATH as described in the preceding section.
>
> Before doing a build, set
>
> export EMMA_INSTRUMENT=true
>
>  This instructs the build system to add the necessary emma instrumentation
> to the generated bytecode.
>
> mmm development/samples/ApiDemos
>
>  Pass in a '-e coverage true' argument to adb shell am instrument when
> executing tests.
>
> adb shell am instrument -w -e coverage true
> com.example.android.apis.tests/android.test.InstrumentationTestRunner
>
>  This command will dump a runtime coverage data file at
> /sdcard/coverage.econ the device. Extract it to local host
>
> adb pull /sdcard/coverage.ec coverage.ec
>
>  Now generate a coverage report. You'll need to pass in the path to the
> coverage metadata generated at build time.
>
> java -cp external/emma/lib/emma.jar emma report -r html -in
> coverage.ec -sp development/samples/ApiDemos/src -in
> out/target/common/obj/APPS/ApiDemos_intermediates/coverage.em
>
> I hope this helps.
>
> Regards,
> Brett.
>
> On Wed, May 27, 2009 at 9:25 PM, Deeps  wrote:
>
> > Thanks a lot Felipe.
>
> > Yeah..I have included emma.jar in the build path of my application.
> > I have the android latest release 1.5 sdk.. However, my application
> > has 1.1 target. I tried using Android JUnit and found all my test
> > cases are executed.
> > And also throu command prompt i followed the syntax mentioned in the
> > earlier post..
>
> > Still coverage is 0.0% but i could see the no of instructions. Will
> > there be a solution?
>
> > Thanks
> > Deeps
>
> > On May 27, 5:33 pm, Felipe Ramos  wrote:
> > > Hi Deeps,
> > > Nice to hear that you are making progress. Are you using only the SDK, or
> > > are you building the entire android source code? Maybe your code is not
> > > instrumented to generate the coverage statistics a

[android-developers] Re: Can only hear sound when playing video

2009-07-10 Thread Marco Nelissen

On Fri, Jul 10, 2009 at 1:53 PM, Alslayer wrote:
>
> That did it.  Man that was difficult.  Thank you so much for your help
> Marco.  I still have a few problems.
> 1. the sound won't stop when I hit the back button

That's because the MediaPlayer doesn't know that you hit the back button.
Since you already have a SurfaceHolder callback, it's probably easiest
to stop the MediaPlayer in the surfaceDestroyed callback.

> 2. there are no controls to stop and start the video - guess I gotta
> make them

Yes, though you might be able to make use of MediaController to
minimize the work you have to do.

> 3. video is stretched out

You will have to adjust the size of the SurfaceView.

Also note that as of Cupcake, playing media from a resource using the
"android.resource://" Uri specifier should work. I haven't tried this
with VideoView, but you could give it a try. If it works, you get all
these things automatically.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 only hear sound when playing video

2009-07-10 Thread Alslayer

That did it.  Man that was difficult.  Thank you so much for your help
Marco.  I still have a few problems.
1. the sound won't stop when I hit the back button
2. there are no controls to stop and start the video - guess I gotta
make them
3. video is stretched out

Here is the final code if anyone else want to play video from the raw
folder.

import java.io.IOException;
import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.SurfaceView;
import android.view.SurfaceHolder;
import android.view.SurfaceHolder.Callback;
import android.content.res.AssetFileDescriptor;

public class myapp extends Activity implements Callback {
public MediaPlayer mp = new MediaPlayer();
public SurfaceView sv = null;
SurfaceHolder holder = null;

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

this.sv = (SurfaceView)findViewById(R.id.SurfaceView01);
this.holder = sv.getHolder();
holder.addCallback(this);
holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
}

@Override
public void surfaceChanged(SurfaceHolder holder, int format, int
width,
int height) {
// TODO Auto-generated method stub
}

@Override
public void surfaceCreated(SurfaceHolder holder) {
// TODO Auto-generated method stub
AssetFileDescriptor afd = getResources().openRawResourceFd
(R.raw.samplevideo);
mp.setDisplay(sv.getHolder());
try {
mp.setDataSource(afd.getFileDescriptor(), 
afd.getStartOffset(),
afd.getLength());
mp.prepare();

} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
mp.start();
}

@Override
public void surfaceDestroyed(SurfaceHolder holder) {
// TODO Auto-generated method stub
}
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] FrameLayout and margins

2009-07-10 Thread Ventrix Kostis P.

I have the following piece of code but the margins are not set.

main.xml:

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





setContentView(R.layout.main);
ImageView image1 = new ImageView(this);
image1.setImageResource(R.drawable.alien_256);
FrameLayout frl = (FrameLayout) this.findViewById(R.id.MainLayout01);
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.WRAP_CONTENT,
FrameLayout.LayoutParams.WRAP_CONTENT);
params.leftMargin=50;
params.topMargin=40;
frl.addView(image1, params);

I have also tried using the params.setMargins(50, 40, 0, 0) but it
does not work either.

Any suggestion? (Absolute layout works just fine, too bad it was
deprecated)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Fwd: tools dex

2009-07-10 Thread Dan Bornstein

On Fri, Jul 10, 2009 at 1:25 PM, Mark Murphy wrote:
> Dan Bornstein wrote:
>> That message is only ever produced because of entirely local
>> information about a class, and the trigger condition is exactly as
>> stated [...]
>
> I apologize for my mistake -- I was thinking of a different dex error.

No worries.

> That being said, recompiling the code in question is the only way that I
> know of to perhaps get past this problem.

Yep, that's almost certainly the right way to proceed. I never meant
to dispute that.

Further cheers,

-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] Selecting text in a WebView?

2009-07-10 Thread gsmd

The browser does this by calling `public void emulateShiftHeld()`
method on the WebView which is hidden in the SDK.
Any other options?
TIA.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Fwd: tools dex

2009-07-10 Thread Mark Murphy

Dan Bornstein wrote:
> On Fri, Jul 10, 2009 at 1:00 PM, Mark Murphy wrote:
>>> warning: Ignoring InnerClasses attribute for an anonymous inner class
>>> that doesn't come with an associated EnclosingMethod attribute. (This
>>> class was probably produced by a broken compiler.)
>> At least in some cases, that means you imported a precompiled JAR that
>> is not fully compatible, possibly due to references to missing platform
>> classes.
> 
> That message is only ever produced because of entirely local
> information about a class, and the trigger condition is exactly as
> stated: A .class file apparently represents (what in the Java
> programming language source was written as) an anonymous inner class;
> per spec such classes are supposed to have both InnerClasses and
> EnclosingMethod attributes, but dx observed it to have the former but
> not the latter. Look here for further details:
> ,
> starting around line 258.
> 
> The jar may reference classes that aren't included in the system as
> well, but that wouldn't trigger the message in question. Dx isn't a
> (cross-dex) linker, and so it never tries to resolve external
> references in the first place (nor does it take arguments that could
> possibly enable it to do so).

I apologize for my mistake -- I was thinking of a different dex error.

That being said, recompiling the code in question is the only way that I
know of to perhaps get past this problem. However, in this case, you may
be able to just rebuild the third-party JAR using your version of the
Java compiler, rather than have to integrate its sources into your own
project.

-- 
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] Re: Fwd: tools dex

2009-07-10 Thread Dan Bornstein

On Fri, Jul 10, 2009 at 1:00 PM, Mark Murphy wrote:
>> warning: Ignoring InnerClasses attribute for an anonymous inner class
>> that doesn't come with an associated EnclosingMethod attribute. (This
>> class was probably produced by a broken compiler.)
>
> At least in some cases, that means you imported a precompiled JAR that
> is not fully compatible, possibly due to references to missing platform
> classes.

That message is only ever produced because of entirely local
information about a class, and the trigger condition is exactly as
stated: A .class file apparently represents (what in the Java
programming language source was written as) an anonymous inner class;
per spec such classes are supposed to have both InnerClasses and
EnclosingMethod attributes, but dx observed it to have the former but
not the latter. Look here for further details:
,
starting around line 258.

The jar may reference classes that aren't included in the system as
well, but that wouldn't trigger the message in question. Dx isn't a
(cross-dex) linker, and so it never tries to resolve external
references in the first place (nor does it take arguments that could
possibly enable it to do so).

Cheers,

-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: Fwd: tools dex

2009-07-10 Thread Mark Murphy

fatima wrote:
> Hi.I have a same problem. When I was trying to run CometdChat
> Program,this warning be appeard : [2009-07-10 20:08:36 - cometdchat]
> warning: Ignoring InnerClasses attribute for an anonymous inner class
> that doesn't come with an associated EnclosingMethod attribute. (This
> class was probably produced by a broken compiler.) What is it? What
> should I do?

At least in some cases, that means you imported a precompiled JAR that
is not fully compatible, possibly due to references to missing platform
classes.

If you can, get the source code for that project and include the source,
rather than the JAR, in your project, and then fix whatever compiler
errors you wind up with.

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

Android 1.5 Programming 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: Using Intent to view specific App in Android Market

2009-07-10 Thread Dianne Hackborn
Note that this is no different than using a private API.  You can expect
this to break in the future.

On Thu, Jul 9, 2009 at 12:37 PM, nEx.Software wrote:

>
> I don't know how exactly, but I can tell you the class name. You'll
> have to figure out the extras though.
>
> Intent intent = new Intent(); intent.setClassName
> ("com.android.vending", "com.android.vending.AssetInfoActivity");
>
> On Jul 9, 12:29 pm, Mike  wrote:
> > Can you tell me how?  I am the owner of the other app I am trying to
> > open in the market from the first app.
> >
> > - Mike
> >
> > On Jul 9, 12:42 pm, "nEx.Software"  wrote:
> >
> > > Presumably, if you knew the ClassName and the extras it was expecting,
> > > you could accomplish this.
> >
> > > On Jul 9, 10:39 am, Mike  wrote:
> >
> > > > Does no one know the answer to this question?  Even a "no you can't
> do
> > > > that." response would be better than nothing.  Google framework
> > > > engineers - where are you?  :)
> >
> > > > It seems based on the other threads that have been started on this
> > > > subject that there is a reasonable amount of interest surrounding it.
> >
> > > > On Jul 8, 10:17 am, Mike  wrote:
> >
> > > > > I've seen a few other threads on this subject, but none that
> addresses
> > > > > my need which is to not only find the app in the market via the
> market
> > > > > uri, but display it as if the user had navigated to it.
> >
> > > > > The closest anyone has gotten to this answer is to show how to
> bring
> > > > > up the Android Market app and browse for the app you want which
> shows
> > > > > the single result in a list that the user must still select to get
> to
> > > > > the screen I want to display.
> >
> > > > > Here's my existing code that does exactly that:
> >
> > > > > private static final String MY_MARKET_APP = "com.some.silly.name";
> >
> > > > > Intent marketLaunch = new Intent(Intent.ACTION_VIEW);
> > > > > marketLaunch.setData(Uri.parse("market://search?q=pname:" +
> > > > > MY_MARKET_APP));
> > > > > startActivity(marketLaunch);
> >
> > > > > I don't want to have to force the user to select this single item
> from
> > > > > the list - just bypass that and bring up the next screen.
> >
> > > > > Has anyone been able to successfully do this?
> >
> > > > > Regards,
> >
> > > > > - Mike
> >
> >
> >
>


-- 
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] Fwd: tools dex

2009-07-10 Thread fatima

Hi.I have a same problem. When I was trying to run CometdChat
Program,this warning be appeard : [2009-07-10 20:08:36 - cometdchat]
warning: Ignoring InnerClasses attribute for an anonymous inner class
that doesn't come with an associated EnclosingMethod attribute. (This
class was probably produced by a broken compiler.) What is it? What
should I do?
 I used JDK 1.6, eclipse-jee-ganymede-SR2-win32 and android-sdk-
windows-1.1_r1

regards


-- Forwarded message --
From: Dan Bornstein 
Date: Mar 20, 10:42 am
Subject: tools dex
To: Android Developers


On Mar 20, 3:39 am, "estibaliz.telefon...@gmail.com"

 wrote:
> Hi! I'm trying to use the "dex" tool with felix.jar. The result is the
> following:

> C:\Devel\android\tools>dx --dex--output=classes.dexE:\TELEFONICA
> \Devel\osgi-an
> droid\bin\felix.jar
> warning:IgnoringInnerClassesattribute for an anonymous inner class
> that doesn
> 't come with an associated EnclosingMethod attribute. (This class was
> probably p
> roduced by a broken compiler.)
> [...]

First of all, this is a warning and not an error. The resulting file
should run just fine, except that if you attempt to use reflection on
the inner classes in question, the answers you get back will not be
correct. (This is because the compiler that produced the files was
broken and didn't provide consistent information.)

> I can't fix this problem.

Yes, you probably can. Recompile the source for "felix.jar" with a
modern compiler, and the problem should disappear.

-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] Can adb shell trigger onLowMemory

2009-07-10 Thread James

Does the adb shell or another development utility support sending or
triggering the onLowMemory call back to the active Activity Context?
I would like to trigger it to make sure my implementation frees
memory.  I find the idea of actually making the device or emulator run
out of memory is a bit unrealistic.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 only hear sound when playing video

2009-07-10 Thread Marco Nelissen

Try setting a SurfaceHolder callback and delaying the call to
MediaPlayer.setDisplay() until you've gotten the surfaceCreated()
callback.


On Fri, Jul 10, 2009 at 11:53 AM, Alslayer wrote:
>
> I noticed with all the copying and deleting code I forgot to add
> setContentView(R.layout.main);.  So now I don't get the "The
> application stopped unexpectedly." error anymore.  Now the app starts
> up with a black screen then goes back the home screen.  Here is the
> whole code and the xml.
>
> import java.io.IOException;
> import android.app.Activity;
> import android.media.MediaPlayer;
> import android.os.Bundle;
> import android.view.SurfaceView;
> import android.content.res.AssetFileDescriptor;
>
> public class myapp extends Activity {
>
>    /** Called when the activity is first created. */
>   �...@override
>    public void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>        setContentView(R.layout.main);
>
>        AssetFileDescriptor afd = getResources().openRawResourceFd
> (R.raw.samplevideo);
>        MediaPlayer mp = new MediaPlayer();
>        SurfaceView sv = (SurfaceView)findViewById
> (R.id.SurfaceView01);
>        mp.setDisplay(sv.getHolder());
>        try {
>                        mp.setDataSource(afd.getFileDescriptor(), 
> afd.getStartOffset(),
> afd.getLength());
>                mp.prepare();
>
>                } catch (IllegalArgumentException e) {
>                        // TODO Auto-generated catch block
>                        e.printStackTrace();
>                } catch (IllegalStateException e) {
>                        // TODO Auto-generated catch block
>                        e.printStackTrace();
>                } catch (IOException e) {
>                        // TODO Auto-generated catch block
>                        e.printStackTrace();
>                }
>        mp.start();
>    }
> }
>
>
> The XML
>
> 
> http://schemas.android.com/apk/res/
> android"
>    android:orientation="vertical"
>    android:layout_width="fill_parent"
>    android:layout_height="fill_parent"
>    >
>
>                          android:layout_width="wrap_content"
>                         android:layout_height="wrap_content">
> 
>
> 
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 Intent to view specific App in Android Market

2009-07-10 Thread Mike

OK, thanks for the head start.  I'll play around with this and see
what I can do.

On Jul 9, 1:37 pm, "nEx.Software"  wrote:
> I don't know how exactly, but I can tell you the class name. You'll
> have to figure out the extras though.
>
> Intentintent= newIntent();intent.setClassName
> ("com.android.vending", "com.android.vending.AssetInfoActivity");
>
> On Jul 9, 12:29 pm, Mike  wrote:
>
> > Can you tell me how?  I am the owner of the other app I am trying to
> > open in themarketfrom the first app.
>
> > - Mike
>
> > On Jul 9, 12:42 pm, "nEx.Software"  wrote:
>
> > > Presumably, if you knew the ClassName and the extras it was expecting,
> > > you could accomplish this.
>
> > > On Jul 9, 10:39 am, Mike  wrote:
>
> > > > Does no one know the answer to this question?  Even a "no you can't do
> > > > that." response would be better than nothing.  Google framework
> > > > engineers - where are you?  :)
>
> > > > It seems based on the other threads that have been started on this
> > > > subject that there is a reasonable amount of interest surrounding it.
>
> > > > On Jul 8, 10:17 am, Mike  wrote:
>
> > > > > I've seen a few other threads on this subject, but none that addresses
> > > > > my need which is to not only find the app in themarketvia themarket
> > > > > uri, but display it as if the user had navigated to it.
>
> > > > > The closest anyone has gotten to this answer is to show how to bring
> > > > > up the AndroidMarketapp and browse for the app you want which shows
> > > > > the single result in a list that the user must still select to get to
> > > > > the screen I want to display.
>
> > > > > Here's my existing code that does exactly that:
>
> > > > > private static final String MY_MARKET_APP = "com.some.silly.name";
>
> > > > >IntentmarketLaunch = newIntent(Intent.ACTION_VIEW);
> > > > > marketLaunch.setData(Uri.parse("market://search?q=pname:" +
> > > > > MY_MARKET_APP));
> > > > > startActivity(marketLaunch);
>
> > > > > I don't want to have to force the user to select this single item from
> > > > > the list - just bypass that and bring up the next screen.
>
> > > > > Has anyone been able to successfully do this?
>
> > > > > Regards,
>
> > > > > - 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: How to get the video stream from MediaRecorder?

2009-07-10 Thread Gergely Kis

Hi,

We wrote a blog about this a few days ago:
http://www.mattakis.com/blog/kisg/20090708/broadcasting-video-with-android-without-writing-to-the-file-system

Best Regards,
Gergely

On júl. 10, 17:44, manoj  wrote:
> hi,
>
> I want to get the stream and send it to server directly by using
> MediaRecorder.
>
> Actually, I am able to record the video,and able to store it into
> sdcard. Now I want to it to stream (live stream) to server rather than
> storing it.
>
> Can any one please suggest me how to do it?
>
> 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: Can only hear sound when playing video

2009-07-10 Thread Alslayer

I noticed with all the copying and deleting code I forgot to add
setContentView(R.layout.main);.  So now I don't get the "The
application stopped unexpectedly." error anymore.  Now the app starts
up with a black screen then goes back the home screen.  Here is the
whole code and the xml.

import java.io.IOException;
import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.SurfaceView;
import android.content.res.AssetFileDescriptor;

public class myapp extends Activity {

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

AssetFileDescriptor afd = getResources().openRawResourceFd
(R.raw.samplevideo);
MediaPlayer mp = new MediaPlayer();
SurfaceView sv = (SurfaceView)findViewById
(R.id.SurfaceView01);
mp.setDisplay(sv.getHolder());
try {
mp.setDataSource(afd.getFileDescriptor(), 
afd.getStartOffset(),
afd.getLength());
mp.prepare();

} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
mp.start();
}
}


The XML


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





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Converting an image captured by camera to grayscale

2009-07-10 Thread Sharmila Chakraborty
Thank you very much!

On Wed, Jul 8, 2009 at 7:39 PM, Jack Ha  wrote:

>
> You can try something like the following:
>
>Bitmap grayscaleBitmap = Bitmap.createBitmap(
>colorBitmap.getWidth(), colorBitmap.getHeight(),
>Bitmap.Config.RGB_565);
>Canvas c = new Canvas(grayscaleBitmap);
>Paint p = new Paint();
>ColorMatrix cm = new ColorMatrix();
>cm.setSaturation(0);
>ColorMatrixColorFilter cmcf = new ColorMatrixColorFilter(cm);
>p.setColorFilter(cmcf);
>c.drawBitmap(colorBitmap, 0, 0, p);
>
> --
> Jack Ha
> Open Source Development Center
> ・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 Jul 8, 3:22 pm, Sharmila  wrote:
> > Hi guys,
> > I have a camera application that captures a 640x480 image.I want to
> > convert this image to grayscale.I know I have to use the setSaturatio
> > (float sat) in the ColorMatrix method to zero but I dnt know how I can
> > set it to grayscale...
> > Can someone please help me out?
> > Thanks.
> >
>

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



[android-developers] Re: Signing APK and "Conversion to Dalvik format failed with error 1"

2009-07-10 Thread Roman

Based on your description I assume that you can build successfully the
APK which is located in the bin folder of your project (of course it's
signed with the developer key).

Normally when you select the option "Android Tools->export unsigned
application package" a window pops up where you specify the location
of your new unsigned application. If this step does not work with your
application, did you try the steps with other applications to find out
whether it is related to your project or Eclipse setup?

You could also try to use the export Wizard to use your own keystore
to sign your application with your own key. The export wizard can be
found in the overview tab of your Manifest file. In this view you can
select exporting an unsigned APK or use your own created signature. Of
course to load an unsigned APK on a device you would have to go
through the signing process with your own created key.

--
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 Jul 9, 3:49 pm, Ian Gavalakis  wrote:
> update:
>
> when I try to "export unsigned" it fails because no APK was generated,
> likely due to the error.  again, reloas/build-again creates an exportable ak
> but it's signed with debug key... useless...
>
> p.s. Romain, please forgive me for including you, but you seem to be one of
> the best responders for Google on Android.  I spent a day on this issue w/o
> success.
>
> [2009-07-09 18:41:13 - EatAndRunDroid] ignored resource C:\Documents and
> Settings\gavalakis\workspace\EatAndRunDroid\bin\.\resources.ap_
> [2009-07-09 18:41:13 - EatAndRunDroid] Using default debug key to sign
> package
> [2009-07-09 18:41:13 - EatAndRunDroid] Packaging C:\Documents and
> Settings\gavalakis\workspace\EatAndRunDroid\bin\resources.ap_
> [2009-07-09 18:41:13 - EatAndRunDroid] Packaging classes.dex
> [2009-07-09 18:41:14 - EatAndRunDroid] Packaging
> /EatAndRunDroid/src/com/eatandrun/bft.gpx into com/eatandrun/bft.gpx
> [2009-07-09 18:41:14 - EatAndRunDroid] Build Success!
>
> -- Forwarded message --
> From: Ian 
> Date: Thu, Jul 9, 2009 at 6:28 PM
> Subject: Signing APK and "Conversion to Dalvik format failed with error 1"
> To: Android Developers 
>
> Help!
>
> I've been trying to use Eclipse and the Export Wizard to create a
> signed apk.
>
> unfortunately, I cannot seem to generate an UNSIGNED apk.  Every time
> I "clean and build" I get the error below, which I read I can get rid
> of by "reload" or refresh then building again.  however, the debugger
> automatically signs with the debug key after I do this, defeating the
> purpose.
>
> > how do I build the apk w/o signing it?
>
> -
> log excerpt:
> [2009-07-09 18:19:09 - EatAndRunDroid] Creating 'C:\Documents and
> Settings\gavalakis\workspace\EatAndRunDroid\bin\resources.ap_'
> [2009-07-09 18:19:09 - EatAndRunDroid] Writing all files...
> .STUFF.
> [2009-07-09 18:19:09 - EatAndRunDroid] Generated 18 files
> [2009-07-09 18:19:09 - EatAndRunDroid] Included 0 files from jar/zip
> files.
> [2009-07-09 18:19:09 - EatAndRunDroid] Checking for deleted files
> [2009-07-09 18:19:09 - EatAndRunDroid] Done!
> [2009-07-09 18:19:09 - EatAndRunDroid] ignored resource C:\Documents
> and Settings\gavalakis\workspace\EatAndRunDroid\bin\.\resources.ap_
> [2009-07-09 18:19:09 - EatAndRunDroid] no classfiles specified
> [2009-07-09 18:19:09 - EatAndRunDroid] Conversion to Dalvik format
> failed with error 1
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Unicode support

2009-07-10 Thread Mark Murphy

amiz wrote:
> Is there a document that lists the range of  unicode codes that
> Android supports.
> 
> I am trying to display  superscript 9 is \u2079 in a string and I get
> a block in the emulator.
> 
> Superscript 3 which is \u00b3 works

Try examining the desktop version of whichever font you are using in a
font editor or "character map" sort of tool. You can download the
TrueType fonts for Droid Sans, Droid Serif, and Droid Sans Mono from
various places online, depending on your development platform.

Assuming the fonts in the firmware match the TrueType fonts, you will be
able to tell that way which glyphs are supported.

-- 
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] Unicode support

2009-07-10 Thread amiz

Is there a document that lists the range of  unicode codes that
Android supports.

I am trying to display  superscript 9 is \u2079 in a string and I get
a block in the emulator.

Superscript 3 which is \u00b3 works

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: Cell Radio Info

2009-07-10 Thread ain

So have you been to see the listeners/managers?
Looks like either someone has the code or was able to access the
fieldtestMode

http://www.flickr.com/photos/12118...@n00/3258661437/in/set-72157613452472324

On Jul 9, 6:58 pm, Richard Schilling 
wrote:
> That's probably all you're going to get at the application layer,
> although from what I've seen the managers/listeners you've identified
> are pretty reliable.
>
> My guess would be that you need to debug the platform itself on a
> Linux box to get this information.  There's a field test mode in the
> phone, but I don't have the code here (google for them).  The RIL is
> buried pretty deeply in the Linux kernel 
>
> Richard Schilling
> Root Wireless
>
> On Jul 9, 7:46 am,ain wrote:
>
> > Is there a way I can get access to the following information from the
> > cell. I know that it uses a Qualcomm MSM7201A chip. I know qualcomm
> > unleashes a boat load of information such as:
> > Pilots-Channels
> > PN offset
> > Neighbours
> > Searches
> > PN Codes
> > Power Control-TX and RX
> > Slot
> > DRC
> > Signal Noise Ratio
> > Carrier to Noise Ratio
> > Energy to Noise Ratio
>
> > so the question is can I get access to all this information and are
> > there APIs from Android that I can use.
>
> > So far the closets I have come is in
> > telephony/PhoneStateListener
> > telephony/NeighboringCellInfo
> > telephony/CellLocation
> > telephony/TelephonyManager
>
> > any more help is welcome
>
> >ain
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 + pidgin = ???

2009-07-10 Thread Yusuf T. Mobile

Pidgin is a graphical front-end for libpurple using GTK+. (Thank you,
Wikipedia). So if you want Pidgin on Android, you could put an Android
UI on top of libpurple. libpurple is written in C, so you can use the
NDK for that part. An easier option would be to use a multiprotocol
library written in Java (e.g a Java alternative to libpurple), except
that I don't know of any.



Yusuf Saib
Android
·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 Jul 9, 10:08 pm, luoqii  wrote:
> Hi, every one , i want to know is there any one who are interest in
> porting integrating IM Pidgin to Android. As i know, in android
> market, there are several IM client, such as meebo,palringo, which are
> fine to us, but for me who reside in china, it's not enough, these IM
> client support QQ, fetion, and so on, and it's believed that these IM
> client are not open-source, so i want to do a porting working in
> Android.
>
> so , any advises are expected.
>
> THX
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Packaging SQLite DB for deployment

2009-07-10 Thread Jeff

I placed a file with my data in the assets directory.  You can then
access the file like this:

context.getResources().getAssets().open("session.txt")

and import your data.  I also run this import process in a separate
thread in the background.  That way the user isn't impacted or needs
to wait.

Jeff
http://trackmaster.trackaroo.com

On Jul 10, 5:56 am, André  wrote:
> Or, if you are working with the SQLiteOpenHelper base class, then you
> could export your DB to a text file (including CREATE TABLE, INSERT,
> etc.), place this in your "assets" folder and import the file in the
> overridden "onCreate" method of SQLiteOpenHelper.
>
> -- Andréhttp://android.rabold.org
>
> On 10 Jul., 14:26, Cezar Augustus Signori 
> wrote:
>
> > You could put it in your app raw directory.
>
> > On Jul 10, 4:38 am, Tez  wrote:
>
> > > Hi,
>
> > > I have an SQLite DB file. I wish to include the sqlite file with my
> > > apk. How do  i do that?
>
> > > Cheers,
> > > Earlence
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 Magic

2009-07-10 Thread Yusuf T. Mobile

As a T-Mobile employee, I discourage you in the strongest possible
terms from rooting your Magic and upgrading it to 1.5 at the same time
using this link: http://android-dls.com/wiki/index.php?title=Magic_Rooting


Yusuf Saib
Android
·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 Jul 10, 8:22 am, Nima  wrote:
> hi,
>
> We have bought new HTC Magic with the following specifications:
>
> 1.Firmware version- 1.5
> 2.Baseband Version - 62.52s.20.18U_3.22.20.17
> 3.Kernel Version- 2.6.27-cb85e129 htc-ker...@and18-2 #3
> 4.Build number-2.16.720.2 146733 CL#38755 release-keys
>
> Can any one please tell us  whether we can flash Android1.5 image
> under the following linkhttp://www.htc.com/www/support/android/adp.html
>
> Where we can get factory image for HTC Magic?
>
> Thanks&Regards,
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: /dev/video

2009-07-10 Thread mboehmer

What about /dev/pmem_camera ?

On 10 Jul., 10:46, mboehmer  wrote:
> Ist there a /dev/video device on Android or any other possibility,
> where I can grab the image of the cam on a binary basis?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Associate app to open email attachments

2009-07-10 Thread Alexey Krasnoriadtsev

You are correct that you should use contentResolver.openInputStream
(uri), to get the data from gmail attachments.

Default Email app, is very dumb and is hardcoded to only open audio
and image attachments.
(disclaimer, that was the case 6 month ago, the last time i looked at
it).


On Jul 8, 10:16 am, Mirko Nasato  wrote:
> Hi all,
>
> I've written an app that can handle the VIEW action for a given
> mimeType, say "application/foo". By adding the following to
> AndroidManifest.xml the Browser automatically uses my app to open
> downloads of that type:
>
>   
>      
>      
>      
>   
>
> The GMail app also tries to use my app to Preview attachments of that
> type, but it's passing a URI with scheme "gmail-ls://" rather than a
> "file://" URI. I guess I need to use a ContentProvider to get the
> attachment data, I haven't looked into that yet.
>
> But the real mystery is the Email app... there just doesn't seem any
> way to make it open the attachments.
>
> Any pointers? Opening attachments is a very common requirement of
> course, and I would expect the Android platform to encourage
> developers to write apps to handle more mime types. Instead I couldn't
> find any answers:
>
>  http://groups.google.com/group/android-developers/browse_thread/threa...
>  http://groups.google.com/group/android-developers/browse_thread/threa...
>
> Thanks
>
> Mirko
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Making a persistant content observer

2009-07-10 Thread Streets Of Boston

I'm not sure at all if this would work,
but have you tried to put the content-observer code inside a *service*
(instead of in your activity).

Start the service and keep it around.
And if the content changes, create a notification.
The notification can be noticed by the user and allows him/her to
start your activity.


On Jul 10, 10:14 am, "jrgraf...@googlemail.com"
 wrote:
> Hey guys,
>
> Quick question: I am trying to make a permanent contentObserver that
> observes content://sms. The way I do it atm is have an initial
> configure Activity with my application that calls the following code:
>
>                 ContentResolver contentResolver = getContentResolver();
>                 SMSHandler handler = new SMSHandler();
>                 SMSObserver resolver = new SMSObserver(handler);
>                 resolver.setApplication(this.getApplication());
>                 
> contentResolver.registerContentObserver(Uri.parse("content://sms"),
> true, resolver);
>
> Now this all works fine...for a while; it seems that about 20 minutes
> after exiting said activity the ContentObserver will get removed and I
> will need to re-launch the Configure Activity to re-attach it.
>
> Is there any way that I can make sure that this content observer can
> permanently listen for changes without ever being killed?
>
> Thanks in advance!
>
> -James
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Is there any way to get galk friend list at android?

2009-07-10 Thread Zhangbin Peng

Hi all,

I'm developing an android app that may use galk's friend.

I have an google account/password pair enter by the user, then how can
I

1) get a list of the account GTalk contacts or Google Contacts?
2) send a contact a message (via IChatSession.sendChatMessage() ?)
3) is there any GTalk API documents?

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] About localization: 'NOT_FOUND' kind of strings

2009-07-10 Thread Claudia

Hello,

I'm localizing an Android phone and I was given several thousand
strings (mostly xml) of many kinds (apps, framework, GUI, content,
graphics, manuals, etc).

Some of those strings are what I assume keys for the Apps message,
like: NOT_FOUND or UNKNOWN_ERROR in the strings of each app. I've
never had to translate those in Win Mo apps, but this is my first
Android phone, so I want to be sure. So should I just leave those
strings as they are?

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] wide character problem

2009-07-10 Thread Droid123

i have a problem with wide characters in android.

wprintf(L"hello world\n");

OUTPUT:
h

i'm compiling my code using ndk, pushing the executable on G1 phone
and running from shell. is there something else that needs to be done
to use wide characters? i even tried calling fwide(stdout, 1) before
printing but it gave the same result.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: conversion to dalvik format failed with error 1

2009-07-10 Thread Ian

please someone help with this...

i'm getting the same issue and I think it's preventing me from
releasing my APK. It looks like I cannot build the apk w/o Eclipse
using the debug key to sign it, but I need an unsigned apk.

I've used the wizard, that's not the issue.  The wizard just takes the
already signed apk (debug) and creates/"exports" another file but that
file seems messed up bcos when I run later with maps api the emulator
cannot access maps.

This all works when I actually want the debug-signed apk.  Yes, I
changed my map key references before compiling.

this is what i'd like to do:

1) get release key and maps key
2) compile unsigned apk
3) sign it
4) run it

unfortunately this "conversion issue" prevents unsigned apk,
instead, this happens:

1) got keys
2) compile fails
3) refresh then build again -> now compiles -> created debug SIGNED
apk -- bad
4) signed again with private -- seemed ok, but not?
5) emulate fails maps api access -> this worked when using debug key

i'm using gaymede eclipse with Android plugin 0.9.
I tried full reinstall of everything.

please help

below is jarsigner verification of doubly signed apk.

-Ian

$ jarsigner -verify -verbose EatAndRunDroid.apk

sm541696 Fri Jul 10 00:07:20 EDT 2009 assets/health.db
sm   994 Fri Jul 10 00:06:28 EDT 2009 res/drawable/eatandrun.png
sm  2004 Fri Jul 10 00:07:20 EDT 2009 res/layout/jog.xml
sm   908 Fri Jul 10 00:07:20 EDT 2009 res/layout/main.xml
sm  1212 Fri Jul 10 00:07:20 EDT 2009 res/layout/map.xml
sm   816 Fri Jul 10 00:07:20 EDT 2009 res/layout/row.xml
sm   920 Fri Jul 10 00:07:20 EDT 2009 res/layout/show_food.xml
sm  1860 Fri Jul 10 00:07:20 EDT 2009 res/layout/weight.xml
sm  5604 Fri Jul 10 00:07:20 EDT 2009 AndroidManifest.xml
sm  7948 Fri Jul 10 00:06:28 EDT 2009 resources.arsc
sm 65412 Fri Jul 10 00:07:20 EDT 2009 classes.dex
sm 10710 Fri Jul 10 00:07:20 EDT 2009 com/eatandrun/bft.gpx
1544 Fri Jul 10 00:07:20 EDT 2009 META-INF/MANIFEST.MF
1597 Fri Jul 10 00:07:20 EDT 2009 META-INF/CERT.SF
 916 Fri Jul 10 00:07:20 EDT 2009 META-INF/CERT.RSA

  s = signature was verified
  m = entry is listed in manifest
  k = at least one certificate was found in keystore
  i = at least one certificate was found in identity scope



On May 23, 3:50 pm, n5r11  wrote:
> This is my strange scenario.. maybe it will help someone:
>
> 1. On "Project/Build Automatically" checked I'm not getting any
> errors.
> 2. When I uncheck "Project/Build Automatically" and build, I'm not
> getting any errors.
> 3. When I clean and build (with "Project/Build Automatically"
> unchecked) i get: no classfiles specified; Conversion toDalvikformat
> failed with error 1
> 4. When I clean with "Project/Build Automatically" checked, I'm not
> getting any errors.
>
> On 13 мај, 22:18, Danny  wrote:
>
>
>
> > This seems to work,
> > but now I'm getting
> > "Could not find myapp.apk!"
>
> > On May 2, 10:05 am, CnmJbm  wrote:
>
> > > ok, it seems i fixed it on my environment.
>
> > > just delete the R.java (by refreshing the project) and rebuild the
> > > project.
>
> > > On May 2, 9:57 am, CnmJbm  wrote:
>
> > > > i got the sameerror, TOO!!!
>
> > > > May Day
>
> > > > On Apr 28, 3:57 pm, "chris.cap...@gmail.com" 
> > > > wrote:
>
> > > > > Hi,
>
> > > > > I just updated to SDK 1.5 and all of my projects are failing to build
> > > > > with the followingerror:
>
> > > > > [2009-04-28 15:53:23 - Utilities]noclassfilesspecified
> > > > > [2009-04-28 15:53:23 - Utilities]ConversiontoDalvikformatfailed
> > > > > witherror1
>
> > > > > ("Utilities" is the name of this specific project.)
>
> > > > > Any idea why? I'm on Ubuntu 9.04 x64. Before the update to 1.5
> > > > > everything worked fine. Thanks.
>
> > > > > Chris- Hide quoted text -
>
> - Show quoted text -

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



[android-developers] HTC Magic

2009-07-10 Thread Nima

hi,

We have bought new HTC Magic with the following specifications:

1.Firmware version- 1.5
2.Baseband Version - 62.52s.20.18U_3.22.20.17
3.Kernel Version- 2.6.27-cb85e129 htc-ker...@and18-2 #3
4.Build number-2.16.720.2 146733 CL#38755 release-keys

Can any one please tell us  whether we can flash Android1.5 image
under the following link
http://www.htc.com/www/support/android/adp.html

Where we can get factory image for HTC Magic?

Thanks&Regards,

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Speech Recognition application

2009-07-10 Thread campi

Hi,
such as the name of the topic says, I am developping an application
based on speech recognition. I intend to develop the recognition part.
Since it requires quite a lot of operations, I was wondering wether an
Android Phone, such as the Dev Phone 1, could handle it. So could I
develop such an application directly on the phone, or should I use a
server to take care of the recognition ?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Creating a rom image

2009-07-10 Thread BTR Naidu

Hi All,

I was wondering if we can create a rom image (not the adk) out of the
SDK and boot android on a hardware platform like OMAP 1623 by TI?

Regards
Naidu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] failed to show dymatic MapView

2009-07-10 Thread En

Hi ~~~

I want to show the map moving along the route, anyone have succeed to
realize that?

I have tried the method of LocationListener and MyLocationOverlay by
successfully loading
KML file, but still not succeed .

who can help me ?!

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



[android-developers] problem with get GPS data from KML file

2009-07-10 Thread En

hello~~

I created a mapView which I want to show the root by using KML file to
sending GPS data.
I both tried by the method of  LocationListener and
MyLocationOverlay , but unluckly still not to
succeed !

I can successfully to load KML file which has a few groups of GPS
datas , but only can get one or two groups of data .

who knows why???

please help me !!!

thank you !!!

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



[android-developers] Get GMail, Google Maps, GTalk, Market in other language

2009-07-10 Thread Fernando Manso (BrOkeR)
Hi there,

My rom is all in my language (spanish) except those applications. May be
someone can guide me to putting them in my language. I don't know if I have
to edit some locale file, or push the spanish apks files, or whatever.

Thanks in advance for your help.

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



[android-developers] Re: GPS Access Question

2009-07-10 Thread jnv

Hi,

I'm working through your gps example but I get a "sorry, app has
stopped unexpectedly" message when I run it on the emulator. My code
is pretty similar to the above. Any thoughts? (BTW, I made sure to
include the ACCESS_FINE_LOCATION permission line in the manifest.xml
file.)

Thanks,
-jnv



package example.app.gps;

import android.app.Activity;
import android.content.Context;
import android.location.Location;
import android.location.LocationManager;
import android.os.Bundle;
import android.widget.Toast;


public class GPS extends Activity {

private LocationManager loc_manager;
private Location location;

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

   // LocationManager gets GPS location
   loc_manager = (LocationManager) getSystemService
(Context.LOCATION_SERVICE);
   location = loc_manager.getLastKnownLocation("gps");

   Toast.makeText(this, "Location = " + location.getLatitude()
+ " , "
+ location.getLongitude(), 0);
}

}



On May 22, 7:29 am, Phil  wrote:
> Ah, thanks for the information!
>
> I did manage to get it working, but the only way I could get it to
> compile properly was by initializing the manager variable outside of
> the onCreate program with a simple "LocationManager manager;" making
> the later call simply "manager = (LocationManager) ... "prior to the
> function start. It does work fine now, though, as long as that line is
> in the code.
>
> On May 21, 4:11 pm, Mike Hearn  wrote:
>
> > Activity inherits from Context, so you don't need to specify a context
> > specifically anywhere. Eclipse will tell you the exact error if you
> > hover over the line, or use the window at the bottom.
>
> > Does that not work?
>
> > LocationManager manager = (LocationManager) getSystemService
> > (LOCATION_SERVICE);
> > String provider = manager.getBestProvider(new Criteria(), true);
> > Location location = manager.getLastKnownLocation(provider);
> > return location;
>
> > On May 21, 5:55 pm, Phil  wrote:
>
> > > Sorry if this is a stupid question- I'm still pretty new to Android
> > > and have been completely unable to figure this out after much google
> > > searching and hunting around in the documentation. *Note: I've been
> > > coding in Eclipse with the Android SDK plugins, using the Google APIs
> > >1.5version.
>
> > > I'm working on a project involving accessing theGPS, so I'm writing a
> > > simple program that will do nothing more than access the current
> > > location in order to familiarize myself with theGPScode.
>
> > > Based on the examples I have found, I came up with the following code.
>
> > > package com.example.gps;
>
> > > import android.app.Activity;
> > > import android.content.Context;
> > > import android.os.Bundle;
> > > import android.widget.Toast;
> > > import android.location.Location;
> > > import android.location.LocationManager;
> > > import android.location.Criteria;
>
> > > public class HelloGps extends Activity {
> > >     /** Called when the activity is first created. */
> > >     @Override
> > >     public void onCreate(Bundle savedInstanceState) {
> > >         super.onCreate(savedInstanceState);
> > >         setContentView(R.layout.main);
> > >         Context context = getContext();
>
> > >         Location location = getLocation(context);
>
> > >                 Toast.makeText(this, "Location = " + 
> > > location.getLatitude() + " , "
> > > + location.getLongitude(), 0);
> > >     }
>
> > >     public static Location getLocation(Context context)
> > >     {
> > >         LocationManager manager = (LocationManager)
> > > context.getSystemService(Context.LOCATION_SERVICE);
> > >         String provider = manager.getBestProvider(new Criteria(),
> > > true);
> > >         Location location = manager.getLastKnownLocation(provider);
> > >         return location;
> > >     }
>
> > > }
>
> > > The issue I am having deals with the "Context context = getContext()"
> > > line. Eclipse tells me that this is an error (but not why). It simply
> > > tells me I should change it to getBaseContext(). If I try this, then
> > > the program hangs. If I try removing it and running the getLocation()
> > > function without the context thrown in there at all, as I have seen in
> > > some other examples, then I get a similar error on the getSystemService
> > > () function call. Eclipse tells me I should rename it, but does not
> > > tell me why or what to.
>
> > > Any help at all would be incredible, and sorry again if this is a
> > > stupid question. Thanks!
>
> > > -Phil

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from thi

[android-developers] General UI Questions

2009-07-10 Thread bnovc

I just started trying to learn the Android SDK, and I've noticed that
it seems to lack a lot of documentation.

I was trying as a first exercise to add an "Every Day" option to the
alarm clock that would click the other items when it is checked. In
onPrepareDialogBuilder, I can check which index was clicked on, but I
don't know how to set the items to checked.

It seemed like I needed to use DialogPreference instead of
ListPreference in AlarmClock's RepeatPreference.java, but I don't
think I understand the relationship between DialogPreference,
ListPreference, and AlertDialog though.

If I change to a DialogPreference, I can add a LinearLayout in the
onCreate method, but it didn't make sense how I would add
CheckBoxPreferences to it. There's also a ToggleButton. Should I be
trying to add that instead? I can't find any examples of
DialogPreference being extended except in the Android code.

Thanks for any 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] android + pidgin = ???

2009-07-10 Thread luoqii

Hi, every one , i want to know is there any one who are interest in
porting integrating IM Pidgin to Android. As i know, in android
market, there are several IM client, such as meebo,palringo, which are
fine to us, but for me who reside in china, it's not enough, these IM
client support QQ, fetion, and so on, and it's believed that these IM
client are not open-source, so i want to do a porting working in
Android.

so , any advises are expected.

THX

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Low accuracy of the accelerometer Sensor

2009-07-10 Thread keyboardr

I'm not 100% familiar with this aspect of the G1, but I know Nintendo
had a similar problem with their Wiimotes.  That's why they have the
sensor bar set up: they couldn't get their accelerometers to be
accurate enough to track position.

On Jul 9, 2:23 pm, dilit  wrote:
> Sounds like some signal processing/filter math is in 
> order.http://www.cs.unc.edu/~welch/kalman/
>
> Anyone with experience?
> D
>
> On Jul 9, 1:18 pm, dilit  wrote:
>
> > Just in case,
>
> > We did calibrate our phones.
> > E.g. My phone's Gravity value is more like 8.7 vs 9.81.
> > While static, the phone's accel values were acceptable.
> > As soon as the phone was in motion, the acceleration (position)
> > data went out to lunch.
>
> > FYI,  marketing = lying 99% of the time.  IMO
>
> > On Jul 9, 1:05 pm, dilit  wrote:
>
> > > We are writing an application that uses acceleration sensor data to
> > > plot phone's movement in 3D.
> > > We are finding  gross inconsistencies in the actual data output by the
> > > sensor.  Also,  sampling rates
> > > vary greatly from 8 to 200 millis. (using System.currentTimeMillis())
>
> > > Specifically, when we try to draw a circle with G1 flat on the table
> > > all the time (filtering out gravity accel 9.8),
> > > most of the time we would get a plot of phone's position that is not a
> > > circle at all.  Lots of times, it would be close to a straight line.
> > > Sometimes, it would start drawing an arc, but would not close the
> > > circle shooting off in a random direction.
>
> > > We tried to eliminate the time variable, by substituting a constant
> > > time sampling rate (10 millis) to calculate phones position, but the
> > > result was
> > > very close to what we had before (shapewise).   Also, the acceleration
> > > in Z direction when the phone is displaced lying flat on a table (XY
> > > plane) varies too
> > > by +/- 2 units which is a lot.
>
> > > I do not think it is an error in our code, as we have checked it many
> > > times.  If there were an error indeed and the
> > > accelerometer worked properly, we would see a consistently wrong
> > > depiction of the phone's movement.  Unfortunately, repeating the same
> > > movement
> > > (circle) would produce sometimes wildly differently shaped plots.
>
> > > It all comes down to us wanting to know if that is indeed the case
> > > that the G1 accelerometer is very unreliable and inconsistent device
> > > when used for more or less precise
> > > measurements?  Is there some documentation/facts paper that would tell
> > > us just how reliable accelerometer is?
>
> > > Thanks for you help!
> > > Dmitriy

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Indication of user activity from a service

2009-07-10 Thread dadical

I need to determine if a user has interacted with the screen,
keyboard, or trackball from a background service.  I don't need to
know coordinates, or actual keystrokes.  I just need to understand if
they have interacted with the phone in any way.  Anyone have any
creative ways to do this?

It would be great if the screen/keyboard/keys/trackball were available
in a manner similar to the other Sensors available on the phone, but
it seems that access to input devices is restricted in services as
part of Android security policies.

Based on my research, I'm not finding much of a possibility, so here's
what I'm considering:

- using information related to the current processes/activities via
ActivityManager to guess if an activity is being interacted with.
Possibly the amount of CPU time would increase more rapidly if the
user is typing or touching the screen?  Seems fairly unreliable...
- using one of the sensors to attempt to determine interaction with
the phone.  Acceleromter fluctuations, magnetic field fluctuations,
tricorder :).
- something else?

Thanks for any creative suggestions.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Home Screen Sample

2009-07-10 Thread camandroid

Apparently bindFavorites() aims only to retrieve the favorite
application.
Since we don't have this file /system/etc/favorites.xml, we are not
obliged to manage it.

What I did is:
- initialize mFavorites at the top and
- fill it from favReader only if favReader != null.

of course at the step: mApplicationsStack.setFavorites(mFavorites);
  mFavorites is an empty list.
But this will prevent the crash in
ApplicationsStackLayout.stackApplications(List
applications, int childLeft, int childTop)
applications (comes from mFavorites) is then not null.

private void bindFavorites(boolean isLaunching) {
 if (!isLaunching || mFavorites == null) {

 if (mFavorites == null) {
 mFavorites = new LinkedList();
 } else {
 mFavorites.clear();
 }

 FileReader favReader = null;
 // Environment.getRootDirectory() is a fancy way of saying
ANDROID_ROOT or "/system".
final File favFile = new File(Environment.getRootDirectory
(), DEFAULT_FAVORITES_PATH);
try {
favReader = new FileReader(favFile);
} catch (FileNotFoundException e) {
Log.e(LOG_TAG, "Couldn't find or open favorites file "
+ favFile);
}

if (favReader != null) {
final Intent intent = new Intent(Intent.ACTION_MAIN,
null);
final PackageManager packageManager =
getPackageManager();

try {
  ...
 } catch (XmlPullParserException e) {
Log.w(LOG_TAG, "Got exception parsing favorites.",
e);
} catch (IOException e) {
Log.w(LOG_TAG, "Got exception parsing favorites.",
e);
}
}
}

mApplicationsStack.setFavorites(mFavorites);

}


This works fine for me.

I'd like to simulate the  /system/etc/favorites.xml
Anyone knows it format ?



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Signing APK and "Conversion to Dalvik format failed with error 1"

2009-07-10 Thread Ian

Help!

I've been trying to use Eclipse and the Export Wizard to create a
signed apk.

unfortunately, I cannot seem to generate an UNSIGNED apk.  Every time
I "clean and build" I get the error below, which I read I can get rid
of by "reload" or refresh then building again.  however, the debugger
automatically signs with the debug key after I do this, defeating the
purpose.

> how do I build the apk w/o signing it?

-
log excerpt:
[2009-07-09 18:19:09 - EatAndRunDroid] Creating 'C:\Documents and
Settings\gavalakis\workspace\EatAndRunDroid\bin\resources.ap_'
[2009-07-09 18:19:09 - EatAndRunDroid] Writing all files...
.STUFF.
[2009-07-09 18:19:09 - EatAndRunDroid] Generated 18 files
[2009-07-09 18:19:09 - EatAndRunDroid] Included 0 files from jar/zip
files.
[2009-07-09 18:19:09 - EatAndRunDroid] Checking for deleted files
[2009-07-09 18:19:09 - EatAndRunDroid] Done!
[2009-07-09 18:19:09 - EatAndRunDroid] ignored resource C:\Documents
and Settings\gavalakis\workspace\EatAndRunDroid\bin\.\resources.ap_
[2009-07-09 18:19:09 - EatAndRunDroid] no classfiles specified
[2009-07-09 18:19:09 - EatAndRunDroid] Conversion to Dalvik format
failed with error 1


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Signing APK and "Conversion to Dalvik format failed with error 1"

2009-07-10 Thread Ian Gavalakis
update:

when I try to "export unsigned" it fails because no APK was generated,
likely due to the error.  again, reloas/build-again creates an exportable ak
but it's signed with debug key... useless...

p.s. Romain, please forgive me for including you, but you seem to be one of
the best responders for Google on Android.  I spent a day on this issue w/o
success.


[2009-07-09 18:41:13 - EatAndRunDroid] ignored resource C:\Documents and
Settings\gavalakis\workspace\EatAndRunDroid\bin\.\resources.ap_
[2009-07-09 18:41:13 - EatAndRunDroid] Using default debug key to sign
package
[2009-07-09 18:41:13 - EatAndRunDroid] Packaging C:\Documents and
Settings\gavalakis\workspace\EatAndRunDroid\bin\resources.ap_
[2009-07-09 18:41:13 - EatAndRunDroid] Packaging classes.dex
[2009-07-09 18:41:14 - EatAndRunDroid] Packaging
/EatAndRunDroid/src/com/eatandrun/bft.gpx into com/eatandrun/bft.gpx
[2009-07-09 18:41:14 - EatAndRunDroid] Build Success!


-- Forwarded message --
From: Ian 
Date: Thu, Jul 9, 2009 at 6:28 PM
Subject: Signing APK and "Conversion to Dalvik format failed with error 1"
To: Android Developers 


Help!

I've been trying to use Eclipse and the Export Wizard to create a
signed apk.

unfortunately, I cannot seem to generate an UNSIGNED apk.  Every time
I "clean and build" I get the error below, which I read I can get rid
of by "reload" or refresh then building again.  however, the debugger
automatically signs with the debug key after I do this, defeating the
purpose.

> how do I build the apk w/o signing it?

-
log excerpt:
[2009-07-09 18:19:09 - EatAndRunDroid] Creating 'C:\Documents and
Settings\gavalakis\workspace\EatAndRunDroid\bin\resources.ap_'
[2009-07-09 18:19:09 - EatAndRunDroid] Writing all files...
.STUFF.
[2009-07-09 18:19:09 - EatAndRunDroid] Generated 18 files
[2009-07-09 18:19:09 - EatAndRunDroid] Included 0 files from jar/zip
files.
[2009-07-09 18:19:09 - EatAndRunDroid] Checking for deleted files
[2009-07-09 18:19:09 - EatAndRunDroid] Done!
[2009-07-09 18:19:09 - EatAndRunDroid] ignored resource C:\Documents
and Settings\gavalakis\workspace\EatAndRunDroid\bin\.\resources.ap_
[2009-07-09 18:19:09 - EatAndRunDroid] no classfiles specified
[2009-07-09 18:19:09 - EatAndRunDroid] Conversion to Dalvik format
failed with error 1

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 contact device with ADB from Windows NT?

2009-07-10 Thread Chenny

Hi All,
I can contact device with ADB tool from Linux PC. Such as:

  On Linux PC:
  $ export ADBHOST=XX.XX.XX.XX #(IP of Android device)
  $ adb kill-server (you must make sure adb path is set)
  $ adb shell

How could I do with Window NT adb?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] HTC Dream

2009-07-10 Thread Nima

Hi,

Can anyone please tell where we can get factory image for HTC Magic
device?
whether we can flash Android1.5 image under the following link
http://www.htc.com/www/support/android/adp.html to HTC Magic device

Thanks&Regards,

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Problems in using android to developing facebook applications .

2009-07-10 Thread Josh

I'm having this same problem with jaxb.  Anyone out there have any
idea why this happens?

On May 13, 3:04 am, daen  wrote:
> I have no idea yet.
> now I'm using CS to develop my android-facebook application.
> the PC working as a server,and android phone working as client.
> may be it will help you.
> best
> Daen
>
> On May 6, 3:25 am, Mad Donde  wrote:
>
> > I'm having the same problem here. Looks like it happens when you try
> > to add jaxb-api-2.1.jar and stax-api-1.0-2.jar to the classpath.
> > I found on the internet this 
> > link,http://code.google.com/p/android/issues/detail?id=314
> > where they fixed the error Conversion to Dalvik format failed with
> > error 2
> > Well, I tried anyway... Don't know if I did all right, but the problem
> > persists.
>
> > Any ideas?
>
> > On Apr 20, 7:41 am, daen  wrote:
>
> > > hi developers:
> > > I try to use facebook-java-api to wrote my android application .
> > > but I got some problems .
> > > when i import all the libs in facebook-java-api,My eclipse Could not
> > > find my apk.
>
> > > [2009-04-20 18:24:59 - android_test_facebook]
> > > --
> > > [2009-04-20 18:24:59 - android_test_facebook] Android Launch!
> > > [2009-04-20 18:24:59 - android_test_facebook] adb is running normally.
> > > [2009-04-20 18:24:59 - android_test_facebook] Could not find
> > > android_test_facebook.apk!
>
> > > --
> > > [2009-04-20 18:24:38 - android_test_facebook] warning: Ignoring
> > > InnerClasses attribute for an anonymous inner class that doesn't come
> > > with an associated EnclosingMethod attribute. (This class was probably
> > > produced by a broken compiler.)
> > > [2009-04-20 18:24:38 - android_test_facebook]
> > > trouble processing "javax/xml/bind/Binder.class":
> > > [2009-04-20 18:24:38 - android_test_facebook]
> > > Attempt to include a core VM class in something other than a core
> > > library.
> > > It is likely that you have attempted to include the core library from
> > > a desktop
> > > virtual machine into an application, which will most assuredly not
> > > work. If
> > > you really intend to build a core library -- which is only appropriate
> > > as
> > > part of creating a full virtual machine binary, as opposed to
> > > compiling an
> > > application -- then use the "--core-library" option to suppress this
> > > error
> > > message. If you go ahead and use "--core-library" but are in fact
> > > building
> > > an application, then please be aware that your build will still fail
> > > at some
> > > point; you will simply be denied the pleasure of reading this helpful
> > > error
> > > message.
> > > [2009-04-20 18:24:38 - android_test_facebook] 1 error; aborting
> > > [2009-04-20 18:24:38 - android_test_facebook] Conversion to Dalvik
> > > format failed with error 1
>
> > > --
> > > all the jars in facebook-java-api is:
> > > -
> > > activation-1.1.jar
> > > commons-lang-2.2.jar
> > > commons-logging-1.1.1.jar
> > > facebook-java-api-2.1.0.jar
> > > facebook-java-api-schema-2.1.0.jar
> > > json-20070829.jar
> > > runtime-0.4.1.3.jar
> > > commons-codec.jar
> > > jaxb-api-2.1.jar
> > > jaxb-impl-2.1.9.jar
> > > stax-api-1.0-2.jar
> > > -
>
> > > bset,
> > > -daen- Hide quoted text -
>
> > - Show quoted text -

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



[android-developers] Error on SharedPreferences for AppWidget

2009-07-10 Thread Stefano Sanna (gerdavax)

Hi.

I'm working on an AppWidget which manages settings using
SharedPreferences. I'm experiencing a strange behaviour (on a Dream)
on its configuration Activity:

1)  if I use software keyboard (that is: without opening physical
keyboard) to edit text, everything works fine and preferences are
stored. The happens if the application starts with keyboard already
open.

2) if I open physical keyboard (and activity is being restarted and
rendered in landscape), when saving preferences the widget does not
appear on the desktop. Sometimes I get an error message ("unable to
unlink" to the path of application's data).

It seems that, when restarted on keyboard open, the configuration
Activity looses ownership of its sharedpreferences.

Any idea?

Thank you.

Ciao,
Stefano.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 TTS from broadcast receiver

2009-07-10 Thread Dianne Hackborn
*sigh*  That solution you were given is utterly broken -- the restriction
placed on the context is to HELP people from doing stuff that is not
actually going to work all of the time (since your hosting process can be
killed any time after onReceive() returns, before onBind() comes back).  So
this person is deliberately being tricky to work around the help the system
is providing to not do something broken, so they can do something broken.

AG.

Could you please tell this person to stop this?  And I'll probably modify
the platform in the future to also impose this restriction on the other
context, to keep people from making this mistake.  Hopefully it doesn't
break too many apps. :p

On Fri, Jul 10, 2009 at 3:16 AM, nuno  wrote:

>
> Thanks Dianne,
>
> I tried a solution from John on the TTS group which worked well but I
> soon realised that trying to the stuff I need on the BR is just a lot
> more work and stupid :)
> I am now writing a big post-it on my screen with: "Broadcast Receivers
> are only to receive events and kick start services and activities
> where you do the stuff you want to do - NOTHING ELSE" :)
>
> Thanks again.
>
> Nuno
>
> (For other users: John's solution is:)
> quote:
> "Hi again,
> sorted it!
> you need to create a new context object from the TTS package context,
> like so -
> Context myContext = ctx.createPackageContext("com.google.tts", 0);
> where ctx is the context from your BroadcastReceiver. Now use
> myContext in your TTS constructor.
> John
> "
>
>
> On Jul 9, 6:28 pm, Dianne Hackborn  wrote:
> > You need to start your own service and do the work there.  There are
> > examples of this in APiDemos.
> >
> > On Thu, Jul 9, 2009 at 3:18 AM, nuno  wrote:
> >
> > > Hi all,
> > > I am trying to start TTS from a broadcast receiver and it as document
> > > an intent receiver can't bind the service.
> > > Is there a work around, I can't figure out how to start the service
> > > using startService(Intent, Bundle) any tips?
> > > Thanks,
> >
> > --
> > 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.
> >
>


-- 
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: Making a persistant content observer

2009-07-10 Thread Dianne Hackborn
Sorry, there is no support for this, besides ensuring you are always running
with a service...  and you should really really avoid that.  We deliberately
don't allow apps to be launched from content changes due to significant
concerns about how this can impact performance if a number of apps end up
getting launched each time there is a change in some content provider.

On Fri, Jul 10, 2009 at 7:14 AM, jrgraf...@googlemail.com <
jrgraf...@googlemail.com> wrote:

>
> Hey guys,
>
> Quick question: I am trying to make a permanent contentObserver that
> observes content://sms. The way I do it atm is have an initial
> configure Activity with my application that calls the following code:
>
>ContentResolver contentResolver = getContentResolver();
>SMSHandler handler = new SMSHandler();
>SMSObserver resolver = new SMSObserver(handler);
>resolver.setApplication(this.getApplication());
>
>  contentResolver.registerContentObserver(Uri.parse("content://sms"),
> true, resolver);
>
> Now this all works fine...for a while; it seems that about 20 minutes
> after exiting said activity the ContentObserver will get removed and I
> will need to re-launch the Configure Activity to re-attach it.
>
> Is there any way that I can make sure that this content observer can
> permanently listen for changes without ever being killed?
>
> Thanks in advance!
>
> -James
> >
>


-- 
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: Can only hear sound when playing video

2009-07-10 Thread Marco Nelissen

On Fri, Jul 10, 2009 at 8:36 AM, Alslayer wrote:
>
>> I'm pretty sure there was more than just "NullPointerException" in the
>> log. Where exactly did this exception occur?
>
> Here is the full error.
>
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604):
> java.lang.RuntimeException: Unable to start activity ComponentInfo
> {com.mycorp.myapp/com.mycorp.myapp.myapp}:
> java.lang.NullPointerException
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604):     at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> 2268)
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604):     at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
> 2284)
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604):     at
> android.app.ActivityThread.access$1800(ActivityThread.java:112)
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604):     at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604):     at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604):     at
> android.os.Looper.loop(Looper.java:123)
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604):     at
> android.app.ActivityThread.main(ActivityThread.java:3948)
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604):     at
> java.lang.reflect.Method.invokeNative(Native Method)
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604):     at
> java.lang.reflect.Method.invoke(Method.java:521)
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604):     at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
> (ZygoteInit.java:782)
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604):     at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604):     at
> dalvik.system.NativeStart.main(Native Method)
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604): Caused by:
> java.lang.NullPointerException
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604):     at
> com.mycorp.myapp.myapp.onCreate(myapp.java:35)
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604):     at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
> 1123)
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604):     at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> 2231)
> 07-10 08:21:04.030: ERROR/AndroidRuntime(11604):     ... 11 more
>
> The code from the last post has lines 32-49.

If I'm reading that correctly that means it is crashing on:
mp.setDisplay(sv.getHolder()) so either mp or sv is null.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 developers challenge 2

2009-07-10 Thread Yusuf T. Mobile

I am not an official nor a judge, but from my reading of the
preliminary rules posted so far, leveraging a server does not render
your entry ineligible.



Yusuf Saib
Android
·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 Jul 9, 11:15 pm, jonathan  wrote:
> I can not find a dedicated group for android developers challenge 2,
> so I'm posting the questions here:
> 1.are apps that rely on web service or do heavy backend processing on
> a remote server eligible?
> 2.are web sites that's optimized for android/smart phone eligible?  so
> the client side may simply be a light weight gui that opens the
> browser to the site.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 get the video stream from MediaRecorder?

2009-07-10 Thread manoj

hi,

I want to get the stream and send it to server directly by using
MediaRecorder.

Actually, I am able to record the video,and able to store it into
sdcard. Now I want to it to stream (live stream) to server rather than
storing it.

Can any one please suggest me how to do it?

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] How to get the h.263 file from the frames coming from Camera?

2009-07-10 Thread manoj

Hi I want to get the h.263 stream using Camera.

Actually, by using Camera, Camera.PreviewCallback, I am getting frames
(yuv format).

>From these frames I want to get the h.263 encoded stream.

Is there any class available in Android?

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: How can I use the hidden provider?

2009-07-10 Thread Romain Guy

You cannot, that's the whole point. These are private APIs that will
change from version to version, if you use them your application will
NOT run on "all public android systems."

On Fri, Jul 10, 2009 at 5:19 AM,
android.bu...@gmail.com wrote:
>
> As we know, Google has hidden some APIs on newer SDKs, some of
> providers(i.e. Telephony provider) are hidden, we can only seen in
> source code, but we can not use on the current SDK. So I wonder how we
> can use these providers. I know we integrate our own firmware,
> however, I wonder if we can solver this problem on the current SDK, so
> that my app can run on all public android system.
> >
>



-- 
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: How to Set the Wall Paper Programatically in android?

2009-07-10 Thread Romain Guy

All you have to do is call setWallpaper(), you do not need to
broadcast any intent, this will be done for you.

On Thu, Jul 9, 2009 at 11:56 PM, android.vinny wrote:
>
> HI Every One
>
> I have To set Wall Paper In application by writing the code
> programmatically.
>
> when i press the Grid view Image will get full screen . that image
> i should keep as a wall paper in the android mobile screen
>
> how can i do that in programatically.
>
> I have done some thing like this 
>
> is it correct or any other way to do it
>
> NotificationManager nm = (NotificationManager)
>     getSystemService(NOTIFICATION_SERVICE);
>     try
> {
>          Bitmap newwallpaper = Bitmap.createBitmap(null, 320, 240,
> mCurrentSelectedImage, mCurrentSelectedImage, null, true);
>          Canvas myCanvas = new Canvas
> (newwallpaper);
>          mImage.get(mCurrentSelectedImage).draw(myCanvas);
>          setWallpaper(newwallpaper);
>          broadcastIntent(new Intent
> (Intent.ACTION_WALLPAPER_CHANGED));
>          Toast.makeText(PhotoView.this, "" + nm,
> Toast.LENGTH_SHORT).show();
>
>     }
> can any body give me suggestions regarding this ...
>
> Thanks in advance.
> >
>



-- 
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: Can only hear sound when playing video

2009-07-10 Thread Alslayer

> I'm pretty sure there was more than just "NullPointerException" in the
> log. Where exactly did this exception occur?

Here is the full error.

07-10 08:21:04.030: ERROR/AndroidRuntime(11604):
java.lang.RuntimeException: Unable to start activity ComponentInfo
{com.mycorp.myapp/com.mycorp.myapp.myapp}:
java.lang.NullPointerException
07-10 08:21:04.030: ERROR/AndroidRuntime(11604): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2268)
07-10 08:21:04.030: ERROR/AndroidRuntime(11604): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
07-10 08:21:04.030: ERROR/AndroidRuntime(11604): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
07-10 08:21:04.030: ERROR/AndroidRuntime(11604): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
07-10 08:21:04.030: ERROR/AndroidRuntime(11604): at
android.os.Handler.dispatchMessage(Handler.java:99)
07-10 08:21:04.030: ERROR/AndroidRuntime(11604): at
android.os.Looper.loop(Looper.java:123)
07-10 08:21:04.030: ERROR/AndroidRuntime(11604): at
android.app.ActivityThread.main(ActivityThread.java:3948)
07-10 08:21:04.030: ERROR/AndroidRuntime(11604): at
java.lang.reflect.Method.invokeNative(Native Method)
07-10 08:21:04.030: ERROR/AndroidRuntime(11604): at
java.lang.reflect.Method.invoke(Method.java:521)
07-10 08:21:04.030: ERROR/AndroidRuntime(11604): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
07-10 08:21:04.030: ERROR/AndroidRuntime(11604): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
07-10 08:21:04.030: ERROR/AndroidRuntime(11604): at
dalvik.system.NativeStart.main(Native Method)
07-10 08:21:04.030: ERROR/AndroidRuntime(11604): Caused by:
java.lang.NullPointerException
07-10 08:21:04.030: ERROR/AndroidRuntime(11604): at
com.mycorp.myapp.myapp.onCreate(myapp.java:35)
07-10 08:21:04.030: ERROR/AndroidRuntime(11604): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
07-10 08:21:04.030: ERROR/AndroidRuntime(11604): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2231)
07-10 08:21:04.030: ERROR/AndroidRuntime(11604): ... 11 more

The code from the last post has lines 32-49.
Thank you for your help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Media AspectRatio

2009-07-10 Thread glory

Hi,

I am playing the video from the you tube link.But the video played by
my Application has different aspect ratio then what played by the
youtube application. How to play the video in the same aspect ratio as
that of the youtube application.

I am using Video View for playing the application.

Please help me out

Thanks in advance
Glory
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] TabHost + ListView + SMS == bug?

2009-07-10 Thread extrapedestrian

I have TabHost with ListView as tab content. ListView has context menu
that opens send SMS activity.
After returning from SMS screen when I try to switch tab ListView
disappears and can not be displayed for second tab until application
is restarted.

I made simple example if someone can confirm this issue, please follow
steps at the bottom:

public class TabHostListView extends TabActivity implements
TabHost.TabContentFactory {
/** Called when the activity is first created. */

private String mListOfResults[] = {"item1", "item2", "item3"};

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

TabHost.TabSpec spec=getTabHost().newTabSpec("First");
spec.setContent(this);
spec.setIndicator("First");
getTabHost().addTab(spec);

spec=getTabHost().newTabSpec("Second");
spec.setContent(this);
spec.setIndicator("Second");
getTabHost().addTab(spec);
}

@Override
public View createTabContent(String arg0) {
// create list here
LayoutInflater inflater = LayoutInflater.from(getBaseContext
());
ListView mLV = (ListView)inflater.inflate
(R.layout.list_layout, null);
mLV.setAdapter(new ArrayAdapter
(this,android.R.layout.simple_list_item_1,mListOfResults));
registerForContextMenu(mLV);
return mLV;
}

@Override
public void onCreateContextMenu(ContextMenu menu, View v,
ContextMenuInfo menuInfo) {
// Display sms action
super.onCreateContextMenu(menu, v, menuInfo);
menu.setHeaderTitle("Actions menu");
menu.add(0, 0, 0, "SMS");
}

public boolean onContextItemSelected(MenuItem item) {
/* Send SMS */
try {
String phone = "123123";
startActivity(new Intent(Intent.ACTION_VIEW, Uri.fromParts
("sms", phone, null)));
} catch (ActivityNotFoundException e) {
Toast.makeText(getBaseContext(), R.string.failed,
Toast.LENGTH_SHORT).show();
Log.e("EdithActivity", "SMS Contact failed" );
}
return super.onContextItemSelected(item);
}

}

list_layout xml file:



http://schemas.android.com/apk/res/android";
android:id="@+id/listTabView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>

Steps to reproduce the bug:

Start program  -> there are two tabs and a list.
Select list item with longpress -> Context menu appears.
Click SMS -> SMS app appears.
Type in few letters and press back -> Toast is displayed, and your are
back to test activity.
Try to switch to tab 2 -> there is no content in tab2! List is not
displayed!

Make sure you dont go to tab2 first, then it works ok!
Make sure you type few letters (at least one) in SMS window, if you
return immediately - it works ok too.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: A question regarding the MotionEvent

2009-07-10 Thread nEx.Software

The chances that your start and end location will be exactly the same
are slim to none. If you want to do it all in a regular old
onTouchEvent(), you'd want to have some sort or range... If down and
up occur within some small range such as within 10 or something like
that. Depending on what exactly you are trying to accomplish, you
might be better off implementing OnGestureListener.

On Jul 10, 4:11 am, zeeshan  wrote:
> Hi Dear,
>
> i need to have a left, right and click event in my App.
>
> i am trying it like below:
>
> @Override
> public boolean onTouch(View v, MotionEvent event) {
>
> switch (event.getAction()) {
>            case MotionEvent.ACTION_DOWN:
>
>                  startX = (int)event.getX();
>
>                  return true;
>             case MotionEvent.ACTION_UP:
>                  endX = (int)event.getX();
>
>                         if(startX == endX){
>                                                      // here i have
> the click code
>                           }
>
>                           else if(startX - endX >10 ){ // next page
>
>                                }
>                            else if(endX - startX >10 ){ //back page
>                                return true;
>
>                         }
>
>               return super.onTouchEvent(event);
>
> }
>
> ///
>
> left and right move works fine for me but the click doesn't work
> soemtime.
>
> i tried a separate onClickListener along with onTouchListener but
> onClickListener doesn't fire.
> i believe to have click event in onTouch but the problem is that,
> startX == endX comes true only on emulator not when we press finger on
> real device.
>
> please suggest how can i capture click in touch event?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 ANT not Eclipse, How do I add a 3rd party jar

2009-07-10 Thread Mark Murphy

moa wrote:
> I want to be able to add google's exteneded json library to my app
> (gson.jar). I can get it in the path so I can compile but it is not
> being bundled into the application when being deployed. How can I do
> this?

If you are using the stock Ant build.xml, just put the JAR in your
project's libs/ directory, and it will be included in the compile and
the APK packaging.

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

Android 1.5 Programming 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 send MMS in Android Mobile

2009-07-10 Thread Jimmy Huang

Thanks John,

Does I only import this MMS git to my application, I can have my
application send MMS probably? please give me tips. thanks very much!

Regards,
Jimmy

On Jul 10, 7:47 pm, john  wrote:
> You could send it programatically but you would probably need to look
> deep within the messaging application code.
>
> Start here -
>
> http://android.git.kernel.org/?p=platform/packages/apps/Mms.git;a=tre...
>
> good luck!
>
> On 7月10日, 上午9時47分, Jimmy Huang  wrote:
>
>
>
> > Thank Yusuf. Yes, I known this, but it will open up the messaging page
> > to ask user to select the receipient and send.  I will like to send
> > MMS directly from my application, don't need to popup the window
> > request the receipient, any idea?
>
> > Thanks,
> > Jimmy
>
> > On Jul 10, 8:47 am, "Yusuf T. Mobile"  wrote:
>
> > > GIYFhttp://jtribe.blogspot.com/2008/12/sending-mms-with-android.html
>
> > > Yusuf Saib
> > > Android
> > > ·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 Jul 9, 2:45 am, Jimmy Huang  wrote:
>
> > > > Dear All,
>
> > > > I would like to develop an  Android Application to allow the user to
> > > > send MMS on Mobile, does anyone know which API should be used?
>
> > > > Thanks,
> > > > Jimmy- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: two questions about MediaPlayer

2009-07-10 Thread Marco Nelissen

A path like "C:\somefile.3gp" has no meaning within the emulator.


On Thu, Jul 9, 2009 at 6:19 PM, tstanly wrote:
>
> under c:\
>
> thanks
>
> On 7月10日, 上午2時56分, Marco Nelissen  wrote:
>> On Wed, Jul 8, 2009 at 1:01 AM,tstanly wrote:
>>
>> > and i think that's not the formation of audio/video issue,
>>
>> > because I put the 3gp video in the /data/app
>> > and modify the path to:
>> > setVideoURI(Uri.parse("/data/app/2.3gp"));
>>
>> > now, it can work!
>>
>> > I am so confused.
>>
>> Where was the file before you put it in /data ?
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 only hear sound when playing video

2009-07-10 Thread Marco Nelissen

On Thu, Jul 9, 2009 at 8:21 PM, Alslayer wrote:
>
> I added the MediaPlayer.setDisplay() and I added a SurfaceView to my
> ui.  Now I get "The application stopped unexpectedly."  I looked in
> the debug log and the error says "NullPointerException".  Any help
> would be great.

I'm pretty sure there was more than just "NullPointerException" in the
log. Where exactly did this exception occur?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Making a persistant content observer

2009-07-10 Thread jrgraf...@googlemail.com

Hey guys,

Quick question: I am trying to make a permanent contentObserver that
observes content://sms. The way I do it atm is have an initial
configure Activity with my application that calls the following code:

ContentResolver contentResolver = getContentResolver();
SMSHandler handler = new SMSHandler();
SMSObserver resolver = new SMSObserver(handler);
resolver.setApplication(this.getApplication());

contentResolver.registerContentObserver(Uri.parse("content://sms"),
true, resolver);

Now this all works fine...for a while; it seems that about 20 minutes
after exiting said activity the ContentObserver will get removed and I
will need to re-launch the Configure Activity to re-attach it.

Is there any way that I can make sure that this content observer can
permanently listen for changes without ever being killed?

Thanks in advance!

-James
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Video with MediaRecorder

2009-07-10 Thread Zeeshan Muhammad
i tried this intent but it doesn't show anything

startActivityForResult(*new* Intent( android.provider.MediaStore.*
ACTION_VIDEO_CAPTURE*), 2);


On Thu, Jul 9, 2009 at 9:25 AM, hanged_man  wrote:

>
> i didn't read this whole thread but i think i got a clear idea of your
> problem, why don't you people just use out-of-the-box video recorder
> (using intents) instead of implementing your own and getting into lots
> of troubles ?
>
> Check out this:
>
> http://developer.android.com/reference/android/provider/MediaStore.html#ACTION_VIDEO_CAPTURE
>
> I haven't tried it yet but it should be very easy and i'm going to try
> it in the very near future, if anyone needs any help with it, please
> don't hesitate in sending me a private message
>  >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 ANT not Eclipse, How do I add a 3rd party jar

2009-07-10 Thread moa

Hi,

I want to be able to add google's exteneded json library to my app
(gson.jar). I can get it in the path so I can compile but it is not
being bundled into the application when being deployed. How can I do
this?

I am NOT using eclipse, so need to do it via the ant. I'm actually
using Netbeans as my ide and all works sweet but for this.


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



[android-developers] Sliding the view when opening Virtual Keyboard

2009-07-10 Thread Hazam

Hi guys,
I was wondering if there is a method for controlling the amount of the
View that gets scrolled when opening the virtual keyboard.
Right know it scrolls just enough for letting the relate EditText show
itself (and not perfectly too, like it scrolls fully in just after the
first typed character), but i need to scroll a little more to show
another widget together.

In Iphone we have *scrollRectToVisible*, do we have something similar
in Android 1.5?
Thanks

-Emanuele
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: EditText and Virtual Keyboard

2009-07-10 Thread Hazam

Hi Hong,
thanks for your reply.
I tried that but to no avail.
The reason seems to be that clicks and actions from virtual keyboard
do not follow the same
path that normal key and touch events do.
The get tunneled in an InputConnection, and things get REALLY
difficult for me to understand fully.
So i just override onCreateInputConnection and return a
BaseInputConnection and now it works.
thanks again for the reply,

-Emanuele

On Jun 30, 12:01 am, Hong  wrote:
> I'm not sure if this will help 
> you:http://developer.android.com/reference/android/widget/TextView.OnEdit...
>
> But looks like some IME related actions you can catch.
>
> Please let us know if it works...
>
>
>
> On Wed, Jun 24, 2009 at 4:36 AM, Hazam wrote:
>
> > Folks,
> > is there nobody having the same problem?
> > Did I explain I clearly?
>
> > The problem is that if i press some of the virtual keyboard keys, they
> > do not cause a onKeyDown event;
> > this happens with keys '/','!' and such.
>
> > While if i press physical emulator keys, (even the same keys), they
> > do.
> > Could you give me some feedback on this, even a pointer to some code
> > to study
> > Thanks
>
> > On 22 Giu, 20:22, Emanuele Di Saverio 
> > wrote:
> >> Hi all,
> >> I was fillding with EditText and handling of events, and I was wondering on
> >> a strange thing:
>
> >> If you press some of the keys (for example forward slash '/') on the
> >> emulated physical keyboard, the keyevents are called
> >> as usual (onKeydown, the KeyListeners etc).
> >> If I click on the corresponding virtual key on the onscreen virtual
> >> keyboard, all these callbacks do not get called at all!
> >> This is strange, given that If I press other keys like alhpanumerical, the
> >> events are called.
>
> >> Can someone explain me this behaviour of the EditText component?
> >> Thanks a lot
>
> >> -Emanuele
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Packaging SQLite DB for deployment

2009-07-10 Thread André

Or, if you are working with the SQLiteOpenHelper base class, then you
could export your DB to a text file (including CREATE TABLE, INSERT,
etc.), place this in your "assets" folder and import the file in the
overridden "onCreate" method of SQLiteOpenHelper.

-- André
http://android.rabold.org


On 10 Jul., 14:26, Cezar Augustus Signori 
wrote:
> You could put it in your app raw directory.
>
> On Jul 10, 4:38 am, Tez  wrote:
>
> > Hi,
>
> > I have an SQLite DB file. I wish to include the sqlite file with my
> > apk. How do  i do that?
>
> > Cheers,
> > Earlence
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Demo App

2009-07-10 Thread UK Android Apps UK Android Apps

Hi,

I want to release a demo version of my app.

I added a restriction that the app could only be used 5 times by
storing a counter in the db.

However a user can easily uninstall and install the demo again!

What the best way to manage this?

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



[android-developers] Re: GPS signal strength

2009-07-10 Thread Sujay Krishna Suresh
@kalyan
Thnx for the reply John... I need both informations and any kinda sample
code would be of gr8 help...
Regards,
Kalyan Simhan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Packaging SQLite DB for deployment

2009-07-10 Thread Cezar Augustus Signori

You could put it in your app raw directory.

On Jul 10, 4:38 am, Tez  wrote:
> Hi,
>
> I have an SQLite DB file. I wish to include the sqlite file with my
> apk. How do  i do that?
>
> Cheers,
> Earlence
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How can I use the hidden provider?

2009-07-10 Thread android.bu...@gmail.com

As we know, Google has hidden some APIs on newer SDKs, some of
providers(i.e. Telephony provider) are hidden, we can only seen in
source code, but we can not use on the current SDK. So I wonder how we
can use these providers. I know we integrate our own firmware,
however, I wonder if we can solver this problem on the current SDK, so
that my app can run on all public android system.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Calendar

2009-07-10 Thread Rafael Sexta
Hi people,
I have o develop somethings in a android calendar to works with events in
the calendar, but someone sad to me that the informations have to be synch
with the blur account and it isnt recorded just in the phone.
Someone knows how the calendar works?? or someone knows how i can
communicate with the caledar events??

thanks
Regards

Rafael Sexta

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 send MMS in Android Mobile

2009-07-10 Thread john

You could send it programatically but you would probably need to look
deep within the messaging application code.

Start here -

http://android.git.kernel.org/?p=platform/packages/apps/Mms.git;a=tree;h=refs/heads/master;hb=master

good luck!

On 7月10日, 上午9時47分, Jimmy Huang  wrote:
> Thank Yusuf. Yes, I known this, but it will open up the messaging page
> to ask user to select the receipient and send.  I will like to send
> MMS directly from my application, don't need to popup the window
> request the receipient, any idea?
>
> Thanks,
> Jimmy
>
> On Jul 10, 8:47 am, "Yusuf T. Mobile"  wrote:
>
>
>
> > GIYFhttp://jtribe.blogspot.com/2008/12/sending-mms-with-android.html
>
> > Yusuf Saib
> > Android
> > ·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 Jul 9, 2:45 am, Jimmy Huang  wrote:
>
> > > Dear All,
>
> > > I would like to develop an  Android Application to allow the user to
> > > send MMS on Mobile, does anyone know which API should be used?
>
> > > Thanks,
> > > Jimmy- Hide quoted text -
>
> > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: GPS signal strength

2009-07-10 Thread John Smith
2009/7/10 kalyan simhan 

> hi all..
> how can i get the gps signal strength.. and the number of satellites..
> im using android 1.1 sdk.. kindly help!  thanks in advance!!


You need to grab GPS status messages, and are you after signal strength or
something more useful like dilution of precision?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Got InflateException in my MapView xml file

2009-07-10 Thread Mark Murphy

Victor Lin wrote:
> 
> http://schemas.android.com/apk/res/android";
>   package="com.ez2learn.android.powergrid"
>   android:versionName="1.0" android:versionCode="4">
> 
>android:label="@string/app_name">
> 
> 
>  android:name="android.intent.category.LAUNCHER" />
> 
> 
>  library>
> 
> 
> 
>  permission>
> 

Try moving the  and
  lines closer to the top of the
file, so  is the first child of  and 
is the first child of . The Android XML parsing logic
sometimes is position-dependent, and I usually see these at the tops of
files, not the bottom.

More generally, see if you can get any existing, known-to-work mapping
examples running, then start to adjust your code to more closely match
what is in the example.

Also, is your AVD set for target 3 (-t 3)? If it is a target 2 AVD,
there is no mapping library.

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

Looking for Android opportunities? 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] Re: Got InflateException in my MapView xml file

2009-07-10 Thread Victor Lin


http://schemas.android.com/apk/res/android";
  package="com.ez2learn.android.powergrid"
  android:versionName="1.0" android:versionCode="4">














On 7月10日, 下午6時20分, Mark Murphy  wrote:
> Victor Lin wrote:
> > Hi,
>
> > I am building a application that use MapView.
>
> > This is the map.xml file I create in layout folder:
>
> > "
> > http://schemas.android.com/apk/res/
> > android"
> >     android:id="@+id/MapLayout"
> >     android:orientation="vertical"
> >     android:layout_width="fill_parent"
> >     android:layout_height="fill_parent" >
>
> >      >         android:id="@+id/MapView"
> >         android:layout_width="fill_parent"
> >         android:layout_height="fill_parent"
> >         android:clickable="true"
> >         android:apiKey="**"
> >     />
>
> > "
>
> > And I set it as content view in onCreate:
>
> > setContentView(R.layout.map);
>
> > Then once I start up the program, I got a exception:
>
> > android.view.InflateException: Binary XML file line #8: Error
> > inflating class java.lang.reflect.Constructor
>
> > I do add "uses library" in manifest. It seems there is nothing wrong
> > in xml file. What am I doing wrong? How to fix it?
>
> Could you post your manifest?
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Development Wiki:http://wiki.andmob.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



  1   2   >