[android-developers] Re: ADC2 deadline

2009-08-24 Thread CraigsRace

http://www.meetup.com/svandroid/messages/7262249/

On Aug 24, 3:50 pm, rizwan rizcs...@gmail.com wrote:
 Hi ,

 can anyone from Google let us know the exact date of submission of
 ADC2 Applications. or Google is extending date . I m very much curious
 about it . please let us know.

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

2009-08-24 Thread Khurram Samad

I was so upset with the delay that i finally gave up and released the
application at Android Store :)

Check out Gang War Lite


On Aug 19, 5:44 pm, mscwd01 mscw...@gmail.com wrote:
 I'd like it postponed a month please ;)

 It would be good to know either way though...

 On Aug 17, 7:43 pm, cindy ypu01...@yahoo.com wrote:



  I have question too. Google should update theADCofficial site to
  tell us what happends.

  On Aug 16, 11:11 am, siuying siu.y...@gmail.com wrote:

   Glad to hear that I'm not the only one having this question!

   On 8月15日, 下午12時36分, sleith raysle...@gmail.com wrote:

Hi, i've just purchased to be an android developer
when i visithttp://market.android.com/publish, i don't see anything
about publish foradc2
how to submit app foradc2 ?
thank you- 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] content provider implementation

2009-08-24 Thread vishal bhoj
Hello Everyone,

Can anyone explain the usage of selection and slectionargs  in content
provider implementation? It states that it filters the rows.


Is it possible to filter based on substrings in the rows?

example db entry has
 _DATA
fun/abc/1
fun/abc/2
fun/abc/3
fun/xyz/1
fun/xyz/2
fun/xyz/3

Can I qwery my content provider to return data column with abc entries?


-- 
with regards vishal

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Problem with Dialog theme when launching from another activity

2009-08-24 Thread ANKIT SOMANI
Problem is with the Child activity, with the Theme.dialog



2009/8/24 ANKIT SOMANI ankitsomani...@gmail.com

 Hi all,

 I am facing a strange problem. I have 2 activities.  The Second activity
 having the theme.Dialog (set in manifest). when I launched the second
 activity from first activity via startActivityforResult(). The Second
 activity is not Visible. When i minimize it  launched it again then its
 showing.

 ahere are my 2 classes.

 Activity 1 :

 package com.startActivityTest;

 import android.app.Activity;
 import android.content.Intent;
 import android.os.Bundle;

 public class StartActivityTest extends Activity {
 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 Intent intent = new Intent();

 setContentView(R.layout.main);


 intent.setClassName(com.startActivityTest,com.startActivityTest.StartActivityTest1);


 startActivityForResult(intent,1);

 }
 }

 Activity 2 :

 package com.startActivityTest;

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

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



 main.xml


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


 main2.xml

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


 AndroidManifest.xml

 ?xml version=1.0 encoding=utf-8?
 manifest xmlns:android=http://schemas.android.com/apk/res/android;
   package=com.startActivityTest
   android:versionCode=1
   android:versionName=1.0
 application android:icon=@drawable/icon
 android:label=@string/app_name
 activity android:name=.StartActivityTest
   android:label=Launcher Acitivity
 intent-filter
 action android:name=android.intent.action.MAIN /
 category android:name=android.intent.category.LAUNCHER
 /
 /intent-filter
 /activity

 activity android:name=.StartActivityTest1
 android:theme=@android:style/Theme.Dialog
   android:label=Dialog Activity
 intent-filter
 action android:name=android.intent.action.MAIN /
 category android:name=android.intent.category.DEFAULT /
 /intent-filter
 /activity

 /application
 uses-sdk android:minSdkVersion=3 /
 /manifest


 please suggest any solution or correct me if i am wrong.

 Thanks in Advance.




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



[android-developers] Re: How to capture and save the image of Google Map(MapView)...

2009-08-24 Thread idoun

I solved this problem.

The main issue of this problem is that the MapView class extends View
class has 0 value of width and height. (I think every View classes
have this issue...)

To set the right size what I want, I extended the MapView to MyMapView
and overrided protected onSizeChanged method into MyMapView.

And I called that method before saving the map.

Then It works!


Additionally, I should attach menu button to my app. for saving the
map because the loading method of the map is asynchronous as you
know
Saving process is ended before loading the map if the process is in
the onCreate method. :)



On Aug 21, 9:10 pm, idoun idou...@gmail.com wrote:
 Dear Developers!

 I'm trying to develop a map application which can save some part of
 map inside a phone.

 So, refering to the example of google developer site, I created my
 activity that using theMapViewclass to display the location what I
 want to see. It works.

 And I attached some code to save that view into png format file using
 Bitmap and Canvas classes. But it didn't work.

 One image file was created but it didn't contain any information of
 the map. I don't know the reason why those codes didn't work and
 couldn't find any related information on the Web...

 code is...

 public class AndroidTest extends MapActivity {

        MapViewmapView;
         ListOverlay mapOverlays;
         Drawable drawable;
         HelloItemizedOverlay itemizedOverlay;

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

                 // build map and mark point
                mapView= (MapView) findViewById(R.id.mapview);
                mapView.setBuiltInZoomControls(true);

                 mapOverlays =mapView.getOverlays();
                 drawable = this.getResources().getDrawable
 (R.drawable.androidmarker);
                 itemizedOverlay = new HelloItemizedOverlay(drawable);

                 GeoPoint point = new GeoPoint(1924, -9912);
                 OverlayItem overlayitem = new OverlayItem(point, , );

                 itemizedOverlay.addOverlay(overlayitem);
                 mapOverlays.add(itemizedOverlay);

                 // copyMapViewto canvas
                 Bitmap bitmap = Bitmap.createBitmap(400, 800,
 Bitmap.Config.ARGB_);
                 Canvas canvas = new Canvas(bitmap);
                mapView.draw(canvas);

                 // save it!
                 FileOutputStream fo = null;

                 try {
                         fo = this.openFileOutput(test.png, 
 Context.MODE_WORLD_WRITEABLE);
                 } catch (FileNotFoundException e) {
                         e.printStackTrace();
                 }

                 bitmap.compress(CompressFormat.PNG, 100, fo);

                 try {
                         fo.flush();
                 } catch (IOException e) {
                         e.printStackTrace();
                 }

                 try {
                         fo.close();
                 } catch (IOException e) {
                         e.printStackTrace();
                 }
         }

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



[android-developers] Re: IllegalArgumentException occur: parameter must be a descendant of this view in ViewGroup.java:2454

2009-08-24 Thread Romain Guy

This issue is fixed in Donut but the source code available in the open
is not the latest version.

2009/8/24 Justin chih.ting@gmail.com:

 This issue still happened in Donut.

 I want to describe my structure first. There are two main view in my
 Activity, one is Gallery another is a FrameLayout, I named it
 FullSizeViewer which can show fit-to-screen photo. When tapping a
 photo in Gallery, the screen changes to FullSizeViewer. FullSizeViewer
 adds and removes from PhoneWindow dynamically.
 The Gallery and FullSizeViewer load photo from SD card dynamically
 (Loading and decoding in the other thread, and posted bitmap back to
 main thread).

 I found there is a member variable called 'mRealFocusedView' in
 ViewRoot which sets to a wrong view (the view doesn't detach to any
 parent) when this exception occurs and ViewRoot uses this wrong view
 to calculating scroll distance and drawing rectangle.

 In my case, when tapping a photo in Gallery and enter in
 FullSizeViewer, the mRealFocusedView of ViewRoot is correct basically.
 Sometimes the mRealFocusedView of ViewRoot is the Gallery's child
 view. At this moment, this issue occurs.

 I tried to set visibility of Gallery's child view to GONE and it is
 not help because the 'mRealFocusedView' of ViewRoot still not correct
 view.
 I also tried to not dynamically add or remove FullSizeViewer, but this
 issue still happened.

 The only way to solve this issue is use two Activities, one Activity
 contains Gallery, and another contains FullSizeViewer.
 But it is too slow when activity change and the screen will become
 black for a while.
 It is not acceptable for me. Besides, I need to do some transition
 animation when changing from Gallery to FullSizeViewer.
 If I use two Activities, the animation can not be implemented.

 I have tried to clear 'mRealFocusedView' to null by calling the
 'clearChildFocus' of decoreView before the moment of exception
 happened.
 It only can reduce the probability of this issue but it can't really
 fix this issue.

 There are three situations easily to reproduce this issue.
 1. Device is busy.
 2. When tapping photo in Gallery, keep using track ball to scroll the
 Gallery.
 3. When you scroll or re-layout the Gallery, press Google search key
 and then press back immediately.

 Is there any solution or work-around to prevent this issue happen?

 Here are my logs:

 08-21 09:43:31.583 W/dalvikvm(  863): threadid=3: thread exiting with
 uncaught exception (group=0x4001db88)
 08-21 09:43:31.583 E/AndroidRuntime(  863): Uncaught handler: thread
 main exiting due to uncaught exception
 08-21 09:43:31.693 E/AndroidRuntime(  863):
 java.lang.IllegalArgumentException: parameter must be a descendant of
 this view
 08-21 09:43:31.693 E/AndroidRuntime(  863): at
 android.view.ViewGroup.offsetRectBetweenParentAndChild(ViewGroup.java:
 2519)
 08-21 09:43:31.693 E/AndroidRuntime(  863): at
 android.view.ViewGroup.offsetDescendantRectToMyCoords(ViewGroup.java:
 2456)
 08-21 09:43:31.693 E/AndroidRuntime(  863): at
 android.view.ViewRoot.scrollToRectOrFocus(ViewRoot.java:1554)
 08-21 09:43:31.693 E/AndroidRuntime(  863): at
 android.view.ViewRoot.draw(ViewRoot.java:1291)
 08-21 09:43:31.693 E/AndroidRuntime(  863): at
 android.view.ViewRoot.performTraversals(ViewRoot.java:1174)
 08-21 09:43:31.693 E/AndroidRuntime(  863): at
 android.view.ViewRoot.handleMessage(ViewRoot.java:1769)
 08-21 09:43:31.693 E/AndroidRuntime(  863): at
 android.os.Handler.dispatchMessage(Handler.java:99)
 08-21 09:43:31.693 E/AndroidRuntime(  863): at
 android.os.Looper.loop(Looper.java:123)
 08-21 09:43:31.693 E/AndroidRuntime(  863): at
 android.app.ActivityThread.main(ActivityThread.java:4203)
 08-21 09:43:31.693 E/AndroidRuntime(  863): at
 java.lang.reflect.Method.invokeNative(Native Method)
 08-21 09:43:31.693 E/AndroidRuntime(  863): at
 java.lang.reflect.Method.invoke(Method.java:521)
 08-21 09:43:31.693 E/AndroidRuntime(  863): at
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
 (ZygoteInit.java:791)
 08-21 09:43:31.693 E/AndroidRuntime(  863): at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
 08-21 09:43:31.693 E/AndroidRuntime(  863): at
 dalvik.system.NativeStart.main(Native Method)


 On 8月20日, 上午1時15分, Yusuf Saib (T-Mobile USA) yusuf.s...@t-
 Mobile.com wrote:
 Or you could git donut.

   ___
.-   -.
  .'   . ;   `.
 /: . ' :  \
|   `  .-. . '  |
|  :  (   ) ; ` |
|   :  `-'   :  |
 \   .` ;  :   /
  `.   . '   .'
