[android-developers] Position of tha zoom in a mapView

2009-06-19 Thread jphdsn

Hi

If anyone knows how to change the position of the zoom in a mapView.

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] BroadcastReceiver and Google Services Inquiry

2009-06-19 Thread kk

Hi All,

I have been working on BroadcastReceiver code to capture GMAIL events
and try to extract data to create an email event log.

Although the registration of the BroadcastReceiver using
Intent.PROVIDER_CHANGED for gmail appears to be correctly formed and
no exceptions are generated.  I have my doubts whether the receiver is
able to capture gmail event for Intent.PROVIDER_CHANGED, generated
when unread email is available, since code in my BroadcastReceiver is
never activated.   Upon reading the BroadcastReciever API docs (see
excerpt below) I see that BroadcastReceivers are not designed to
capture intents used with startActivity() and that BroadcastReceivers
only receive intents generated from a sendBroadcast() method call.
For your reference see my code snippets below.

Is the BroadcastReceiver mechanism not the appropriate method to
capture email/gmail/sms events?



BroadcastReceiver code is the following:

public class EmailReceiver extends BroadcastReceiver {
/**
 *
 */

String TAG= "MY_TAG:RECEIVER";

@Override
public void onReceive(Context context, Intent intent) {
//
Log.i(TAG, "Action=" + intent.getAction());
  if (Intent.ACTION_PROVIDER_CHANGED.equals(intent.getAction
())) {
  Uri dataURI= intent.getData();
  String dataURIPath=dataURI.getPath();
  Log.i(TAG, dataURIPath);
   }
}
}


BroadcastReceiver code registration for gmail is the following:
//

@override
public void onCreate(Bundle b){


EmailReceiver myMailReceiver = new EmailReceiver();

..

}


@Override
public void onResume(){
super.onResume();

 try{
   IntentFilter mailFilter = new IntentFilter
( Intent.ACTION_PROVIDER_CHANGED, "content://gmail-ls/unread/^i");
   // IntentFilter mailFilter = new IntentFilter
( Intent.ACTION_PROVIDER_CHANGED, "gmail-ls");
registerReceiver( myMailReceiver, mailFilter);
Log.i(myMailReceiver.TAG, "MailReceiver registered");
  }catch(Exception e){
Log.e(myMailReceiver.TAG, "Intent Filter malformed");
  }

}

Excerpt from BroadcastReceiver Doc:

Base class for code that will receive intents sent by sendBroadcast
().



Note that, although the Intent class is used for sending and receiving
these broadcasts, the Intent broadcast mechanism here is completely
separate from Intents that are used to start Activities with
Context.startActivity(). There is no way for a BroadcastReceiver to
see or capture Intents used with startActivity(); likewise, when you
broadcast an Intent, you will never find or start an Activity. These
two operations are semantically very different: starting an Activity
with an Intent is a foreground operation that modifies what the user
is currently interacting with; broadcasting an Intent is a background
operation that the user is not normally aware of.

.

Regards,

KK
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: global variable and get website address question

2009-06-19 Thread Tsai stanly
thanks for your reply,

for first question,
how can i do the garbage collection?
for second,
i was implement,but haw can get the link "address"?

my code of implement shouldOverrideUrlLoading is bellow,
how can i get address? thanks!

private class class_WebViewClient extends WebViewClient {
 @Override
 public boolean shouldOverrideUrlLoading(WebView view, String url) {
 view.loadUrl(url);
 return true;
 }
  }
2009/6/19 Mark Murphy 

>
> > one is how can I define a global variable that can deliver between
> > several activities?
>
> If the activities are all in your process, you can use a public static
> data member. Be careful, though, that you do not mess up your garbage
> collection -- things held onto from static data members never get garbage
> collected.
>
> > two is how can I get the website address when I link to other sites?
> > for detail,
> > i use the webview to browse the web,but when i click the link on the
> > web,
> > i want to get the linking address
>
> Attach a WebViewClient to your WebView, then implement
> shouldOverrideUrlLoading() on the WebViewClient.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>
>
>
> >
>

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



[android-developers] Re: Difference between invalidate() and postInvalidate()

2009-06-19 Thread Deren

Yeah but why isn't the View redrawn if I call invalidate() from
computeScroll()?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] App Icon and Name not being shown by Installer

2009-06-19 Thread Doug

Ok, this has me stumped - I've seen it on multiple phones (v 1.0 thru
1.5) but can't find any evidence anyone else seen the problem... so
here we go:

When I install my app, the installer shows the package-name and a
generic app icon.
If the app is already installed, the installer will show the CORRECT
app name and icon - same APK!

It gets stranger...

When I open up Menu->Settings->Applications->Manage Applications

The initial list has a bunch of app names, with generic icons next to
them... the icons then get fleshed out over a second or so.  Then the
spinner stops... I scroll down the list...

A bunch of the apps still have the default icon (I know some do not
have icons or even names, but the ones I am talking about here do) -
if I open up *any* applications, and then hit the 'back' button
**ALL** of the apps that had missing icons now have their correct
icons displaying.

Here is part of my manifest (with names changed to protect the guilty)
(Note, I even put the Label/Icon on the main activity too... to no
effect)


http://schemas.android.com/apk/res/android";
  package="com.mememe.android.youyouyoul"
  android:versionName="1.0.8" android:versionCode="9">













.
.
.




On a new install, the installer shows the app name as
"com.mememe.android.youyouyou" (too long for screen), with the
default 'screen-with-a-cog-in-front-of-it' icon.
On an upgrade, the installer shows the app name as whatever is in
"@string/app_name", with the icon present in "@drawable/icon"

Anyone with any ideas/thoughts?

Thanks
Doug
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: global variable and get website address question

2009-06-19 Thread Tsai stanly
sorry,about first quest,
I want the variable can deliver between different .java in the same project.

2009/6/19 Tsai stanly 

> thanks for your reply,
>
> for first question,
> how can i do the garbage collection?
> for second,
> i was implement,but haw can get the link "address"?
>
> my code of implement shouldOverrideUrlLoading is bellow,
> how can i get address? thanks!
>
> private class class_WebViewClient extends WebViewClient {
>  @Override
>  public boolean shouldOverrideUrlLoading(WebView view, String url) {
>  view.loadUrl(url);
>  return true;
>  }
>   }
> 2009/6/19 Mark Murphy 
>
>
>> > one is how can I define a global variable that can deliver between
>> > several activities?
>>
>> If the activities are all in your process, you can use a public static
>> data member. Be careful, though, that you do not mess up your garbage
>> collection -- things held onto from static data members never get garbage
>> collected.
>>
>> > two is how can I get the website address when I link to other sites?
>> > for detail,
>> > i use the webview to browse the web,but when i click the link on the
>> > web,
>> > i want to get the linking address
>>
>> Attach a WebViewClient to your WebView, then implement
>> shouldOverrideUrlLoading() on the WebViewClient.
>>
>> --
>> Mark Murphy (a Commons Guy)
>> http://commonsware.com
>> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>>
>>
>>
>> >>
>>
>

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



[android-developers] Activity not found... sometimes!

2009-06-19 Thread Doug

I have an app that's currently being beta tested by around 400 helpful
souls.
For 399 of these it's working 100% perfectly.
For 1 it's not.  (he has the same version of CupCake everyone else
has, he has the same version of code everyone else has)

In the onCreate for my main activity I launch (via
'startActivityForResult(...)') a setup activity if necessary.  This is
all per the official documentation, and even takes advantage of the
"if the calling activity has not yet been displayed, it will be
deferred until the new activity returns in order to avoid screen
flickering" (very nice, by the way).  As I say, on 399/400 phones
(mostly G1's) this works perfectly according to spec.

Mr 400 gets told the app exited unexpectedly - every time.

I did some testing, and was able to get the problem to happen to me
ONCE (ever) - the stack-trace showed me that the
'startActivityForResult(...)' method failed with an
'ActivityNotFoundException'.  This was on the emulator, which was
running a bit slow after a tiring day.

The activity in question *is* present, and has worked every time I
have called it except once.

My question is: Is there any reason the runtime would suddenly decide
to ignore an activity?  Is there some strange whackiness that would
cause the PackageManager to have difficulty with the manifest?  (I
only ask this because I have other strange problems with the Installer
not recognizing the app label/icon)

Originally, the Activity in question was being launched by an Intent
that used an intentfilter in the manifest.  After reading a comment by
Diane H I changed it to launch using the class instead (still waiting
on results of that)

Anyone have any ideas?

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



[android-developers] zoomcontrol position in a mapView

2009-06-19 Thread jphdsn

Could we with the 1.5 sdk change the position of the zoomcontrol in a
mapView as The setBuidInZoomControls (different of getControl()method
is not a child of a view?

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] Is Calendar App exists in Android SDK 1.5?

2009-06-19 Thread Kasmoori Bindu
Hi All,

I couldn't find Calendar application in the emulator, is there any plug-in
to have all the applications enabled in emulator?

If Calendar app exists, what is the service API for Calendar application
supported by android.

Please reply,  your response is highly appreciated. Need this info urgently.

Best Regards,
Bindu

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



[android-developers] Book: Web On-The-Go

2009-06-19 Thread Bala

Google Android has been the source of inspiration for this book, Web
On-The-Go.
This book presents innovative ideas with fictionalized examples about
the Wireless Web. It is a book for all policy makers, executives,
engineers and general public.

A Forecast of Innovations for the Wireless Web World. It is a must
read for Tomorrow's Innovating Managers. It reveals innovation's
vulnerabilities, opportunities. Also it shows how to recognize
innovation's dynamics, emergent patters, and predictability.

Title: Web On-The-Go.
Subtitle: A Preview of The Way of Living in the Wireless Web World.
Watch the video: http://www.youtube.com/watch?v=Sv9sxJdy-io

eBook available at:
http://www.booksonboard.com/index.php?BODY=viewbook&BOOK=458654

Your comments and feedback will be very valuable.

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



[android-developers] mediaplayer error -4

2009-06-19 Thread l hx
a mp3 file which can be played well in sdcard. but when i copy it to another
subarea in linux linked as /data/test. but i can not be played in that
directory

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



[android-developers] 3D Streaming on Android Phone?

2009-06-19 Thread javame_android

Hi Everybody,

I would like to know whether it is possible to implement 3D streaming
on Android phone. We have our own 3D studio which takes as input 3Ds
and maya files and generates .q3z file. Now if I call this .q3z file
using url then is it possible to render it on Android phone. I have
Java Applet player ready for it and it runs fine. Can that be ported
to Android phone.

I have ported some part of it i.e. uptil decoding .q3z file, but it
takes a lot of time to decode whereas in Java Applet Player the
decoding and rendering gets completed quickly. This is tested just on
emulator so assuming it will be even slower on Phone. So I would like
to know whether its possible to do so or not.


Thanks & Regards
Sunil
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Is Calendar App exists in Android SDK 1.5?

2009-06-19 Thread Mike Hearn

There isn't a calendar API in Android currently, sorry.

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

2009-06-19 Thread sunita

So you want to say that there is no way to override the AnalogClock
Widget at the home screen ,to display our custom clock,am I right?
following is the  the xml im using for my custom widget

1.
2.
3.http://schemas.android.com/apk/res/
com.android.alarmclock_cs"
5.
6.  android:layout_width="wrap_content"
7.   android:layout_height="fill_parent"
8.
9.  widget:dials="@drawable/port_idle_bigclock_bg_am"
10. widget:hand_hours="@drawable/port_idle_bigclock_time"
11. widget:hand_minutes="@drawable/port_idle_bigclock_min"/>
12.

I'm getting the following warning at line no. 3.

WARN/AppWidgetHostView(612): android.view.InflateException: Binary XML
file line #3: Error inflating class
com.android.alarmclock_cs.AnalogClock_cs
.
.
.
WARN/AppWidgetHostView(612): Caused by:
java.lang.ClassNotFoundException:
com.android.alarmclock_cs.AnalogClock_cs in loader
dalvik.system.pathclassloa...@400190f8

Is there any way or workaround so that we can add our custom analog
clock at the home screen widget?

-Thanks


On Jun 18, 10:32 pm, Romain Guy  wrote:
> You cannot use your own views in Home widgets, for security reasons.
>
>
>
>
>
> On Wed, Jun 17, 2009 at 10:48 PM, sunita wrote:
>
> > I want to make my own Analog class by extending View.but
> > it is giving
>
> >  WARN/AppWidgetHostView(614): Caused by:
> > java.lang.ClassNotFoundException:
> > com.back.alarmclock_cs.AnalogClock_new in loader
> > dalvik.system.pathclassloa...@400190f8
>
> > 06-18 10:12:25.848: WARN/AppWidgetHostView(614):
> > android.view.InflateException: Binary XML file line #17: Error
> > inflating class com.back.alarmclock_cs.AnalogClock_new
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them- 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] Cannot Decode Images from sdcard using BitmapFactory.Options

2009-06-19 Thread Shre555

Hi,

I am tring to get a image from the images stored on the sdcard of my
Android

but i am getting a skia error using BitmapFactory

When I just take the image directly without using BitmapFactory class
I get the image.

But the purpose of using BitmapFactory is scaling down the image size
by using inSample =4;

but I get skia as the error

Here is my code after which the logcat details are also given



Java:
public class bitD extends Activity {
 private int SELECT_IMAGE = 200;

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

  startActivityForResult(new Intent(Intent.ACTION_PICK,
 
android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI),
SELECT_IMAGE);
 }

 @Override
 protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
  super.onActivityResult(requestCode, resultCode, data);
  if (requestCode == SELECT_IMAGE) {
   if (resultCode == Activity.RESULT_OK) {

Uri selectedImage = data.getData();

System.out.println("Uri of the selected img is "
  + selectedImage);

try {
 InputStream is = getContentResolver
().openInputStream(
   selectedImage);

 BitmapFactory.Options opts = new
BitmapFactory.Options();
 Bitmap bm;

 opts.inJustDecodeBounds = true;
 bm = BitmapFactory.decodeStream(is, null,
opts);

 System.out.println("ht" + opts.outHeight);
 System.out.println("wt" + opts.outWidth);
 System.out.println("mime" +
opts.outMimeType);

 opts.inJustDecodeBounds = false;
 opts.inDither = true;
 opts.inPreferredConfig =
Bitmap.Config.RGB_565;
 // this will resize the bm
 opts.inSampleSize = 4; // scaled down by 4
 bm = BitmapFactory.decodeStream(is, null,
opts);

 setContentView(R.layout.main);
 ImageView iv1 = (ImageView) findViewById
(R.id.ImageView01);
 iv1.setImageBitmap(bm);

} catch (FileNotFoundException e) {
 // TODO Auto-generated catch block
 e.printStackTrace();
}

   }

  }
 }




Here is the ouput of my logcat


06-19 12:01:21.140: DEBUG/SurfaceFlinger(56): Screen about to return,
flinger = 0x127c58
06-19 12:01:21.350: DEBUG/dalvikvm(316): GC freed 875 objects / 48416
bytes in 89ms
06-19 12:01:21.450: DEBUG/dalvikvm(316): GC freed 148 objects / 5720
bytes in 88ms
06-19 12:01:21.560: DEBUG/dalvikvm(316): GC freed 23 objects / 1064
bytes in 87ms
06-19 12:01:21.780: DEBUG/KeyguardViewMediator(56): pokeWakelock(5000)
06-19 12:01:22.870: VERBOSE/ImageGallery2(316): /
ImageBlockManager.onPause
06-19 12:01:22.890: INFO/System.out(2551): Uri of the selected img is
content://media/external/images/media/34
06-19 12:01:22.960: INFO/System.out(2551): ht1536
06-19 12:01:22.960: INFO/System.out(2551): wt2048
06-19 12:01:22.970: INFO/System.out(2551): mimeimage/jpeg
06-19 12:01:22.970: DEBUG/skia(2551): xxx jpeg error 53 Not a
JPEG file: starts with 0x%02x 0x%02x
06-19 12:01:23.080: INFO/ActivityManager(56): Displayed activity
co.pad.BD/.bitD: 14010 ms
06-19 12:01:28.200: DEBUG/dalvikvm(163): GC freed 1543 objects / 79424
bytes in 108ms
06-19 12:01:33.170: DEBUG/dalvikvm(180): GC freed 91 objects / 4840
bytes in 77ms
06-19 12:01:38.200: DEBUG/dalvikvm(316): GC freed 790 objects / 35944
bytes in 103ms


Please someone help me out 

Is there a work around / can i do this differently without consuming a
lot of memory(I do not want to end up with Out of Memory Error.)


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: global variable and get website address question

2009-06-19 Thread Tsai stanly
solved.

for two:
use  WebViewClient.getTitle()

for one:
eg:
class A{
 static int a=1;
 public void doSomethingElse(){
}
}
class B{
 public void doAddA(){
   A.a=A.a+1;
 }
}



2009/6/19 Tsai stanly 

> sorry,about first quest,
> I want the variable can deliver between different .java in the same
> project.
>
> 2009/6/19 Tsai stanly 
>
>  thanks for your reply,
>>
>> for first question,
>> how can i do the garbage collection?
>> for second,
>> i was implement,but haw can get the link "address"?
>>
>> my code of implement shouldOverrideUrlLoading is bellow,
>> how can i get address? thanks!
>>
>> private class class_WebViewClient extends WebViewClient {
>>  @Override
>>  public boolean shouldOverrideUrlLoading(WebView view, String url) {
>>  view.loadUrl(url);
>>  return true;
>>  }
>>   }
>> 2009/6/19 Mark Murphy 
>>
>>
>>> > one is how can I define a global variable that can deliver between
>>> > several activities?
>>>
>>> If the activities are all in your process, you can use a public static
>>> data member. Be careful, though, that you do not mess up your garbage
>>> collection -- things held onto from static data members never get garbage
>>> collected.
>>>
>>> > two is how can I get the website address when I link to other sites?
>>> > for detail,
>>> > i use the webview to browse the web,but when i click the link on the
>>> > web,
>>> > i want to get the linking address
>>>
>>> Attach a WebViewClient to your WebView, then implement
>>> shouldOverrideUrlLoading() on the WebViewClient.
>>>
>>> --
>>> Mark Murphy (a Commons Guy)
>>> http://commonsware.com
>>> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>>>
>>>
>>>
>>> >>>
>>>
>>
>

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



[android-developers] ExifInterface and libexif

2009-06-19 Thread Augustin.CL

Dear All,
Currently, I want to fix the camera apk to make the image
attached the GPS information. But I find there are some problems.
1. First, we can't change the exif information. According to
http://code.google.com/p/android/issues/detail?id=2415, I modified
some codes of libexif(external/jhead/main.c). Now, it will show the
GPS information.

2.But, when I try to modify the gps information of EXIF, I
failed to update this information to that image.

"My questions is How I could use the ExifInterface.java of Camera app
to change the Exif information."

Please give me some advices. Thanks in advanced.

BTW, Does ExifInterface.java use the android/external/jhead/main.c
over JNI?


Best regards,
Augustin.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: zoomcontrol position in a mapView

2009-06-19 Thread Mark Murphy

> Could we with the 1.5 sdk change the position of the zoomcontrol in a
> mapView as The setBuidInZoomControls (different of getControl()method
> is not a child of a view?

The Android 1.1-era getZoomControls() method is still available in Android
1.5, though it is deprecated. Instead of calling setBuiltInZoomControls(),
you call getZoomControls() and add them to the container of your choice,
positioned somewhere on-screen.

That being said, because getZoomControls() is deprecated, and
setBuiltInZoomControls() is now standard, and since
setBuiltInZoomControls() puts the zoom controls centered on the bottom,
users will start expecting the zoom controls to be centered on the bottom.
Hence, if you elect to do something differently, be sure to let your users
know.

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



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



[android-developers] Computer Vision on Android

2009-06-19 Thread mboehmer

http://code.google.com/p/androidcv/
Anybody interested in joining the project? We are currently in a phase
of planning and checking possibilities.

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



[android-developers] How delete Media record on db

2009-06-19 Thread Francesco Pace
Hi guys,
I have a question. Sorry for my english.
I have this code :

Uri uri = Uri.parse("content://media/external/images/media");
ContentResolver resolver = _ctx.getContentResolver();
resolver.delete(uri, null, null);

but this code doesn't work because I have this error :

06-19 12:41:32.886: VERBOSE/TEST](2285): Unknown or unsupported URL:
content://media/external/images/media

Can I have to delete all records on this db?

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

2009-06-19 Thread siLent


http://schemas.android.com/apk/res/android";
package="com.helloandroid.android.newsdroid"
  android:versionCode="1"
  android:versionName="1.0">















Hello Developers,

The above code is my manifest for my project i get the error "Tag
 missing required attribute name."
on lines 7, 15 and 16. ive been trying to renew the file but i get the
same errors i am currently using
SDK 1.5 mn3 maybe somone that has this experience could help me

best regards!

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



[android-developers] Re: zoomcontrol position in a mapView

2009-06-19 Thread jphdsn

 I will use setBuidInZoomControls...
Thanks,

On 19 juin, 14:25, "Mark Murphy"  wrote:
> > Could we with the 1.5 sdk change the position of the zoomcontrol in a
> > mapView as The setBuidInZoomControls (different of getControl()method
> > is not a child of a view?
>
> The Android 1.1-era getZoomControls() method is still available in Android
> 1.5, though it is deprecated. Instead of calling setBuiltInZoomControls(),
> you call getZoomControls() and add them to the container of your choice,
> positioned somewhere on-screen.
>
> That being said, because getZoomControls() is deprecated, and
> setBuiltInZoomControls() is now standard, and since
> setBuiltInZoomControls() puts the zoom controls centered on the bottom,
> users will start expecting the zoom controls to be centered on the bottom.
> Hence, if you elect to do something differently, be sure to let your users
> know.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] help with intents

2009-06-19 Thread Saurav Mukherjee
hi all,
is there any way to pass values(strings or bundles) to another application
while calling it via intents, and also return some information (mostly
string)???

thanx 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: Computer Vision on Android

2009-06-19 Thread blindfold

I'm certainly interested in your project, but currently Android is
just about the worst platform for developing computer vision
applications: no native code interface yet that one can distribute for
(NDK is under development), no JIT compiler to speed up pure Android
code, no Android API for decoding camera preview images, while the 16
MB heap just about kills any attempt to process full camera snapshots.
Don't know how long we need to hold our breath for a more workable
situation.

On Jun 19, 2:29 pm, mboehmer  wrote:
> http://code.google.com/p/androidcv/
> Anybody interested in joining the project? We are currently in a phase
> of planning and checking possibilities.
>
> Matthias
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: help with intents

2009-06-19 Thread Mark Murphy

> is there any way to pass values(strings or bundles) to another application
> while calling it via intents, and also return some information (mostly
> string)???

To send data, use the putExtra() set of methods on Intent.

To receive data, you will want to use startActivityForResult():

http://developer.android.com/reference/android/app/Activity.html

(scroll down to the Starting Activities and Getting Results section)

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



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



[android-developers] Re: help with intents

2009-06-19 Thread Saurav Mukherjee
thanx...

On Fri, Jun 19, 2009 at 7:12 PM, Mark Murphy wrote:

>
> > is there any way to pass values(strings or bundles) to another
> application
> > while calling it via intents, and also return some information (mostly
> > string)???
>
> To send data, use the putExtra() set of methods on Intent.
>
> To receive data, you will want to use startActivityForResult():
>
> http://developer.android.com/reference/android/app/Activity.html
>
> (scroll down to the Starting Activities and Getting Results section)
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>
>
>
> >
>

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



[android-developers] OutOfMemoryError

2009-06-19 Thread Francois

Hello all,

For my project (quite a big project), an Android application create, I
need to compile the sources from a command line. So I have followed
the explanations found in the dev guide.
I have set JAVA_HOME to a short directory name, and created the
project with the Android command.

When I compile the project, with "ant debug" as stated in the doc, it
works fine until it reaches the dex creator.

[echo] Convertine compiled files and external libraries into bin/
classes.dex

It seems to work for like 10 seconds, then it stops with this error:

UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: Java heap space