`-.___.-'

 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 Aug 19, 

[android-developers] Re: adc2 submission site

2009-08-24 Thread an0

If the time window is too small, any little problems may cause you
miss it. Also consider the sudden surge of submissions in the same
time.

On Aug 20, 4:44 am, Maps.Huge.Info (Maps API Guru)
cor...@gmail.com wrote:
 As long as the site opens before the end of the month, what difference
 does it make?

 -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] why padding can't use

2009-08-24 Thread tstanly

hi all,

because my layout have a listview and tab widget,
so I must set padding for seperating they,

but when I use the
android:padding=10px
in the layout of xml file,

there is nothing happen in the emulator screen,


so how can I do for the padding??


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: what permission to us ContentResolver cr = getContentResolver(); ???

2009-08-24 Thread Dany BREARD

Thanks you very much Dianne

I called that on an other class Client out of my oncreate so now I
don't have any error

Dany

On Aug 21, 6:52 pm, Dianne Hackborn hack...@android.com wrote:
 There is no permission for that (notice the error you are getting is NOT
 SecurityException).  My guess is you are calling this on an Activity or
 Service before onCreate() is called.



 On Fri, Aug 21, 2009 at 7:16 AM, Dany BREARD dany.bre...@gmail.com wrote:

  Hi

  I try to use a lot of permission to use

  ContentResolver cr = getContentResolver();

  but i always have an  ERROR Exception: java.lang.NullPointerException

  my code is just :

             try {
                 ContentResolver cr = getContentResolver();
             }
             catch(Exception e){
                  Log.v(TAG, ERROR Exception:  + e);
             }

  and i try to use :

  uses-permission android:name=android.permission.INTERNET/

     uses-permission
  android:name=android.permission.SUBSCRIBED_FEEDS_WRITE/

     uses-permission
  android:name=android.permission.SUBSCRIBED_FEEDS_READ/

     uses-permission
  android:name=android.permission.WRITE_OWNER_DATA/

     uses-permission android:name=android.permission.WRITE_SETTINGS/

     uses-permission
  android:name=android.permission.ACCESS_CHECKIN_PROPERTIES/

  Do you know what kind of permission I have to use ?

 --
 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: How to slow down SensorEventListener ?

2009-08-24 Thread DaminouU



On Aug 21, 7:32 pm, Donn Felker donnfel...@gmail.com wrote:
 Cant you set a timer or time the events between readings? Example, when the
 sensor is fired (which goes very fast as you know) throw a simple
 if(mTimeElapsed  2000) { // do stuff }

 That would work, wouldnt it?



 On Fri, Aug 21, 2009 at 9:32 AM, DaminouU dam.le...@gmail.com wrote:

  Hi,

  I am currently using sensors and I would like to know if I can slow
  down the sampling rate.
  Indeed, I register my listener with the constant
  SensorManager.SENSOR_DELAY_UI
  (is it the slowest one of the four constants mentionned in the
  documentation?)
  but the rate is still quite high. I would like to be able to define
  the time before giving the new value (For example, I would like to
  wait two seconds before update).

  Does someone have any idea to do that?

  Thanks,

  D.

 --
 Donnhttp://blog.donnfelker.com/

All right,
I will try your solution.

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



[android-developers] Re: IllegalArgumentException occur: parameter must be a descendant of this view in ViewGroup.java:2454

2009-08-24 Thread Justin

This issue still happened in Donut.

I want to describe my structure first. There are two main view in my
Activity, one is Gallery another is a FrameLayout, I named it
FullSizeViewer which can show fit-to-screen photo. When tapping a
photo in Gallery, the screen changes to FullSizeViewer. FullSizeViewer
adds and removes from PhoneWindow dynamically.
The Gallery and FullSizeViewer load photo from SD card dynamically
(Loading and decoding in the other thread, and posted bitmap back to
main thread).

I found there is a member variable called 'mRealFocusedView' in
ViewRoot which sets to a wrong view (the view doesn't detach to any
parent) when this exception occurs and ViewRoot uses this wrong view
to calculating scroll distance and drawing rectangle.

In my case, when tapping a photo in Gallery and enter in
FullSizeViewer, the mRealFocusedView of ViewRoot is correct basically.
Sometimes the mRealFocusedView of ViewRoot is the Gallery's child
view. At this moment, this issue occurs.

I tried to set visibility of Gallery's child view to GONE and it is
not help because the 'mRealFocusedView' of ViewRoot still not correct
view.
I also tried to not dynamically add or remove FullSizeViewer, but this
issue still happened.

The only way to solve this issue is use two Activities, one Activity
contains Gallery, and another contains FullSizeViewer.
But it is too slow when activity change and the screen will become
black for a while.
It is not acceptable for me. Besides, I need to do some transition
animation when changing from Gallery to FullSizeViewer.
If I use two Activities, the animation can not be implemented.

I have tried to clear 'mRealFocusedView' to null by calling the
'clearChildFocus' of decoreView before the moment of exception
happened.
It only can reduce the probability of this issue but it can't really
fix this issue.

There are three situations easily to reproduce this issue.
1. Device is busy.
2. When tapping photo in Gallery, keep using track ball to scroll the
Gallery.
3. When you scroll or re-layout the Gallery, press Google search key
and then press back immediately.

Is there any solution or work-around to prevent this issue happen?

Here are my logs:

08-21 09:43:31.583 W/dalvikvm(  863): threadid=3: thread exiting with
uncaught exception (group=0x4001db88)
08-21 09:43:31.583 E/AndroidRuntime(  863): Uncaught handler: thread
main exiting due to uncaught exception
08-21 09:43:31.693 E/AndroidRuntime(  863):
java.lang.IllegalArgumentException: parameter must be a descendant of
this view
08-21 09:43:31.693 E/AndroidRuntime(  863): at
android.view.ViewGroup.offsetRectBetweenParentAndChild(ViewGroup.java:
2519)
08-21 09:43:31.693 E/AndroidRuntime(  863): at
android.view.ViewGroup.offsetDescendantRectToMyCoords(ViewGroup.java:
2456)
08-21 09:43:31.693 E/AndroidRuntime(  863): at
android.view.ViewRoot.scrollToRectOrFocus(ViewRoot.java:1554)
08-21 09:43:31.693 E/AndroidRuntime(  863): at
android.view.ViewRoot.draw(ViewRoot.java:1291)
08-21 09:43:31.693 E/AndroidRuntime(  863): at
android.view.ViewRoot.performTraversals(ViewRoot.java:1174)
08-21 09:43:31.693 E/AndroidRuntime(  863): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1769)
08-21 09:43:31.693 E/AndroidRuntime(  863): at
android.os.Handler.dispatchMessage(Handler.java:99)
08-21 09:43:31.693 E/AndroidRuntime(  863): at
android.os.Looper.loop(Looper.java:123)
08-21 09:43:31.693 E/AndroidRuntime(  863): at
android.app.ActivityThread.main(ActivityThread.java:4203)
08-21 09:43:31.693 E/AndroidRuntime(  863): at
java.lang.reflect.Method.invokeNative(Native Method)
08-21 09:43:31.693 E/AndroidRuntime(  863): at
java.lang.reflect.Method.invoke(Method.java:521)
08-21 09:43:31.693 E/AndroidRuntime(  863): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:791)
08-21 09:43:31.693 E/AndroidRuntime(  863): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
08-21 09:43:31.693 E/AndroidRuntime(  863): at
dalvik.system.NativeStart.main(Native Method)


On 8月20日, 上午1時15分, Yusuf Saib (T-Mobile USA) yusuf.s...@t-
Mobile.com wrote:
 Or you could git donut.

   ___
.-   -.
  .'   . ;   `.
 /: . ' :  \
|   `  .-. . '  |
|  :  (   ) ; ` |
|   :  `-'   :  |
 \   .` ;  :   /
  `.   . '   .'