OK, after searching on the internet, I have tried to set the heap of
my Java VM, by changing the ANT_OPTS environement variable to:
set ANT_OPTS=-Xms512m -Xmx1024m (I have tried different values).

I still get the same error.

Is it a known bug? Is there something I can to do avoid it?

Thanks in advance for you advices.

Francois

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



[android-developers] Re: Cannot Decode Images from sdcard using BitmapFactory.Options

2009-06-19 Thread Streets Of Boston

"xxx jpeg error 53 Not a JPEG file: starts with 0x%02x 0x%02x"

It seems that the file on your sd-card is not a JPEG file, at least
not one recognized by SKIA.

On Jun 19, 8:23 am, Shre555  wrote:
> Hi,
>
> I am tring to get a image from the images stored on the sdcard of my
> Android
>
> but i am getting a skia error using BitmapFactory
>
> When I just take the image directly without using BitmapFactory class
> I get the image.
>
> But the purpose of using BitmapFactory is scaling down the image size
> by using inSample =4;
>
> but I get skia as the error
>
> Here is my code after which the logcat details are also given
>
> Java:
> public class bitD extends Activity {
>      private int SELECT_IMAGE = 200;
>
>      /** Called when the activity is first created. */
>     �...@override
>      public void onCreate(Bundle savedInstanceState) {
>           super.onCreate(savedInstanceState);
>
>           startActivityForResult(new Intent(Intent.ACTION_PICK,
>
> android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI),
>                     SELECT_IMAGE);
>      }
>
>     �...@override
>      protected void onActivityResult(int requestCode, int resultCode,
> Intent data) {
>           super.onActivityResult(requestCode, resultCode, data);
>           if (requestCode == SELECT_IMAGE) {
>                if (resultCode == Activity.RESULT_OK) {
>
>                     Uri selectedImage = data.getData();
>
>                     System.out.println("Uri of the selected img is "
>                               + selectedImage);
>
>                     try {
>                          InputStream is = getContentResolver
> ().openInputStream(
>                                    selectedImage);
>
>                          BitmapFactory.Options opts = new
> BitmapFactory.Options();
>                          Bitmap bm;
>
>                          opts.inJustDecodeBounds = true;
>                          bm = BitmapFactory.decodeStream(is, null,
> opts);
>
>                          System.out.println("ht" + opts.outHeight);
>                          System.out.println("wt" + opts.outWidth);
>                          System.out.println("mime" +
> opts.outMimeType);
>
>                          opts.inJustDecodeBounds = false;
>                          opts.inDither = true;
>                          opts.inPreferredConfig =
> Bitmap.Config.RGB_565;
>                          // this will resize the bm
>                          opts.inSampleSize = 4; // scaled down by 4
>                          bm = BitmapFactory.decodeStream(is, null,
> opts);
>
>                          setContentView(R.layout.main);
>                          ImageView iv1 = (ImageView) findViewById
> (R.id.ImageView01);
>                          iv1.setImageBitmap(bm);
>
>                     } catch (FileNotFoundException e) {
>                          // TODO Auto-generated catch block
>                          e.printStackTrace();
>                     }
>
>                }
>
>           }
>      }
>
> Here is the ouput of my logcat
>
> 06-19 12:01:21.140: DEBUG/SurfaceFlinger(56): Screen about to return,
> flinger = 0x127c58
> 06-19 12:01:21.350: DEBUG/dalvikvm(316): GC freed 875 objects / 48416
> bytes in 89ms
> 06-19 12:01:21.450: DEBUG/dalvikvm(316): GC freed 148 objects / 5720
> bytes in 88ms
> 06-19 12:01:21.560: DEBUG/dalvikvm(316): GC freed 23 objects / 1064
> bytes in 87ms
> 06-19 12:01:21.780: DEBUG/KeyguardViewMediator(56): pokeWakelock(5000)
> 06-19 12:01:22.870: VERBOSE/ImageGallery2(316): /
> ImageBlockManager.onPause
> 06-19 12:01:22.890: INFO/System.out(2551): Uri of the selected img is
> content://media/external/images/media/34
> 06-19 12:01:22.960: INFO/System.out(2551): ht1536
> 06-19 12:01:22.960: INFO/System.out(2551): wt2048
> 06-19 12:01:22.970: INFO/System.out(2551): mimeimage/jpeg
> 06-19 12:01:22.970: DEBUG/skia(2551): xxx jpeg error 53 Not a
> JPEG file: starts with 0x%02x 0x%02x
> 06-19 12:01:23.080: INFO/ActivityManager(56): Displayed activity
> co.pad.BD/.bitD: 14010 ms
> 06-19 12:01:28.200: DEBUG/dalvikvm(163): GC freed 1543 objects / 79424
> bytes in 108ms
> 06-19 12:01:33.170: DEBUG/dalvikvm(180): GC freed 91 objects / 4840
> bytes in 77ms
> 06-19 12:01:38.200: DEBUG/dalvikvm(316): GC freed 790 objects / 35944
> bytes in 103ms
>
> Please someone help me out 
>
> Is there a work around / can i do this differently without consuming a
> lot of memory(I do not want to end up with Out of Memory Error.)
>
> 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 do you handle orientation change for a Cupcake widget?

2009-06-19 Thread Blake B.

Hi,
Maybe I'm missing something obvious, but how do you handle
orientation changes for a Cupcake desktop widget?
When it is initially created, the onUpdate() method of my
AppWidgetProvider calls views.setOnClickPendingIntent(buttonID,
pendingIntent) to register for my button events, but when the
orientation changes, new buttons are created and I don't have an
opportunity to re-register the "onClick" listeners. What is the proper
way to do this?

Thanks,
Blake
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 do you handle orientation change for a Cupcake widget?

2009-06-19 Thread Blake B.

Hi,
Maybe I'm missing something obvious, but how do you handle
orientation changes for a Cupcake desktop widget?
When it is initially created, the onUpdate() method of my
AppWidgetProvider calls views.setOnClickPendingIntent(buttonID,
pendingIntent) to register for my button events, but when the
orientation changes, new buttons are created and I don't have an
opportunity to re-register the "onClick" listeners. What is the proper
way to do this?

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

2009-06-19 Thread Streets Of Boston

The gluUnProject should just be used to translate the coordinates of
your finger on the screen (x1,y1,z1), where z1 is 0...1, to a 3d
coordinate in your Kube space (x2,y2,z2).

You calculate it for z1=0 and z1=1, which gives you two coordinates in
Kube space, a line:
unproject(x1,y1,0) --> (Sx2,Sy2,Sz2) (start of line)
unproject(x1,y1,1) --> (Ex2,Ey2,Ez2) (end of line)

Then you have to calculate which squares your line (Sx2,Sy2,Sz2) -->
(Ex2,Ey2,Ez2) intersects.

The intersection point that is closest to your finger (i.e. when
moving from (Sx2,Sy2,Sz2) to (Ex2,Ey2,Ez2), the first point that is
intersecting), is the square your finger is touching. Don't count
squares that are facing away from you, if you have such squares (using
normals of the plane in which the square lies).

Brush up on your math from high-school :=) :
Figure out how to calculate a point that is the intersection of a line
and a plane.
Then limit this plane to just a square.

The 3d Kube coordinates of your squares are the ones in your vertex-
buffer..

On Jun 18, 10:30 pm, quill  wrote:
> Hi Boston,
> I failed with both GLU.gluUnProject or your gluUnProject.
> Maybe there is something wrong with my polygon coordinates. In fact,
> the polygon is just a square, which is the face of a small cube. I get
> the coordinates from GLWord.mVertexBuffer(such as mVertexBuffer.get(0)/
> 65536.0), is this coordinates the same kind with that which I got from
> gluUnProject? Are they both belongs to object coordinates?
>
> On Jun 19, 12:21 am, Streets Of Boston 
> wrote:
>
>
>
> > Yes, you are on the right track. :-)
> > However, i could not get gluUnProject to work. I wrote my own:
> >  http://groups.google.com/group/android-developers/browse_frm/thread/9...
> >   (see messages no. 6 and 8)
>
> > On Jun 18, 4:21 am, quill  wrote:
>
> > > Thank you Nightwolf.
> > > I want to choose the Kube when I touch on the Kube face in order to
> > > rotate Kube.
> > > My idea is:
> > > 1. to get vertices of Kube to compose a polygon(2D);
> > > 2. judge if the touch point locates in the polygon;
> > > As you said, the cube coordinates is not modified, so I use
> > > gluunproject() to change touch point coordinates(x, y, 0) in order to
> > > map window coordinates to object coordinates, and then I judged if the
> > > new touch point coordinates locates in the polygon. Am I on the right
> > > way?
>
> > > On Jun 18, 11:59 am, Nightwolf  wrote:
>
> > > > Cube coordinates are stored in vertices array in Cube.java.
> > > > Rotating effect is achieved via model view matrix modification
> > > > (glTranslate and glRotate commands). Original vertex data isn't
> > > > modified.
>
> > > > On Jun 17, 8:30 pm, quill  wrote:
>
> > > > > Hi all,
> > > > > I'm modifying Kube(api demo) to a game, does anyone who know how to
> > > > > get the vertice coodinates of Kube? From the source code in api demo,
> > > > > I think GLWorld.mVertexBuffer may save the vertice coodinates after
> > > > > rotate the Kube, but I was wrong, the infomation in mVertexBuffer
> > > > > always remains the same.- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: OutOfMemoryError

2009-06-19 Thread Daniel Janev

Hi,

You have to set the -Xmx options in the dx.bat but not in the ANT_OPT.

Francois wrote:
> Hello all,
> 
> For my project (quite a big project), an Android application create, I
> need to compile the sources from a command line. So I have followed
> the explanations found in the dev guide.
> I have set JAVA_HOME to a short directory name, and created the
> project with the Android command.
> 
> When I compile the project, with "ant debug" as stated in the doc, it
> works fine until it reaches the dex creator.
> 
> [echo] Convertine compiled files and external libraries into bin/
> classes.dex
> 
> It seems to work for like 10 seconds, then it stops with this error:
> 
> UNEXPECTED TOP-LEVEL ERROR:
> java.lang.OutOfMemoryError: Java heap space
> 
> OK, after searching on the internet, I have tried to set the heap of
> my Java VM, by changing the ANT_OPTS environement variable to:
> set ANT_OPTS=-Xms512m -Xmx1024m (I have tried different values).
> 
> I still get the same error.
> 
> Is it a known bug? Is there something I can to do avoid it?
> 
> Thanks in advance for you advices.
> 
> Francois
> 
> > 
> 
> 


-- 

Best Regards,
Daniel
---
Daniel Janev · Department Manager/Core Platform and Smart Home
ProSyst Software GmbH
1606 Sofia, Bulgaria · Vladajska Str. 48
Tel. +359 (0)2 952 35 81/109 · Fax +359 (0)2 953 26 17
Mobile Phone +359 (0)888 678 670
http://www.prosyst.com · d.ja...@prosyst.com
---
stay in touch with your product.
---

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

2009-06-19 Thread Blake B.

Hi Jeff,
I've tried the two options you mentioned below for disabling a
button on a widget, but although they can have the appearance of a
disabled button from the image, the button is still in an enabled
state and does not have the standard Android appearance of a disabled
button.  I looked into swapping out two buttons using VISIBLE/GONE,
but I don't see that "enabled" state is supported in the XML layout
definition for an ImageButton.  Am I missing somthing?  I don't see
any way to put a button into a disabled state on a widget.


Not directly, but you could send a widget update that swaps out the
drawable used and clears the PendingIntent.  Or, keep two buttons in
your layout, and visible/gone them as needed.


Thanks,
Blake

On Jun 16, 7:19 pm, "Blake B."  wrote:
> I suspected as much with the Google Search "widget".  Thanks for
> clarifying.  And the results of the grep for @RemotableViewMethod
> annotation are very useful.
>
> Great responses to every question!  Thanks Jeff!
>
> On Jun 16, 3:25 pm, Jeff Sharkey  wrote:
>
>
>
> > > Is it possible to disable a button on a Cupcake desktop widget?
>
> > Not directly, but you could send a widget update that swaps out the
> > drawable used and clears the PendingIntent.  Or, keep two buttons in
> > your layout, and visible/gone them as needed.
>
> > > The current Google Search widget disables the search button until a
> > > user enters text, then the button is disabled.  Is this only allowed
> > > for "special widgets", or is there an approach available to third-
> > > party widgets?
>
> > The Google Search bar on the desktop looks and feels like a widget,
> > but it isn't a real widget.  It lives directly in the Launcher app,
> > which is how it does things like auto completion.  Other
> > AppWidgetHosts are free to include their custom elements like this:
>
> >http://d.android.com/reference/android/appwidget/AppWidgetManager.htm...
>
> > > More generally, is there a list somewhere of the allowed / disallowed
> > > calls to widget views via the RemoteViews.set() approach?  I've
> > > also encountered that "setSelected" and some others are not allowed.
>
> > The allowed methods are simply marked with the @RemotableViewMethod
> > annotation, here's a quick grep across the Cupcake tree:
>
> >http://pastebin.com/f45b5130a
>
> > --
> > Jeff Sharkey
> > jshar...@android.com- 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: Difference between invalidate() and postInvalidate()

2009-06-19 Thread Streets Of Boston

Really? *immediately*?

I thought that invalidate() must be called on the UI thread. But
invalidate() does not draw your view *immediately*, does it? I thought
it will schedule a draw 'action' as soon as the UI-message thread gets
a chance. If you call multiple invalidate()-s in a row, your view is
redrawn only once (all the invalidate-rects are gathered and the
redraw is using the union of all these rects).

The postInvalidate() can be called from a non UI-thread. It just posts
an invalidate() on the UI-thread.

On Jun 18, 3:49 pm, Romain Guy  wrote:
> > What is the difference between invalidate() and postInvalidate(),
> > except the obvious (I know that postInvalidate post an invalidate-
> > request on the UI-thread, while a call to invalidate() invalidates the
> > View immediately).
>
> Just what you said :)
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Capture the Android's browser HTTP petitions

2009-06-19 Thread psaltamontes

Yes, I want to say request :), sorry , I need improve my English.

I don't want my application modify the settings of the browser, the
idea is that the user configure the proxy of the browser and install
my application. This application is a service that listen the HTTP
requests and send to the Internet.

I want capture the HTTP request and modify the headers because, in the
header, I put a number to identify the client that connect to my
webserver, doing this, the user don't have to put an user name and a
password. I have written the code to do this, in PC works, but in
Android I don't know how to get this behaviour.

How can I do?

On 18 jun, 21:14, "Mark Murphy"  wrote:
> > I need capture the Android's browser HTTP petitions.
>
> I think you mean "request", not "petition".
>
> > In PC to capture the HTTP petitions is easy, I change the browser
> > configuration, I put localhost and a port () and it's works. But,
> > in Android I don't know how to change the browser configuration.
>
> I would be rather surprised if they allowed applications to adjust the
> proxy server settings of the browser application. That would be a way for
> spyware to attack the user.
>
> For the emulator, you can set up a proxy server from outside the emulator
> environment itself:
>
> http://developer.android.com/guide/developing/tools/emulator.html#proxy
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Android Support

2009-06-19 Thread Mr.No

Hello,
how do i get Support from the Android-Team?


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

2009-06-19 Thread Marco Nelissen
Use setDataSource(FileDescriptor) instead of setDataSource(String path)


On Fri, Jun 19, 2009 at 4:46 AM, l hx  wrote:

> a mp3 file which can be played well in sdcard. but when i copy it to
> another subarea in linux linked as /data/test. but i can not be played in
> that directory
>
> >
>

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

2009-06-19 Thread Balwinder Kaur (T-Mobile)

The "android:name" attribute needs to be added to the activity tag

e.g. 

>From the official documentation
http://developer.android.com/guide/topics/manifest/activity-element.html

"android:name
The name of the class that implements the activity, a subclass of
Activity. The attribute value should be a fully qualified class name
(such as, "com.example.project.ExtracurricularActivity"). However, as
a shorthand, if the first character of the name is a period (for
example, ".ExtracurricularActivity"), it is appended to the package
name specified in the  element.
There is no default. The name must be specified. "

Hope this helps,
Balwinder Kaur
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 Jun 19, 5:45 am, siLent  wrote:
> 
> http://schemas.android.com/apk/res/android";
>     package="com.helloandroid.android.newsdroid"
>       android:versionCode="1"
>       android:versionName="1.0">
>     
>                   android:enabled="true"
>         class=".FeedsList" android:label="@string/url_editor">
>             
>                 
>                  android:name="android.intent.category.LAUNCHER" />
>             
>         
>         
>         
>     
>     
> 
> 
>
> Hello Developers,
>
> The above code is my manifest for my project i get the error "Tag
>  missing required attribute name."
> on lines 7, 15 and 16. ive been trying to renew the file but i get the
> same errors i am currently using
> SDK 1.5 mn3 maybe somone that has this experience could help me
>
> best regards!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How delete Media record on db

2009-06-19 Thread Marco Nelissen
You can't delete all images at once, you'll have to delete them one by one.


On Fri, Jun 19, 2009 at 5:43 AM, Francesco Pace  wrote:

> Hi guys,
> I have a question. Sorry for my english.
> I have this code :
>
> Uri uri = Uri.parse("content://media/external/images/media");
> ContentResolver resolver = _ctx.getContentResolver();
> resolver.delete(uri, null, null);
>
> but this code doesn't work because I have this error :
>
> 06-19 12:41:32.886: VERBOSE/TEST](2285): Unknown or unsupported URL:
> content://media/external/images/media
>
> Can I have to delete all records on this db?
>
>
> >
>

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

2009-06-19 Thread Mark Murphy

> how do i get Support from the Android-Team?

As an ordinary person, ask questions on these Android Google Groups. The
core Android team, and other people in the Android community, try to
answer many of them.

If you are an employee with an Open Handset Alliance member, you may have
additional ways to interact with the core Android team, but that would be
a question for your manager.

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



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



[android-developers] Re: Difference between invalidate() and postInvalidate()

2009-06-19 Thread Streets Of Boston

You're right :)
It's friday and i should read the posts a bit more carefully :)

On Jun 19, 11:14 am, Marco Nelissen  wrote:
> On Fri, Jun 19, 2009 at 7:43 AM, Streets Of Boston
> wrote:
>
>
>
> > Really? *immediately*?
> > I thought that invalidate() must be called on the UI thread. But
> > invalidate() does not draw your view *immediately*, does it? I thought
> > it will schedule a draw 'action' as soon as the UI-message thread gets
> > a chance. If you call multiple invalidate()-s in a row, your view is
> > redrawn only once (all the invalidate-rects are gathered and the
> > redraw is using the union of all these rects).
>
> Indeed. Nobody said that the view gets *drawn* immediately, just that it
> gets *invalidated* immediately.
>
>
>
> > The postInvalidate() can be called from a non UI-thread. It just posts
> > an invalidate() on the UI-thread.
>
> > On Jun 18, 3:49 pm, Romain Guy  wrote:
> > > > What is the difference between invalidate() and postInvalidate(),
> > > > except the obvious (I know that postInvalidate post an invalidate-
> > > > request on the UI-thread, while a call to invalidate() invalidates the
> > > > View immediately).
>
> > > Just what you said :)
>
> > > --
> > > Romain Guy
> > > Android framework engineer
> > > romain...@android.com
>
> > > Note: please don't send private questions to me, as I don't have time
> > > to provide private support.  All such questions should be posted on
> > > public forums, where I and others can see and answer them- 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: override AnalogClock

2009-06-19 Thread Romain Guy
Like I just said, you cannot do this.

On Fri, Jun 19, 2009 at 5:21 AM, sunita  wrote:

>
> So you want to say that there is no way to override the AnalogClock
> Widget at the home screen ,to display our custom clock,am I right?
> following is the  the xml im using for my custom widget
>
> 1.
> 2.
> 3. 4.  xmlns:widget="http://schemas.android.com/apk/res/
> com.android.alarmclock_cs"
> 5.
> 6.  android:layout_width="wrap_content"
> 7.   android:layout_height="fill_parent"
> 8.
> 9.  widget:dials="@drawable/port_idle_bigclock_bg_am"
> 10.
> widget:hand_hours="@drawable/port_idle_bigclock_time"
> 11.
> widget:hand_minutes="@drawable/port_idle_bigclock_min"/>
> 12.
>
> I'm getting the following warning at line no. 3.
>
> WARN/AppWidgetHostView(612): android.view.InflateException: Binary XML
> file line #3: Error inflating class
> com.android.alarmclock_cs.AnalogClock_cs
> .
> .
> .
> WARN/AppWidgetHostView(612): Caused by:
> java.lang.ClassNotFoundException:
> com.android.alarmclock_cs.AnalogClock_cs in loader
> dalvik.system.pathclassloa...@400190f8
>
> Is there any way or workaround so that we can add our custom analog
> clock at the home screen widget?
>
> -Thanks
>
>
> On Jun 18, 10:32 pm, Romain Guy  wrote:
> > You cannot use your own views in Home widgets, for security reasons.
> >
> >
> >
> >
> >
> > On Wed, Jun 17, 2009 at 10:48 PM, sunita
> wrote:
> >
> > > I want to make my own Analog class by extending View.but
> > > it is giving
> >
> > >  WARN/AppWidgetHostView(614): Caused by:
> > > java.lang.ClassNotFoundException:
> > > com.back.alarmclock_cs.AnalogClock_new in loader
> > > dalvik.system.pathclassloa...@400190f8
> >
> > > 06-18 10:12:25.848: WARN/AppWidgetHostView(614):
> > > android.view.InflateException: Binary XML file line #17: Error
> > > inflating class com.back.alarmclock_cs.AnalogClock_new
> >
> > --
> > Romain Guy
> > Android framework engineer
> > romain...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time
> > to provide private support.  All such questions should be posted on
> > public forums, where I and others can see and answer them- Hide quoted
> text -
> >
> > - Show quoted text -
> >
>


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

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

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



[android-developers] AppWidget: Irregular Id for Disable event

2009-06-19 Thread temp

Hi

I'm developing my application on Android 1.5r2 and it is registered
for both DISABLE and DELETE event of AppWidget.

However, the application does not receives the delete event.

Also in case , multiple Widgets are added to HomeScreen, the
application receives DISABLE event for the last added widget only.

Is there any settings to be done in the emulator to correct this
problem or is this a known issue?

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: Capture the Android's browser HTTP petitions

2009-06-19 Thread psaltamontes

Do you know/think if this option will be in the future?

Now, I'm trying to do something with a webview and webviewclient. But
I don't know how to send a "RAW HTTP request" using these classes.

I can send/receive RAW HTTP with sockets, but I don't know how to link
these sockets with the webview.

Any idea?

Thanks.

On 19 jun, 17:14, "Mark Murphy"  wrote:
> > Yes, I want to say request :), sorry , I need improve my English.
>
> > I don't want my application modify the settings of the browser, the
> > idea is that the user configure the proxy of the browser and install
> > my application. This application is a service that listen the HTTP
> > requests and send to the Internet.
>
> Hmmm...I do not see where users can set their proxy server, either.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Retrieving Records from a created Database and put it in a SPINNER

2009-06-19 Thread Georgy

Mark thanks for the helpful link,

I still can't tell how to use manageQuery with my table (and not a
built in table such as CONTACTS).

My database is: locode
My Table is: chart

and I have several columns and rows in it. My column that I want to
show is called KEY_TITLE

So in this line I don't know what to replace:

Cursor cur = managedQuery(People.CONTENT_URI, PROJECTION, null, null);
SimpleCursorAdapter adapter2 = new SimpleCursorAdapter(this,
android.R.layout.simple_spinner_item,  cur, new String[]
{People.NAME}, new int[] {android.R.id.text1});


I really appreciate your help