`-.___.-'

 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 Aug 19, 6:06 am, Moxor maxcambi...@gmail.com wrote:



  Thanks. I'll have to wait then :(

  On 4 ago, 17:52, Romain Guy romain...@google.com wrote:

   Known bug it's been fixed in Donut

   On Tue, Aug 4, 2009 at 1:48 PM, 

[android-developers] Re: onCreate -Prob?

2009-08-24 Thread Chaoz1336

they ARE compatible...
Its NOT like I would use them directly out of a j2me .class file,
it works fine with interfaces, otherwise wouldnt my code proceed that
far. I only got the prob with the error mentoined above, ... =/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: adc2 submission site

2009-08-24 Thread sleith

i agree with you
there's so many things that can happen to anyone and anytime that may
make him fail to submit his apk

On Aug 24, 2:20 pm, an0 an0...@gmail.com wrote:
 If the time window is too small, any little problems may cause you
 miss it. Also consider the sudden surge of submissions in the same
 time.

 On Aug 20, 4:44 am, Maps.Huge.Info (Maps API Guru)

 cor...@gmail.com wrote:
  As long as the site opens before the end of the month, what difference
  does it make?

  -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: IllegalArgumentException occur: parameter must be a descendant of this view in ViewGroup.java:2454

2009-08-24 Thread Justin

Could you kindly told me which version of Donut will have the solution
of this issue?
When can we download the Donut with the solution of this issue?

On 8月24日, 下午3時12分, Romain Guy romain...@google.com wrote:
 This issue is fixed in Donut but the source code available in the open
 is not the latest version.

 2009/8/24 Justin chih.ting@gmail.com:







  This issue still happened in Donut.

  I want to describe my structure first. There are two main view in my
  Activity, one is Gallery another is a FrameLayout, I named it
  FullSizeViewer which can show fit-to-screen photo. When tapping a
  photo in Gallery, the screen changes to FullSizeViewer. FullSizeViewer
  adds and removes from PhoneWindow dynamically.
  The Gallery and FullSizeViewer load photo from SD card dynamically
  (Loading and decoding in the other thread, and posted bitmap back to
  main thread).

  I found there is a member variable called 'mRealFocusedView' in
  ViewRoot which sets to a wrong view (the view doesn't detach to any
  parent) when this exception occurs and ViewRoot uses this wrong view
  to calculating scroll distance and drawing rectangle.

  In my case, when tapping a photo in Gallery and enter in
  FullSizeViewer, the mRealFocusedView of ViewRoot is correct basically.
  Sometimes the mRealFocusedView of ViewRoot is the Gallery's child
  view. At this moment, this issue occurs.

  I tried to set visibility of Gallery's child view to GONE and it is
  not help because the 'mRealFocusedView' of ViewRoot still not correct
  view.
  I also tried to not dynamically add or remove FullSizeViewer, but this
  issue still happened.

  The only way to solve this issue is use two Activities, one Activity
  contains Gallery, and another contains FullSizeViewer.
  But it is too slow when activity change and the screen will become
  black for a while.
  It is not acceptable for me. Besides, I need to do some transition
  animation when changing from Gallery to FullSizeViewer.
  If I use two Activities, the animation can not be implemented.

  I have tried to clear 'mRealFocusedView' to null by calling the
  'clearChildFocus' of decoreView before the moment of exception
  happened.
  It only can reduce the probability of this issue but it can't really
  fix this issue.

  There are three situations easily to reproduce this issue.
  1. Device is busy.
  2. When tapping photo in Gallery, keep using track ball to scroll the
  Gallery.
  3. When you scroll or re-layout the Gallery, press Google search key
  and then press back immediately.

  Is there any solution or work-around to prevent this issue happen?

  Here are my logs:

  08-21 09:43:31.583 W/dalvikvm(  863): threadid=3: thread exiting with
  uncaught exception (group=0x4001db88)
  08-21 09:43:31.583 E/AndroidRuntime(  863): Uncaught handler: thread
  main exiting due to uncaught exception
  08-21 09:43:31.693 E/AndroidRuntime(  863):
  java.lang.IllegalArgumentException: parameter must be a descendant of
  this view
  08-21 09:43:31.693 E/AndroidRuntime(  863): at
  android.view.ViewGroup.offsetRectBetweenParentAndChild(ViewGroup.java:
  2519)
  08-21 09:43:31.693 E/AndroidRuntime(  863): at
  android.view.ViewGroup.offsetDescendantRectToMyCoords(ViewGroup.java:
  2456)
  08-21 09:43:31.693 E/AndroidRuntime(  863): at
  android.view.ViewRoot.scrollToRectOrFocus(ViewRoot.java:1554)
  08-21 09:43:31.693 E/AndroidRuntime(  863): at
  android.view.ViewRoot.draw(ViewRoot.java:1291)
  08-21 09:43:31.693 E/AndroidRuntime(  863): at
  android.view.ViewRoot.performTraversals(ViewRoot.java:1174)
  08-21 09:43:31.693 E/AndroidRuntime(  863): at
  android.view.ViewRoot.handleMessage(ViewRoot.java:1769)
  08-21 09:43:31.693 E/AndroidRuntime(  863): at
  android.os.Handler.dispatchMessage(Handler.java:99)
  08-21 09:43:31.693 E/AndroidRuntime(  863): at
  android.os.Looper.loop(Looper.java:123)
  08-21 09:43:31.693 E/AndroidRuntime(  863): at
  android.app.ActivityThread.main(ActivityThread.java:4203)
  08-21 09:43:31.693 E/AndroidRuntime(  863): at
  java.lang.reflect.Method.invokeNative(Native Method)
  08-21 09:43:31.693 E/AndroidRuntime(  863): at
  java.lang.reflect.Method.invoke(Method.java:521)
  08-21 09:43:31.693 E/AndroidRuntime(  863): at
  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
  (ZygoteInit.java:791)
  08-21 09:43:31.693 E/AndroidRuntime(  863): at
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
  08-21 09:43:31.693 E/AndroidRuntime(  863): at
  dalvik.system.NativeStart.main(Native Method)

  On 8月20日, 上午1時15分, Yusuf Saib (T-Mobile USA) yusuf.s...@t-
  Mobile.com wrote:
  Or you could git donut.

___
 .-   -.
   .'   . ;   `.
  /: . ' :  \
 |   `  .-. . '  |
 |  :  (   ) ; ` |
 |   :  `-'   :  |
  \   .` ;  :   /
  

[android-developers] Error to add WAV file into Android database

2009-08-24 Thread Dany BREARD

I'm so lost to choice the true name and description of wav file which
I want to add into Android database:

ContentResolver cr = getContentResolver();

try
{
 //  byte[] is the decoded message
byte[] decoded = Base64.decode( oClient.getMsg(0).getMsgBase64() );

ContentValues values = new ContentValues();
values.put(Media.DISPLAY_NAME, Voicemail);
//  values.put(Media.MIME_TYPE, Audio/wav);
values.put(Media.CONTENT_TYPE, Audio/wav);
values.put(Media._ID, 1);
values.put(Media.DATA, decoded);



Uri uri = cr.insert(Media.INTERNAL_CONTENT_URI, values);
 }
 catch(Exception e)
 {
Log.v(TAG, ERROR Exception:  + e);
 }

My error is:

08-24 08:03:03.882: ERROR/Database(652): Error inserting
date_added=1251100983 _display_name= _id=1 vnd.android.cursor.dir/
audio=Audio/wav album_id=-1 title_key= artist_id=-1
08-24 08:03:03.882: ERROR/Database(652):
android.database.sqlite.SQLiteException: near .: syntax error: ,
while compiling: INSERT INTO audio_meta(date_added, _display_name,
_id, vnd.android.cursor.dir/audio, album_id, title_key, artist_id)
VALUES(?, ?, ?, ?, ?, ?, ?);
08-24 08:03:03.882: ERROR/Database(652): at
android.database.sqlite.SQLiteProgram.native_compile(Native Method)
08-24 08:03:03.882: ERROR/Database(652): at
android.database.sqlite.SQLiteProgram.compile(SQLiteProgram.java:110)
08-24 08:03:03.882: ERROR/Database(652): at
android.database.sqlite.SQLiteProgram.init(SQLiteProgram.java:59)
08-24 08:03:03.882: ERROR/Database(652): at
android.database.sqlite.SQLiteStatement.init(SQLiteStatement.java:
41)
08-24 08:03:03.882: ERROR/Database(652): at
android.database.sqlite.SQLiteDatabase.compileStatement
(SQLiteDatabase.java:925)
08-24 08:03:03.882: ERROR/Database(652): at
android.database.sqlite.SQLiteDatabase.insertWithOnConflict
(SQLiteDatabase.java:1300)
08-24 08:03:03.882: ERROR/Database(652): at
android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:
1173)
08-24 08:03:03.882: ERROR/Database(652): at
com.android.providers.media.MediaProvider.insertInternal
(MediaProvider.java:1228)
08-24 08:03:03.882: ERROR/Database(652): at
com.android.providers.media.MediaProvider.insert(MediaProvider.java:
1118)
08-24 08:03:03.882: ERROR/Database(652): at
android.content.ContentProvider$Transport.insert(ContentProvider.java:
140)
08-24 08:03:03.882: ERROR/Database(652): at
android.content.ContentProviderNative.onTransact
(ContentProviderNative.java:125)
08-24 08:03:03.882: ERROR/Database(652): at
android.os.Binder.execTransact(Binder.java:287)
08-24 08:03:03.882: ERROR/Database(652): at
dalvik.system.NativeStart.run(Native Method)
08-24 08:03:04.124: WARN/IInputConnectionWrapper(610): showStatusIcon
on inactive InputConnection
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: bluetooth use in android

2009-08-24 Thread Stefano Sanna

Hi Dianne,

thank you for highlighting this. I started working on Bluetooth API
for myself, just for accessing Bluetooth sensor modules. I've shared
the library to the community for people interesting playing with this
kind of devices, but it is not intended to be nothing more than this
:-)

I'm checking regularly the source base of Android and I'll try to
update my library to follow changes on underlying classes (until an
official Bluetooth API will not be available). Looking at the code, I
know that Bluetooth stack on Android is changing and improving...

Thanks again for warning.

Ciao,
Stefano.

On Sun, Aug 23, 2009 at 7:43 PM, Dianne Hackbornhack...@android.com wrote:
 Hi Stefano, I know you already say this in your site, but just to be extra
 clear -- the code here is accessing private APIs, so we make no guarantees
 about it working in future versions of the platform.  There is a very good
 chance that applications using it will break at a platform update.

 On Sun, Aug 9, 2009 at 7:49 AM, Stefano Sanna gerda...@gmail.com wrote:

 Hi.

 On Sun, Aug 9, 2009 at 1:29 PM, Honesthonestsucc...@gmail.com wrote:
 
  I want to use bluetooth APIS in my android application. I could found
  the API related to wifi but i could not find the API for bluetooth.
  Can some one tell me how can i use it ? any links for API docs and
  code snippt will be much useful to me.

 I've written an experimental Bluetooth API that provides Bluetooth
 stack on/off, device discovery and rfcomm (SPP) client connections. It
 does not need to get root access on the device and it have been
 successfully tested on firmware 1.1 and 1.5, on HTC Dream, HTC Magic
 and Samsung Galaxy.

 This Bluetooth API and a sample application (published on the Android
 Market as Bluetooth Samples) is published under Apache 2.0 license
 at:

 http://code.google.com/p/android-bluetooth/

 Feel free to contact me if you need further details.

 Ciao,
 Stefano.

 --
 Stefano Sanna
 gerda...@gmail.com (Skype: gerdavax)

 Personal blog: http://www.gerdavax.it
 Linkedin profile: http://www.linkedin.com/in/gerdavax
 QuadraSpace Project: http://www.quadraspace.org





 --
 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.


 




-- 
Stefano Sanna
gerda...@gmail.com (Skype: gerdavax)

Personal blog: http://www.gerdavax.it
Linkedin profile: http://www.linkedin.com/in/gerdavax
QuadraSpace Project: http://www.quadraspace.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
-~--~~~~--~~--~--~---



[android-developers] Re: List of running process.

2009-08-24 Thread Ramesh Anandhan
Yes, I am able to get the list process running in the background. I had used
ActivityManager class.

Regards,
Ramesh A

On Wed, Aug 19, 2009 at 8:42 PM, Jack Ha jack...@t-mobile.com wrote:


 Are you trying to do this programmatically?

 --
 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 Aug 19, 5:31 am, Ramesh Anandhan anandhan.ram...@gmail.com wrote:
  Hi,
 
   I am trying to get the list of process running in the background. If
  any one have done this already, Please help me.
 
  regards,
  Ramesh A
 


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

2009-08-24 Thread Asad Zia

Thanks Dianne and Yusuf for the replies.

I am using system image shipped with Android SDK. I guess I have to
build a new system image from source code and figure out a way to sign
it with my own certificate.

There seems to be no documentation on how to interrupt Android build
system in order to inject my own certificate or to get the certificate
used by Android by default.

Any help or useful pointers are appreciated.

Thanks,
Asad


On Aug 23, 6:52 am, Dianne Hackborn hack...@android.com wrote:
 If you are doing this, you are making your own device, so you can build your
 own system image to run in the emulator that is signed with your own
 platform cert.



 On Fri, Aug 21, 2009 at 4:02 AM, Asad Zia asad...@gmail.com wrote:

  Hi,

  There seems to be two levels of uses-permission, user level and system
  level. When I declare to use  INTERNET or BATTERY_STATS, in my
  AndroidManifest.xml file it works without problem. However when I try
  to use INSTALL_PACKAGES, BIND_APPWIDGET  it does not work. According
  to a [android-beginner msg11514],

  “Whoever signs the system is also going to need to sign any app that
  wants system privileges.”

  I need to know how do I get System Privileges while debugging my
  application on emulator.

  Thanks,
  Asad

 --
 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: Problem with Dialog theme when launching from another activity

2009-08-24 Thread suchita bhardwaj
Hi,
I am also facing the same problem. Can anyone suggest something?

On Mon, Aug 24, 2009 at 12:00 PM, ANKIT SOMANI ankitsomani...@gmail.comwrote:

 Problem is with the Child activity, with the Theme.dialog



 2009/8/24 ANKIT SOMANI ankitsomani...@gmail.com

 Hi all,

 I am facing a strange problem. I have 2 activities.  The Second activity
 having the theme.Dialog (set in manifest). when I launched the second
 activity from first activity via startActivityforResult(). The Second
 activity is not Visible. When i minimize it  launched it again then its
 showing.

 ahere are my 2 classes.

 Activity 1 :

 package com.startActivityTest;

 import android.app.Activity;
 import android.content.Intent;
 import android.os.Bundle;

 public class StartActivityTest extends Activity {
 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 Intent intent = new Intent();

 setContentView(R.layout.main);


 intent.setClassName(com.startActivityTest,com.startActivityTest.StartActivityTest1);


 startActivityForResult(intent,1);

 }
 }

 Activity 2 :

 package com.startActivityTest;

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

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



 main.xml


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


 main2.xml

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


 AndroidManifest.xml

 ?xml version=1.0 encoding=utf-8?
 manifest xmlns:android=http://schemas.android.com/apk/res/android;
   package=com.startActivityTest
   android:versionCode=1
   android:versionName=1.0
 application android:icon=@drawable/icon
 android:label=@string/app_name
 activity android:name=.StartActivityTest
   android:label=Launcher Acitivity
 intent-filter
 action android:name=android.intent.action.MAIN /
 category android:name=android.intent.category.LAUNCHER
 /
 /intent-filter
 /activity

 activity android:name=.StartActivityTest1
 android:theme=@android:style/Theme.Dialog
   android:label=Dialog Activity
 intent-filter
 action android:name=android.intent.action.MAIN /
 category android:name=android.intent.category.DEFAULT
 /
 /intent-filter
 /activity

 /application
 uses-sdk android:minSdkVersion=3 /
 /manifest


 please suggest any solution or correct me if i am wrong.

 Thanks in Advance.




 


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



[android-developers] About ADC.

2009-08-24 Thread Mike

Hello,

i have two questions about ADC:
Is there a size limit for an application? Right now my game is at
about 6MB, but it will most likely exeed 10MB.
Is it possible to update the application after it has been submitted?
(For additional content/bug fixes?)

Thanks,
Mike.

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



[android-developers] Re: Virtual Keyboard on custom input field

2009-08-24 Thread Ashwini

Figured this one out.
Launched the virtual keyboard and got the keys through
dispatchkeyevent.
Works fine!

Thanks,
Ashwini

On Aug 18, 9:31 am, Ashwini ashwinibha...@gmail.com wrote:
 Hi,

 Is is possible to get the virtual keyboard key events on a custom
 input field ?
 I tried using keyboardView, but somehow that doesn't work.

 Is it mandatory to use the android input method classes to get the
 events ?

 Please help.

 Thanks,Ashwini
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Displaying virtual keyboard in a custom View

2009-08-24 Thread LambergaR

Thank you very much for all the responses. I finished up simply using

inputMethodManager.toggleSoftInputFromWindow ( this.getWindowToken (),
InputMethodManager.SHOW_FORCED,
InputMethodManager.HIDE_IMPLICIT_ONLY );

the problem was actually quite easy to solve!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: getting all the resources from other apks

2009-08-24 Thread Spektor Yaron
Thanks Dianne for all your help,
i want to make sure i understand:
it will be done very differently than what you are describing here (rather
would probably be something like the approach I was describing before).
meaning querying for the resource ids reliyng on thier sequential nature?
and then getting their resource name etc. from the getResourceEntryName(int
resid)

for example you could just define the resource IDs that are in the skin and
what they should contain and not have to worry about any analysis of the
resources.

not sure i understand what you mean. how do you define the resource IDs? as
they are generated.
are you referring to hard coding the allowed names in Resources for each
skin? or maybe using the file system instead of the resources (would i be
able to inflate a layout the resides on the file system and not in
resources?)
What i would like to accomplish is to not know anything about the xml file
naming (i will need to know about layout and drawable etc.)

On Mon, Aug 24, 2009 at 8:18 AM, Dianne Hackborn hack...@android.comwrote:

 I'm sorry, I thought you were just bringing up skins as an example.  The
 platform currently doesn't support skinning, and when/if it ever does, it
 will be done very differently than what you are describing here (rather
 would probably be something like the approach I was describing before).  If
 you want to implement some kind of skinning for your app, you are on your
 own, and can do whatever you want.  And you really don't need to make this
 hard -- for example you could just define the resource IDs that are in the
 skin and what they should contain and not have to worry about any analysis
 of the resources.


 On Sun, Aug 23, 2009 at 5:15 PM, Spektor Yaron spekt...@gmail.com wrote:

 Thanks Dianne, i appreciate your help.
 firstly i am not even sure how to do the single skin version you
 suggested, unless i state that the resources names must not change which is
 something i am not eager to do.
 secondly, i was thinking (in terms of skins) to allow multiple skins at
 once. so the user selects one or more skins and can see them (lets say i
 have one default skin and then i click on a change skin button and change
 it to the next one in line).
 so my idea (and hopefully i will be able to post it here soon for everyone
 to use) was to take all the relevant apks based on the intent-filter, and
 show them to the user to be able to choose from, thus creating a list of
 skin, for this i need to load the resources for the drawable and the layout
 etc. (again, skins are just an example) from all the apks i got back from
 the search.
 as i said earlier, i may be missing something and there may be a much
 easier way to do it in android
 Thanks,
 Yaron


 On Mon, Aug 24, 2009 at 3:03 AM, Dianne Hackborn hack...@android.comwrote:

 I'm not sure what this has to do with skinning.  I don't know of any
 applications that scan for different resources for a skin; rather, you
 create a skin by replacing the existing (layout, drawable, etc) resource
 with a different one.


 On Sun, Aug 23, 2009 at 2:18 PM, Spektor Yaron spekt...@gmail.comwrote:

 Hi,
 i know it is done somehow by other applications (for example adding new
 skins to an existing application w/o knowing the name of the layout ahead 
 of
 time)
 what am i missing here. is this not the way to do it?
 should i copy all resources to the file system and read them from there?
 would that make sense? would i be able to inflate a view with them this 
 way?
 Thanks,

 On Sun, Aug 23, 2009 at 6:44 PM, Dianne Hackborn 
 hack...@android.comwrote:

 I don't believe there is any way to do that from an application.  From
 a desktop, you can use the aapt dump commands to find out about the 
 contents
 of the .apk.


 On Sun, Aug 23, 2009 at 8:15 AM, Spektor Yaron spekt...@gmail.comwrote:

 Hi,
 i was able to play around with the resource on a different apk and get
 them using createPackageContext as you suggested.
 here is an example of the code:
 otherAppContext =
 this.createPackageContext(com.android.demo.notepad2,Context.CONTEXT_INCLUDE_CODE
 + Context.CONTEXT_IGNORE_SECURITY);
 int resID = otherAppContext.getResources().getIdentifier(icon,
 drawable, com.android.demo.notepad2);

 this works well.
 now i am trying to get ALL the drawables (or all the layouts) in this
 package. i tried a multitude of ways including reflection and 
 AssetManager
 but was unsuccessful. any tips here?
 just to be clear i can not use R.drawable.icon as this is a different
 context

 --
 Yaron Spektor





 --
 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.






 --
 Yaron Spektor





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

 Note: please don't send private 

[android-developers] Re: Dialog windowBackground makes parent window go black

2009-08-24 Thread LambergaR

I think that the easiest way to solve this problem is to set the theme
in your manifest file to Theme.Dialog and then simply say

requestWindowFeature ( Window.FEATURE_NO_TITLE );
custom = new Custom(getApplicationContext ());
setContentView ( custom );

Works like a charm! :)

On 22 avg., 07:37, CraigsRace craig...@gmail.com wrote:
 BTW: My dialogs were dying because I was opening them outside the
 onCreateDialog method.  Once I moved them in there, everything worked
 great.  Ref:http://developer.android.com/guide/topics/ui/dialogs.html

 On Aug 13, 10:41 am, CraigsRace craig...@gmail.com wrote:



  Well, I did it this way.  Create your dialog that extends Dialog.  In
  the constructor call:
  requestWindowFeature(Window.FEATURE_NO_TITLE);
  this.getContext().setTheme(R.style.MyCustomTheme);
  setContentView(R.layout.your_layout);

  Put all the initialisation of all your stuff in onCreate.

  Then to open the dialog from an activity simply do this:
  new YourDialog(this).show();

  No need for anything in the manifest.  You may want to add a
  OnDismissListener also.

  One downside of this approach is that if the screen orientation
  changes, the dialog dies.  I think you can code around this, but I
  haven't done that yet.

  On Aug 11, 7:12 pm,LambergaRmartin.s...@gmail.com wrote:

   Hi!

   I am facing a similar problem. All I want to do is remove the title
   from an Activity that I am trying to show as a Dialog. Could you
   please post some more details on how you managed to solve the problem?

   I am using the following code to modify the Dialog theme:

   ?xml version=1.0 encoding=utf-8?
   resources
     style name=MyCustomTheme parent=@android:style/
   Theme.Dialog
       item name=android:windowNoTitletrue/item
     /style
   /resources

   It doesn't matter where I apply the theme, I always loose the
   background.

   Thanks!

   On 11 avg., 08:02, CraigsRace craig...@gmail.com wrote:

I kept running into this problem, and I think I have found the cause.

Specifying an activity is a dialog in the manifest, for me, kept
causing the background screen to be lost (not all the time - some
dialogs would work ok).  However, if I made my dialogs via code, Ie:
sub-classed Dialog, and in the dialog I call this.getContext().setTheme
(R.style.SpecialDialog);  Then, so far, it keeps the background
screen.  Hooray!

On Aug 7, 12:03 am, CraigsRace craig...@gmail.com wrote:

 The parent window had a 120Kb jpeg picture on it.  I used more
 compression on the jpeg and got it down to 32Kb, and bingo, the parent
 window stopped disappearing!  Yay me!

 On Aug 6, 10:39 am, CraigsRace craig...@gmail.com wrote:

  Hi,

  I wanted to change the frame around my Dialog.  So I set up a style:
  resources
      style name=SpecialDialog parent=android:Theme.Dialog
          item name=android:windowBackground@drawable/my_frame/
  item
      /style
  /resources

  and assigned it in the manifest:
          activity android:name=.MyActivity android:theme=@style/
  SpecialDialog

  And yay! I get my new frame.  However, the parent window disappears
  (goes black).

  Having a normal dialog:
  activity android:name=.MyActivity 
  android:theme=@android:style/  Theme.Dialog
  keeps the parent window visible.

  Can I have a custom frame on a dialog and keep the parent window
  visible?

  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] Which protocal impemented in IM package in Android Donut

2009-08-24 Thread Kerr

Dear all,
Instant Message(IM) is one app in Donet vertion, But there is no
official IM document, if developper want to design their own IM for
some case, what task should be done? for example?
1, Which protocal this IM used, XMPP or others?
2, Has IMPS protocal been implemented in the IM code, or it's just
some one layer of this protocal?
3, If developper want disign their own IM app, the only thing is to
implement the base translation procol, right?
4, Want to start the AccountActivity, what is the intent data section
format, you know, it uses startActivity() to start signin, but after
that, which will check the intent data format, but there is no
specific definenation of that, how could we reference something?

Wish you could guide us, advance the Android app dev!!
Regards!

Kerr


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



[android-developers] Clickable Desktop Widget

2009-08-24 Thread Alex Corbi

Hi guys,

i'm implementing a simple Widget that toggles on/off a service on my
App, I've extended a AppWidgetProvider class and succesfully defined
the xml appwidget-provider file.

The question is, how can i register a OnClikListener so i know when
the user clicks the widget on the desktop (once its already placed on
it) the OnUpdated(), OnEnabled(), OnDisabled() events are being
correctly called, but i don't know how to register a OnClickListener
sinces there's no activity and therefore i cannot call findViewById().

How is it done for most of the toggle widgets? how have you guys
implemented it?

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



[android-developers] How to read timestamp

2009-08-24 Thread DaminouU

Hi,

I would like to read timestamp from sensorEvent.

I read that timestamp is The time in nanosecond at which the event
happened . So, if event_1 happened two seconds before event_2,
timestamp_event_2 - timestamp_event_1 = 2 000 000 000 ?

Is it true?

If I am right, I have a problem because I ask some details about the
new event when timestamp_new_event - timestamp_old_event  2 000 000
000 and it send information only one time in a minute...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Download file

2009-08-24 Thread engin

Hi I am trying to download something from server.I am downloading
using ftpclient but problem is this can ı use download manager of
telephone. The reason that ı want to use is to get notifications.

On Aug 23, 4:25 pm, engin enginarsla...@gmail.com wrote:
 Hi, how can we download a file from server using ftp? How can we use
 android's download manager manually to download ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Download file

2009-08-24 Thread engin

Hi I am trying to download something from server.I am downloading
using ftpclient but problem is this can ı use download manager of
telephone. The reason that ı want to use is to get notifications.

On Aug 23, 4:25 pm, engin enginarsla...@gmail.com wrote:
 Hi, how can we download a file from server using ftp? How can we use
 android's download manager manually to download ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 1.5 to google maps API

2009-08-24 Thread Honest

Hello,

My project was working fine in android 1.5 but i need to use google
maps so i used google APIS and did some change in API to merge MAPS
functionality which was in other application.but some how i got
exception and my application stopped working. It is even not starting
so can some one tell me what can be issue in 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: android 1.5 to google maps API

2009-08-24 Thread Honest

It seems the problem is in manifest file as i have put try catch every
where yet it is giving message  Application Closed Unexpectedly with
only ok button so according to me the problem should be in in it. I am
pasting the manifest file code please take a look at it and let me
know.

?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.kartik.ATM
  android:versionCode=1
  android:versionName=1.0
application android:icon=@drawable/icon android:label=@string/
app_name
activity android:name=.Application
  android:label=@string/app_name
intent-filter
action android:name=android.intent.action.MAIN /
category
android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity
activity android:name=.HelloMapView
android:label=@string/app_name
/activity

/application
uses-library android:name=com.google.android.maps /
uses-sdk android:minSdkVersion=3 /
uses-permission
android:name=android.permission.ACCESS_COARSE_LOCATION/uses-
permission
uses-permission
android:name=android.permission.ACCESS_FINE_LOCATION/uses-
permission
uses-permission
android:name=android.permission.ACCESS_COARSE_LOCATION/uses-
permission
uses-permission android:name=android.permission.INTERNET/uses-
permission
/manifest

On Aug 24, 5:50 pm, Honest honestsucc...@gmail.com wrote:
 Hello,

 My project was working fine in android 1.5 but i need to use google
 maps so i used google APIS and did some change in API to merge MAPS
 functionality which was in other application.but some how i got
 exception and my application stopped working. It is even not starting
 so can some one tell me what can be issue in 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] Listen a keybord

2009-08-24 Thread SIDIBE Ali-Broma


Hello

I search to to listen a some key by the followin code :




tv.setOnKeyListener(new OnKeyListener() {
@Override   public boolean onKey(View v, int keyCode,
KeyEvent event) {
if (KeyEvent.ACTION_UP != event.getAction()) {
  //  int color = Color.BLUE;
tv.setText(Ohlalal);
switch (keyCode) {
case KeyEvent.KEYCODE_CALL:
  //  color = Color.MAGENTA;
tv.setText(kfkkfklffklfglk);
setContentView(tv);
break;
case KeyEvent.KEYCODE_ENTER:
  //  color = Color.YELLOW;
tv.setText(jgfjgjgjg);
break;
default:tv.setText(poonpoonon); ;
}

   // makeDot(dots, dotView, color);
setContentView(tv);
   // tv.invalidate();
 //   tv.refreshDrawableState();
}

return true;
}

});


But when I press some key ( eg: Enter of the board near the emulato) I
find nothing
Who can say me where is the problem
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] change seekbar progress color

2009-08-24 Thread jaimin

hi i am new to android .
i want to change the color of progress of seekbar form orange that is
default ot something different.

i tried something like this:
here is my code

?xml version=1.0 encoding=utf-8?
layer-list xmlns:android=http://schemas.android.com/apk/res/
android
  item android:id=@android:id/background
 shape
 corners android:radius=5dip /
   gradient
android:startColor=#ff9d9e9d
 android:centerColor=#ff5a5d5a
 android:centerY=0.75
 android:endColor=#ff747674
 android:angle=270
/
/shape
 /item
item android:id=@android:id/progress
 clip
 shape
corners android:radius=5dip /
gradient
 android:startColor=#d300
  android:centerColor=#b600
 android:centerY=0.75
 android:endColor=#cb00
  android:angle=270
 /
  /shape
  /clip
 /item
 /layer-list

 SeekBar android:id=@+id/seek
android:layout_width=400dip
android:progressDrawable=@drawable/progress_horizontal
android:layout_height=wrap_content
android:layout_below=@+id/btngrid
android:layout_marginTop = 10dip
android:layout_marginLeft = 30dip
android:max=10
android:progress=1
/

but it did nothing .so anybody can help me on this problem
plz its urgent.

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



[android-developers] Best/safest place to do cleanups(e.g. connection release) at Application level

2009-08-24 Thread Vikas

Hi,

What is the best/safest place to do cleanups at application level?

I am creating a single instance of DefaultHttpClient when the
application starts up. Rest of the activities will be ustilizing same
instance of client. Now I want to release all resources associated
with it( or in other words make the following call
client.getConnectionManager().shutdown()) only one time i.e. when the
application terminates and not on onPause because that will defeat my
purpose. so if I override onTerminate and onLowMemory methods and put
the connection release code in both methods will that ensure that my
cleanup code will definitely be called. The docs says onTerminate may
not get called in some cases..so will overriding onLowMemory ensure
that all cases get covered?

Please advise

Thanks
Vikas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 root German G1 running on CRC37?

2009-08-24 Thread Christian S.

Hi, anyone has a step-by-step approach how to root a German G1 running
on CRC37? thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to read timestamp

2009-08-24 Thread DaminouU

I fixed my problem...

So no need to answer ;)

And sorry



On Aug 24, 2:06 pm, DaminouU dam.le...@gmail.com wrote:
 Hi,

 I would like to read timestamp from sensorEvent.

 I read that timestamp is The time in nanosecond at which the event
 happened . So, if event_1 happened two seconds before event_2,
 timestamp_event_2 - timestamp_event_1 = 2 000 000 000 ?

 Is it true?

 If I am right, I have a problem because I ask some details about the
 new event when timestamp_new_event - timestamp_old_event  2 000 000
 000 and it send information only one time in a minute...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: About ADC.

2009-08-24 Thread Maps.Huge.Info (Maps API Guru)

I didn't read anything about size restrictions but the rules do say
something about updates after submission. The easiest and surest way
to find this out is to read the rules. They are quite clear and to the
point. Search Google for ADC2 to find them.

-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: adc2 submission site

2009-08-24 Thread Maps.Huge.Info (Maps API Guru)

There is nothing in the rules to prevent you from releasing your app
to the market after August 1st, so what's the big deal? I would
suggest that anyone who plans on submitting an app to ADC2 submit it
first to the market for debugging and to catch unforeseen problems.

-John Coryat

On Aug 24, 1:11 am, Khurram Samad khurram.sa...@gmail.com wrote:
 I was so upset with the delay that i finally gave up and released the
 application at Android Store :)

 Check out Gang War Lite

 On Aug 19, 5:44 pm, mscwd01 mscw...@gmail.com wrote:

  I'd like it postponed a month please ;)

  It would be good to know either way though...

  On Aug 17, 7:43 pm, cindy ypu01...@yahoo.com wrote:

   I have question too. Google should update theADCofficial site to
   tell us what happends.

   On Aug 16, 11:11 am, siuying siu.y...@gmail.com wrote:

Glad to hear that I'm not the only one having this question!

On 8月15日, 下午12時36分, sleith raysle...@gmail.com wrote:

 Hi, i've just purchased to be an android developer
 when i visithttp://market.android.com/publish, i don't see anything
 about publish foradc2
 how to submit app foradc2 ?
 thank you- 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] Survey for french Android developers

2009-08-24 Thread arnouf

Hi everyone,

This message concerns especially french guys (not necessary living in
France).
I'm making a study about french Android developers and contests (ADC2,
Samsung Mob!le).

Less than 3 minutes are sufficient to answer.
http://spreadsheets.google.com/viewform?formkey=dE1yenpicHYwSVpUODctRVVPRXNuQ1E6MA..

Thanks by advance for your answers.

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

2009-08-24 Thread vishal bhoj
Hello Everyone,

I am trying to run widgets on wvga resolution emulator.
But with such a wide screen I thought I  could populate more number of
widgets but looks like the same number of widgets would fill as in hvga
screen.
I have set the *ro*.sf.lcd_density=220;
I could layout 3 clocks widgets;
When I set  *ro*.sf.lcd_density=160
even then I could just layout 3 clock widgets;
All the widgets look fine.
I want to know is it possible to configure the screen resolution to load
more number of widgets onto the screen by changing*.

*Is it possible that by keeping dpi=160 and wvga I can populate more widget
?

I am doing this exercise not from an app developer point of view but from
platform point of view.

-- 
with regards vishal

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Problem with Dialog theme when launching from another activity

2009-08-24 Thread ANKIT SOMANI
This Problem is with the Cupcake 1.5 release, I tried it with 1.1 it was
working there.

Regards
~Ankit Somani



2009/8/24 suchita bhardwaj suchi.bhard...@gmail.com



 Hi,
 I am also facing the same problem. Can anyone suggest something?


 On Mon, Aug 24, 2009 at 12:00 PM, ANKIT SOMANI 
 ankitsomani...@gmail.comwrote:

 Problem is with the Child activity, with the Theme.dialog



 2009/8/24 ANKIT SOMANI ankitsomani...@gmail.com

 Hi all,

 I am facing a strange problem. I have 2 activities.  The Second activity
 having the theme.Dialog (set in manifest). when I launched the second
 activity from first activity via startActivityforResult(). The Second
 activity is not Visible. When i minimize it  launched it again then its
 showing.

 ahere are my 2 classes.

 Activity 1 :

 package com.startActivityTest;

 import android.app.Activity;
 import android.content.Intent;
 import android.os.Bundle;

 public class StartActivityTest extends Activity {
 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 Intent intent = new Intent();

 setContentView(R.layout.main);


 intent.setClassName(com.startActivityTest,com.startActivityTest.StartActivityTest1);


 startActivityForResult(intent,1);

 }
 }

 Activity 2 :

 package com.startActivityTest;

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

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



 main.xml


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


 main2.xml

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


 AndroidManifest.xml

 ?xml version=1.0 encoding=utf-8?
 manifest xmlns:android=http://schemas.android.com/apk/res/android;
   package=com.startActivityTest
   android:versionCode=1
   android:versionName=1.0
 application android:icon=@drawable/icon
 android:label=@string/app_name
 activity android:name=.StartActivityTest
   android:label=Launcher Acitivity
 intent-filter
 action android:name=android.intent.action.MAIN /
 category android:name=android.intent.category.LAUNCHER
 /
 /intent-filter
 /activity

 activity android:name=.StartActivityTest1
 android:theme=@android:style/Theme.Dialog
   android:label=Dialog Activity
 intent-filter
 action android:name=android.intent.action.MAIN /
 category android:name=android.intent.category.DEFAULT
 /
 /intent-filter
 /activity

 /application
 uses-sdk android:minSdkVersion=3 /
 /manifest


 please suggest any solution or correct me if i am wrong.

 Thanks in Advance.







 


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



[android-developers] Re: Clickable Desktop Widget

2009-08-24 Thread String

On Aug 24, 1:05 pm, Alex Corbi a.co...@gmail.com wrote:

 The question is, how can i register a OnClikListener so i know when
 the user clicks the widget on the desktop

You send it through the RemoteViews object. Here's my code:

RemoteViews views = new RemoteViews(context.getPackageName(),
R.layout.widget);
views.setOnClickPendingIntent(R.id.click_target,
PendingIntent.getActivity(
context,
0,
new Intent(context, MyActivity.class).setFlags
(Intent.FLAG_ACTIVITY_NEW_TASK),
PendingIntent.FLAG_UPDATE_CURRENT));

As you can see, mine opens a specific activity, but I believe you
could fire any valid Intent.

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



[android-developers] Re: how to use adb tool on SAMSUNG GALAXY?

2009-08-24 Thread legerb

I have the latest SDK 1.5r3, modified the android_usb.inf and
installed the usb driver.
But still the device is not recognized by the ADB.
If adb in r3 supports Samsung devices directly, then the problem is in
the drivers?


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

2009-08-24 Thread Wouter

No one has an idea?

On 22 aug, 14:00, Wouter wouterg...@gmail.com wrote:
 Hey,

 I am using the android xmlrpc client (http://code.google.com/p/android-
 xmlrpc/) to consume a xml-rpc webservice.

 I can call the webservice and get data back but I want to save the
 received data in own made Objects.

 For example:

 I want to get the movieScore:

 public void getMovieScore()
     {
         Object[] params = {sessionKey, 500};
         try {
                         MapString, Object response =  (MapString, Object) 
 client.call
 (film.retrieveScore,params);

                         for (Iterator it=response.keySet().iterator(); 
 it.hasNext(); ) {
                         Object key = it.next();
                         Object value = response.get(key);
                     }

                         Log.d(FILM, FILM:  + response.keySet());
                 } catch (XMLRPCException e) {
                         // TODO Auto-generated catch block
                         e.printStackTrace();
                 }
     }

 I use MapString, Object response =  (MapString, Object) client.call
 (film.retrieveScore,params);
                 but i can also use Object or something else..

 When i debug this line of code I get this:

 http://www.grabup.com/uploads/b4823a93fd9733c2cb12fc6879a55b78.png?di...

 So the response is a HashMap.. and the reponse is this: {total=27253,
 votes=6503, average=4.19}

 How can I save these data in my class FilmScore (looks like this: )

 public class FilmScore {

             public String votes;
             public String total;
             public String average;

 }

 Can someone help me? Thank you,

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



[android-developers] Re: android 1.5 to google maps API

2009-08-24 Thread Jack Ha

Can you post the logcat exception stack track here?

--
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 Aug 24, 6:15 am, Honest honestsucc...@gmail.com wrote:
 It seems the problem is in manifest file as i have put try catch every
 where yet it is giving message  Application Closed Unexpectedly with
 only ok button so according to me the problem should be in in it. I am
 pasting the manifest file code please take a look at it and let me
 know.

 ?xml version=1.0 encoding=utf-8?
 manifest xmlns:android=http://schemas.android.com/apk/res/android;
       package=com.kartik.ATM
       android:versionCode=1
       android:versionName=1.0
     application android:icon=@drawable/icon android:label=@string/
 app_name
         activity android:name=.Application
                   android:label=@string/app_name
             intent-filter
                 action android:name=android.intent.action.MAIN /
                 category
 android:name=android.intent.category.LAUNCHER /
             /intent-filter
         /activity
         activity android:name=.HelloMapView
         android:label=@string/app_name
         /activity

     /application
     uses-library android:name=com.google.android.maps /
     uses-sdk android:minSdkVersion=3 /
 uses-permission
 android:name=android.permission.ACCESS_COARSE_LOCATION/uses-
 permission
 uses-permission
 android:name=android.permission.ACCESS_FINE_LOCATION/uses-
 permission
 uses-permission
 android:name=android.permission.ACCESS_COARSE_LOCATION/uses-
 permission
 uses-permission android:name=android.permission.INTERNET/uses-
 permission
 /manifest

 On Aug 24, 5:50 pm, Honest honestsucc...@gmail.com wrote:

  Hello,

  My project was working fine in android 1.5 but i need to use google
  maps so i used google APIS and did some change in API to merge MAPS
  functionality which was in other application.but some how i got
  exception and my application stopped working. It is even not starting
  so can some one tell me what can be issue in 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: Error Code 5: Database is locked

2009-08-24 Thread Armond Avanes

So how can I create an in-memory database? I just took a quick look at the
API and couldn't find any.

Cheersss,
Armond

 develop...@googlegroups.com] On Behalf Of Andrei
 Sent: Monday, August 24, 2009 7:35 AM
 
 If your write time take long i would try this
 I would create another in memory database, attach it to yours.
 In memory database table would have same schema.
 You would write to in memory database and after done do insert into
 db1.table as select * from db2.table
 I did something similar but on desktop not phone and of course you
 need to wait for lock to clear
 
 On Aug 23, 2:31 am, Armond Avanes armond...@yahoo.com wrote:
  I forgot to mention that this exception happens (so far) from the
 service I
  have for updating database (is executed every 24 hours).
 
  Cheersss,
  Armond
 
   Hi Guys,
 
   I have different background threads in my application, one doing
   periodical
   database updates, another responsible for doing long searches and so.
   Obviously some are just reading from database while others are writing
 as
   well.
 
   Once in a while I get database is locked exception. I need to know
 the
   safe way of reading/writing from/to database on different threads.
 
   As well I've found isDbLockedByCurrentThread() and
   isDbLockedByOtherThreads() methods on SQLiteDatabase. Should I use
 them
   every time I want to access the database? What if the database is
 locked?
   Should I pause the current thread and retry a few milliseconds later?
 
   Best Regards,
   Armond
 
   08-23 10:17:32.029 E/AndroidRuntime( 1331): Caused by:
   android.database.sqlite.SQLiteException: error code 5: database is
 locked
 
   08-23 10:17:32.029 E/AndroidRuntime( 1331):     at
   android.database.sqlite.SQLiteStatement.native_execute(Native Method)
 
   08-23 10:17:32.029 E/AndroidRuntime( 1331):     at
  
 android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:66)
 
   08-23 10:17:32.029 E/AndroidRuntime( 1331):     at
  
 android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1534)
 
   08-23 10:17:32.029 E/AndroidRuntime( 1331):     at
   com.test.db.TestDao.update (TestDao.java:327)
 
   08-23 10:17:32.029 E/AndroidRuntime( 1331):     at
   com.test.UpdateService.onStart(UpdateService.java:35)
 
   08-23 10:17:32.029 E/AndroidRuntime( 1331):     at
   android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2557)
 
   08-23 10:17:32.029 E/AndroidRuntime( 1331):     . 10 more
 

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



[android-developers] Re: Adding Threshold to Bitmap Images

2009-08-24 Thread Streets Of Boston

You mean 'threshold' as a color-effect (turning a pic into a black and
white (no grey) image)?

On Aug 24, 1:09 am, Abdul Mateen abmat...@gmail.com wrote:
 Hi,
 I have a question about adding a threshold images into bitmap images, can
 this be possible with the Android SDK, if not can anyone here generate the
 Algorithm for that to add threshold to images.

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



[android-developers] ADC and autoupdate?

2009-08-24 Thread Sebastian

While considering different possible scenarios for app conflicts
during ADC judging (i.e. someone installed the app from the market,
got the latest update, and is now offered an older version for
judging) I came up with an interesting posibility.

What happens if my app has auto update capabilities? There are
several toolkits out there offering this feature.

So when someone gets the app for judging, it will offer the user the
possibility of getting the latest version.

The only wording in the terms and conditions that seems to apply here
is 9.a. There is no opportunity to improve or modify an application
between the First and Second Rounds of Judging. ... but it seems to
imply that you won't be able to submit a new version, and that they
will distribute the original binary on both rounds.

Could we get some clarification from Google as to what happens in this
case?

- Is it allowed for my app to update itself?

- What happens when someone has installed my app from the market, has
updated it, and then gets to judge it on the contest?

- Will existing users of my app not be offered to judge it?

And for those of you claiming it would be unfair to update my app in
the middle of the contest, consider the case of an app that uses web
views to offer content produced by a web server... that application
can get feature updates at any time while still using the same
binary. I know it's the nature of the technology (and I'm glad it is
that way) but it does affect the fairness of judging.

And yes, all these issues make it very tricky to create a fair and
balanced judging process.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: update for syncML (client) and android

2009-08-24 Thread Tdj


 hello,

On Jul 28, 5:49 pm, angelo asant...@yahoo.co.uk wrote:
 funambol do have a second release of thesyncmlclient which did do
 contacts,events and tasks but I couldnt get it to work with my
 companyssyncmlserver (the paths were incorrect).. Unfortunatly my
 knowledge of ant and all the deployment tools aint good enough to
 rewrite the urls and try..

If you send me the name of your remote database, I can compile the
funambol client for you.

   David.

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



[android-developers] Re: About ADC.

2009-08-24 Thread String

On Aug 24, 10:39 am, Mike internet...@hotmail.com wrote:

 Is it possible to update the application after it has been submitted?

From http://code.google.com/android/adc/adc2_terms.html:
There is no opportunity to improve or modify an application between
the First and Second Rounds of Judging.

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



[android-developers] Re: Clickable Desktop Widget

2009-08-24 Thread Alex Corbi

Thanks, i appreciatte the help.

On Aug 24, 4:27 pm, String sterling.ud...@googlemail.com wrote:
 On Aug 24, 1:05 pm, Alex Corbi a.co...@gmail.com wrote:

  The question is, how can i register a OnClikListener so i know when
  the user clicks the widget on the desktop

 You send it through the RemoteViews object. Here's my code:

         RemoteViews views = new RemoteViews(context.getPackageName(),
 R.layout.widget);
         views.setOnClickPendingIntent(R.id.click_target,
 PendingIntent.getActivity(
                         context,
                         0,
                         new Intent(context, MyActivity.class).setFlags
 (Intent.FLAG_ACTIVITY_NEW_TASK),
                         PendingIntent.FLAG_UPDATE_CURRENT));

 As you can see, mine opens a specific activity, but I believe you
 could fire any valid Intent.

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



[android-developers] Re: update for syncML (client) and android

2009-08-24 Thread Tdj


   I made some test and :

   o it works fine with my.funambol.com to sync contacts and calendar,
   o I modify the remote database name for SOGo, and it doesn't
work...

David.

On Aug 19, 5:22 pm, Tdj david.c...@gmail.com wrote:
       Hello,

 On Jul 28, 5:49 pm, angelo asant...@yahoo.co.uk wrote:

  funambol do have a second release of thesyncmlclient which did do
  contacts,events and tasks but I couldnt get it to work with my

     where can I donwload this version ?

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



[android-developers] Re: Listen a keybord

2009-08-24 Thread Dianne Hackborn
Probably the view doesn't have focus.

On Mon, Aug 24, 2009 at 6:21 AM, SIDIBE Ali-Broma jahbr...@gmail.comwrote:



 Hello

 I search to to listen a some key by the followin code :




tv.setOnKeyListener(new OnKeyListener() {
@Override   public boolean onKey(View v, int
 keyCode,
 KeyEvent event) {
if (KeyEvent.ACTION_UP != event.getAction()) {
  //  int color = Color.BLUE;
tv.setText(Ohlalal);
switch (keyCode) {
case KeyEvent.KEYCODE_CALL:
  //  color = Color.MAGENTA;
tv.setText(kfkkfklffklfglk);
setContentView(tv);
break;
case KeyEvent.KEYCODE_ENTER:
  //  color = Color.YELLOW;
tv.setText(jgfjgjgjg);
break;
default:tv.setText(poonpoonon); ;
}

   // makeDot(dots, dotView, color);
setContentView(tv);
   // tv.invalidate();
 //   tv.refreshDrawableState();
}

return true;
}

});


 But when I press some key ( eg: Enter of the board near the emulato) I
 find nothing
 Who can say me where is the problem
 



-- 
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: getting all the resources from other apks

2009-08-24 Thread Dianne Hackborn
On Mon, Aug 24, 2009 at 4:08 AM, Spektor Yaron spekt...@gmail.com wrote:

 it will be done very differently than what you are describing here (rather
 would probably be something like the approach I was describing before).
 meaning querying for the resource ids reliyng on thier sequential nature?
 and then getting their resource name etc. from the getResourceEntryName(int
 resid)


No, the description of what you said you wanted to do for skinning -- going
and finding another .apk and trawling through its resources.


 for example you could just define the resource IDs that are in the skin
 and what they should contain and not have to worry about any analysis of the
 resources.
 not sure i understand what you mean. how do you define the resource IDs? as
 they are generated.
 are you referring to hard coding the allowed names in Resources for each
 skin? or maybe using the file system instead of the resources (would i be
 able to inflate a layout the resides on the file system and not in
 resources?)
 What i would like to accomplish is to not know anything about the xml file
 naming (i will need to know about layout and drawable etc.)


Yes, just hard-code the resources.  There are, after all, a fixed number of
layouts and drawables and other things that an application will know what to
do with.  So just given them fixed names or IDs and be done with it.

-- 
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: ListView with multiple buttons, how do I detect which View the buttons were pressed in?

2009-08-24 Thread Doug

Views have a dedicated field you can use to store your own
identifiers.

You should put some value that uniquely identifies the view into it's
'tag' member setTag(Object).  This member is there for you to put
just this kind of info into.

Then, when you get the onClick event with the view, just cast the
'getTag()' to the appropriate object type... tada!

Couple of examples:

* I store a Long in the tag that corresponds to the _ID column in
the table row the view models
* If it's a manually generated or otherwise 'disconnected' object you
could store the object itself in there, using the ListActivity as
your list!

Doug


On Aug 23, 2:13 pm, Croccy22 matthew.bea...@gmail.com wrote:
 Hi thanks for the reply,

 I've set an onClickListener and it's only parameter is View. The
 problem is  don't know how to translate that information back to a
 useful identifier. I can't use getID ecause the buttons are all
 created from the same XML layout so they have the same ID. The only
 unique thing I can find is if I do a v.toString() tis returns somehing
 like android.widget.but...@123456.

 What I need to do is if I press a button in the second View of the
 ListView I need to retrieve a value from a cursor database from the
 second result?

 Matt.

 On Aug 21, 6:53 pm, skink psk...@gmail.com wrote:



  On Aug 21, 10:18 am, Croccy22 matthew.bea...@gmail.com wrote:

   Hi all,

   I am writing  a program where I need a ListView for which I am using a
  ListActivity. Each one  of the views within the ListView has four
   buttons, (Off, Dim, Bright and On). Each one of these buttons is
   configured with it's own OnClickListener when I build the view. This
   part seems to work  ok.

   However when I have say 5 Views each which has these four buttonns, I
   cann tell whether an off,dim,bright or onbuttonwas pressed but I
   cannot tell from which view it was pressed.

   So for example if my views are devices (Light, Heater and Kettle) I
   press an onbuttonand i know an Onbuttonwas pressed but how do I
   get it to tell me the Onbuttonfor the Light was pressed?

   Any ideas on how to achieve this?

   Thanks, Matt

  well,

  what method does OnClickListener interface  have?

  and what's its only parameter?

  pskink- 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: onCreate -Prob?

2009-08-24 Thread Doug

I suspect from your logging that your code may be trying to hit up a
system service before the activity has it's context set up correctly.
Basically, you can't do anything that requires Context until your
'onCreate()' method is called (you can do it *in* onCreate, just not
before).

On Aug 24, 12:09 am, Chaoz1336 stoffe...@gmail.com wrote:
 they ARE compatible...
 Its NOT like I would use them directly out of a j2me .class file,
 it works fine with interfaces, otherwise wouldnt my code proceed that
 far. I only got the prob with the error mentoined above, ... =/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: List of running process.

2009-08-24 Thread Yusuf Saib (T-Mobile USA)

ActivityManager: 
http://developer.android.com/reference/android/app/ActivityManager.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 Aug 24, 1:18 am, Ramesh Anandhan anandhan.ram...@gmail.com wrote:
 Yes, I am able to get the list process running in the background. I had used
 ActivityManager class.

 Regards,
 Ramesh A



 On Wed, Aug 19, 2009 at 8:42 PM, Jack Ha jack...@t-mobile.com wrote:

  Are you trying to do this programmatically?

  --
  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 Aug 19, 5:31 am, Ramesh Anandhan anandhan.ram...@gmail.com wrote:
   Hi,

        I am trying to get the list of process running in the background. If
   any one have done this already, Please help me.

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



[android-developers] Re: change seekbar progress color

2009-08-24 Thread Mark Murphy

 hi i am new to android .
 i want to change the color of progress of seekbar form orange that is
 default ot something different.

 i tried something like this:
 here is my code

 ?xml version=1.0 encoding=utf-8?
 layer-list xmlns:android=http://schemas.android.com/apk/res/
 android
   item android:id=@android:id/background
shape
corners android:radius=5dip /
  gradient
   android:startColor=#ff9d9e9d
android:centerColor=#ff5a5d5a
  android:centerY=0.75
  android:endColor=#ff747674
android:angle=270
 /
 /shape
  /item
 item android:id=@android:id/progress
  clip
  shape
 corners android:radius=5dip /
   gradient
  android:startColor=#d300
   android:centerColor=#b600
  android:centerY=0.75
  android:endColor=#cb00
   android:angle=270
  /
   /shape
   /clip
  /item
  /layer-list

  SeekBar android:id=@+id/seek
 android:layout_width=400dip
   android:progressDrawable=@drawable/progress_horizontal
 android:layout_height=wrap_content
 android:layout_below=@+id/btngrid
 android:layout_marginTop = 10dip
 android:layout_marginLeft = 30dip
 android:max=10
 android:progress=1
 /

 but it did nothing .so anybody can help me on this problem
 plz its urgent.

I recently used this same sort of technique for changing the colors in a
ProgressBar. The three differences I see between what you did and what I
did:

-- You are using SeekBar instead of ProgressBar, and it is possible
SeekBar handles the progress drawable differently

-- ProgressBar needs a third item with an id of @android:id/secondaryProgress

-- I called setProgressDrawable() in Java code rather than using an XML
attribute

Otherwise, I do not see any obvious differences in technique.

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



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



[android-developers] Connecting multiple phones

2009-08-24 Thread julia_robinson

Hello . I am looking forward to developing an application which needs
a cellphone to connect with about 20 cellphones in its vicinity (say
about 50 metres) .

1. Which technology allows this ?
2. Does Android support 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] Camera and video mode

2009-08-24 Thread raja sekhar

can any one help me to create this jobs
i'm tried a lot but still failure.
plz help me.thanks for ur help.


i need these things .
1. Capture Image using Camera (with the name, format and path
provided)
2. Capture Video (with the name, format and path provided)

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

2009-08-24 Thread akitto

Not 100% sure as i am away form my computer and out on my android
phone, but I thought it would be more likely to be that you did not
include the Microsoft sql jar for your deployed environment.?

On Aug 22, 3:42 pm, engin enginarsla...@gmail.com wrote:
 Hi I wrote java code that connects remote sql server. But code does
 not work in android. Code is as follows:
 try {

         DriverManager.registerDriver(new
 com.microsoft.sqlserver.jdbc.SQLServerDriver());
         String url=jdbc:sqlserver://hostname;
         Connection conn=DriverManager.getConnection
 (url,username,password);
         Statement stmt=conn.createStatement();
         DatabaseMetaData meta = conn.getMetaData();
         if (conn != null) {
                 txt.setText(Conection Succesful);

         }
     }
         catch(SQLException se)
         {
                 System.out.println(ERROR:  + se.getMessage());
         }

 And log is follows:

 08-22 17:32:40.777: ERROR/AndroidRuntime(17582):
 java.lang.VerifyError:
 com.microsoft.sqlserver.jdbc.SQLServerConnection
 08-22 17:32:40.777: ERROR/AndroidRuntime(17582):     at
 com.microsoft.sqlserver.jdbc.SQLServerDriver.connect
 (SQLServerDriver.java:840)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Software Packaging Problem: How to create an Android installer (apk) ?

2009-08-24 Thread Andrew Shu

Bryan,

In the Android developer docs (http://developer.android.com/guide/
publishing/app-signing.html#releasecompile) it mentions 2 build tools-
one being Eclipse and the other Ant. It sounds like you want to look
up more information about Ant and finding or writing tools that use
it. I personally use Eclipse so unfortunately I don't have any info to
offer there.

On Aug 21, 1:01 am, Bryan Lee tthsntt...@gmail.com wrote:
 HI all,

 In Windows, we write installer script, and user an installer
 compiler to generate an installer,
 let's say .inf for .msi/.cab and .nsi for NSIS.

 But when it comes to Android, is there a similiar method?

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

2009-08-24 Thread tommylion

Hi all,

I used Class MediaRecorder to play mp3 file,
the source like this:
--
MediaRecorder recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setOutputFile(PATH_NAME);
recorder.prepare();
recorder.start();
--

It runs no problem.
But I want to get the stream,and write the byte array to the stream,
let mick sound the refreing voice.

by use java source I can did that.
the source like this:
--
SourceDataLine line = (SourceDataLine)AudioSystem.getLine(info);
SourceDataLine line = (SourceDataLine)AudioSystem.getLine(info);
// Initialize Audio
line.open(); line.start();
byte[] block = new byte[1024];
line.write(block, 0, block.length);
line.drain();
--

you know,Android SDK don't include the class SourceDataLine(package
javax.sound.sampled).

and who can tell me how to deal with that.
thank you!

tommy

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



[android-developers] How to use motion events with multiple layouts

2009-08-24 Thread andr0id

Hi everyone, I'm beginning in android development, and I've stumbled
upon a problem.

My application has different layouts stored in xml files, and I use
motion events such as onFling or onSingleTapup.
These motion events seem to apply whatever layout i'm in.

My problem is simply identifying which layout i'm currently using so I
can define the appropriate action.

I guess what i'm trying to do is a bit like this:

@Override
public boolean onSingleTapUp(MotionEvent e)
{
if(using main layout)
{
//do this
}
   else if (using settings layout)
{
  // do that
}
return false;
}

Is this the right way to do things ?

Thanks for the much needed 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] using SQLiteOpenHelper outside emulator

2009-08-24 Thread robin bakkerus

Is it possible to use/test the SQLiteOpenHelper outside the emulator
(to speed up development).
The problem is that constructor of the SQLiteOpenHelper needs an
Android.context.Context.
Hence is is possible to mimic the context.

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



[android-developers] Spinner widget setposition

2009-08-24 Thread Federico Paolinelli

Hi all,
I am having some problems using a spinner with a SimpleCursorAdapter.
Basically, my activity ships a button to start a new activity that add
new items to the table the spinner is linked to.
Everything works beautifully, but the problems started when I wanted
to set the spinner to the last created item. I thought that returing
the rowid of the new item would have been ok, but the code

if(resultCode == Activity.RESULT_OK){
Long rowid = data.getLongExtra(mDbHelper.ST_ROW_ID, -1);
if(rowid != -1){
mSpinner.setSelection(rowid.intValue());
}
return;
}

has no effect on the spinner. I also tried to force manually to some
value the argument of setSelection, with no results. Moreover, I am
not sure setSelection would be the right method, since it accepts a
position and not an id.

Any  hints?
Thanks in advance and best regards,
 Federico

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



[android-developers] call outputstream

2009-08-24 Thread slenzi

Is there any way to access the voice outputstream during a call, such
that you could intercept and manipulate the byte data before its sent
over the air?

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



[android-developers] Hook into SMS delivery

2009-08-24 Thread Philipp

Hi folks,

I'm just writing a little app to have a convenient way to send SMS
through a free web-base SMS gateway. This wouldn't be much of a
problem for itself, but for the reason of seamlessness, I would like
to fully integrate the program into Android. When the user sends a new
message, a dialog should appear to let him choose between normal
sending and sending through the gateway. But for doing so, I need a
way to have my app/service started after the press on Send.
When sending an SMS, logcat shows the following:
[code]
I/ActivityManager(  564): Starting activity: Intent
{ action=android.intent.action.MAIN categories=
{android.intent.category.LAUNCHER} flags=0x1020 comp=
{com.android.mms/com.android.mms.ui.ConversationList} }
W/IInputConnectionWrapper(  607): showStatusIcon on inactive
InputConnection
I/ActivityManager(  564): Displayed activity
com.android.mms/.ui.ConversationList: 1186 ms
D/dalvikvm(  607): GC freed 4153 objects / 116272 bytes in 139ms
I/ActivityManager(  564): Starting activity: Intent { comp=
{com.android.mms/com.android.mms.ui.ComposeMessageActivity} }
I/ActivityManager(  564): Displayed activity
com.android.mms/.ui.ComposeMessageActivity: 670 ms
D/dalvikvm(  604): GC freed 4418 objects / 252872 bytes in 151ms
W/KeyCharacterMap(  629): No keyboard for id 0
W/KeyCharacterMap(  629): Using default keymap: /system/usr/keychars/
qwerty.kcm.bin
D/dalvikvm(  629): GREF has increased to 201
D/SmsProvider(  604): insert url=content://sms/outbox, match=8
I/ActivityManager(  564): Stopping service:
com.android.mms/.transaction.SmsReceiverService
[/code]

Is there a way to hook into the message queue to get the result of
ComposeMessageActivity, or even better, to have the call of
SmsProvider redirected to my service?

Many thanks in advance and best regards,
Philipp

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

2009-08-24 Thread Shawn Brown

 Rather wasteful on a platform like Android. Are there any other
 options other than Formatter?

I think it does exactly what you want

          final Formatter f = new Formatter();

use Formatter(Appendable a)

 StringBuilder sb = new StringBuilder();

 final Formatter f = new Formatter(sb);

         for (Sentinel s : Sentinel.mSentinels) {
          if (s.mIsLive) {
                  pos++;
                f.format(%4d%5d, s.mPos.x, s.mPos.y);
             canvas.drawText(sb.toString(), x_pos, (pos *
mHalfHeight), mPaint);
              }
  sb.setLength(0);

see StringBuilder

toString

public String toString()

Returns a string representing the data in this sequence. A new
String object is allocated and initialized to contain the character
sequence currently represented by this object. This String is then
returned. Subsequent changes to this sequence do not affect the
contents of the String.

I assume a String is less costly than a Formatter.

Shawn

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

Just to follow that up, I was able to get it working as well for a
custom project (thanks Gabor!). I had to make some minor changes to
the instructions to get it all to work for me, particularly with the
SDCard on cupcake. If folks are interested, here's what I did:

http://blog.lv25.com/2009/08/emma-code-coverage-for-your-android.html

Tim

On Aug 20, 6:08 am, Gabor gabor.andr...@googlemail.com wrote:
 Hi All,

 Finally, the emma code coverage measurement is working for me (for a
 custom project). So here are the steps what you need to make it work
 (I have tested it, with Java 1.5 on Ubuntu 8.04):

 mkdir android-src
 cd android-src
 repo init -u git://android.git.kernel.org/platform/manifest.git -b
 cupcake
 repo sync

 # Add emma.jar to the system/core/rootdir/init.rc
 sed 's/\/system\/framework\/core.jar:\/system\/framework\/ext.jar:/\/
 system\/framework\/core.jar:\/system\/framework\/ext.jar:\/system\/
 framework\/emma.jar:/' system/core/rootdir/init.rc  system/core/
 rootdir/init.rc.tmp
 mv system/core/rootdir/init.rc.tmp system/core/rootdir/init.rc

 # Rebuild the boot image
 make bootimage

 # To build the full system image
 make -j4

 # Set the PATH:
 export PATH=${PATH}:/_path_/android-src/out/host/linux-x86/bin/

 # Build the emma jar itself
 make emma

 # Setting the environment and additional bash commands. (like
 m,mm,mmm, choosecombo etc) Notice the space after the dot!
 . build/envsetup.sh

 # Set EMMA_INSTRUMENTATION to true
 export EMMA_INSTRUMENT=true

 # Copy your project to development/samples/_projectname_ or
 somewhere..:)
 # Based on the ApiDemo create an Android.mk file for the project
 directory and the project test directory
 # The LOCAL_INSTRUMENTATION_FOR value in test dir Android.mk has to be
 equal with the LOCAL_PACKAGE_NAME defined in the Android.mk in the
 main project dir.
 # Compile the Application would like to instrument
 mmm development/samples/_projectname_

 # Set the ANDROID_PRODUCT_OUT directory for the emulator to know the
 image location
 export ANDROID_PRODUCT_OUT=/_path_/android-src/out/target/product/
 generic

 # Start an emulator with a simulated sdcard:
 emulator -sdcard path to sdcard

 # Remount the drive - it is needed to have a writable drive. without
 that sync wont work
 adb remount

 # Synchronize the local content with the emulator
 adb sync

 adb shell
 # create directory: mkdir /etc/coverageresult

 # Executing tests
 adb shell am instrument -w -e coverage true -e coverageFile /etc/
 coverageresult/coverage.ec hu.agsoftware.sample.tests/
 android.test.InstrumentationTestRunner

 # Dump a runtime coverage data file:
 adb pull /etc/coverageresult/coverage.ec coverage.ec

 # Generate a coverage report
 java -cp external/emma/lib/emma.jar emma report -r html -in
 coverage.ec -sp development/samples/_projectname_/src -in out/target/
 common/obj/APPS/_projectname_intermediates/coverage.em

 I hope it helps.

 Gabor

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



[android-developers] Re: Android 1.5 SDK now available

2009-08-24 Thread RichardMAN

Hey guys

Does anyone know would the other Google Maps API service classes such
as GDirections be available to Google API in android?

Regards
RichardMAN

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

2009-08-24 Thread Shany

Hey guys,
I was wondering on this for quite a bit but couldn't find any
solution!

1. My app bind to a service (through AIDL interface)
2, The service runs in the backround and send to my activity a value
every now and than (and also a notification is sent)

When I click the HOME button, and than navigate back to my application
(while still i get notifications) to my app and launch it, everything
is fine, i'm back to my app as if I never left it (i get a window with
my value displayed)

When I click the BACK button the service dies along with the activity
that is bound to it (the onDestroy() of the service is fired and the
code there removes all the messages)

now, I removed the code that disabled the message handler to my
services, and the service is kept a live even if i killed the host
activity.

however, the service still runs in the bk and i get notifications but
when I run my activity again, it wants to start a new service! which
means, the service in the background is left to run without any
binding to it, and it just there in the void running.

my question:
How mp3 alike apps in android catch the BACK button and still able to
keep connection to a service even after the activity is closed?

i can save the process ID of the service, but is it possible to attach
your self to the service? or even re-bind to the existing one?

how does it work??
thanx!

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



[android-developers] setContentView of called activity based on Calling Activity Intent

2009-08-24 Thread gonzo

Hi,

I'm fairly new to Android Development and i'm having slight trouble
with activity interaction.

I have one activity that calls another and passes with its intent some
text. At the called activity i wish to set the Content View based on
the received string. I've been stuck for hours now.
here's the code at the receiving activity.

Bundle extras = getIntent().getExtras();
String text=extras.getString(DetailsDbHelper.KEY_DETAIL);
if(text==Name)

setContentView(R.layout.ice_dateedit);

else
  setContentView(R.layout.ice_textedit);

I'm certain the text received is Name, as later in the code i'm
setting a TextView's text with this text and that seems proper.
But while setting contentView it always goes straight to the ELSE
part.

Assistance on this would really be appreciated. I'm unable to see what
is wrong, Please do throw some light on 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] java question

2009-08-24 Thread srinivasarao

hi Sir,
  Take Class name as input (command line) and loads that class
Dynamically and calls the main method in that class..how will we do
that?

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



[android-developers] Connecting multiple phones

2009-08-24 Thread julia_robinson

Hello . I am looking forward to developing an application which needs
a cellphone to connect with about 20 cellphones in its vicinity (say
about 50 metres) .

1. Which technology allows this ?
2. Does Android support 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] Hi Need help

2009-08-24 Thread Nishat

Hi All

I am a new Android developer and i am trying some basic stuff like the
hello world application.

I am able to create a project and created a avd as well. when i am
running the project i am getting the error :

[2009-08-22 19:37:18 - HelloAndroid] Android Launch!
[2009-08-22 19:37:18 - HelloAndroid] adb is running normally.
[2009-08-22 19:37:18 - HelloAndroid] Could not find HelloAndroid.apk!

I can see that the apk file is in the bin directory and i tried to
install it manually from command line as well like :
HelloAndroid\binadb install HelloAndroid.apk

but it also give me error :
EOCD not found, not Zip
file 'HelloAndroid.apk' is not a valid zip file

My emulator is running and i configure the avd in the run wizard as
well.

I need help from seniors ... Please provide your expert comment
and sail me through my first application :))

Thanks in advance

Nishat


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 do I Activate the camera application from my app?

2009-08-24 Thread Getto

No. Camera App scale down bitmap when you use
android.media.action.IMAGE_CAPTURE action :-\
If you found a work around please let me know.

.g

On Aug 21, 9:21 am, Friso friso.kl...@gmail.com wrote:
 How can I get the full-size image from the camera? This method gives
 me a 256x192 pixels image.

 On Aug 21, 2:52 pm, jagtap.jj jagtap...@gmail.com wrote:

  Refer this
  Intent i = new Intent(android.media.action.IMAGE_CAPTURE);

          try{
                  startActivityForResult(i, TAKEPICTURE_ACTIVITY);

          }catch(ActivityNotFoundException e){
                  Toast.makeText(this, Application not available,
  Toast.LENGTH_SHORT).show();
                  Log.e(TAG, Error in taking picture);
          }

  �...@override
      protected void onActivityResult(int requestCode, int resultCode,
  Intent intent) {
          super.onActivityResult(requestCode, resultCode, intent);

        if (requestCode == TAKEPICTURE_ACTIVITY){
                  if (resultCode == RESULT_OK) {

                                  Bundle extras = intent.getExtras();
                                  Bitmap bitmap = (Bitmap) extras.get(data) 
  ;
               }
    }

  }

  in the bitmap  u will get the picture taken from camera.

  On Aug 20, 5:26 am, dualboot sv2...@gmail.com wrote:

   How do I pass an Intent from my application to the Camera application
   to bring it to the foreground?

   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: EMMA Code coverage and JUnit

2009-08-24 Thread Maya

hey Gabor,
thanks a lot for your help.
Actually i tried reproducing the same steps, it is working fine till
emulator starts, it launches emulator but it does not shows the home
screen
i tried steps after that, doing adb remount and adb sync, it pushes
all the neccessay files into the emulator, but emulator is still in
sleep state, just the first screen saying Android.. keeps up, does not
boot after that.
Then i tries running test cases using 'am' command no tests run and no
coverage file got generated.
Can  you tell me whats the problem in this.(all the bulding process wa
successfully passed with no errors)

Thanks,
Mayank

On Aug 20, 6:08 pm, Gabor gabor.andr...@googlemail.com wrote:
 Hi All,

 Finally, the emma code coverage measurement is working for me (for a
 custom project). So here are the steps what you need to make it work
 (I have tested it, with Java 1.5 on Ubuntu 8.04):

 mkdir android-src
 cd android-src
 repo init -u git://android.git.kernel.org/platform/manifest.git -b
 cupcake
 repo sync

 # Add emma.jar to the system/core/rootdir/init.rc
 sed 's/\/system\/framework\/core.jar:\/system\/framework\/ext.jar:/\/
 system\/framework\/core.jar:\/system\/framework\/ext.jar:\/system\/
 framework\/emma.jar:/' system/core/rootdir/init.rc  system/core/
 rootdir/init.rc.tmp
 mv system/core/rootdir/init.rc.tmp system/core/rootdir/init.rc

 # Rebuild the boot image
 make bootimage

 # To build the full system image
 make -j4

 # Set the PATH:
 export PATH=${PATH}:/_path_/android-src/out/host/linux-x86/bin/

 # Build the emma jar itself
 make emma

 # Setting the environment and additional bash commands. (like
 m,mm,mmm, choosecombo etc) Notice the space after the dot!
 . build/envsetup.sh

 # Set EMMA_INSTRUMENTATION to true
 export EMMA_INSTRUMENT=true

 # Copy your project to development/samples/_projectname_ or
 somewhere..:)
 # Based on the ApiDemo create an Android.mk file for the project
 directory and the project test directory
 # The LOCAL_INSTRUMENTATION_FOR value in test dir Android.mk has to be
 equal with the LOCAL_PACKAGE_NAME defined in the Android.mk in the
 main project dir.
 # Compile the Application would like to instrument
 mmm development/samples/_projectname_

 # Set the ANDROID_PRODUCT_OUT directory for the emulator to know the
 image location
 export ANDROID_PRODUCT_OUT=/_path_/android-src/out/target/product/
 generic

 # Start an emulator with a simulated sdcard:
 emulator -sdcard path to sdcard

 # Remount the drive - it is needed to have a writable drive. without
 that sync wont work
 adb remount

 # Synchronize the local content with the emulator
 adb sync

 adb shell
 # create directory: mkdir /etc/coverageresult

 # Executing tests
 adb shell am instrument -w -e coverage true -e coverageFile /etc/
 coverageresult/coverage.ec hu.agsoftware.sample.tests/
 android.test.InstrumentationTestRunner

 # Dump a runtime coverage data file:
 adb pull /etc/coverageresult/coverage.ec coverage.ec

 # Generate a coverage report
 java -cp external/emma/lib/emma.jar emma report -r html -in
 coverage.ec -sp development/samples/_projectname_/src -in out/target/
 common/obj/APPS/_projectname_intermediates/coverage.em

 I hope it helps.

 Gabor

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



[android-developers] ContentObserver

2009-08-24 Thread vivasvan

Hi,

Is it possible to keep a ContentObserver alive in an application that
does not have an activity, just broadcast receivers and services
invoked through them?

Thanks,
V.

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



[android-developers] Recording Playing file simantaneously

2009-08-24 Thread bharath paturi
HI All,


Is it possible to simultaneously play an audio file while recording
via the microphone?  Is there any API provided in Android SDK 1.5.


When I start a recording audio in the standard
way with the  MediaRecorder class, and then start playing back audio
in the standard way with the MediaPlayer class, it
seems that the recorder is cut off when the player starts.

Please help me if there is any way doing this application through
Android SDK 1.5.

-- 

Regards,
Bharath

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



[android-developers] Nike_Air_Force_1

2009-08-24 Thread gfgweg...@yeah.net

Nike_Air_Force_1
Nike_Air_Dunk
Jordan Ring
Jordan Fusion
Jordan 23 Mixture
GucciFashion
BOOTBape
 shoesASCIS
Air_max_man
ADIDAS SHOE
http://www.vipmalls.com/
Shoes For Female
http://www.vipmalls.com/
Woman BootSandal
Nike_shox_woman
Nike_Air_Jordan_w
Jordan_Fusion_w
Gucci woman
Dunk_Shoe_woman
Air_max_woman
AF1_Shoe_woman
Timberland_WRift_W
Puma_WPrada_W
LV_W
Louboutin_W
juicy couture shoe_W
DG_WCOACH_W
christian louboutin
ASCIS_WADIDAS_W
Kid Apparel
http://www.vipmalls.com/
Shoe For KidClothing For Kid
Handbag_Wallet
http://www.vipmalls.com/
Wallet
Handbag
Other Product
http://www.vipmalls.com/
Watch
Sunglass
Software
Jewerly
Hair Straigher
CapBelt
ED Hardy_men
DG menCOACH_men
LV men
Lacoste man Kobe man Puma_man   Timberland bootRift_man  Super Size
(14_15)
Prada_manNike_shoxNike_Air_JordanNike_Air_Force_1Nike_Air_DunkJordan
RingJordan   FusionJordan 23 Mixture   GucciFashion BOOTBape shoes
ASCISAir_max_manADIDAS SHOE more info
http://www.vipmalls.com/

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



[android-developers] Re: Has ADC submission site opened?

2009-08-24 Thread Bagpiper

Hey all,

I'm beginning to think that finding the submission site is part of
the challenge ;)

We're thinking of just publishing to the Android Market...

Any news, please, Google friends?

M

On Aug 20, 2:45 pm, karthikr karthik.scintill...@gmail.com wrote:
 Why hasnt there been any update anywhere regarding the status of the
 adc2,

 Or has it been mentioned somewhere that thesubmissionsites will open
 only after a specific dates?

 Regards,
 R.Karthik

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



[android-developers] Benefits of Android for Connectivity Reasons

2009-08-24 Thread salza

I am just thinking of a new application and I am pretty new to mobile
OS. For my application it would be very important, that there is an
easy connectivity between the smartphone and other blueetooth-able
devices.

In many articles I have read, that Android is the best OS regarding
connectivity reasons. All I know is, that Android offers Bluetooth
components but other OS like iPhone or Symbian have that too.

Has somone out there already made experiences with the topic of
connectivity? Do you know why it is being told that Android is better
then other OS?

And another question: Are there maybe alternative facilities of
communication, that Android supports very well (and better then other
OS)?

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

2009-08-24 Thread manigault

Maybe this will help you
http://stackoverflow.com/questions/500264/android-multiple-actions-on-a-list-view-focus-issue

On Jul 30, 5:26 pm, legerb drim...@gmail.com wrote:
 Each list item in myListViewis a linkified TextView, and a regular
 TextView.
 The problem is that once there is a touchable item in theListView,
 the touch works only for that item, that is - only links work, but the
 entire list item containing the link cannot be touch selected (only
 with the trackball). I tried this also with buttons inside the list
 items and the touch behavior was the same - only thebuttonview could
 be touched.
 Is there a way to make a list item touchable with touchable views
 inside?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: My emulator is running 100% CPU, it's annoying..

2009-08-24 Thread Chauncey Chen

Hi All,

Mine is also occupying 100% CPU. I am a fresh man and just now created
a HelloWorld in Eclipse. When I ran it as an Android application,
after a while, it keep 100% occupying some minutes and only the text
Android_ with black background in the emluator.

My OS is Windows XP and Eclipse is 3.4. I have tried JDK5 and JDK6. I
have tried many times today and yesterday.

Here is my console lines in Eclipse:
After I lunch as below,
[2009-08-24 19:37:43 - HelloWorld] --
[2009-08-24 19:37:43 - HelloWorld] Android Launch!
[2009-08-24 19:37:43 - HelloWorld] adb is running normally.
[2009-08-24 19:37:43 - HelloWorld] Performing com.test.HelloWorld
activity launch
[2009-08-24 19:37:43 - HelloWorld] Automatic Target Mode: launching
new emulator with compatible AVD 'my_avd'
[2009-08-24 19:37:43 - HelloWorld] Launching a new emulator with
Virtual Device 'my_avd'
[2009-08-24 19:37:52 - HelloWorld] New emulator found: emulator-5554
[2009-08-24 19:37:52 - HelloWorld] Waiting for HOME
('android.process.acore') to be launched...

No way, I kill the emluator, then as below,
[2009-08-24 19:39:24 - Emulator] emulator: emulator window was out of
view and was recentred
[2009-08-24 19:39:24 - Emulator]

On 8月21日, 下午3时57分, jiaoni jiaoni5...@gmail.com wrote:
 Hi,

 Many times (not all the times), my emulator is running 100% of one of
 my two CPUs on the machine.

 Can anyone tell me why it is so, and how can I reduce the cpu usage?

 Thanks a lot,
 Jiaoni

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

2009-08-24 Thread sathya

Provides project's news, tips and tricks and development examples.
android-developers.blogspot.com/
To support you in your efforts, Google has launched the Android
Developer Challenge, which will provide awards for great mobile apps
built on the Android ...
code.google.com/android/

http://www.123maza.com/1011/media

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 communicate to a socket in UNIX domain Datagram socket (IPC between Java and Linux application)?

2009-08-24 Thread Arun

Dear Friends,

I am looking for a solution to this problem ( IPC between Java and
Linux application):
- I have an application in LINUX that has a socket created using UNIX
Domain DataGram socket (by calling socket(PF_UNIX, SOCK_DGRAM, 0)),
and it binds to this socket with address /temp/myserver.
- I want to run this LINUX application from my Android UI Application
by calling running.exec API. But my concern is which Socket to use for
this purpose.
- I have explored and found a LocalSocket and LocalServerSocket, but
not sure if that would work, there it seems these are STREAM based
sockets (no documentation if these are STREAM or DATAGRAM based
socket)

I appreciate to share/provide any information on this.

Regards,
-Arun

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

2009-08-24 Thread Fallen Leaf

If your question is if you can submit an update after the 31st August
deadline according to the rules you cannot. If the update is before
the deadline I'm not sure since the submit website isn't online yet.
And about the size limit in the rules I haven't seen anything but I
guess when they put the submit website there'll be a limit, but again,
not sure at all.

On 24 ago, 11:39, Mike internet...@hotmail.com wrote:
 Hello,

 i have two questions about ADC:
 Is there a size limit for an application? Right now my game is at
 about 6MB, but it will most likely exeed 10MB.
 Is it possible to update the application after it has been submitted?
 (For additional content/bug fixes?)

 Thanks,
 Mike.

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



[android-developers] ADC 2 Submission Site -- Now live

2009-08-24 Thread David McLaughlin (Android Advocate)

The submission site for ADC 2 is now live! For full details, see our
blog post:

http://android-developers.blogspot.com/2009/08/android-developer-challenge-2-open-for.html

Enjoy,
David

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



[android-developers] fire up onKeyDown

2009-08-24 Thread petter

Hi,
I' d like to fire up onKeyDown() event from my source code (for
example from Activity). I want it, because i'd like to create program
for remote keyboard, which will be PC keyboard. PC will send to mobile
throw Socket message and mobile will fire up event from message in
socket. Message will contain pressed key on PC keyboard. In future i'd
like to create service, which will be starting on device power on .

thanks for reply

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



[android-developers] Jdbc driver problem

2009-08-24 Thread Alessio

Hi all.
Like object i have some problem with jdbc driver.

I wanna connect to a database server (postgresql) without write some
php script server side to comunicate with client (android mobile
phone), so can i use this driver?

http://jdbc.postgresql.org/

I try it in a normal java program and it works very well but when I
use this library in android program I have this exception (logcat
paste):

08-24 08:15:11.072: INFO/ActivityManager(568): Starting activity:
Intent { flags=0x1000 comp={com.prova.pgsql/
com.prova.pgsql.PGSQL} }
08-24 08:15:11.132: INFO/ActivityManager(568): Start proc
com.prova.pgsql for activity com.prova.pgsql/.PGSQL: pid=767 uid=10023
gids={}
08-24 08:15:11.152: DEBUG/AndroidRuntime(760): Shutting down VM
08-24 08:15:11.152: DEBUG/dalvikvm(760): DestroyJavaVM waiting for
non-
daemon threads to exit
08-24 08:15:11.172: DEBUG/dalvikvm(760): DestroyJavaVM shutting VM
down
08-24 08:15:11.172: DEBUG/dalvikvm(760): HeapWorker thread shutting
down
08-24 08:15:11.172: DEBUG/dalvikvm(760): HeapWorker thread has shut
down
08-24 08:15:11.172: DEBUG/jdwp(760): JDWP shutting down net...
08-24 08:15:11.172: DEBUG/jdwp(760): +++ peer disconnected
08-24 08:15:11.172: INFO/dalvikvm(760): Debugger has detached; object
registry had 1 entries
08-24 08:15:11.182: DEBUG/dalvikvm(760): VM cleaning up
08-24 08:15:11.232: DEBUG/dalvikvm(760): LinearAlloc 0x0 used 639228
of 4194304 (15%)
08-24 08:15:11.362: INFO/jdwp(767): received file descriptor 20 from
ADB
08-24 08:15:11.451: DEBUG/dalvikvm(541): GC freed 264 objects / 9912
bytes in 329ms
08-24 08:15:11.682: DEBUG/dalvikvm(541): GC freed 40 objects / 1696
bytes in 212ms
08-24 08:15:11.792: DEBUG/dalvikvm(541): GC freed 2 objects / 48 bytes
in 107ms
08-24 08:15:11.892: INFO/dalvikvm(767): Failed resolving Lorg/
postgresql/jdbc4/Jdbc4SQLXML; interface 131 'Ljava/sql/SQLXML;'
08-24 08:15:11.892: WARN/dalvikvm(767): Link of class 'Lorg/
postgresql/
jdbc4/Jdbc4SQLXML;' failed
08-24 08:15:11.892: ERROR/dalvikvm(767): Could not find class
'org.postgresql.jdbc4.Jdbc4SQLXML', referenced from method
org.postgresql.jdbc4.AbstractJdbc4Connection.createSQLXML
08-24 08:15:11.892: WARN/dalvikvm(767): VFY: unable to resolve new-
instance 391 (Lorg/postgresql/jdbc4/Jdbc4SQLXML;) in Lorg/postgresql/
jdbc4/AbstractJdbc4Connection;
08-24 08:15:11.892: WARN/dalvikvm(767): VFY:  rejecting opcode 0x22 at
0x
08-24 08:15:11.892: WARN/dalvikvm(767): VFY:  rejected Lorg/
postgresql/
jdbc4/AbstractJdbc4Connection;.createSQLXML ()Ljava/sql/SQLXML;
08-24 08:15:11.892: WARN/dalvikvm(767): Verifier rejected class Lorg/
postgresql/jdbc4/AbstractJdbc4Connection;
08-24 08:15:11.892: DEBUG/AndroidRuntime(767): Shutting down VM
08-24 08:15:11.892: WARN/dalvikvm(767): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
08-24 08:15:11.892: ERROR/AndroidRuntime(767): Uncaught handler:
thread main exiting due to uncaught exception
08-24 08:15:11.902: ERROR/AndroidRuntime(767): java.lang.VerifyError:
org.postgresql.jdbc4.AbstractJdbc4Connection
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
org.postgresql.Driver.makeConnection(Driver.java:393)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
org.postgresql.Driver.connect(Driver.java:267)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
java.sql.DriverManager.getConnection(DriverManager.java:192)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
java.sql.DriverManager.getConnection(DriverManager.java:228)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
com.prova.pgsql.PGSQL.onCreate(PGSQL.java:32)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2231)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
android.os.Handler.dispatchMessage(Handler.java:99)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
android.os.Looper.loop(Looper.java:123)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
android.app.ActivityThread.main(ActivityThread.java:3948)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
java.lang.reflect.Method.invokeNative(Native Method)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
java.lang.reflect.Method.invoke(Method.java:521)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
08-24 08:15:11.902: 

[android-developers] How to look up position in spinner from string array?

2009-08-24 Thread Fabian Sturm

Hello all!

I have a pretty simple question, but I am still hammering my brain with
finding an elegant solution.

I have a spinner filled with an array defined as xml resource:

string-array name=distances
itemitem1/item
itemitem2/item
/string-array

Whenever I close the application I save the selected string of the
spinner in a database. E.g. I save item1.

On application restart I now want to relaod the spinner with the
previous selection. Therefore I read item1 from the db and now have to
somehow lookup the position of it and there I am stuck.
An additionalproblem is that the array might have changed from the time
where the data was saved to the db.

I hope I explained my problem clear enough.

Anyways lots of thanks, Fabian




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



[android-developers] Jdbc driver problem

2009-08-24 Thread Alessio

Hi all.
Like object i have some problem with jdbc driver.

I wanna connect to a database server (postgresql) without write some
php script server side to comunicate with client (android mobile
phone), so can i use this driver?

http://jdbc.postgresql.org/

I try it in a normal java program and it works very well but when I
use this library in android program I have this exception (logcat
paste):

08-24 08:15:11.072: INFO/ActivityManager(568): Starting activity:
Intent { flags=0x1000 comp={com.prova.pgsql/
com.prova.pgsql.PGSQL} }
08-24 08:15:11.132: INFO/ActivityManager(568): Start proc
com.prova.pgsql for activity com.prova.pgsql/.PGSQL: pid=767 uid=10023
gids={}
08-24 08:15:11.152: DEBUG/AndroidRuntime(760): Shutting down VM
08-24 08:15:11.152: DEBUG/dalvikvm(760): DestroyJavaVM waiting for non-
daemon threads to exit
08-24 08:15:11.172: DEBUG/dalvikvm(760): DestroyJavaVM shutting VM
down
08-24 08:15:11.172: DEBUG/dalvikvm(760): HeapWorker thread shutting
down
08-24 08:15:11.172: DEBUG/dalvikvm(760): HeapWorker thread has shut
down
08-24 08:15:11.172: DEBUG/jdwp(760): JDWP shutting down net...
08-24 08:15:11.172: DEBUG/jdwp(760): +++ peer disconnected
08-24 08:15:11.172: INFO/dalvikvm(760): Debugger has detached; object
registry had 1 entries
08-24 08:15:11.182: DEBUG/dalvikvm(760): VM cleaning up
08-24 08:15:11.232: DEBUG/dalvikvm(760): LinearAlloc 0x0 used 639228
of 4194304 (15%)
08-24 08:15:11.362: INFO/jdwp(767): received file descriptor 20 from
ADB
08-24 08:15:11.451: DEBUG/dalvikvm(541): GC freed 264 objects / 9912
bytes in 329ms
08-24 08:15:11.682: DEBUG/dalvikvm(541): GC freed 40 objects / 1696
bytes in 212ms
08-24 08:15:11.792: DEBUG/dalvikvm(541): GC freed 2 objects / 48 bytes
in 107ms
08-24 08:15:11.892: INFO/dalvikvm(767): Failed resolving Lorg/
postgresql/jdbc4/Jdbc4SQLXML; interface 131 'Ljava/sql/SQLXML;'
08-24 08:15:11.892: WARN/dalvikvm(767): Link of class 'Lorg/postgresql/
jdbc4/Jdbc4SQLXML;' failed
08-24 08:15:11.892: ERROR/dalvikvm(767): Could not find class
'org.postgresql.jdbc4.Jdbc4SQLXML', referenced from method
org.postgresql.jdbc4.AbstractJdbc4Connection.createSQLXML
08-24 08:15:11.892: WARN/dalvikvm(767): VFY: unable to resolve new-
instance 391 (Lorg/postgresql/jdbc4/Jdbc4SQLXML;) in Lorg/postgresql/
jdbc4/AbstractJdbc4Connection;
08-24 08:15:11.892: WARN/dalvikvm(767): VFY:  rejecting opcode 0x22 at
0x
08-24 08:15:11.892: WARN/dalvikvm(767): VFY:  rejected Lorg/postgresql/
jdbc4/AbstractJdbc4Connection;.createSQLXML ()Ljava/sql/SQLXML;
08-24 08:15:11.892: WARN/dalvikvm(767): Verifier rejected class Lorg/
postgresql/jdbc4/AbstractJdbc4Connection;
08-24 08:15:11.892: DEBUG/AndroidRuntime(767): Shutting down VM
08-24 08:15:11.892: WARN/dalvikvm(767): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
08-24 08:15:11.892: ERROR/AndroidRuntime(767): Uncaught handler:
thread main exiting due to uncaught exception
08-24 08:15:11.902: ERROR/AndroidRuntime(767): java.lang.VerifyError:
org.postgresql.jdbc4.AbstractJdbc4Connection
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
org.postgresql.Driver.makeConnection(Driver.java:393)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
org.postgresql.Driver.connect(Driver.java:267)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
java.sql.DriverManager.getConnection(DriverManager.java:192)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
java.sql.DriverManager.getConnection(DriverManager.java:228)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
com.prova.pgsql.PGSQL.onCreate(PGSQL.java:32)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2231)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
android.os.Handler.dispatchMessage(Handler.java:99)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
android.os.Looper.loop(Looper.java:123)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
android.app.ActivityThread.main(ActivityThread.java:3948)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
java.lang.reflect.Method.invokeNative(Native Method)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
java.lang.reflect.Method.invoke(Method.java:521)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
08-24 08:15:11.902: 

[android-developers] Speech Recognition on the Emu PROB

2009-08-24 Thread Vexile


Does anyone get a solution for running speech recognition on the
emulator?

Or is there any other way to do the recognition on emulator?

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



[android-developers] Nike_Air_Force_1

2009-08-24 Thread hdgjhf fdjdfg

Nike_Air_Force_1
Nike_Air_Dunk
Jordan Ring
Jordan Fusion
Jordan 23 Mixture
GucciFashion
BOOTBape
 shoesASCIS
Air_max_man
ADIDAS SHOE
http://www.vipmalls.com/
Shoes For Female
http://www.vipmalls.com/
Woman BootSandal
Nike_shox_woman
Nike_Air_Jordan_w
Jordan_Fusion_w
Gucci woman
Dunk_Shoe_woman
Air_max_woman
AF1_Shoe_woman
Timberland_WRift_W
Puma_WPrada_W
LV_W
Louboutin_W
juicy couture shoe_W
DG_WCOACH_W
christian louboutin
ASCIS_WADIDAS_W
Kid Apparel
http://www.vipmalls.com/
Shoe For KidClothing For Kid
Handbag_Wallet
http://www.vipmalls.com/
Wallet
Handbag
Other Product
http://www.vipmalls.com/
Watch
Sunglass
Software
Jewerly
Hair Straigher
CapBelt
ED Hardy_men
DG menCOACH_men
LV men
Lacoste man Kobe man Puma_man   Timberland bootRift_man  Super Size
(14_15)
Prada_manNike_shoxNike_Air_JordanNike_Air_Force_1Nike_Air_DunkJordan
RingJordan   FusionJordan 23 Mixture   GucciFashion BOOTBape shoes
ASCISAir_max_manADIDAS SHOE more info
http://www.vipmalls.com/

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



[android-developers] Re: XML-RPC

2009-08-24 Thread Mark Murphy

 No one has an idea?

score=new FilmScore();

score.votes=response.get(votes);
score.total=response.get(total);
score.average=response.get(average);

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



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



[android-developers] Re: ADC and autoupdate?

2009-08-24 Thread Dan Sherman
Are you possibly able to point out a toolkit that provides an auto-update
feature?

- Dan

On Mon, Aug 24, 2009 at 11:23 AM, Sebastian sdelm...@gmail.com wrote:


 While considering different possible scenarios for app conflicts
 during ADC judging (i.e. someone installed the app from the market,
 got the latest update, and is now offered an older version for
 judging) I came up with an interesting posibility.

 What happens if my app has auto update capabilities? There are
 several toolkits out there offering this feature.

 So when someone gets the app for judging, it will offer the user the
 possibility of getting the latest version.

 The only wording in the terms and conditions that seems to apply here
 is 9.a. There is no opportunity to improve or modify an application
 between the First and Second Rounds of Judging. ... but it seems to
 imply that you won't be able to submit a new version, and that they
 will distribute the original binary on both rounds.

 Could we get some clarification from Google as to what happens in this
 case?

 - Is it allowed for my app to update itself?

 - What happens when someone has installed my app from the market, has
 updated it, and then gets to judge it on the contest?

 - Will existing users of my app not be offered to judge it?

 And for those of you claiming it would be unfair to update my app in
 the middle of the contest, consider the case of an app that uses web
 views to offer content produced by a web server... that application
 can get feature updates at any time while still using the same
 binary. I know it's the nature of the technology (and I'm glad it is
 that way) but it does affect the fairness of judging.

 And yes, all these issues make it very tricky to create a fair and
 balanced judging process.
 


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

2009-08-24 Thread Terry

hi, everyone.

jarkata commons lib is very useful for our everyday development.

is there any porting to android?

or is there a good way to porting the jarkart commons libs to the
android environment?

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



[android-developers] Lossless rotation of a jpeg image in Android (without fully decoding the image). How to?

2009-08-24 Thread RaulHK

Hello,

I would appreciate to hear from you what would be the available
options in Android to perform a lossless jpeg rotation of a jpeg image
- Rearranging the image data  from landscape to portrait by rotation
without ever fully decoding the image.

My problem is that my device's camera always take the images in
landscape mode and sometimes I would need to rotate the image to
portrait to be used in my application. This takes time and memory if I
need to do it in the standard way (decode the image, apply rotation
operation to the pixels and encode again). Doing it without decoding
the image would bring a significant improvement in performance.

I have seen that in Android platform (Cupcake) jpegtran.c (which
performs this operation beautifully) is available under /external/jpeg
but this functionality is not available (a.f.a.k) on the application
framework. How can I use this function? I guess I need to use JNI to
be able to access this functionality, right? Other ways?

Could you give me any hint on how I could do this or if there is
another easier and quicker way to do it?

Thank you in advance for any reply.

R.

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

2009-08-24 Thread Dimitar Dimitrov

@Mark Murphy,
I think by right soft key, he meant the BACK button.

You can disable the BACK button, but I too think that you can't do the
same for the HOME button.

With the code you have posted, you disable default key handling for
all buttons, except HOME (not possible, AFAIK) and BACK (because you
use the default behavior, by calling super.onKeyDown(keyCode, event))

Android has received some criticism about its platform consistency and
lack of Google-recommended interface guidelines (in the spirit of
Apple's HIG). Whether that's justified is another topic, but keep in
mind that it's not advisable to change the default behavior of system-
used buttons for something more than sample/tutorial applications.

Dimitar

On Aug 22, 2:03 pm, Mark Murphy mmur...@commonsware.com wrote:
 Shang Hao wrote:
  Hi,
  dis
  I m making a test application and want to able all keys excluding the
  back button.. Using below code i am not able to disable HOME key
  and right soft key. Please suggest what to do.

    �...@override
     public boolean onKeyDown(int keyCode, KeyEvent event) {
             if(keyCode == KeyEvent.KEYCODE_BACK){
                     return super.onKeyDown(keyCode, event);
             }
         else   {
                     return true;
             }

     }

 You cannot disable the home key, and Android does not have soft keys.

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

 _Beginning Android_ from Apress Now 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
-~--~~~~--~~--~--~---



  1   2   3   >