On Jun 18, 4:19 pm, "Mark Murphy"  wrote:
> > Mark thanks for the reply,
>
> > To be more specific, here is a snippet from my spinner code:
>
> >String[] array = {"Select", "Building", "Here"};
> >   Spinner s2 = (Spinner) findViewById(R.id.spinner2);
> >   ArrayAdapter cadapter = new ArrayAdapter(this,
> > android.R.layout.simple_spinner_item, array);
> >   cadapter.setDropDownViewResource
> > (android.R.layout.simple_spinner_dropdown_item);
> >   s2.setAdapter(cadapter);
>
> > my problem is replace array (to make it dynamic) with my 'title'
> > column from my 'chart' table in my 'dbm' database.  I know it's a
> > simple line, but I can't seem to get  it.
>
> http://developer.android.com/guide/topics/ui/binding.html
>
> The first code listing shows two spinners, one using an ArrayAdapter, one
> using a SimpleCursorAdapter wrapping the result of a database query.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Difference between invalidate() and postInvalidate()

2009-06-19 Thread Marco Nelissen
On Fri, Jun 19, 2009 at 7:43 AM, Streets Of Boston
wrote:

>
> Really? *immediately*?


> I thought that invalidate() must be called on the UI thread. But
> invalidate() does not draw your view *immediately*, does it? I thought
> it will schedule a draw 'action' as soon as the UI-message thread gets
> a chance. If you call multiple invalidate()-s in a row, your view is
> redrawn only once (all the invalidate-rects are gathered and the
> redraw is using the union of all these rects).


Indeed. Nobody said that the view gets *drawn* immediately, just that it
gets *invalidated* immediately.


> The postInvalidate() can be called from a non UI-thread. It just posts
> an invalidate() on the UI-thread.
>
> On Jun 18, 3:49 pm, Romain Guy  wrote:
> > > What is the difference between invalidate() and postInvalidate(),
> > > except the obvious (I know that postInvalidate post an invalidate-
> > > request on the UI-thread, while a call to invalidate() invalidates the
> > > View immediately).
> >
> > Just what you said :)
> >
> > --
> > Romain Guy
> > Android framework engineer
> > romain...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time
> > to provide private support.  All such questions should be posted on
> > public forums, where I and others can see and answer them
> >
>

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



[android-developers] Re: Capture the Android's browser HTTP petitions

2009-06-19 Thread Mark Murphy

> Yes, I want to say request :), sorry , I need improve my English.
>
> I don't want my application modify the settings of the browser, the
> idea is that the user configure the proxy of the browser and install
> my application. This application is a service that listen the HTTP
> requests and send to the Internet.

Hmmm...I do not see where users can set their proxy server, either.

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



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



[android-developers] Re: Can an Activity find out where it started from?

2009-06-19 Thread Mike Wolfson

This was a good question (as it is something I was looking for
myself).

One super basic question:  How do I get a handle to the calling Intent
in the called activity?

I create the intent in the first Activity with Intent i = new Intent
(); etc,  but I am unclear on how I retrieve a handle to the calling
intent in the new Activity.

I am looking for something like this:

public NewActivity extends Activity {
...
Intent calledIntent = this.getCallingIntent();  //this is where I
would like to retrieve the handle to intent that was used
   //
to start this Activity

   //so I can call
   String myData = calledIntent.getExtra("someData");

}


--Maybe I need to purchase your book as well ;-)

On Jun 18, 8:49 pm, "Mark Murphy"  wrote:
> > I have a situation where an activity needs to know where it was
> > started from,
> > so it knows what data to display in that current activity.
>
> Put an "extra" in the Intent that launches it that specifies its origin
> (e.g., putExtra(ORIGIN_KEY, STARTED_FROM_HERE); versus
> putExtra(ORIGIN_KEY, STARTED_FROM_THERE)). Then, examine the extra in the
> launched activity (e.g., getExtra(ORIGIN_KEY)).
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Can an Activity find out where it started from?

2009-06-19 Thread Marco Nelissen
On Fri, Jun 19, 2009 at 8:50 AM, Mike Wolfson  wrote:

>
> This was a good question (as it is something I was looking for
> myself).
>
> One super basic question:  How do I get a handle to the calling Intent
> in the called activity?


getIntent()

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



[android-developers] INotificationService question

2009-06-19 Thread skink

hi,

in fact the question relates to Toast.show(), but after looking into
the code it seems that INotificationService and its enqueueToast() may
steal toast's reference for a long time since when i run my Activity
several times wirhout Toast, Activity.getInstanceCount() returns
always 1 or 2, while when using Toast.show() Activity.getInstanceCount
() increments each time i run Activity and after long time is gc()'ed

so how can avoid that reference stealing?

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



[android-developers] ListView - keep item selected

2009-06-19 Thread Mark Wyszomierski

Hi,

I have a ListView. When I click a row Item (which are just TextView
instances) I want them to remain hilighted (default orange color). The
default behavior is that they flash orange.

Strangely, if I use the key pad (arrow up/down) to move between items,
it has the exact behavior I want. Why is the logic different between
using the keypad or with finger tapping?

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: Traceview OutOfMemory error

2009-06-19 Thread Boris

Are there no Traceview gurus out there?
B

On Jun 15, 8:38 pm, Boris  wrote:
> Hello. I have been trying to use traceview for profiling my Android
> app. So far I have gotten it to work on very small parts of the
> program. If I use it for bigger chunks it creates too much information
> (.trace file is too large) and I get an OutOfMemory (heap memory)
> error from the java compiler. I tried some tricks with setting higher
> min and max heap memory values but no luck.
>
> If anyone has used traceview with similar effects before I would
>
> highly appreciate any tips you may have.
>
> Here are the details. First I am reproducing the error message:
>
> $ traceview.bat tmp.trace
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>        at com.android.traceview.TimeLineView.setData
> (TimeLineView.java:433)
>        at com.android.traceview.TimeLineView.(TimeLineView.java:
> 316)
>        at com.android.traceview.MainWindow.createContents
> (MainWindow.java:93)
>        at org.eclipse.jface.window.Window.create(Window.java:426)
>        at org.eclipse.jface.window.Window.open(Window.java:785)
>        at com.android.traceview.MainWindow.run(MainWindow.java:58)
>        at com.android.traceview.MainWindow.main(MainWindow.java:190)
>
> On windows traceview works from a batch file that is reproduced below.
> The last line is where I am mucking with the memory settings. That
> does not seem to affect the behavior though. The parameters-- -XX:
> +HeapDumpOnOutOfMemoryError -Xms2g -Xmx2g-- have been added by me ...
> - Hide quoted text -
>
> again they have no effect. Maybe because they should be used when
> generating the .jar file itself?
>
>  traceview.bat /
> rem don't modify the caller's environment
> setlocal
>
> rem Set up prog to be the path of this script, including following
> symlinks,
> rem and set up progdir to be the fully-qualified pathname of its
> directory.
> set prog=%~f0
>
> rem Change current directory to where traceview is, to avoid issues
> with directories
> rem containing whitespaces.
> cd %~dp0
>
> set jarfile=traceview.jar
> set frameworkdir=
> set libdir=
>
> if exist %frameworkdir%%jarfile% goto JarFileOk
>    set frameworkdir=lib\
>    set libdir=lib\
>
> if exist %frameworkdir%%jarfile% goto JarFileOk
>    set frameworkdir=..\framework\
>    set libdir=..\lib\
>
> :JarFileOk
>
> set jarpath=%frameworkdir%%jarfile%
>
> C:\Program Files\Java\jdk1.6.0_12\bin\java -XX:
> +HeapDumpOnOutOfMemoryError -Xms2g -Xmx2g -Djava.ext.dirs=
> %frameworkdir
> % -Djava.library.path=%libdir% -jar %jarpath% %*
> //
>
> Cheers, Boris
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Catching AudioRecord exception when not processing fast enough

2009-06-19 Thread Keith Wiley

In the Eclipse log I can clearly see a warning pop up (something about
buffer overflow) every time I don't read from the AudioRecord buffer
fast enough and consequently miss a chunk of audio samples.  Is there
any way I can detect that notification programatically so I know
exactly when I have missed a chunk?

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: Computer Vision on Android

2009-06-19 Thread Keith Wiley

I'd be interested.  Not sure how much free time I have, but if you
want to keep me in the communication loop I can decide as we go if I
have time or relevant skills to contribute.  I have wanted to
implemented some image-processing wavelet routines, but have seriously
question the point of even attempting to do so in Java.  Even native
optimized C++ on a desktop usually has a hard time with the kinds of
wavelets I tend to use in my applications.  Likewise for 2D FFTs I
suppose.

...but yes, I'm basically interested.  Let me know what you're
thinking.

Cheers!

On Jun 19, 6:29 am, mboehmer  wrote:
> http://code.google.com/p/androidcv/
> Anybody interested in joining the project? We are currently in a phase
> of planning and checking possibilities.
>
> Matthias
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ListView - keep item selected

2009-06-19 Thread Brian Smith

I could rattle off an explanation, but the folks at Google have
already explained it better than I ever could...

http://android-developers.blogspot.com/2008/12/touch-mode.html

On Jun 19, 12:01 pm, Mark Wyszomierski  wrote:
> Hi,
>
> I have a ListView. When I click a row Item (which are just TextView
> instances) I want them to remain hilighted (default orange color). The
> default behavior is that they flash orange.
>
> Strangely, if I use the key pad (arrow up/down) to move between items,
> it has the exact behavior I want. Why is the logic different between
> using the keypad or with finger tapping?
>
> 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: ListView - keep item selected

2009-06-19 Thread Peli

Romain's blog post will answer all your questions:
http://android-developers.blogspot.com/2008/12/touch-mode.html

(read until the end until you see the paragraph about "choice mode" -
which is what you need).

Peli
www.openintents.org

On Jun 19, 6:01 pm, Mark Wyszomierski  wrote:
> Hi,
>
> I have a ListView. When I click a row Item (which are just TextView
> instances) I want them to remain hilighted (default orange color). The
> default behavior is that they flash orange.
>
> Strangely, if I use the key pad (arrow up/down) to move between items,
> it has the exact behavior I want. Why is the logic different between
> using the keypad or with finger tapping?
>
> 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: Is running applications from shell disabled?

2009-06-19 Thread Lewis Z.

Yes, I did.

On Jun 18, 8:45 pm, Delta Foxtrot  wrote:
> 2009/6/19 Lewis Z. 
>
> > I wrote a simple hello c program. I pushed the program to either
> > Android Emulator or a device. When I run it, however, I got "./hello:
> > not found" message. I ls-ed it and it's right there. Is this purposely
> > disabled?
>
> Did you chmod 755 hello ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Device offline

2009-06-19 Thread xiaohua

It's the same error I have encountered.
The same phone works ok on WinXp, but can't use adb in ubuntu.

On 5月10日, 上午10时19分, krishnakanth  wrote:
> Hi,
>
> I have a problem when trying to see use the Android for development on
> Ubuntu. The device is shown as offline. Although it detects the
> device.
>
> when I type
> % adb devices
> List of devices attached
> HT845GZ50600offline
>
> I am using:
> Ubuntu 9.04 (Jaunty)
>
> Few things I tried:
>
> 1. I have changed the 50-android.rules file and reloaded the udev.
> [ as suggested by docs]
> 2. 51-android.rules ( if there was another 50 then this would have
> worked) and it worked for some users [ diff thread in the forum] .
> 2. I also killed adb server and restarted it.
> 3. It works on Windows, but I want to develop on Ubuntu ( and curious
> why it doesnt work).
>
> Any suggestions ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ListView - keep item selected

2009-06-19 Thread Mark

Hi guys,

Yeah I had this problem when I started with Android last year.

So my users want to select an item from a ListView, then may scroll
around a bit more. I don't understand why we should prevent the item
they selected from being highlighted? I've done this:

  listView.setItemsCanFocus(false);
  listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);

  // my adapter:
  public View getView(int position, View convertView, ViewGroup
parent) {
  if (listView.getCheckedItemPosition() == position) {
  view.setBackgroundColor(orange);
  }
  else {
  view.setBackgroundColor(default);
  }
  }

I read through the document linked, but still cannot appreciate the
rationale behind disallowing a ListView item from having a 'selected'
color when in TouchMode,

Thanks



On Jun 19, 12:20 pm, Peli  wrote:
> Romain's blog post will answer all your 
> questions:http://android-developers.blogspot.com/2008/12/touch-mode.html
>
> (read until the end until you see the paragraph about "choice mode" -
> which is what you need).
>
> Peliwww.openintents.org
>
> On Jun 19, 6:01 pm, Mark Wyszomierski  wrote:
>
> > Hi,
>
> > I have a ListView. When I click a row Item (which are just TextView
> > instances) I want them to remain hilighted (default orange color). The
> > default behavior is that they flash orange.
>
> > Strangely, if I use the key pad (arrow up/down) to move between items,
> > it has the exact behavior I want. Why is the logic different between
> > using the keypad or with finger tapping?
>
> > 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: Capture the Android's browser HTTP petitions

2009-06-19 Thread psaltamontes

Here,

http://groups.google.com/group/android-developers/browse_thread/thread/1bd1c80127510b16

there is information about classes that I can use to modify HTTP
requests. I will try something with this classes.

On 19 jun, 17:34, psaltamontes  wrote:
> Do you know/think if this option will be in the future?
>
> Now, I'm trying to do something with a webview and webviewclient. But
> I don't know how to send a "RAW HTTP request" using these classes.
>
> I can send/receive RAW HTTP with sockets, but I don't know how to link
> these sockets with the webview.
>
> Any idea?
>
> Thanks.
>
> On 19 jun, 17:14, "Mark Murphy"  wrote:
>
> > > Yes, I want to say request :), sorry , I need improve my English.
>
> > > I don't want my application modify the settings of the browser, the
> > > idea is that the user configure the proxy of the browser and install
> > > my application. This application is a service that listen the HTTP
> > > requests and send to the Internet.
>
> > Hmmm...I do not see where users can set their proxy server, either.
>
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com
> > _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ListView addHeaderView gives ClassCastException when adding LinearLayout

2009-06-19 Thread Bob.T.Terminal

I've been trying to add a linear layout to a listview header. The
listview appears fine and is working as expected, but when i try to
add a linearlayout to the header i get a java.lang.ClassCastException:
android.view.ViewGroup$LayoutParams occuring at the list.addHeaderView
(ll); line. I thought it might be something in the complex layout i
had so i switched it to just a linearlayout with a colored background
and still got the same error. The end result i an trying to get is a
list with a header that is all scrollable. any help would be greatly
appreciated

Thanks


_list = new ListView(this);

LinearLayout ll = new LinearLayout(this);
ll.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, 100));
ll.setBackgroundColor(Color.CYAN);
_list.addHeaderView(ll);

_list.setAdapter(_adapter);

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



[android-developers] Re: Application (.apk) Size

2009-06-19 Thread indodroid

I also had the same query. What is a reasonable footprint of an
android application (static footprint)...and what is the maximum
runtime footprint that is acceptable ?

Regards
indodroid.

On May 27, 3:25 pm, amuy...@gmail.com wrote:
> Hi,
>
> What is the maximum size allowed for an android application?
>
> Regards,
> Abdul Muyeed M

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



[android-developers] mp3 streaming

2009-06-19 Thread Andrei

Sorry if this is duplicate question
Did anybody got mp3 streaming working using MediaPlayer or anything
else
Is there an example?
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: problems importing existing project into eclipse

2009-06-19 Thread mojo

I received the same error, I am using Subversion in Eclipse to import
the source code from the Open Data Kit.
When I got the error, I tried Android Tools >> Fix Project Properties
but there was no response.
I closed Eclipse and opened it again. Then, when I tried Fix Project
Properties, BAM! it worked.

thanks

Neil the Wheel

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

2009-06-19 Thread HeyChinaski

I'm animating a an ImageView from the right to the left of the screen
using a translate animation. The ImageView is place inside a
RelativeLayout over the top of my main layout using FrameLayout.

When I run the animation on the emulator everything works pretty well
but when I use run it on my G1 it leaves visual artifacts behind and
effects the rendering of the text component behind it.

Is this a performance issue and I'm being too ambitious or is it a bug
I can overcome?

If it is a performance issue is there anything I can do to improve
things?

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



[android-developers] ListView addHeaderView gives ClassCastException when adding LinearLayout

2009-06-19 Thread Bob.T.Terminal

When trying to add a header to a listview i keep on getting a
java.lang.ClassCastException: android.widget.LinearLayout
$LayoutParams. I thought it might be a problem with the widget i was
adding to the header so i made the simple test case below which add
just a colored linearlayout as the header and the problem still
occurs. The rendering of the list with the adapter is working fine, i
just cant add a header to it. Any help would be appreciated

thanks

_list = new ListView(this);

LinearLayout ll = new LinearLayout(this);
ll.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, 100));
ll.setBackgroundColor(Color.RED);
list.addHeaderView(ll);

_list.setAdapter(_adapter);

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



[android-developers] Measurement of Time

2009-06-19 Thread Michelle Silva
 Hi,

   i'd like to know how can i measure time to access an aplication in
the phone? Is there a way to measure time exactly?? If not, what is the
margin of error???
   I wanna know this because I will develop an application to measure
performance of the phone.
   Could you help me??
   Best regards,
  Michelle.

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



[android-developers] Re: How can I give my paid app away for free to some users?

2009-06-19 Thread intbt

Coupons or some method of offering free or discounted versions. If you
have a customer that might want to use apps as a giveaway for selected
customers, it is difficult with the present Google Market set-up.

On Jun 18, 11:01 am, Jason Van Anden 
wrote:
> +1
>
> On Thu, Jun 18, 2009 at 1:52 PM, Anna PS 
> wrote:
>
> > Ah - that's a shame. Discount coupons would definitely be a nice
> > feature to have on the Market...
>
> > On Jun 18, 12:06 am, Yuri Ammosov - Sadko Mobile 
> > wrote:
> >> DO NOT REFUND. Refund UNINSTALLS the program.
>
> >> YA
>
> >> On Jun 17, 2:17 pm, Anna PS  wrote:
>
> >> > Hi all
>
> >> > So I'm about to put a paid app on the Market, but I'd like to give it
> >> > free to a few users who helped to test it.
>
> >> > Is there any way that I can give them a token or something else so
> >> > that they can get it free? Or can I refund them once they've paid if I
> >> > know their details?
>
> >> > I guess the alternative would be to give them a direct download, but
> >> > then they won't get updates through the Market.
>
> >> > It'd be nice to know how to do this, and how to give discount codes as
> >> > well.
>
> >> > Any ideas anyone?
>
> >> > Thanks!
> >> > Anna
>
>

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



[android-developers] feedback system

2009-06-19 Thread Tumaru

i think that there is an absolutely vital part of the programing chain
missing here, and that is feedback.

you might think that you have already got adequate feedback in place
but it took me a couple days to find it and if i hadn't just gone to
school for a year to learn some basics of computer support i probably
would have just fallowed my friends advice and switched my new ghone
in for an iphone (the one that works and everybody knows how to use).
i'm not saying that the ghone don't work but i'm not saying that it
hasn't told me to force quit many applications either.

also on top of all of that the market place is too big and the
organization of apps isn't adequate, which has lead to my gphone being
overloaded with apps in less then a day.

also i the setting are hard to find, you can't connect it to a
computer and update its software or switch our apps or reformat it or
anything else like that (because i couldn't find any software online i
trusted).

also i can't find where to change the theme and haven't found a decent
guide on the internet. personally i would have thought there would be
plenty of guides out there by now, including fully functional flash
tutorials on everything and anything you need to know about the
android operating system.


ps i'm sorry if i put this in the wrong place but i'm sick and tired
of searching websites to find that i still don't know where to put my
post.

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



[android-developers] Null ptr exception before starting activity

2009-06-19 Thread chimaera

Hi All,

I just deployed my first app on the market tonight. It was running
nice on the emulator and on my G2.
But apparently several users have difficulties starting the app, and I
can't figure out why.

Here is the crash dump:
java.lang.RuntimeException: Unable to start activity ComponentInfo
{com.comp.app/com.comp.app.AppActivity}:
java.lang.NullPointerException
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2268)
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
android.app.ActivityThread.access$1800(ActivityThread.java:112)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:123)
android.app.ActivityThread.main(ActivityThread.java:3948)
java.lang.reflect.Method.invokeNative(Native Method)
java.lang.reflect.Method.invoke(Method.java:521)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
dalvik.system.NativeStart.main(Native Method)


Any ideas ?

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

2009-06-19 Thread charmed_chic

Does anyone know where I can download this app? Apparently, this is
the developers' website:
http://aor.leadapps.com/
I have been searching & searching for an online radio aside from
streamfurious. 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: The errors when use the aidl, need your help

2009-06-19 Thread Nacho
  You need move "mp3PlayerInterface.aidl" in the "\mp3\player\" directory if
your declaration package says "mp3.player".
  For example, I'll put IMyInterface.aidl in \com\ill\IMyInterface.aidl
:
--- content of IMyInterface.aidl ---
 package com.ill;

 interface IMyInterface {
   // methods...
 }

  Nice regards!

On Thu, Jun 18, 2009 at 4:32 AM, Alex Lv  wrote:

>
> Firstly, I create an aidl file named mp3PlayerInterface.aidl.
> Then I try to use the aidl tool to parsing the aidl-file to java-file.
> The error"mp3PlayerInterface should be declared in a file called com
> \mp3\player\mp3PlayerI
> nterface.aidl."happened no matter use the aidl-command derectly or
> eclipse.
> How to solve this issue?
> >
>

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



[android-developers] InputMethodService and landscape mode

2009-06-19 Thread Markus

Hi,

I've implemented a new InputMethodService, which uses a GLSurfaceView
to display the letters in a 3D scene. In portrait mode, it is working
fine now, but not in landscape mode. It is always launching in
fullscreen mode and displaying a textinput box from the base class. Is
there are way to disable the textinput box?

Moreover, my GLSurfaceView is not displayed at all in landscape mode.
Therefore, I've set onEvaluateFullscreenMode() to return always false
to disable the fullscreen mode, but in this case, nothing is shown at
all. So what do I have to do to use the same displaying mode  in
landscape mode as in protrait mode?

Sometimes, the services also starts without focus. Where can I set to
give always focus to the service?

bye
Markus

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

2009-06-19 Thread charmed_chic

i need an android project that allows one to listen to internet radio
stations live. i searched on google codes about it but found nothing.
any ideas? 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: ExifInterface and libexif

2009-06-19 Thread Augustin.CL

Could I use ExifInterface.java to getAttributes ,put some Exif Tag
into that HashMap, saveAttributes and commitChanges?
For Example:
ExifInterface exif = new ExifInterface(filePath);
HashMap exifData = exif.getAttributes();
exifData.put("GPSImgDirection","200");
exif.saveAttributes(exifData);
exif.commitChanges();

On Jun 19, 8:24 pm, "Augustin.CL"  wrote:
> Dear All,
>         Currently, I want to fix the camera apk to make the image
> attached the GPS information. But I find there are some problems.
>         1. First, we can't change the exif information. According 
> tohttp://code.google.com/p/android/issues/detail?id=2415, I modified
> some codes of libexif(external/jhead/main.c). Now, it will show the
> GPS information.
>
>         2.But, when I try to modify the gps information of EXIF, I
> failed to update this information to that image.
>
> "My questions is How I could use the ExifInterface.java of Camera app
> to change the Exif information."
>
> Please give me some advices. Thanks in advanced.
>
> BTW, Does ExifInterface.java use the android/external/jhead/main.c
> over JNI?
>
> Best regards,
> Augustin.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: InputMethodService and landscape mode

2009-06-19 Thread Dianne Hackborn
Um...  don't do this.  On the G1 there can only be one GL context at a
time.  This will utterly break if your IME is used with an app that is also
using GL.

Also, yes the IME window does not get focus.  This is intentional; if you
want to do something different, you are well outside the bounds of how IMEs
are supposed to operate.  Which is fine, but realize that you basically are
on your own for taking care of things.

On Fri, Jun 19, 2009 at 7:50 AM, Markus  wrote:

>
> Hi,
>
> I've implemented a new InputMethodService, which uses a GLSurfaceView
> to display the letters in a 3D scene. In portrait mode, it is working
> fine now, but not in landscape mode. It is always launching in
> fullscreen mode and displaying a textinput box from the base class. Is
> there are way to disable the textinput box?
>
> Moreover, my GLSurfaceView is not displayed at all in landscape mode.
> Therefore, I've set onEvaluateFullscreenMode() to return always false
> to disable the fullscreen mode, but in this case, nothing is shown at
> all. So what do I have to do to use the same displaying mode  in
> landscape mode as in protrait mode?
>
> Sometimes, the services also starts without focus. Where can I set to
> give always focus to the service?
>
> bye
> Markus
>
> >
>


-- 
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 addHeaderView gives ClassCastException when adding LinearLayout

2009-06-19 Thread Romain Guy

Hi,

It seems that the layout params you give your LinearLayout are not of
the right type. You need to use ListView.LayoutParams.

On Fri, Jun 19, 2009 at 6:52 AM, Bob.T.Terminal wrote:
>
> When trying to add a header to a listview i keep on getting a
> java.lang.ClassCastException: android.widget.LinearLayout
> $LayoutParams. I thought it might be a problem with the widget i was
> adding to the header so i made the simple test case below which add
> just a colored linearlayout as the header and the problem still
> occurs. The rendering of the list with the adapter is working fine, i
> just cant add a header to it. Any help would be appreciated
>
> thanks
>
> _list = new ListView(this);
>
> LinearLayout ll = new LinearLayout(this);
> ll.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, 100));
> ll.setBackgroundColor(Color.RED);
> list.addHeaderView(ll);
>
> _list.setAdapter(_adapter);
>
> >
>



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

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

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



[android-developers] Re: ListView - keep item selected

2009-06-19 Thread Romain Guy
> I read through the document linked, but still cannot appreciate the
> rationale behind disallowing a ListView item from having a 'selected'
> color when in TouchMode,
>

With your solution, there is no distinction between a "checked" item and the
selection (the selection is the highlight that moves when the user moves
around with the trackball/dpad/keyboard/etc.), which is confusing.

The selection disappears in touch mode because it is in our opinion the best
way to handle the dual navigation mode (touch and non-touch.) If we kept the
selection, what should happen when the user scrolled the list with the touch
screen and then tried to use the trackball/dpad again? The list could
immediately scroll back to where the selection is (very jarring effect) or
the selection could reappear on the current screen (which is equivalent to
having lost the selection in the first place.)

You can do whatever you want of course but you are going against Android's
UI guidelines and your application behaves differently from all other apps.
Which is bad for your users. I **strongly** recommend that you follow what I
explained in the article linked in one of the previous messages in this
thread.

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

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

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



[android-developers] lock data usage to email

2009-06-19 Thread canistel

Is it possible to lock down the phone so that the only data usage is
email? I don't even mind if the email has to be manually send /
received; due to the small amount of data I have on my plan, I just
don't ever want to use edge / 3g for anything other then email data.
Once I'm on wifi then other data is fine.

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

2009-06-19 Thread Lorenz

Thanks JP!!

On Jun 10, 7:20 pm, JP  wrote:
> We've had this discussion a few times before:
>
> http://groups.google.com/group/android-developers/browse_thread/threa...
>
> Unless someone found out otherwise, googlenav in Android seems to be
> history. BTW, if memory serves me right, googlenav was pulled wayback
> in m5. An API using a small set of mockup data was included instead,
> but that did not raise my interest, and I haven't heard where that
> went.
>
> As an alternative, you could perhaps check out what the devs of
> Andnav2 (andnav.org andhttp://code.google.com/p/osmdroid/) have done.
> They moved on to OpenStreetMaps and use a geo-search engine outside of
> Google or another commercial provider.
>
> On Jun 9, 3:40 pm, Lorenz  wrote:
>
> > Hi to everyone!!
> > So, I've to deliver a project in two week.In this project I should use
> > the package com.google.googlenav for drawing one the maps some Driving
> > or "Walking" DIRections but from some sites I have known that it isn't
> > avaible anymore for SDK 1.5(as it was for SDK 0.9).So please is there
> > anybody that can solve this problem??Is there an other way to obtain
> > that directions?
>
> > regards:)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Join the Android Developer Group on Linkedin!

2009-06-19 Thread atea...@gmail.com

Join over 1,500 Android professionals to share, learn, and network.
The resource for connecting professionals with experience in
developing, selling, marketing, managing, supporting and/or creating
new business around the Android platform.

You may join this group by going to the following link:
http://www.linkedin.com/e/gis/86481/4DA362688A87

Regards,
-Austin Teames
Group Manager

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

2009-06-19 Thread skink



On 19 Cze, 13:58, skink  wrote:

>
> so how can avoid that reference stealing?
>
> skink

ok, i've work arounded that problem with using application context iso
activity one as a Toast's ctor parameter
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Retrieving Records from a created Database and put it in a SPINNER

2009-06-19 Thread Georgy

Ok this has worked for me:

   Spinner s2 = (Spinner) findViewById(R.id.spinner2);
   db.open();
   Cursor cur = db.getAllTitles();
   SimpleCursorAdapter cadapter = new SimpleCursorAdapter(this,
android.R.layout.simple_spinner_item, cur,
   new String[] {KEY_TITLE},
   new int[] {android.R.id.text1});

   cadapter.setDropDownViewResource
(android.R.layout.simple_spinner_dropdown_item);
   s2.setAdapter(cadapter);



on another matter, I want to see my database, I rezlied that I do not
have the persmission to see it from the device, how can I see it from
the emulator on Eclipse? I read the documentation and on the MS DOS
prompt after writing adb -s emulator5554 shell and trying to connect
to the database it can't find it and I can't see it  on the project
explorer in Eclipse?

any ideas?

10x




On Jun 19, 11:40 am, Georgy  wrote:
> Mark thanks for the helpful link,
>
> I still can't tell how to use manageQuery with my table (and not a
> built in table such as CONTACTS).
>
> My database is: locode
> My Table is: chart
>
> and I have several columns and rows in it. My column that I want to
> show is called KEY_TITLE
>
> So in this line I don't know what to replace:
>
> Cursor cur = managedQuery(People.CONTENT_URI, PROJECTION, null, null);
> SimpleCursorAdapter adapter2 = new SimpleCursorAdapter(this,
> android.R.layout.simple_spinner_item,  cur, new String[]
> {People.NAME}, new int[] {android.R.id.text1});
>
> I really appreciate your help
>
> On Jun 18, 4:19 pm, "Mark Murphy"  wrote:
>
> > > Mark thanks for the reply,
>
> > > To be more specific, here is a snippet from my spinner code:
>
> > >String[] array = {"Select", "Building", "Here"};
> > >   Spinner s2 = (Spinner) findViewById(R.id.spinner2);
> > >   ArrayAdapter cadapter = new ArrayAdapter(this,
> > > android.R.layout.simple_spinner_item, array);
> > >   cadapter.setDropDownViewResource
> > > (android.R.layout.simple_spinner_dropdown_item);
> > >   s2.setAdapter(cadapter);
>
> > > my problem is replace array (to make it dynamic) with my 'title'
> > > column from my 'chart' table in my 'dbm' database.  I know it's a
> > > simple line, but I can't seem to get  it.
>
> >http://developer.android.com/guide/topics/ui/binding.html
>
> > The first code listing shows two spinners, one using an ArrayAdapter, one
> > using a SimpleCursorAdapter wrapping the result of a database query.
>
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com
> > _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How delete Media record on db

2009-06-19 Thread Francesco Pace
Thanks Marco,
but I try to delete with content://media/external/images/media/<_id> my
application works ;)


2009/6/19 Marco Nelissen 

> You can't delete all images at once, you'll have to delete them one by one.
>
>
>
> On Fri, Jun 19, 2009 at 5:43 AM, Francesco Pace  wrote:
>
>> Hi guys,
>> I have a question. Sorry for my english.
>> I have this code :
>>
>> Uri uri = Uri.parse("content://media/external/images/media");
>> ContentResolver resolver = _ctx.getContentResolver();
>> resolver.delete(uri, null, null);
>>
>> but this code doesn't work because I have this error :
>>
>> 06-19 12:41:32.886: VERBOSE/TEST](2285): Unknown or unsupported URL:
>> content://media/external/images/media
>>
>> Can I have to delete all records on this db?
>>
>>
>>
>>
>
> >
>

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



[android-developers] Re: Application (.apk) Size

2009-06-19 Thread Fred Grott(shareme)

It wil be smaller than the heap size limit per apps..so if that is 10
megs than assume 4 to 5 megs?



On Jun 19, 8:35 am, indodroid  wrote:
> I also had the same query. What is a reasonable footprint of an
> android application (static footprint)...and what is the maximum
> runtime footprint that is acceptable ?
>
> Regards
> indodroid.
>
> On May 27, 3:25 pm, amuy...@gmail.com wrote:
>
> > Hi,
>
> > What is the maximum size allowed for an android application?
>
> > Regards,
> > Abdul Muyeed M
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 - keep item selected

2009-06-19 Thread Mark

Hi Romain,

In my mind there are (at least) two ways to use a ListView:

One is when you want to let the user pick a single item then
immediately move to some other Activity (this works perfectly as
described). For example, you present the user with a list of cities,
as soon as they click "New York", we move them to a new Activity. So
there's no issue about letting the item remain focused.

The other is the problem I'm facing, where I don't want to immediately
perform some action when the user clicks a ListView item. Maybe the
user can click the item (or multiple items), then perform some delayed
action. Something like:

  "Pick 4 cities you want to visit, then hit OK."
  
  

here the user would tap multiple ListView items, each of which should
remain "selected". In this case, what would you recommend we do?
Should each ListView item be a composite ChechBox + TextView control
for example? So instead of relying on the ListView to indicate
"selected-ness", I simply put a checkmark next to the items that the
user has tapped thus far?

Thanks

On Jun 19, 1:15 pm, Romain Guy  wrote:
> > I read through the document linked, but still cannot appreciate the
> > rationale behind disallowing a ListView item from having a 'selected'
> > color when in TouchMode,
>
> With your solution, there is no distinction between a "checked" item and the
> selection (the selection is the highlight that moves when the user moves
> around with the trackball/dpad/keyboard/etc.), which is confusing.
>
> The selection disappears in touch mode because it is in our opinion the best
> way to handle the dual navigation mode (touch and non-touch.) If we kept the
> selection, what should happen when the user scrolled the list with the touch
> screen and then tried to use the trackball/dpad again? The list could
> immediately scroll back to where the selection is (very jarring effect) or
> the selection could reappear on the current screen (which is equivalent to
> having lost the selection in the first place.)
>
> You can do whatever you want of course but you are going against Android's
> UI guidelines and your application behaves differently from all other apps.
> Which is bad for your users. I **strongly** recommend that you follow what I
> explained in the article linked in one of the previous messages in this
> thread.
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Removing Missed Call Notification

2009-06-19 Thread Jonathan Herriott

Hi,

So, I've been researching how to clear missed calls, and I can't find
the API to do it.  I've tried setting Calls.NEW in the CallLogs
database to 0 for missed calls, and I've verified that the values are
set in the emulator's database, but the notification never
disappears.  I've seen other 3rd party applications do it, so how can
I do it?

I've noticed that there is an internal service that Android uses to
clear missed call notifications, so is there a way to access this
without being part of the system?

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] testing/understanding weak and strong pointers

2009-06-19 Thread devi prasad
While trying to follow the implementation of weak and strong (smart)
pointers in Android, I created a few code snippets to test my
understanding. I'm sharing a few samples here. I have attached a file
that show the contains of my Android.mk file, source files, commands
to build this sample code, and also the logs.

I'm providing it here believing that there are many like me out there
who'd benefit. Please feel free to provide comments and suggestions.Of
course, one needs to spend some time with RefBase.h and RefBase.cpp to
really appreciate what's going on behind the scene. I'm reserving the
explanations for some other day :)

regards
Devi Prasad

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

---
A C++ source file (without a main function)
---
#define LOG_TAG "smart-ptr-sample"

#include "utils/RefBase.h"
#include "utils/Log.h"

using namespace android;

class Point : public RefBase {
public:
Point(int x, int y) :  mx(x), my(y) {
LOGD("Point constructor");
extendObjectLifetime(OBJECT_LIFETIME_WEAK);
}
virtual ~Point() {
LOGD("Point destructor");
}

virtual void onFirstRef() {
LOGD("first weak ptr ref callback");
}

virtual void onLastStrongRef(const void* id) {
LOGD("last strong ptr ref callback");
}

virtual void onLastWeakRef(const void* id) {
LOGD("last weak ptr ref callback");
}

private:
int mx, my;
};

---
Here's the contents of Android.mk file
---
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

$(info building weak pointer example code)

LOCAL_SRC_FILES:= weakp.cpp

LOCAL_SHARED_LIBRARIES := \
   libutils \
   libcutils

LOCAL_C_INCLUDES += frameworks/base/include system/core/include

LOCAL_MODULE:= weakp

include $(BUILD_EXECUTABLE)

---
  Here's are the instructions to compile and run the code within the emulator
---

I created a folder named "example" within the top directory (i.e., at same 
level as frameworks and external directories), and used the following commands 
to build my samples:

(1) . build/envsetup.sh 
(2) mmm

Then I'd push the resulting executable (using 'adb push') to '/data/app' 
directory and run it from there. Use 'adb logcat' to view the logs.


---
  Here's are a few samples of 'main' function and corresponding logs
---
int main()
{
{
{
wp weakp(new Point(10, 20));

LOGD("weak ptr's lifetime is just about to finish ...\n");
}
LOGD("weak ptr is out of scope.\n");
}

return 0;
}

D/smart-ptr-sample(  731): Point constructor
D/smart-ptr-sample(  731): weak ptr's lifetime is just about to finish ...
D/smart-ptr-sample(  731): last weak ptr ref callback
D/smart-ptr-sample(  731): Point destructor
D/smart-ptr-sample(  731): weak ptr is out of scope.
---

int main()
{
{
{
wp weakp(new Point(10, 20));

weakp.promote();
LOGD("weak ptr's lifetime is just about to finish ...\n");
}

LOGD("weak ptr is out of scope.\n");
}

return 0;
}

D/smart-ptr-sample(  734): Point constructor
D/smart-ptr-sample(  734): first ptr ref callback
D/smart-ptr-sample(  734): last strong ptr ref callback
D/smart-ptr-sample(  734): weak ptr's lifetime is just about to finish ...
D/smart-ptr-sample(  734): last weak ptr ref callback
D/smart-ptr-sample(  734): Point destructor
D/smart-ptr-sample(  734): weak ptr is out of scope.

---

int main()
{
{
sp strp;

{
wp weakp(new Point(10, 20));

strp = weakp.promote();
LOGD("weak ptr's lifetime is just about to finish ...\n");
}
LOGD("weak ptr is out of scope.\n");
LOGD("only strong ptr is in scope.\n");
}

LOGD("strong ptr is out of scope.\n");

return 0;
}

D/smart-ptr-sample(  729): Point constructor
D

[android-developers] Re: ListView - keep item selected

2009-06-19 Thread Romain Guy
> One is when you want to let the user pick a single item then
> immediately move to some other Activity (this works perfectly as
> described). For example, you present the user with a list of cities,
> as soon as they click "New York", we move them to a new Activity. So

there's no issue about letting the item remain focused.


In that case there's no need to keep it focused either.


> here the user would tap multiple ListView items, each of which should
> remain "selected". In this case, what would you recommend we do?
> Should each ListView item be a composite ChechBox + TextView control
> for example? So instead of relying on the ListView to indicate
> "selected-ness", I simply put a checkmark next to the items that the
> user has tapped thus far?


That's exactly what ListView's choice mode is for! Look at List10.java and
List11.java in the ApiDemos.

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

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

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



[android-developers] new dev device

2009-06-19 Thread Andrei

When can we expect new unlocked dev device for developers? Anybody?
May be Magic
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Application (.apk) Size

2009-06-19 Thread Dianne Hackborn
The Java heap is limited to 16MB, but that is just the heap, so I don't
believe code is included.

The basic answer is: keep your app as small as possible.  A little more
detail: the G1 has ~75MB of storage for both apps and data, so if your app
is 1MB it is using 7.5% of that storage which is getting quite noticeable.
Also the code needs to be copied out during the dexopt phase, so if your
size is significantly related to code than that total space needed is
likewise increased.

At that point, it's just a matter for you to decide how much space your
application can take before your users won't think it is worth keeping on
their phone.

On Fri, Jun 19, 2009 at 10:47 AM, Fred Grott(shareme)
wrote:

>
> It wil be smaller than the heap size limit per apps..so if that is 10
> megs than assume 4 to 5 megs?
>
>
>
> On Jun 19, 8:35 am, indodroid  wrote:
> > I also had the same query. What is a reasonable footprint of an
> > android application (static footprint)...and what is the maximum
> > runtime footprint that is acceptable ?
> >
> > Regards
> > indodroid.
> >
> > On May 27, 3:25 pm, amuy...@gmail.com wrote:
> >
> > > Hi,
> >
> > > What is the maximum size allowed for an android application?
> >
> > > Regards,
> > > Abdul Muyeed M
> >
>


-- 
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] contextMenu for dialog

2009-06-19 Thread Mike Lanin

I've wrote, but have no answer. Is there any way to create context
menu for items of dialog?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] contextMenu and dialog

2009-06-19 Thread Mike Lanin

I've wrote, but have no answer. Is there any way to create context
menu for items of dialog?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Application (.apk) Size

2009-06-19 Thread Streets Of Boston

"It wil be smaller than the heap size limit per apps"
Not true. :=)
I could imagine creating an app of 50MBytes. 2MBytes worth of code and
48MBytes worth of resources (images/assets/etc.). And if these
resources are not loaded all at once, it should work.

Of course, who would download such a big app to his/her phone..?


On Jun 19, 1:47 pm, "Fred Grott(shareme)" 
wrote:
> It wil be smaller than the heap size limit per apps..so if that is 10
> megs than assume 4 to 5 megs?
>
> On Jun 19, 8:35 am, indodroid  wrote:
>
>
>
> > I also had the same query. What is a reasonable footprint of an
> > android application (static footprint)...and what is the maximum
> > runtime footprint that is acceptable ?
>
> > Regards
> > indodroid.
>
> > On May 27, 3:25 pm, amuy...@gmail.com wrote:
>
> > > Hi,
>
> > > What is the maximum size allowed for an android application?
>
> > > Regards,
> > > Abdul Muyeed M- 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: 3D Streaming on Android Phone?

2009-06-19 Thread Yusuf T. Mobile

>From your message, it seems that is is possible, but slow. I would not
assume the phone is slower, you would have to try it out, and of
course different phones have different capabilities. Most should have
3D hardware acceleration, but that means using the OpenGL API, which
your Java applet may not be doing.



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 Jun 19, 4:47 am, javame_android  wrote:
> Hi Everybody,
>
> I would like to know whether it is possible to implement 3D streaming
> on Android phone. We have our own 3D studio which takes as input 3Ds
> and maya files and generates .q3z file. Now if I call this .q3z file
> using url then is it possible to render it on Android phone. I have
> Java Applet player ready for it and it runs fine. Can that be ported
> to Android phone.
>
> I have ported some part of it i.e. uptil decoding .q3z file, but it
> takes a lot of time to decode whereas in Java Applet Player the
> decoding and rendering gets completed quickly. This is tested just on
> emulator so assuming it will be even slower on Phone. So I would like
> to know whether its possible to do so or not.
>
> Thanks & Regards
> Sunil
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Retrieving Records from a created Database and put it in a SPINNER

2009-06-19 Thread Mark Murphy

> on another matter, I want to see my database, I rezlied that I do not
> have the persmission to see it from the device, how can I see it from
> the emulator on Eclipse? I read the documentation and on the MS DOS
> prompt after writing adb -s emulator5554 shell and trying to connect
> to the database it can't find it and I can't see it  on the project
> explorer in Eclipse?
>
> any ideas?

Use the adb pull command:

http://developer.android.com/guide/developing/tools/adb.html#copyfiles

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



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



[android-developers] Re: Application (.apk) Size

2009-06-19 Thread Fred Grott(shareme)

Dianne I have a related question..

How do figure out the upper limit of the sqlite database size an app
can use?

Fred Grott
http://mobilebytes.wordpress.com

On Jun 19, 1:52 pm, Streets Of Boston  wrote:
> "It wil be smaller than the heap size limit per apps"
> Not true. :=)
> I could imagine creating an app of 50MBytes. 2MBytes worth of code and
> 48MBytes worth of resources (images/assets/etc.). And if these
> resources are not loaded all at once, it should work.
>
> Of course, who would download such a big app to his/her phone..?
>
> On Jun 19, 1:47 pm, "Fred Grott(shareme)" 
> wrote:
>
> > It wil be smaller than the heap size limit per apps..so if that is 10
> > megs than assume 4 to 5 megs?
>
> > On Jun 19, 8:35 am, indodroid  wrote:
>
> > > I also had the same query. What is a reasonable footprint of an
> > > android application (static footprint)...and what is the maximum
> > > runtime footprint that is acceptable ?
>
> > > Regards
> > > indodroid.
>
> > > On May 27, 3:25 pm, amuy...@gmail.com wrote:
>
> > > > Hi,
>
> > > > What is the maximum size allowed for an android application?
>
> > > > Regards,
> > > > Abdul Muyeed M- 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] Enabling camera in the emulator !

2009-06-19 Thread hanged_man

Hi everyone,
 I've just noticed that launching the Camera and Camcorder (in the
emulator) would result in a black screen (instead of the famous moving
small boxes), i've looked for why this happening on the net,
apparently that the camera is disabled by default when you create an
AVD. Decided to create another AVD with the camera enabled and
launched it and still getting that black screen.
Anyone has any idea how to fix this ?

My problem in the first place is that my application is using the
default camera application using intents just like in the following:

Intent imageCaptureIntent = new Intent
(MediaStore.ACTION_IMAGE_CAPTURE);
imageCaptureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new
File("/sdcard/imageCaptureIntent.jpg")));
startActivityForResult(imageCaptureIntent, WHATEVER_REQ_CODE);

I thought that there's a problem in my intent request but like i said
before, running the camera on the emulator itself is the problem.
By the way, You can run the "camera preview" in the API demos with no
problems, how come !!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Application (.apk) Size

2009-06-19 Thread Dianne Hackborn
The only upper limit is the amount of storage space available, and the
amount of temporary RAM needed for whatever queries you are doing.

On Fri, Jun 19, 2009 at 12:12 PM, Fred Grott(shareme)
wrote:

>
> Dianne I have a related question..
>
> How do figure out the upper limit of the sqlite database size an app
> can use?
>
> Fred Grott
> http://mobilebytes.wordpress.com
>
> On Jun 19, 1:52 pm, Streets Of Boston  wrote:
> > "It wil be smaller than the heap size limit per apps"
> > Not true. :=)
> > I could imagine creating an app of 50MBytes. 2MBytes worth of code and
> > 48MBytes worth of resources (images/assets/etc.). And if these
> > resources are not loaded all at once, it should work.
> >
> > Of course, who would download such a big app to his/her phone..?
> >
> > On Jun 19, 1:47 pm, "Fred Grott(shareme)" 
> > wrote:
> >
> > > It wil be smaller than the heap size limit per apps..so if that is 10
> > > megs than assume 4 to 5 megs?
> >
> > > On Jun 19, 8:35 am, indodroid  wrote:
> >
> > > > I also had the same query. What is a reasonable footprint of an
> > > > android application (static footprint)...and what is the maximum
> > > > runtime footprint that is acceptable ?
> >
> > > > Regards
> > > > indodroid.
> >
> > > > On May 27, 3:25 pm, amuy...@gmail.com wrote:
> >
> > > > > Hi,
> >
> > > > > What is the maximum size allowed for an android application?
> >
> > > > > Regards,
> > > > > Abdul Muyeed M- Hide quoted text -
> >
> > > - Show quoted text -
> >
>


-- 
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: Permissions for Android Dev Phone 1

2009-06-19 Thread Andrew

On Jun 18, 10:53 am, hanasnap  wrote:
> Hi, if anyone can help me is there a way to make an ADP behave like a
> normal G1? I would like to know if I can set an application on ADP to
> ask for permissions (when installing) like it does on G1. Thanks!

Are you testing one of your own applications? What have you written in
the manifest file?

As far as I know the ADP and the retail G1/G2/... behave the same way
if there is anything in the manifest which is a security risk or else
the application will just install without any questions.

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