[android-developers] Re: Is there a command to find out the pid of all process running on the emulator?

2009-03-17 Thread mercury xu
Hi  ying

As I know, you can check  what's happen on your emulator from the Eclipse'
DDMS,at the IDE left‘s list . You can find them.

Anyway, you want to show those information on your program or just check it?

IF run in your emulator.maybe you can try process as following

java.lang.Objecthttp://developer.android.com/reference/java/lang/Object.html
   ↳ android.os.Process
http://developer.android.com/reference/android/os/Process.html

Wish can give you some helps.

Best wish and regards!

Mercury

2009/3/17 ying lcs ying...@gmail.com


 Hi,

 Is there a command to find out the pid of all process running on the
 emulator?
 If yes, can you please tell me how can I do that?

 Thank you.

 


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



[android-developers] Re: ADT Layout Editor

2009-03-17 Thread Xavier Ducrohet

Hi,

This will probably come in the version following the plugin released
with cupcake.

Note that even though you cannot use the add button to add your
custom classes to your layout, you can add them from the XML edit
view.
In most cases, custom views are properly rendered by the graphical
layout editor and you should also be able to edit their properties as
if it was a normal class.

ApiDemos has a layout with custom views called custom_view.xml which
demonstrate this. The custom view renders in the layout editor and its
custom attributes text and textcolor show up in the property tab
(they appear with their xml namespace prefix, which we should fix, but
it doesn't prevent from using the attribute).

Xav

On Fri, Mar 13, 2009 at 12:16 AM, Susan smxb...@gmail.com wrote:

 Could you please tell me when the editor will find all the classes in
 the project that extend android.view.View and add them to the list?
 Which ADT version I could expect? I think it is on your schedule,
 isn't it?


 Best regards
 




-- 
Xavier Ducrohet
Android Engineer, Google.

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

2009-03-17 Thread Mariano Kamp
 I think it would be beneficial to see replies to comments,
especially from the developer.

Amen!

It would also be good if you could see the other comments/ratings of the
commenter. Just to get an idea if it is a prick or a concerned user.

On Mon, Mar 16, 2009 at 3:45 PM, Alexander okthat...@gmail.com wrote:




 On Mar 16, 7:05 am, coding_android_standards
 festival.s...@googlemail.com wrote:
  That is true. But I got another suggestion. It would be so helpful if
  there would be the version of the software that the people are using
  added to the post. I have got hundreds of emails and bad comments
  based on a weeks old version of my application. This leads to totally
  missleading ratings. In addition it makes it hard to guess if the
  people just report old errors or if they really got problems with the
  current version.


 What about a system similar to Google Code Issues (or SourceForge,
 any decent tracker, etc.)? E.g., a way that Issues can be submitted
 and resolved, etc., but not necessarily open source.

 At least a percentage of uninstallers' reasons (similar to what devs
 see non-publicly) in a 'Details' page (release notes??), within the
 menu while viewing the app's description, or something simple so users
 could see more details than an averaged 5-star rating.

 Then again, if the rating system had a more specifically weighed
 algorithm like IMDb, we could take the overall Rating more seriously.

 I just had a thought - why is the comments system linear?? You cannot
 see any direct responses to a comment, which would put much less
 significance on a comment of a user that had a complaint, while the
 response had already come previously or was resolved in a later
 version. I think it would be beneficial to see replies to comments,
 especially from the developer. You could still Mark As Spam, so the
 current moderation would be able to remain.
 


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



[android-developers] Hosting APKs files on site works for emulator, but not device?

2009-03-17 Thread EboMike

I'm currently hosting an app on my own server so my beta testers can
test it. I've set up the apk MIME type to be application/
vnd.android.package-archive, and when I try to download the app from
the emulator, it downloads the 53KB apk file and installs it.

When I try to do the same thing from a real ADP1 device, it only loads
43KB. When I try to install it, the system says that I'm trying to
install an app that already exists (called Android System) and that
doesn't require any permissions, but nothing happens when I proceed.
logcat tells me D/asset   (16379): failed to open Zip archive '/
sdcard/download/[name of the app].apk'

Bonus points! When I try to download the app from the emulator, I can
see that in the accesslog of my server. Not so when I download it from
the device, even after deleting /sdcard/download/* and clearing the
cache through the settings. Almost as if the device was loading an old
copy from a proxy server. I'm not sure which APN I'm using, but none
of the T-Mobile APNs have a proxy AFAICS.

Is there a way to circumvent the proxy, assuming that this is the
case? And/or tell the proxy not to cache this apk file?

-Mike


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



[android-developers] Re: Hosting APKs files on site works for emulator, but not device?

2009-03-17 Thread Al Sutton

Does the URL you're downloading from use a redirect or something similar 
to get to the apk?

Many free file hosting or website hosting packages use a loading page 
and some type of redirect (a Meta refresh tag being one example), and 
there have been problems with those on the device (see 
http://groups.google.com/group/android-developers/browse_thread/thread/b4fffb26e83d9653
 
for one example).

Al.

EboMike wrote:
 I'm currently hosting an app on my own server so my beta testers can
 test it. I've set up the apk MIME type to be application/
 vnd.android.package-archive, and when I try to download the app from
 the emulator, it downloads the 53KB apk file and installs it.

 When I try to do the same thing from a real ADP1 device, it only loads
 43KB. When I try to install it, the system says that I'm trying to
 install an app that already exists (called Android System) and that
 doesn't require any permissions, but nothing happens when I proceed.
 logcat tells me D/asset   (16379): failed to open Zip archive '/
 sdcard/download/[name of the app].apk'

 Bonus points! When I try to download the app from the emulator, I can
 see that in the accesslog of my server. Not so when I download it from
 the device, even after deleting /sdcard/download/* and clearing the
 cache through the settings. Almost as if the device was loading an old
 copy from a proxy server. I'm not sure which APN I'm using, but none
 of the T-Mobile APNs have a proxy AFAICS.

 Is there a way to circumvent the proxy, assuming that this is the
 case? And/or tell the proxy not to cache this apk file?

 -Mike


 
   


-- 

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Hosting APKs files on site works for emulator, but not device?

2009-03-17 Thread Michael Krehan
Al, thanks for the reply. It's on my own server (a Linux-based Apache
server), and it's a simple A HREF that goes straight to the file in the same
directory. No redirection or anything.

I tried it on an ADP1 and a G1, both on the T-Mobile network, and it didn't
work. The emulator worked fine. The symptoms point to a proxy.

On Mar 17, 2009 12:42 AM, Al Sutton a...@funkyandroid.com wrote:


Does the URL you're downloading from use a redirect or something similar
to get to the apk?

Many free file hosting or website hosting packages use a loading page
and some type of redirect (a Meta refresh tag being one example), and
there have been problems with those on the device (see
http://groups.google.com/group/android-developers/browse_thread/thread/b4fffb26e83d9653
for one example).

Al.

EboMike wrote:  I'm currently hosting an app on my own server so my beta
testers can  test it. I'...
--

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England  Wales with the
company number  6741909. The registered head office is Kemp House,
152-160 City Road, London,  EC1V 2NX, UK.

The views expressed in this email are those of the author and not
necessarily those of Funky Android Limited, it's associates, or it's
subsidiaries.



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Hosting APKs files on site works for emulator, but not device?

2009-03-17 Thread Al Sutton

If you want to send me a link off list I'll see what I can find.

Al.

Michael Krehan wrote:

 Al, thanks for the reply. It's on my own server (a Linux-based Apache 
 server), and it's a simple A HREF that goes straight to the file in 
 the same directory. No redirection or anything.

 I tried it on an ADP1 and a G1, both on the T-Mobile network, and it 
 didn't work. The emulator worked fine. The symptoms point to a proxy.

 On Mar 17, 2009 12:42 AM, Al Sutton a...@funkyandroid.com
 mailto:a...@funkyandroid.com wrote:


 Does the URL you're downloading from use a redirect or something
 similar
 to get to the apk?

 Many free file hosting or website hosting packages use a loading page
 and some type of redirect (a Meta refresh tag being one example), and
 there have been problems with those on the device (see
 
 http://groups.google.com/group/android-developers/browse_thread/thread/b4fffb26e83d9653
 for one example).

 Al.

 EboMike wrote:  I'm currently hosting an app on my own server so
 my beta testers can  test it. I'...

 --

 * Written an Android App? - List it at http://andappstore.com/ *

 ==
 Funky Android Limited is registered in England  Wales with the
 company number  6741909. The registered head office is Kemp House,
 152-160 City Road, London,  EC1V 2NX, UK.

 The views expressed in this email are those of the author and not
 necessarily those of Funky Android Limited, it's associates, or it's
 subsidiaries.




 


-- 

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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

2009-03-17 Thread Cyril Jaquier

Hi,

 in order to communicate with the server I need a huge global object
 (class with some hashmaps).
 
 all my activities (about 10) need that huge global object.
 
 wich options do I have?
 
 I am thinking about passing the object using intends and about the
 possibility to make the object a singleton.
 
 using the db will be much too slow.
 
 
 any ideas?
 

I just rewrote part of my application (NetCounter) last week to get ride 
of the aidl I used between activity and service. I wrote a model created 
in Application#onCreate [1]. You can register an Application object in 
your manifest so the platform will create it before anything else in 
your application. You can then use getApplication [2][3] to get this 
reference from your activities and services.

You can have a look at NetCounter code as it is now open-source ;)

http://www.jaqpot.net/viewvc/android/netcounter/trunk/

Regards,

Cyril Jaquier

[1] http://developer.android.com/reference/android/app/Application.html
[2] 
http://developer.android.com/reference/android/app/Activity.html#getApplication()
[3] 
http://developer.android.com/reference/android/app/Service.html#getApplication()

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

2009-03-17 Thread Al Sutton

Have you actually benchmarked using the database against alternatives?

You may find that although you consider the database slow it's the 
fastest option you have when compared to serialization methods.

Al.

DaRolla wrote:
 hello,

 in order to communicate with the server I need a huge global object
 (class with some hashmaps).

 all my activities (about 10) need that huge global object.

 wich options do I have?

 I am thinking about passing the object using intends and about the
 possibility to make the object a singleton.

 using the db will be much too slow.


 any ideas?

 greetings  thanks for reading,
 DaRolla
 
   


-- 

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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



[android-developers] global object? (singleton, intends, db)

2009-03-17 Thread DaRolla

hello,

in order to communicate with the server I need a huge global object
(class with some hashmaps).

all my activities (about 10) need that huge global object.

wich options do I have?

I am thinking about passing the object using intends and about the
possibility to make the object a singleton.

using the db will be much too slow.


any ideas?

greetings  thanks for reading,
DaRolla
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 re ad the file in sdcard?

2009-03-17 Thread Jiang
Sorry, you need to write like:
FileInputStream is = new FileInputStream(/sdcard/your_file);


--- 09年3月17日,周二, Jiang webs...@yahoo.cn 写道:
发件人: Jiang webs...@yahoo.cn
主题: 回复: [android-developers] Re: How to read the file in sdcard?
收件人: android-developers@googlegroups.com
日期: 2009,317,周二,5:17下午

InputStream is = new InputStream(/sdcard/your_file);


--- 09年3月17日,周二, AlexNguyen alexnt...@gmail.com 写道:
发件人: AlexNguyen alexnt...@gmail.com
主题: [android-developers] Re: How to read the file in sdcard?
收件人: Android Developers android-developers@googlegroups.com
日期: 2009,317,周二,5:15下午


I created the file.java  to read file so I don't know why it's error.
And there's the error: android.content.res.AssetManager
$AssetInputStream

public class Test1 extends Activity{
 /** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
   
 super.onCreate(savedInstanceState);
readfilefromlocal(this);
}
protected void readfilefromlocal(Context ctx) {

 FileInputStream istream = null;
 TextView tv = new TextView (this);
try {
  istream = (FileInputStream)ctx.getResources().openRawResource
(R.raw.sample);

 SAXParserFactory spf = SAXParserFactory.newInstance();
 SAXParser sp = spf.newSAXParser();
 XMLReader xr = sp.getXMLReader();
 ExampleHandler myExampleHandler = new ExampleHandler();
 xr.setContentHandler(myExampleHandler);
 xr.parse(new InputSource(istream));

 ParsedExampleDataSet parsedExampleDataSet =
myExampleHandler.getParsedData();
 tv.setText(parsedExampleDataSet.toString1());
}
catch (Exception e){
  tv.setText(Error:  + e.getMessage());
}

this.setContentView(tv);
}
}

If I want to modify to read file at sdcard, how must i do?
Thanks,
--Alex


好玩贺卡等你发,邮箱贺卡全新上线!







  ___ 
  好玩贺卡等你发,邮箱贺卡全新上线! 
http://card.mail.cn.yahoo.com/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Transferring paid apps G1 - HTC Magic

2009-03-17 Thread Carl Whalley

With the imminent arrival of the Magic I was wondering what impact
this would have on both end users and developers who want to transfer
their apps over, or may even have both handsets for whatever reason.
Is there a licensing provision for it? A means via software? This will
become more of an issue as the other new Android handsets are
launched.

--
Android Academy: http://www.androidacademy.com


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



[android-developers] How the use same instances when launching application twice ?

2009-03-17 Thread Derek

Hi,

Is it possible to re-use all the instances of Activities and Services
when an application is launched twice. For instance:
1/ I start my application APP1. Some activities are launched and a
service is started.
2/ I click Home device button
3/ I can see the icon the launch again my application APP1
4/ I click on it and the APP1 is launched twice

I would like to re-use the existing the instances of Activities and
Services from the first launch.
I guess it is related to SingleTop or SingleTask but it doesn't
seem to work.

Any suggestion ?

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



[android-developers] Re: TextView

2009-03-17 Thread Mr.No

Nobody knows how to set the text in a TextView underlinded within the
code?

On 16 Mrz., 12:11, Mr.No f.hi...@arcor.de wrote:
 Thx, but its static, i wonna also change the text within the code.

 On 16 Mrz., 11:59, manoj manojkumar.m...@gmail.com wrote:

  Define a string value in strings.xml as suggested below.
  string name=Your_textuMy Booking/u/string

  On Mar 16, 3:38 pm, Mr.No f.hi...@arcor.de wrote:

   Hello,
   how i can set the Text in a TextView underlined within the xml?

   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: Redistributing the eclipse plugins

2009-03-17 Thread danielolsson

On 16 Mar, 22:37, Ralf ralfo...@gmail.com wrote:
 With the usual I'm not a lawyer disclaimer applied, I'd think yes as
 long as you comply with the EPL and thus redistribute that part using
 the EPL. However you'd have to carefully choose your wording to make
 it clear this is not the original plugin distributed by Google.


Thank you for your answer. However, I have realised that the binary
plugins I have are NOT under the EPL.

I've been looking into this a little bit more in detail, and have come
to the following conclusions:
The eclipse plugins (0.8.0.v200809220836) downloadable from the update
site https://dl-ssl.google.com/android/eclipse/ are distributed under
the Android Software Development Kit License Agreement. According to
3.3 in that agreement we are not allowed to redistribute the plugins
in our own eclipse distribution.
If we would take the source code of the plugins in git (0.8.1 or 0.9.0
work in progress) we could build the plugins ourselves and distribute
it under EPL and Apache 2 accordingly.
To build them ourselves appears to us as an unnecessary step which we
would like to avoid. If possible we would like to take the prebuilt
binaries and include them in our distribution. However, it appears
that we would need Google's written permission in order to do that.

Could someone from Google comment on that?


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



Re: 回复: [android-developers] Re: How to rea d the file in sdcard?

2009-03-17 Thread AlexNguyen

Thanks for your help!

--Alex

On Mar 17, 5:22 pm, Jiang webs...@yahoo.cn wrote:
 Sorry, you need to write like:
 FileInputStream is = new FileInputStream(/sdcard/your_file);

 --- 09年3月17日,周二, Jiang webs...@yahoo.cn 写道:
 发件人: Jiang webs...@yahoo.cn
 主题: 回复: [android-developers] Re: How to read the file in sdcard?
 收件人: android-developers@googlegroups.com
 日期: 2009,317,周二,5:17下午

 InputStream is = new InputStream(/sdcard/your_file);

 --- 09年3月17日,周二, AlexNguyen alexnt...@gmail.com 写道:
 发件人: AlexNguyen alexnt...@gmail.com
 主题: [android-developers] Re: How to read the file in sdcard?
 收件人: Android Developers android-developers@googlegroups.com
 日期: 2009,317,周二,5:15下午

 I created the file.java  to read file so I don't know why it's error.
 And there's the error: android.content.res.AssetManager
 $AssetInputStream

 public class Test1 extends Activity{
  /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {

  super.onCreate(savedInstanceState);
 readfilefromlocal(this);
 }
 protected void readfilefromlocal(Context ctx) {

  FileInputStream istream = null;
  TextView tv = new TextView (this);
 try {
   istream = (FileInputStream)ctx.getResources().openRawResource
 (R.raw.sample);

  SAXParserFactory spf = SAXParserFactory.newInstance();
  SAXParser sp = spf.newSAXParser();
  XMLReader xr = sp.getXMLReader();
  ExampleHandler myExampleHandler = new ExampleHandler();
  xr.setContentHandler(myExampleHandler);
  xr.parse(new InputSource(istream));

  ParsedExampleDataSet parsedExampleDataSet =
 myExampleHandler.getParsedData();
  tv.setText(parsedExampleDataSet.toString1());
 }
 catch (Exception e){
   tv.setText(Error:  + e.getMessage());
 }

 this.setContentView(tv);
 }

 }

 If I want to modify to read file at sdcard, how must i do?
 Thanks,
 --Alex

 好玩贺卡等你发,邮箱贺卡全新上线!

   ___
   好玩贺卡等你发,邮箱贺卡全新上线!http://card.mail.cn.yahoo.com/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Store log messages on adp1

2009-03-17 Thread Michael Bollmann

Is it possible to configure the ADP1 to keep the last 5mb(for example)
of log messages
especially when it's not connected to a development machine?

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



[android-developers] Determine images at runtime - getResources().getIdentifier()

2009-03-17 Thread Tommaso

Hi all,

in my application I have a table that stores information for symbols.
These symbols have to be displayed, so also the source, the *.png, is
stored in each row. These symbols are loaded randomly at runtime.

How do I get the the image(s) to be loaded?

getResources().getIdentifier(symbolIdentifier, null, null) always
results 0 (zero).

Here is the code:
private void loadSymbol(final String source) {
int imageIdentifier = getResources().getIdentifier
(symbolIdentifier, null, null);
Bitmap bitmap = BitmapFactory.decodeResource(getResources(),
imageIdentifier);
mImageOfSymbol.setImageBitmap(bitmap);
mImageOfSymbol.setVisibility(ImageView.VISIBLE);
mImageOfSymbol.refreshDrawableState();
}

It says in the JavaDoc that the use of getIdentifier() is discouraged.
What is a best practice to load images at runtime, when only knowing
the source as a string?

Many thanks in advance.

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

2009-03-17 Thread sukumar bhashyam
hi Fred,

CheckJNI has nothing to do with testRunner. Din't remember the exact cause
why it was not running on phone. But, it started working after sometime(
might be problem with my code ).

Sukumar.

On Tue, Dec 30, 2008 at 3:12 PM, sukumar bhashyam.suku...@gmail.com wrote:


 hi,

 I'm facing problems running TestRunner on G1 phone. I haven't had any
 problems running on emulator.   Was there any setting I need to turn
 it ON on G1 phone?. Also from catlogs, for emulator CheckJNI is
 printed as ON but on phone its printed as OFF.  Is checkJNI has
 something to do with test runner ?. Thanks in advance.


 Sukumar.



 


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

2009-03-17 Thread aljo

Thanks... your program worked...

Thank you for your help...

Just one question... If what I understand is correct, your program
queries only the first column of the table... If I query the second
column which is the _id column, it still looks into the name
column and displays the content of the name column in the autocomplete
textview. So i have to change the ((TextView) view).setText
(cursor.getString(columnIndex)) and return cursor.getString
(columnIndex) to ((TextView) view).setText(cursor.getString(1)) and
return cursor.getString(1)...
I don't know if what I did to modify the code was the correct way or
do you have a better way?

it now looks like this...

 @Override
public void bindView(View view, Context context, Cursor
cursor) {
((TextView) view).setText(cursor.getString(1));
}

@Override
public String convertToString(Cursor cursor) {
Log.i(info,  convertToString );
return cursor.getString(1);
}

@Override
public Cursor runQueryOnBackgroundThread(CharSequence
constraint) {
if (constraint != null) {
String selection = _id like \' + constraint.toString()
+%\';
return sqlite.query(test, null, selection, null,
null, null, null);
}
else {
return null;
}
}

sorry if im such a noob



On Mar 13, 5:28 pm, roland roland...@gmail.com wrote:
 Hi, i made a sample of using a AutoCompleteTextView to showing names
 which are saved in a database.

 Here is the link of 
 project:http://0467525716.free.fr/Android/AutocompleteTest.zip

 I hope it helps.

 On 10 mar, 04:26, aljo aljochim...@gmail.com wrote:



  i already saw that thread but i still can't understand some of the
  codes... i don't know how to incorporate my database in that code...
  how can i import my db...

  public ContactListAdapter(Context context, Cursor c) {
                      super(context, c);
                      Log.d(exp, *** A VER EHJEE
  *);
                      mDb = new Database
  (context);
  --- (is this where i will put my DB?)
                      mDb.open();
                      Log.d(exp, *** A VER PUES 100
  *);
                  }

   private static final String[] PEOPLE_PROJECTION = new String[]
  - (is this where autocomplete extracts its data?)
  {
                  Database.KEY_REASON,
                  Database.KEY_VALUE,
                  Database.KEY_TAX
          };

  sorry guyz... im kinda new on this whole thing
  tnx for any of your help...

  On Mar 5, 6:42 pm, roland roland...@gmail.com wrote:

   Check this 
   out,http://groups.google.com/group/android-developers/browse_thread/threa...

   On 4 mar, 07:22, aljo aljochim...@gmail.com wrote:

i'm kinda new to this android application and still a newbei to
programming so hope someone could help me

i've created an SQLitedatabaseprogram.. but i don't know how to use
theautocompletefunction to access mydatabase... here's my code:

---­­---

packagedatabase.dev5;

import java.util.ArrayList;

import android.app.ListActivity;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.EditText;

public classDatabaseextends ListActivity {

        private final String MY_DATABASE_NAME = myCoolDB_2;
        private final String MY_DATABASE_TABLE = Users;

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

                EditText et = new EditText(this);
                et.setSelection(et.getText().length());
                /* Will hold the 'Output' we want to display at the 
end. */
                ArrayListString results = new ArrayListString();

                SQLiteDatabase myDB = null;
                try {

                        //Create theDatabase(no Errors if it already 
exists)
                        this.openOrCreateDatabase(MY_DATABASE_NAME, 
MODE_PRIVATE, null);
                        // Open the DB and remember it
                        myDB = 
this.openOrCreateDatabase(MY_DATABASE_NAME, MODE_PRIVATE,
null);

                        //this.deleteDatabase(MY_DATABASE_NAME);

                        // Create a Table in theDatabase.
                        myDB.execSQL(CREATE TABLE IF NOT EXISTS 
                                                        + 
MY_DATABASE_TABLE
                                                        +  (English 
VARCHAR, Japanese 

[android-developers] Reg: Porting of camera code with android source code

2009-03-17 Thread alok Yadav

Hi ,
I am porting camera code with the android source code .I am 
following all the
procedure but while doing ant, i am getting following error.

**

[r...@localhost CameraApiTest_alok]# /usr/bin/ant
Exception in thread main java.lang.NoClassDefFoundError: 
org.apache.tools.ant.launch.Launcher
   at gnu.java.lang.MainThread.run(libgcj.so.7rh)
Caused by: java.lang.ClassNotFoundException: 
org.apache.tools.ant.launch.Launcher not found in 
gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/bin/build-classpath,file:/usr/lib/jvm/java-1.4.2/lib/tools.jar],
 
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(libgcj.so.7rh)
   at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh)
   at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
   at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
   at gnu.java.lang.MainThread.run(libgcj.so.7rh)





i have set all the path like:

export JAVA_HOME=/usr/lib/jvm/java-1.4.2
export ANT_HOME=/usr/share/ant
PATH=$PATH:$HOME:$JAVA_HOME:$ANT_HOME:

But still getting the issue.
Can some one tell that where the issue is??

Thanks in advance
Alok




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

2009-03-17 Thread TjerkW

I cannot follow only 1 thread there, it is all-threads or threads with
a specific keyword.
What i want is to only follow certain threads..

(sorry to be so off-topic)

On 15 mrt, 17:46, Stoyan Damov stoyan.da...@gmail.com wrote:
 Go tohttp://groups.google.com/group/android-developers/subscribe?hl=en
 and edit your membership

 On Sun, Mar 15, 2009 at 5:13 PM,TjerkWtje...@gmail.com wrote:

  Ok both your email adresses are noted... but the game still needs some
  work,
  so if i think it can be tested youll get an .apk in your inbox! :-)

  Btw: how do you subscribe to a thread in order to get automatic emails
  here at google-groups?
  I can only subscribe by easing search-words.. or by getting an email
  once a day ...
  I only want to subscribe to this thread... how do i do that?

  On 13 mrt, 15:53, Andrea Fanfani a.fanf...@dynamicfun.com wrote:
  On Fri, Mar 13, 2009 at 06:40:52AM -0700,TjerkWwrote:

   Hello all,

   I am making an android game, but i do not have the money to buy a
   developer phone.
   The game is not finished but i should it is testable.. and if i dont
   test it know i may
   have a big problem later... it is playable though.

   Is there somebody who has a real device and wants to test the game for
   me,
   just starting it up and playing it a little bit is good enough.

   It's a 2d airplane shoot gane, much like the old raptor game.

   If someone is interested please reply, i will sent you
   the (singed) APK and with some things i want to test (using both the
   buttons as well as touch screen for gameplay).

   Could anybody help me out?

  hi, send me at andrea.fanfani(at)gmail.com

  I will try to take a look at the application.

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

2009-03-17 Thread ifuller1

Thanks gesh - as suggested the problem was related to recycling.
Preformance is pretty good now, sadly my images keep shuffling but
given your recent input this should be easy to fix.

On Mar 15, 10:03 pm, Gesh geo...@neofonie.de wrote:
  I'm currently using the ImageAdapter from the Hello GridView sample.
  But loading the images from the web rather than using resources.

 I think you need a better understanding of how adapters work to solve
 your problem. The getView() method of your Adapter is inkoved every
 time an image in your grid becomes visible (yes, including when you
 scroll back and forth to previously visible images). So if you have
 just replaced that one line image.setImageResource(int) with
 image.setImageDrawable(Drawable.createFromStream()) it means you are
 re-downloading images every time they get scrolled into view.

 So you need to cache those downloaded images and while you are at it
 make sure you cache scaled thumbnail of the image, just as big as you
 need them to avoid the possible problem Romain suggested. Use
 Bitmap.createScaledBitmap() - it's worked great for me.

 Also be aware that the emulator is running on your PC using that same
 network speed. If you want to test for real network problems you might
 get on a real device try starting the emulator with limited network
 (or on your G1 disable wireless and 3G). I alwasy run my emulator with
 network speed and latency set to EDGE, or for some debugging purposes
 even GPRS or GSM.

 hope that helps you,
 gesh.

 On Mar 15, 7:22 am, ifuller1 ifuller1mob...@gmail.com wrote:

  Hi Gesh,

  Thanks for the response. I'll certainly give the bitmap factory a go.
  I'm currently using the ImageAdapter from the Hello GridView sample.
  But loading the images from the web rather than using resources. The
  problem is immediate, in that the performance doesn't degrade after re-
  visits to the activity, but is instead directly proportional to the
  number of images I'm displaying.

  As well as trying the bitmap factory can I ask what you think is the
  best way to encourage garbage collection? Will nulling my objects be a
  big help.

  Once I have it optimized I'm going to release it for free... I think
  there's a big hole in androids picasa support.

  Ian

  On Mar 14, 11:38 pm, Gesh geo...@neofonie.de wrote:

   hi,

   I have written 2 connected apps with some image content pulled from
   the web and must say if you handle your resources right it shouldn't
   be a problem at all.

   Do you use your own Adapter for theGridViewor do you use some of the
   already available ones in the SDK? If you use your own you should keep
   in mind that when you deal with AdapterViews in general they keep
   references to Views you create in your adapter and recycle them, so
   try to reuse the convertView reference you get in the Adapter.getView
   (int position, View convertView, ViewGroup parent) method.

   And although memory leaks are difficult to achieve in what sounds like
   a single activity app the other thing that comes to mind is that you
   might have memory leaks due to the way you use Drawables. Try using
   Bitmaps from the BitmapFactory.decodeStream(InputStream) method and
   maybe read this blog for more info why Drawables could cause memory
   leaks 
   -http://android-developers.blogspot.com/2009/01/avoiding-memory-leaks.

   cheers,
   gesh.

   On Mar 14, 12:47 pm, ifuller1 ifuller1mob...@gmail.com wrote:

I've managed to successfully connect to the picasa web services using
JSON and download a list of thumbnails from my picasa album. The
thumbnails are all very small but I'm getting pretty terrible
performance (especially when compared to the native picture viewer).
As my main goal was getting the application working their is obviously
lots of optimisation work I can do but I just wanted to know where the
most likely cause of poor performance is coming from. Is it the memory
usage (so I should try cleaning up existing objects) or is it display
performance (can't cope with 30 thumbnails at once)?

Example thumbnail 
imagehttp://lh6.ggpht.com/_QIFTbqmwS8U/Samo30_xoBI/AEk/VeBxiukdKzU...

being loaded via Drawable.createFromStream

Thanks in advanced.

Ian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Determine images at runtime - getResources().getIdentifier()

2009-03-17 Thread Tommaso

I solved it, the parameter must be:
getPackageName()+:drawable/+symbolIdentifier

Still the question:
How can it be done better?

Thanks,
  Tommaso

On 17 Mrz., 11:44, Tommaso nuccio.tomm...@gmail.com wrote:
 Hi all,

 in my application I have a table that stores information for symbols.
 These symbols have to be displayed, so also the source, the *.png, is
 stored in each row. These symbols are loaded randomly at runtime.

 How do I get the the image(s) to be loaded?

 getResources().getIdentifier(symbolIdentifier, null, null) always
 results 0 (zero).

 Here is the code:
     private void loadSymbol(final String source) {
         int imageIdentifier = getResources().getIdentifier
 (symbolIdentifier, null, null);
         Bitmap bitmap = BitmapFactory.decodeResource(getResources(),
 imageIdentifier);
         mImageOfSymbol.setImageBitmap(bitmap);
         mImageOfSymbol.setVisibility(ImageView.VISIBLE);
         mImageOfSymbol.refreshDrawableState();
     }

 It says in the JavaDoc that the use of getIdentifier() is discouraged.
 What is a best practice to load images at runtime, when only knowing
 the source as a string?

 Many thanks in advance.

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

2009-03-17 Thread David Turner
Hello,

The vibrator is not currently emulated by the Android emulator at this
point.

On Mon, Mar 16, 2009 at 8:07 PM, Prem Thilagar prem...@gmail.com wrote:


 Hi I am trying to actually simulate a vibrator device inside the
 emulator .A timed_output driver for the vibrator was created and i am
 able to access the node at /sys/class/timed_output/vibrator/enable
 that is specified as THE_DEVICE in the vibrator.c file at hardware/
 libhardware/vibrator/.The driver is tested to work from the kernel
 below

 I ran into some issue while trying to invoke the driver from a user
 level app.I just added these two lines and created an app.

 vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
 vibrator.vibrate(1);

 when i created an .apk and ran it i could see the following messages
 in Logcat

 I/ActivityManager( 589): Starting activity: Intent
 { action=android.intent.action.MAIN categories=
 {android.intent.category.LAUNCHER} flags=0x1020
 comp={com.uiactivity.ui/com.uiactivity.ui.uiSimpleWidet} }
 I/ActivityManager( 589): Start proc com.uiactivity.ui for activity
 com.uiactivity.ui/.uiSimpleWidet: pid=791 uid=10023 gids={}
 :
 : A bunch of Dalvik messages
 :
 :
 V/ActivityThread( 791): Resuming ActivityRecord
 {436b6288token=android.os.binderpr...@436b5e50 {com.uiactivity.ui/
 com.uiactivity.ui.uiSimpleWidet}} with isForward=true
 I/ActivityManager( 589): Displayed activity
 com.uiactivity.ui/.uiSimpleWidet: 1203 ms

 Do i have to do something specific to make sure that the Harware
 service kicks in after this.?

 After this nothing happens ,

 is it guaranteed that VIBRATOR_SERVICE will automatically be binded
 when i do this
 vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
 because i dont really see a error there.

 could some one throw some light on it

 Is there a way i can verify VIBRATOR_SERVICE is actually running in
 the emulator .( i made sure the libhardware.so and
 libhardware_legacy.so are present )I could see from ddms service
 hardware is running .

 


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

2009-03-17 Thread deepdr...@googlemail.com

I would expect that the attribute
android:launchMode=singleTask
(notice the lower case s)
on the Activity does what you want.
How do you determine this doesn't work?

--
http://www.deepdroid.com

On 17 Mrz., 10:26, Derek cram.de...@gmail.com wrote:
 Hi,

 Is it possible to re-use all the instances of Activities and Services
 when an application is launched twice. For instance:
 1/ I start my application APP1. Some activities are launched and a
 service is started.
 2/ I click Home device button
 3/ I can see the icon the launch again my application APP1
 4/ I click on it and the APP1 is launched twice

 I would like to re-use the existing the instances of Activities and
 Services from the first launch.
 I guess it is related to SingleTop or SingleTask but it doesn't
 seem to work.

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



[android-developers] Re: Transferring paid apps G1 - HTC Magic

2009-03-17 Thread Jean-Baptiste Queru

If those apps were downloaded from Android Market, just be sure to
sign into the new device with the same Google account and re-download
the apps there (they'll be listed in Market - My Downloads).

JBQ

On Tue, Mar 17, 2009 at 1:48 AM, Carl Whalley
carl.whal...@googlemail.com wrote:

 With the imminent arrival of the Magic I was wondering what impact
 this would have on both end users and developers who want to transfer
 their apps over, or may even have both handsets for whatever reason.
 Is there a licensing provision for it? A means via software? This will
 become more of an issue as the other new Android handsets are
 launched.

 --
 Android Academy: http://www.androidacademy.com


 




-- 
Jean-Baptiste M. JBQ Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

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

2009-03-17 Thread Jean-Baptiste Queru

As far as I know this is not run-time configurable.

JBQ

On Tue, Mar 17, 2009 at 3:21 AM, Michael Bollmann
michael.bollm...@googlemail.com wrote:

 Is it possible to configure the ADP1 to keep the last 5mb(for example)
 of log messages
 especially when it's not connected to a development machine?

 




-- 
Jean-Baptiste M. JBQ Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

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



[android-developers] jarsigner jar sign apk update

2009-03-17 Thread Maxence Warzecha

Hi all,

This is what I did :

- I signed my apk.
- I published my apk.
- I updated my application.
- I sign my new apk file succesfully (**with an other keystore**).
- I upload my new apk.
- When poeple what to install updated version, they receive message
look like apk file was not signed correctly. If they uninstall
previous version, they are able to install new version (piouf...).

I don't understand why.

Can you tell me if need to keep my previous keystore *OR* with similar
information? Or ...?

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

2009-03-17 Thread Stoyan Damov

Of course you should sign your updated app with the same keystore,
think about it - if this wasn't the case, I could make an app which
claims to be yours, sign it with my own key and push a bogus update.

On Tue, Mar 17, 2009 at 2:47 PM, Maxence Warzecha war...@gmail.com wrote:

 Hi all,

 This is what I did :

 - I signed my apk.
 - I published my apk.
 - I updated my application.
 - I sign my new apk file succesfully (**with an other keystore**).
 - I upload my new apk.
 - When poeple what to install updated version, they receive message
 look like apk file was not signed correctly. If they uninstall
 previous version, they are able to install new version (piouf...).

 I don't understand why.

 Can you tell me if need to keep my previous keystore *OR* with similar
 information? Or ...?

 Thank you!
 Max
 


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

2009-03-17 Thread Maxence Warzecha

Hi XD!

Ok I understand. I will be aware about that.


On 17 mar, 13:51, Stoyan Damov stoyan.da...@gmail.com wrote:
 Of course you should sign your updated app with the same keystore,
 think about it - if this wasn't the case, I could make an app which
 claims to be yours, sign it with my own key and push a bogus update.

 On Tue, Mar 17, 2009 at 2:47 PM, Maxence Warzecha war...@gmail.com wrote:

  Hi all,

  This is what I did :

  - I signed my apk.
  - I published my apk.
  - I updated my application.
  - I sign my new apk file succesfully (**with an other keystore**).
  - I upload my new apk.
  - When poeple what to install updated version, they receive message
  look like apk file was not signed correctly. If they uninstall
  previous version, they are able to install new version (piouf...).

  I don't understand why.

  Can you tell me if need to keep my previous keystore *OR* with similar
  information? Or ...?

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



[android-developers] I need to use jbossall-client.jar

2009-03-17 Thread DaRolla

hello,

I need to use some jars inside android. well, most of them work. It
seems that the standard java compiled jars are decompiled and compiled
into dalvik format (for example Log4J.jar).

The only jar that makes troubles is jbossall-client.jar.

Eclipse console says:

Attempt to include a core VM class in something other than a core
library.
It is likely that you have attempted to include the core library from
a desktop
virtual machine into an application, which will most assuredly not
work. If
you really intend to build a core library -- which is only appropriate
as
part of creating a full virtual machine binary, as opposed to
compiling an
application -- then use the --core-library option to suppress this
error
message. If you go ahead and use --core-library but are in fact
building
an application, then please be aware that your build will still fail
at some
point; you will simply be denied the pleasure of reading this helpful
error
message.

So I tried to remove the javax package from the jar.

Now Eclipse console says:

Conversion to Dalvik format failed: Unable to execute dex: null

:(

Who can help me on this?

Greetings,
DaRolla

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



[android-developers] R.id.icon missing?

2009-03-17 Thread Fred Grott(shareme)

I have a problem..

Frist my envir0onment:
-Ubuntu 8.10
-Eclipse 3.4.2/ADt 0.8
android SDk 1.1.r1

R.id.icon reference i snto showing upo..

my R java file shows:

 public static final class id {
public static final int all_apps=0x7f050006;
public static final int faves_and_recents=0x7f050007;
public static final int gallery=0x7f050005;
public static final int horizontal=0x7f05;
public static final int label=0x7f050004;
public static final int show_all_apps=0x7f050002;
public static final int show_all_apps_check=0x7f050003;
public static final int vertical=0x7f050001;
}

Was implementing ViewHoldr/Wrapper classes when I noticed it..

As you can see label show up 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: R.id.icon missing?

2009-03-17 Thread Fred Grott(shareme)

never mind, needed to add android. prefix

On Mar 17, 8:23 am, Fred Grott(shareme) fred.gr...@gmail.com
wrote:
 I have a problem..

 Frist my envir0onment:
 -Ubuntu 8.10
 -Eclipse 3.4.2/ADt 0.8
 android SDk 1.1.r1

 R.id.icon reference i snto showing upo..

 my R java file shows:

  public static final class id {
         public static final int all_apps=0x7f050006;
         public static final int faves_and_recents=0x7f050007;
         public static final int gallery=0x7f050005;
         public static final int horizontal=0x7f05;
         public static final int label=0x7f050004;
         public static final int show_all_apps=0x7f050002;
         public static final int show_all_apps_check=0x7f050003;
         public static final int vertical=0x7f050001;
     }

 Was implementing ViewHoldr/Wrapper classes when I noticed it..

 As you can see label show up 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: Thumbnails

2009-03-17 Thread Gaurav

One point is still left, can we have duplicate thumbnails of same
kind. Say I have an Image, can there be two thumbnails of micro kind
of the same image? - No, right?

On Mar 17, 4:52 am, Dave Sparks davidspa...@android.com wrote:
 We have a number of issues with metadata that need to be sorted out.
 Unfortunately, it will have to wait until the next major release.

 Unless I'm mistaken, micro-thumbnails are generated by the music
 player for album art. This is just an optimization to improve list
 flinging operations in the music browser.

 On Mar 16, 1:20 pm, todd tdonahue...@gmail.com wrote:

  Having the camera app create thumbs when a photo is taken is great,
  but another common scenario has been left unanswered. What happens
  when the user inserts (or copies) images to the SD card?

  I've found that unless the Pictures app is run, no thumbs have been
  generated for the images on the SD card and I have to add the thumbs
  myself in order to display thumbnail images.

  Additionally, the gallery/camera apps only create the mini version of
  the thumbnail and not the micro version. It would be great to have a
  clear, consistent policy for thumbnail generation of images that
  reside on the SD card. I can foresee apps battling over thumb
  creation, some doing it well, others not so well and using different
  (custom?) sizes for both sizes.

  That's my two cents.

  Todd


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

2009-03-17 Thread dillirao malipeddi
when you want to update application in the device it checks for the previous
key info with modifications.
it wont allow you to sign same application with different signs

if you want to use different keys you must change your package name of your
application
then it wont give error. otherwise it will give the error

because it store installed application details in the system folder as xml
file

when you want to update an application it will check with previous one with
same package

On Tue, Mar 17, 2009 at 6:17 PM, Maxence Warzecha war...@gmail.com wrote:


 Hi all,

 This is what I did :

 - I signed my apk.
 - I published my apk.
 - I updated my application.
 - I sign my new apk file succesfully (**with an other keystore**).
 - I upload my new apk.
 - When poeple what to install updated version, they receive message
 look like apk file was not signed correctly. If they uninstall
 previous version, they are able to install new version (piouf...).

 I don't understand why.

 Can you tell me if need to keep my previous keystore *OR* with similar
 information? Or ...?

 Thank you!
 Max
 



-- 
Dilli Rao. 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: How the use same instances when launching application twice ?

2009-03-17 Thread dillirao malipeddi
when you create a new intent
set flag as

your_intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);

 startActivity(your_intent);



On Tue, Mar 17, 2009 at 2:56 PM, Derek cram.de...@gmail.com wrote:


 Hi,

 Is it possible to re-use all the instances of Activities and Services
 when an application is launched twice. For instance:
 1/ I start my application APP1. Some activities are launched and a
 service is started.
 2/ I click Home device button
 3/ I can see the icon the launch again my application APP1
 4/ I click on it and the APP1 is launched twice

 I would like to re-use the existing the instances of Activities and
 Services from the first launch.
 I guess it is related to SingleTop or SingleTask but it doesn't
 seem to work.

 Any suggestion ?

 



-- 
Dilli Rao. 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] Understand Broadcast and Intent with Dalvik process

2009-03-17 Thread Kenny Yu

Does anyone know if sendBroadcast(intentA) will bring intents to all
Dalvik processes?

For example, process android.process.acore behaves sendBroadcast(new
intentA). Will the intentA be received in com.android.camera? We think
android.process.acore and com.android.camera are zygoted to two Dalvik
VMs (Linux processes).

Same question to sendIntent(intentB). In terms of docs, sendIntent( )
can address certain class to receive the intent. Is this behavior
across processes?

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

2009-03-17 Thread bra...@gmail.com

Well Im sorry - but this is a memory leak. Watching the core its
obvious that the actual memory is being freed but when an attempt is
made to use that memory the vm buffer still thinks the memory is in
use. I have to say this is probably one of the worst bugs I have come
across and it should be addressed rapidly. In a phone where visuals
are everything to have such a HUGE problem with handling them is a
real PITA.

On Mar 1, 1:57 am, bra...@gmail.com peacoc...@gmail.com wrote:
 Best darn suggestion yet. Thankyou I was wondering if I could use that
 setting, but feared that perhaps I would not be able to generate new
 bitmaps from the original - you can - thankyou

 On Feb 27, 1:19 pm, Alexey Krasnoriadtsev ale...@agilefusion.com
 wrote:

  There best working approach is to only load Bounds of the image, and
  then use scale to load the Bitmap of the needed size.
  This way you never load the full-size bitmap in the memory.

 http://code.google.com/intl/ja/android/reference/android/graphics/Bit...

  get the bounds, and then use those to calculate the appropriate sample
  size.

  On Feb 26, 2:36 pm, mark.ka...@gmail.com wrote:

     I'm just saying there have been a number of threads on this issue,
   I've had out of memory problems when processing bitmaps, and so have
   many other developers. It looks to me like a bug IMHO. I hope this
   problem will be resolved at some point.

   On Feb 26, 2:02 pm, bra...@gmail.com peacoc...@gmail.com wrote:

If that is the case then why does calling myBitmap.recycle not give me
that memory back to use for the next time I go into an edit.

On Feb 26, 4:59 pm, Romain Guy romain...@google.com wrote:

 BitmapFactory does NOT leak Bitmaps.

 A 2056x1536 opaque image requires 6 MB of RAM. An application has 16
 MB max. Do the math.

 On Thu, Feb 26, 2009 at 1:50 PM,  mark.ka...@gmail.com wrote:

   Are you using BitmapFactory? There have been a number of threads
  about memory leaks, or similar problems when using BitmapFactory to
  process bitmaps. Using Bitmap.recycle may mitigate, but not 
  eliminate
  these types of problems.

                  M

  On Feb 26, 11:39 am, Mattaku Betsujin mattaku.betsu...@gmail.com
  wrote:
  I think the best solution to handle very large bitmaps is to be 
  able to
  decode only a small chunk of the bitmap at a time and process it.

  Does anyone know if the existing Android API can support this?

  If not, probably one solution is to write a smart decoder (in 
  Java, so slow
  :-( )  that can decode a small chunk.

  On Thu, Feb 26, 2009 at 11:32 AM, Tomei Ningen 
  tomei.nin...@yahoo.comwrote:

   You're running into memory fragmentation problems. Bitmap memory 
   is
   not allocated from the Java object heap. Instead, it's allocated 
   from
   the 'malloc' heap. That's why you don't see the Java heap 
   expanding.

   How big is your bitmap? If you're processing JPEG files, 
   probably it
   will be better to read the thumbnail directly from the JPEG 
   file. This
   way you don't need to create the Bitmap at all.

   On Feb 26, 9:47 am, bra...@gmail.com peacoc...@gmail.com 
   wrote:
Ok I am at the end of my rope.

I am doing some image processing. I have a large image file 
which I
open and create a smaller bitmap from. At the end of 
processing I call
recycle on everything. I null everything. I run GC manually.

I then try edit another image and I get an out of VM memory 
error.
Bitmap exceeds etc etc.

I am looking at the heap and the secone edit doesnt seem to 
cause it
to increase at all.

What else can I do. Surely google cannot possibly be 
suggesting that
we can open one large bitmap per session and thats it?- 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- 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] OnDraw in Listview

2009-03-17 Thread vovkab

Hello

I made my own widget by extended listview.
How to draw over list?

When i draw in Overridden OnDraw method it's showing behind the list
items, but i need to draw over.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: GridView ImageView and performance

2009-03-17 Thread Streets Of Boston

I had similar issues. I managed to fix the performance of the list-
view, but i ran into memory issues.

My app downloads images from Smugmug, images that are 'front-page'
images of galleries/albums.
First, my app needed to get the information about the album, to get
the image-id of the album's front-page image. This would result in a
URL and then my app downloads the image using this URL and then shows
it in a list-item.

I used the ExecutorService to fetch the necessary album information
and image-retrieval and image decoding in a limited number of
background threads.

In the list-adpater's getView method, i would tag (setTag) the list-
item view with the album-id and submit a new (cancelable) task using
the ExecutorService (java.util.concurrent packages). This task
downloads the album info and then downloads the image. While the album
information and the image were downloading, i showed a place-holder
picture in my list-item's imageview (a bitmap from the res/drawable
directory)

When the task that has been submitted finishes, it posts the result
back to the main-thread: Loop over the current list-view children
(which are the visible list-items). For each child get its tag
(getTag) and if this tag matched the task-result, i would set the
child's imageview's bitmap to the image i just downloaded.

This all worked quite well, with images downloading at their own pace
and the list-view kept performing well.
However, at some point i got memory errors when calling
ImageView.setImageBitmap(Bitmap). I checked my code. I made sure to
recycle not-used bitmaps, i did not cache bimtaps, etc., but i kept
getting memory errors (note that the smugmug images downloaded were
small: 100x100 pixels).

I was not able to solve these memory errors and i abandoned this idea.
Any ideas to prevent these memory errors? :-)

On Mar 17, 7:28 am, ifuller1 ifuller1mob...@gmail.com wrote:
 Thanks gesh - as suggested the problem was related to recycling.
 Preformance is pretty good now, sadly my images keep shuffling but
 given your recent input this should be easy to fix.

 On Mar 15, 10:03 pm, Gesh geo...@neofonie.de wrote:



   I'm currently using the ImageAdapter from the Hello GridView sample.
   But loading the images from the web rather than using resources.

  I think you need a better understanding of how adapters work to solve
  your problem. The getView() method of your Adapter is inkoved every
  time an image in your grid becomes visible (yes, including when you
  scroll back and forth to previously visible images). So if you have
  just replaced that one line image.setImageResource(int) with
  image.setImageDrawable(Drawable.createFromStream()) it means you are
  re-downloading images every time they get scrolled into view.

  So you need to cache those downloaded images and while you are at it
  make sure you cache scaled thumbnail of the image, just as big as you
  need them to avoid the possible problem Romain suggested. Use
  Bitmap.createScaledBitmap() - it's worked great for me.

  Also be aware that the emulator is running on your PC using that same
  network speed. If you want to test for real network problems you might
  get on a real device try starting the emulator with limited network
  (or on your G1 disable wireless and 3G). I alwasy run my emulator with
  network speed and latency set to EDGE, or for some debugging purposes
  even GPRS or GSM.

  hope that helps you,
  gesh.

  On Mar 15, 7:22 am, ifuller1 ifuller1mob...@gmail.com wrote:

   Hi Gesh,

   Thanks for the response. I'll certainly give the bitmap factory a go.
   I'm currently using the ImageAdapter from the Hello GridView sample.
   But loading the images from the web rather than using resources. The
   problem is immediate, in that the performance doesn't degrade after re-
   visits to the activity, but is instead directly proportional to the
   number of images I'm displaying.

   As well as trying the bitmap factory can I ask what you think is the
   best way to encourage garbage collection? Will nulling my objects be a
   big help.

   Once I have it optimized I'm going to release it for free... I think
   there's a big hole in androids picasa support.

   Ian

   On Mar 14, 11:38 pm, Gesh geo...@neofonie.de wrote:

hi,

I have written 2 connected apps with some image content pulled from
the web and must say if you handle your resources right it shouldn't
be a problem at all.

Do you use your own Adapter for theGridViewor do you use some of the
already available ones in the SDK? If you use your own you should keep
in mind that when you deal with AdapterViews in general they keep
references to Views you create in your adapter and recycle them, so
try to reuse the convertView reference you get in the Adapter.getView
(int position, View convertView, ViewGroup parent) method.

And although memory leaks are difficult to achieve in what sounds like
a single activity app the other thing that 

[android-developers] Re: android.os.ServiceManager

2009-03-17 Thread Kenny

Reading the file frameworks/base/telephony/java/com/android/internal/
telephony/gsm/SMSDispatcher.java, you can find handleSendComplete( )
has a PendingIntent to send. I don't understand PendingIntent well,
only seeing the LOG code saying SMS send complete. Broadcasting
intent ...

Is this PendingIntentsendIntent interceptable? Not sure if the
PendingIntent has extra data of SMS contents. Seer, let me know your
insight.

Kenny

On Mar 17, 12:54 pm, Seer gilligan.ch...@gmail.com wrote:
 So if that is not the way you are meant to services such as alternate
 SMS gateways, what is?  Using intents will not work as most of the sms
 apps have the reply for a thread built in.  This is the only way i
 have been able to discover to capture all outgoing sms so i can either
 redirect them over the web or over the mobile network. I find it sort
 of strange that the developers of Android did not think that people
 would want to also use alternate networks and mediums to the gsm
 network for things like calls and sms.  With sms prices as high as
 they are in Australia the internet can be up to 5 times cheaper to
 send them and even with data costs that is still much cheaper.

 I know all apps are meant to be equal but some apps / services need to
 be able to do things on a much lower level or have intents or
 something for the lower level services of the phone as well.

 I am open to any ideas you have.

 On Mar 17, 3:31 pm, Dianne Hackborn hack...@android.com wrote:



  You can't do this.  Especially from the SDK, on so many levels:

  1. ServiceManager is not public.  The features it contains are not available
  in the SDK.
  2. None of the interfaces of the services published in the service manager
  are published in the SDK, so you wouldn't be able to redefine them anyway.
  3. And even if any of this were in the SDK, applications are not allowed to
  modify what is published in the service manager, and they never will be able
  to.

  On Mon, Mar 16, 2009 at 8:47 PM, Seer gilligan.ch...@gmail.com wrote:

   Is there a way to access this class in the SDK or is there another
   class that does the same thing?  I need to rename one of the services
   listed in the servicemanager so that it will call my service instead
   and then pass calls i don't handle onto the original service that i
   have renamed.

  --
  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.  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: Intercepting outgoing sms

2009-03-17 Thread Kenny

I think check database seems not feasible. Seer, I posted a rely to
you about SMSDispatcher class. Take a look, there may be certain
intent sent there.

Kenny

On Mar 16, 9:44 pm, Kenny yxw...@gmail.com wrote:
 Sms should have provider, through which you may put your SMS to
 database, I think.

 But the topic was about intercepting/redirecting being-sent SMS. Is it
 resolved?

 On Mar 16, 12:52 pm, Seer gilligan.ch...@gmail.com wrote:



  ok i have written an app for sending the sms over the web but how do i
  insert the sms sent over the web into the list of sms sent from the
  phone?

  On Mar 6, 1:25 am, Avraham Serour tovm...@gmail.com wrote:

   not sure if you can do that, if not you could do the opposite, make the 
   user
   send sms using you app, so if the number match your criteria you use your
   gateway, if not send it using the phone regular sms service

   On Thu, Mar 5, 2009 at 5:04 AM, Seer gilligan.ch...@gmail.com wrote:

Hi,
What i want to do is intercept outgoing sms.  The reason been that i
want to redirect some sms over a web based sms sending service and
others to go over the normal mobile network.  I would really like to
do this as an invisible background process that does not need
modifications to any of the existing apps people use to send sms.

Is this possible or will i have to write my own app to send sms and
let that app decide how to send the sms?  with so many sms apps out
there i really did not want to add another to the mix and to instead
work on a lower level.

thanks

Chris- 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: How to add SMS to inbox in android programmatically?

2009-03-17 Thread Kenny

Thanks for your update. So you exactly have done two things:
1. Call SmsManager::sendTextMessage( )
2. Put the sent SMS to its database via ContentResolver::insert( )

Kenny

On Mar 17, 6:42 am, Seer gilligan.ch...@gmail.com wrote:
 i have been trying to do the same thing and just worked it out.  you
 want to do something similar to this.
 uses-permission android:name=android.permission.WRITE_SMS/

    public static final String ADDRESS = address;
    public static final String PERSON = person;
         public static final String DATE = date;
         public static final String READ = read;
         public static final String STATUS = status;
         public static final String TYPE = type;
     public static final String BODY = body;
     public static final int MESSAGE_TYPE_INBOX = 1;
     public static final int MESSAGE_TYPE_SENT = 2;

 ContentValues values = new ContentValues();
            values.put(SMSHelper.ADDRESS, +61408219690);
            values.put(SMSHelper.DATE, 1237080365055);
            values.put(SMSHelper.READ, 1);
            values.put(SMSHelper.STATUS, -1);
            values.put(SMSHelper.TYPE, 2);
            values.put(SMSHelper.BODY, SMS inserting test);
                 Uri inserted = 
 getContentResolver().insert(Uri.parse(content://
 sms), values);

 That is from a few different classes but i am sure you can work out
 how it fits.

 On Mar 13, 8:09 pm, senthil senthil...@gmail.com wrote:



  HI,
  Iam sending the sms by using the below code,
  SmsManager smsManager = SmsManager.getDefault();
  smsManager.sendTextMessage(destAddr, null, mMessageText, il, null);

  But, the same SMS message needs to be reflected in the Native sms
  inbox,
  Can anyone help me out in achieving this

  Thanks in Advance !- 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: Paid applications and market feedback/rating

2009-03-17 Thread StefanK

There is probably a possibility to still keep the ratings if you leave
the app free, let it expire (or go to a limited functionality after a
several days or so). If users want to get it back to full features -
they have to buy an unlock key. The unlock key is nothing more than a
paid application that has no functionality. Your free application will
just have to check if the paid is installed and unlock itself.

This approach (if possible) has lots of advantages:

1. You can keep the ratings from the free app
2. You support only one app (not free and paid).
3. You can give your users potentially longer trial than the 24 hours
Google allows.
4. No need to port settings from the free to the paid one.
5. You potentially avoid issues with crashes caused by copy protection
as you will copy protect only the paid app that has not real
functionality,

This is a bit unconventional approach, but it may work.


On Mar 16, 7:44 pm, Keith Wiley kbwi...@gmail.com wrote:
 I don't *think* that's possible.  Assuming the signature/package is
 tied to the market app, there is no way to convert a previously free
 app to a paid app.  A brand new app must be installed instead, if I've
 understood thing so far.  I think a new app must have a new package
 and an old app can't be changed from free to paid.

 Can anyone clarify or straighten this out for us?

 On Mar 16, 4:26 pm, sm1 sergemas...@gmail.com wrote:

  I'm not 100% sure but if my understanding of how Android Market works
  is correct, what you may want to do is keep the same package (aka.
  signature) for your paid app as the package that you had before, with
  the comments and ratings, and make a *new* package for the free app.,
  and the new free app will start at zero comments and zero ratings, but
  you could write about that in it's description, i.e., previous
  version had a rating of x stars.

  and you could verify it by posting on this forum:

 http://www.google.com/support/forum/p/Android+Market

  Let us know what you find.
  cheers,
  good luck with your app.

  On Mar 16, 11:02 am, Keith Wiley kbwi...@gmail.com wrote:

   I have had a free version of my app available for several months.
   With the new features I am about to release in the latest version, and
   with paid apps now possible, I intend to split the app into a free
   lite/trial version and a paid full version.  I am aware that I must
   create a new app with a new signature for the full version b/c I can't
   change the current free app to a paid one.  I don't mind this, but, is
   there any way I can transfer the thousands of feedback and ratings I
   have accumulated so far to the paid version even though it will have a
   totally new signature?

   If there is no way to do this then, permit me to say, I am a little
   miffed.  :-/

   ...but I'm holding out hope that I missed this somewhere, that's it's
   possible.  Am I right?  I'm sorry if I missed the explanation for how
   to do this.

   Thank you very much.

   Cheers!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Hosting APKs files on site works for emulator, but not device?

2009-03-17 Thread EboMike

I tried it again this morning and it works now. I guess T-Mobile keeps
a cached file for 24 hours or so.

At this point, I'm positive that the problem lies with T-Mobile: a) it
works from within the emulator, b) I don't see a hit in the accesslog
when I try to download it, c) it works after 24 hours.

One thing I didn't try when the file was busted was to simply rename
it or to add something like ?x=y at the end of the URL when
downloading it. That should have solved it too.

-Mike


On Mar 17, 5:49 am, Jean-Baptiste Queru j...@android.com wrote:
 There is a transparent proxy on T-Mobile's port 80, which works at the
 IP level (so it doesn't need to be explicitly configured at the HTTP
 level, but also can't be bypassed).

 Does your apk download over wifi? Can you try serving it from a port
 other than 80?

 There's an open 
 issuehttp://code.google.com/p/android/issues/detail?id=1085about
 situations where small apks (less than 64kB) sometimes cause problems,
 though we've never been able to quite get to the bottom of it.

 JBQ



 On Tue, Mar 17, 2009 at 1:36 AM, Al Sutton a...@funkyandroid.com wrote:

  If you want to send me a link off list I'll see what I can find.

  Al.

  Michael Krehan wrote:

  Al, thanks for the reply. It's on my own server (a Linux-based Apache
  server), and it's a simple A HREF that goes straight to the file in
  the same directory. No redirection or anything.

  I tried it on an ADP1 and a G1, both on the T-Mobile network, and it
  didn't work. The emulator worked fine. The symptoms point to a proxy.

      On Mar 17, 2009 12:42 AM, Al Sutton a...@funkyandroid.com
      mailto:a...@funkyandroid.com wrote:

      Does the URL you're downloading from use a redirect or something
      similar
      to get to the apk?

      Many free file hosting or website hosting packages use a loading page
      and some type of redirect (a Meta refresh tag being one example), and
      there have been problems with those on the device (see
     http://groups.google.com/group/android-developers/browse_thread/threa...
      for one example).

      Al.

      EboMike wrote:  I'm currently hosting an app on my own server so
      my beta testers can  test it. I'...

      --

      * Written an Android App? - List it athttp://andappstore.com/*

      ==
      Funky Android Limited is registered in England  Wales with the
      company number  6741909. The registered head office is Kemp House,
      152-160 City Road, London,  EC1V 2NX, UK.

      The views expressed in this email are those of the author and not
      necessarily those of Funky Android Limited, it's associates, or it's
      subsidiaries.

  --

  * Written an Android App? - List it athttp://andappstore.com/*

  ==
  Funky Android Limited is registered in England  Wales with the
  company number  6741909. The registered head office is Kemp House,
  152-160 City Road, London,  EC1V 2NX, UK.

  The views expressed in this email are those of the author and not
  necessarily those of Funky Android Limited, it's associates, or it's
  subsidiaries.

 --
 Jean-Baptiste M. JBQ Queru
 Android Engineer, Google.

 Questions sent directly to me that have no reason for being private
 will likely get ignored or forwarded to a public forum with no further
 warning.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Hosting APKs files on site works for emulator, but not device?

2009-03-17 Thread Jean-Baptiste Queru

It'd be great if you could leave a note about your findings at
http://code.google.com/p/android/issues/detail?id=1085

Thanks,
JBQ

On Tue, Mar 17, 2009 at 8:13 AM, EboMike ebom...@gmail.com wrote:

 I tried it again this morning and it works now. I guess T-Mobile keeps
 a cached file for 24 hours or so.

 At this point, I'm positive that the problem lies with T-Mobile: a) it
 works from within the emulator, b) I don't see a hit in the accesslog
 when I try to download it, c) it works after 24 hours.

 One thing I didn't try when the file was busted was to simply rename
 it or to add something like ?x=y at the end of the URL when
 downloading it. That should have solved it too.

 -Mike


 On Mar 17, 5:49 am, Jean-Baptiste Queru j...@android.com wrote:
 There is a transparent proxy on T-Mobile's port 80, which works at the
 IP level (so it doesn't need to be explicitly configured at the HTTP
 level, but also can't be bypassed).

 Does your apk download over wifi? Can you try serving it from a port
 other than 80?

 There's an open 
 issuehttp://code.google.com/p/android/issues/detail?id=1085about
 situations where small apks (less than 64kB) sometimes cause problems,
 though we've never been able to quite get to the bottom of it.

 JBQ



 On Tue, Mar 17, 2009 at 1:36 AM, Al Sutton a...@funkyandroid.com wrote:

  If you want to send me a link off list I'll see what I can find.

  Al.

  Michael Krehan wrote:

  Al, thanks for the reply. It's on my own server (a Linux-based Apache
  server), and it's a simple A HREF that goes straight to the file in
  the same directory. No redirection or anything.

  I tried it on an ADP1 and a G1, both on the T-Mobile network, and it
  didn't work. The emulator worked fine. The symptoms point to a proxy.

  On Mar 17, 2009 12:42 AM, Al Sutton a...@funkyandroid.com
  mailto:a...@funkyandroid.com wrote:

  Does the URL you're downloading from use a redirect or something
  similar
  to get to the apk?

  Many free file hosting or website hosting packages use a loading page
  and some type of redirect (a Meta refresh tag being one example), and
  there have been problems with those on the device (see
 
  http://groups.google.com/group/android-developers/browse_thread/threa...
  for one example).

  Al.

  EboMike wrote:  I'm currently hosting an app on my own server so
  my beta testers can  test it. I'...

  --

  * Written an Android App? - List it athttp://andappstore.com/*

  ==
  Funky Android Limited is registered in England  Wales with the
  company number  6741909. The registered head office is Kemp House,
  152-160 City Road, London,  EC1V 2NX, UK.

  The views expressed in this email are those of the author and not
  necessarily those of Funky Android Limited, it's associates, or it's
  subsidiaries.

  --

  * Written an Android App? - List it athttp://andappstore.com/*

  ==
  Funky Android Limited is registered in England  Wales with the
  company number  6741909. The registered head office is Kemp House,
  152-160 City Road, London,  EC1V 2NX, UK.

  The views expressed in this email are those of the author and not
  necessarily those of Funky Android Limited, it's associates, or it's
  subsidiaries.

 --
 Jean-Baptiste M. JBQ Queru
 Android Engineer, Google.

 Questions sent directly to me that have no reason for being private
 will likely get ignored or forwarded to a public forum with no further
 warning.
 




-- 
Jean-Baptiste M. JBQ Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

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



[android-developers] need help on --core-library

2009-03-17 Thread DaRolla

hello,

I need to build a java.beans.PropertyChangeListener which is part of
JDK (rt.jar) but not part of Dalvik.

Trying to copy the sources to my Application I get this:

Attempt to include a core VM class in something other than a core
library.
It is likely that you have attempted to include the core library from
a desktop
virtual machine into an application, which will most assuredly not
work. If
you really intend to build a core library -- which is only appropriate
as
part of creating a full virtual machine binary, as opposed to
compiling an
application -- then use the --core-library option to suppress this
error
message. If you go ahead and use --core-library but are in fact
building
an application, then please be aware that your build will still fail
at some
point; you will simply be denied the pleasure of reading this helpful
error
message.

My solution:
1) build a core library with consisting out of
java.beans.PropertyChangeListener
2) integrate that library (jar?) into my application.

My question:
- how can I build a core library using eclipse?

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

2009-03-17 Thread linkmaster_6

thank you very much then. im just screwed then lol

On Mar 16, 4:16 pm, Ralf ralfo...@gmail.com wrote:
 On Mon, Mar 16, 2009 at 12:34 AM, Kenny yxw...@gmail.com wrote:

  Not helping you, but I wonder what keystore is for? where to get some
  docs? thank you very much,

 http://developer.android.com/guide/publishing/app-signing.html

  On Mar 14, 5:18 am, linkmaster_6 linkmast...@gmail.com wrote:
  Hello yes i have forgotten the password to my keystore and was
  wondring if there was anyway to retrieve this?

 As far as I know there is no mechanism to recover a lost password
 for a java keystore.

 R/




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



[android-developers] rebooting from application

2009-03-17 Thread Dan Raaka

Can application initiate rebooting the phone?

Doing some thing like below doesn't seem to help  ..
Intent i = new Iintent();
i.setAction(Intent.ACTION_REBOOT);
sendBroadcast(i);

and having in the manifest ..
uses-permission android:name=android.permission.REBOOT /

gives the following the error in log cat
W/ActivityManager(   51): Permission Denial: broadcasting Intent
{ action=android.intent.action.REBOOT } from com.example.android
(pid=146, uid=10035) requires android.permission.REBOOT due to
registered receiver BroadcastFilter{433de720 ReceiverList{433e5e90 51
system/1000 client 433ece68}}

Looks like calling application needs to explicitly registered !! any
ideas how to proceed here ..


The next was to try ..
$ adb shell
# reboot

the emulator froze !!

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



[android-developers] CheckBox test= (CheckBox) findViewById(R.id.test); returns null

2009-03-17 Thread zeeshan

Hi Android Experts,

why CheckBox is always null.

please find the error in my code:

xml-

CheckBox id=@+id/checkbox
 android:layout_width=wrap_content
 android:layout_height=wrap_content
/

code file-

package com.reblogr.reblogrclient;





public class Test extends Activity {
/** Called when the activity is first created. */

   public CheckBox checkbox;

   @Override
public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.login);
Button connectButton = (Button)findViewById(R.id.objBtn1);

 checkbox= (CheckBox)findViewById(R.id.checkbox);

 connectButton.setOnClickListener(connectButtonListener);
}
   public OnClickListener connectButtonListener = new OnClickListener
()
   {
   public void onClick(View v)
   {

  Athenticate();



   }
   };
   public void Athenticate(){

if(checkbox.isChecked()){   //
NullPointerException here
//do something

   }


   }

}

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



[android-developers] problem occur while writing andro id.provider.Settings.Secu­re.ENABLED_INPUT_METHODS

2009-03-17 Thread nighteagle

I have a problem while writing
android.provider.Settings.Secure.ENABLED_INPUT_METHODS in my
application. It will throw a security exception:
03-17 17:43:15.717: ERROR/AndroidRuntime(6950):
java.lang.SecurityException: Cannot write secure settings table
03-17 17:43:15.717: ERROR/AndroidRuntime(6950): at
android.os.Parcel.readException(Parcel.java:1234)
03-17 17:43:15.717: ERROR/AndroidRuntime(6950): at
android.database.DatabaseUtils.readExceptionFromParcel
(DatabaseUtils.java:144)
03-17 17:43:15.717: ERROR/AndroidRuntime(6950): at
android.database.DatabaseUtils.readExceptionFromParcel
(DatabaseUtils.java:110)
03-17 17:43:15.717: ERROR/AndroidRuntime(6950): at
android.content.ContentProviderProxy.insert
(ContentProviderNative.java:
320)
03-17 17:43:15.717: ERROR/AndroidRuntime(6950): at
android.content.ContentResolver.insert(ContentResolver.java:336)
03-17 17:43:15.717: ERROR/AndroidRuntime(6950): at
android.provider.Settings$NameValueTable.putString(Settings.java:409)
03-17 17:43:15.717: ERROR/AndroidRuntime(6950): at
android.provider.Settings$Secure.putString(Settings.java:1520)

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



[android-developers] Build application with Android OS source code

2009-03-17 Thread Eng. Ahmed Abo El Ella

Hi all
I write this tip for helping people working with Android OS source
code. I created my own -Java Android- application. I developed it
under windows eclipse

I downloaded the source code of Android OS and successfully build it
under Linux Ubuntu

I wanted to insert my application into Android packages and build
successfully with the Android source code under Ubuntu

I faced the following issues and I solved it:
1. Add my application in packages folders under Android source code
I copied my application folder into packages folder and add the make
file for it into the folder (Android.mk)

File content:

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := eng development
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := MyApp
include $(BUILD_PACKAGE)


2. Encoding:
Some source files contains Unicode characters and can't be compiled
under Linux. I opened it under Linux and saved it with the same
encoding again


3.Inheritance from KeyListener
Under eclipse I developed my application and successfully run it on
emulator. But when I try to build the same code under Linux I got
error saying that my activity that inherits from KeyListener interface
isn't abstract and doesn't override methods clearMetaKeyState and
getInputType

Although I didn't find these methods in KeyListener in Android code
help (I found only OnKeyUp and OnKeyDown), I override these methods in
my activity as follows:
void clearMetaKeyState(android.view.View v, android.text.Editable
edit, int val)
{
}

public int getInputType()
{
return 0;
}

Then make the source code of Android, here you got Android Build with
your application inside its packages

Enjoy time
Enjoy Building

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



[android-developers] Queue and Display Call Log, Names Only

2009-03-17 Thread iPaul Pro

I am trying to construct a simple app that allows me to see my call
log, displaying names only, in a simple_list_item_1. I am totally
new to Java and Android and this is really the first step in creating
my first app.

Here's what I've got (go easy, please):

Manifest:

?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.ipaulpro.calls
  android:versionCode=1
  android:versionName=1.0.0
application android:icon=@drawable/icon android:label=@string/
app_name android:debuggable=true
activity android:name=.Calls
  android:label=@string/app_name
intent-filter
action android:name=android.intent.action.MAIN /
category
android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity
/application
uses-permission android:name=android.permission.READ_CONTACTS/
uses-permission
/manifest

Calls.java

package com.ipaulpro.calls;

import android.app.ListActivity;
import android.database.Cursor;
import android.os.Bundle;
import android.provider.CallLog;
import android.widget.ListAdapter;
import android.widget.SimpleCursorAdapter;

public class Calls extends ListActivity {
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);

Cursor c = getContentResolver().query(
   android.provider.CallLog.Calls.CONTENT_URI,
   null, null, null,
   android.provider.CallLog.Calls.DATE+  DESC);
   startManagingCursor(c);

   ListAdapter adapter = new SimpleCursorAdapter(
   this,
   android.R.layout.simple_list_item_1,
   c,
   new String[] {CallLog.Calls.CACHED_NAME},
   new int[] {CallLog.Calls.MISSED_TYPE}
   );

   setListAdapter(adapter);
}
}

Main.xml

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

 ListView android:id=@id/android:list
   android:layout_width=fill_parent
   android:layout_height=fill_parent

 /
   TextView  id=@+id/row_number
android:layout_width=wrap_content
android:layout_height=wrap_content
  /

/LinearLayout

And here' s the LogCat:

03-17 12:45:15.992: DEBUG/dalvikvm(4426): Calling exit(1)
03-17 12:45:16.012: INFO/ActivityManager(58): Process
com.ipaulpro.calls (pid 4426) has died.
03-17 12:45:16.012: INFO/WindowManager(58): WIN DEATH: Window{430edaa0
com.ipaulpro.calls/com.ipaulpro.calls.Calls}
03-17 12:45:16.022: DEBUG/Zygote(31): Process 4426 exited cleanly (1)
03-17 12:45:16.452: DEBUG/AndroidRuntime(4435): 
AndroidRuntime START 
03-17 12:45:16.452: DEBUG/AndroidRuntime(4435): CheckJNI is OFF
03-17 12:45:16.582: DEBUG/AndroidRuntime(4435): --- registering native
functions ---
03-17 12:45:16.592: INFO/jdwp(4435): received file descriptor 17 from
ADB
03-17 12:45:17.252: DEBUG/PackageParser(58): Scanning package: /data/
app/vmdl16664.tmp
03-17 12:45:17.352: WARN/PackageManager(58): Attempt to re-install
com.ipaulpro.calls without first uninstalling.
03-17 12:45:17.362: INFO/installd(35): unlink /data/dalvik-cache/
d...@app@vmdl16664@classes.dex
03-17 12:45:17.372: DEBUG/AndroidRuntime(4435): Shutting down VM
03-17 12:45:17.382: DEBUG/dalvikvm(4435): DestroyJavaVM waiting for
non-daemon threads to exit
03-17 12:45:17.382: INFO/dalvikvm(4435): DestroyJavaVM shutting VM
down
03-17 12:45:17.382: DEBUG/dalvikvm(4435): HeapWorker thread shutting
down
03-17 12:45:17.392: DEBUG/dalvikvm(4435): HeapWorker thread has shut
down
03-17 12:45:17.392: DEBUG/jdwp(4435): JDWP shutting down net...
03-17 12:45:17.392: DEBUG/jdwp(4435): Got wake-up signal, bailing out
of select
03-17 12:45:17.392: INFO/dalvikvm(4435): Debugger has detached; object
registry had 1 entries
03-17 12:45:17.392: DEBUG/dalvikvm(4435): VM cleaning up
03-17 12:45:17.412: ERROR/dalvikvm(4435): pthread_setspecific failed,
err=22
03-17 12:45:17.432: DEBUG/dalvikvm(4435): LinearAlloc 0x0 used 529708
of 4194304 (12%)
03-17 12:45:17.792: DEBUG/dalvikvm(58): GC freed 6717 objects / 411200
bytes in 380ms
03-17 12:45:17.982: DEBUG/AndroidRuntime(4443): 
AndroidRuntime START 
03-17 12:45:17.982: DEBUG/AndroidRuntime(4443): CheckJNI is OFF
03-17 12:45:18.112: DEBUG/AndroidRuntime(4443): --- registering native
functions ---
03-17 12:45:18.122: INFO/jdwp(4443): received file descriptor 17 from
ADB
03-17 12:45:18.792: DEBUG/PackageParser(58): Scanning package: /data/
app/vmdl16665.tmp
03-17 12:45:18.892: DEBUG/PackageManager(58): Removing package
com.ipaulpro.calls
03-17 12:45:18.902: DEBUG/PackageManager(58):   Activities:
com.ipaulpro.calls.Calls
03-17 12:45:18.902: DEBUG/PackageManager(58): Scanning package
com.ipaulpro.calls

[android-developers] TrackBall

2009-03-17 Thread cruiseru...@gmail.com

I know that emulation of trackball to DPAD do not work so good, then i
decide use trackball.

I override onTrackBallEvent but I have problem .It has good reaction
for action move ... when I track left, it goes left, when I track
right, it goes right, but I can't stop it .When I unpress ..
(action_up) the track ball .. it does nothing... still continue to
move. It does stop moving only when I track up or down
I have no action_up or action_cancel,down reactions ... only
action_move react.

thread.sprite.moveleft or right ... is moving my sprite untlil a call
sprite.stayStil...

Logically it should be at ACTION_UP  but it do nothing

Does have somebody experience with trackball reactions? (action up)

@Override
public boolean onTrackballEvent(MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
thread.sprite.stayStill();
   // trackball selected... ignore
   break;
case MotionEvent.ACTION_UP:
thread.sprite.stayStill();
return true;
case MotionEvent.ACTION_CANCEL:
   // trackball selected... ignore
thread.sprite.stayStill();
return true;
case MotionEvent.ACTION_MOVE:
if (mContext != null) {
   float x = event.getX() * event.getXPrecision();
   float y = event.getY() * event.getYPrecision();
   thread.xx=(int)x;//for debug, show on screen
   if(x(int)0)thread.sprite.moveLeft();
   if(x(int)0)thread.spritemoveRight();
   if(x==(int)0)thread.sprite.stayStill();
   x=0;
return true;
}
}
return super.onTrackballEvent(event);
}

Thx for answers.

J

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



[android-developers] How to setclip of a view

2009-03-17 Thread 单单

There is another post asked this question. A guy give a solution using
invalidate(int, int, int, int). But this seems work only once -- the
drawing right after the invalidate. After that time of drawing, every
repaint will draw the whole view. I need a real setClip permanent.

Any help will be highly appriciated.

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



[android-developers] Re: need help on --core-library

2009-03-17 Thread Stoyan Damov

I'll try to pull a magic now and guess what you're trying to do -- are
you trying to get FreeTTS to work in your app? :P

On Tue, Mar 17, 2009 at 6:01 PM, DaRolla netzprofi.ma...@googlemail.com wrote:

 hello,

 I need to build a java.beans.PropertyChangeListener which is part of
 JDK (rt.jar) but not part of Dalvik.

 Trying to copy the sources to my Application I get this:

 Attempt to include a core VM class in something other than a core
 library.
 It is likely that you have attempted to include the core library from
 a desktop
 virtual machine into an application, which will most assuredly not
 work. If
 you really intend to build a core library -- which is only appropriate
 as
 part of creating a full virtual machine binary, as opposed to
 compiling an
 application -- then use the --core-library option to suppress this
 error
 message. If you go ahead and use --core-library but are in fact
 building
 an application, then please be aware that your build will still fail
 at some
 point; you will simply be denied the pleasure of reading this helpful
 error
 message.

 My solution:
 1) build a core library with consisting out of
 java.beans.PropertyChangeListener
 2) integrate that library (jar?) into my application.

 My question:
 - how can I build a core library using eclipse?

 greetings,
 darolla
 


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

2009-03-17 Thread Gesh

well you can use the other parameters of that method instead of
building the string yourself, but that's just for better readability,
no real improvement there.

otherwise there is no better method.

cheers,
gesh.

On Mar 17, 12:29 pm, Tommaso nuccio.tomm...@gmail.com wrote:
 I solved it, the parameter must be:
 getPackageName()+:drawable/+symbolIdentifier

 Still the question:
 How can it be done better?

 Thanks,
   Tommaso

 On 17 Mrz., 11:44, Tommaso nuccio.tomm...@gmail.com wrote:

  Hi all,

  in my application I have a table that stores information for symbols.
  These symbols have to be displayed, so also the source, the *.png, is
  stored in each row. These symbols are loaded randomly at runtime.

  How do I get the the image(s) to be loaded?

  getResources().getIdentifier(symbolIdentifier, null, null) always
  results 0 (zero).

  Here is the code:
      private void loadSymbol(final String source) {
          int imageIdentifier = getResources().getIdentifier
  (symbolIdentifier, null, null);
          Bitmap bitmap = BitmapFactory.decodeResource(getResources(),
  imageIdentifier);
          mImageOfSymbol.setImageBitmap(bitmap);
          mImageOfSymbol.setVisibility(ImageView.VISIBLE);
          mImageOfSymbol.refreshDrawableState();
      }

  It says in the JavaDoc that the use of getIdentifier() is discouraged.
  What is a best practice to load images at runtime, when only knowing
  the source as a string?

  Many thanks in advance.

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

2009-03-17 Thread Justin (Google Employee)

The emulator does not support WiFi. Also note that a retail G1 is
perfectly suitable for development. There are pluses and minuses to
both the ADP1 and the G1, most of which I'm sure you can find explored
in different threads on this forum.

Cheers,
Justin
Android Team @ Google

On Mar 17, 7:06 am, Daniel Weidele daniel.weid...@googlemail.com
wrote:
 Hello Developers,

 i am currently doing my Bachelor Project concerning Android
 Programming.

 Therefore i need a possibility to SCAN/DISCOVER Hot-Spots or WLAN's
 where i can connect to.

 In many topics i have read, that the EMULATOR does NOT support WiFi
 scan with WiFiManager. I also tried using ConnectivityManager or
 BroadcastReceiver. But it doesn't ever work.

 So my question ist the following - is it CORRECT that the emulator
 does not support any kind of WLAN Scan/Discovery? I need as many
 comments on this as possible - because only if its REALLY true, that
 the emulator does not provide WIFI functioanlity, then i can ask for
 buying a Dev Phone.

 Please give some comments on that. And if so, WHY there is no WiFi
 support within the emulator...?

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



[android-developers] Editing / Modifying Stock Google Apps

2009-03-17 Thread ipersaud

Where can I find the source code / project files to the Pattern Unlock
feature so I can customize it in my  own way?

I don't even know if this is possible or allowable but I'm new to the
group, read the forum rules but wasn't sure where to post a question
like this.


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



[android-developers] DatePicker to looks like regular Calendar

2009-03-17 Thread marwooj

Hi,
Is there a simple way to make DatePicker looks like that one from
http://www.droiddraw.org/widgetguide.html

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] can not call a java method from javascript using addJavascriptInterface()

2009-03-17 Thread sherwin huang
hi
I'm trying to call a java method from javascript using
addJavascriptInterface();
but seems does not work, it always  display failure;
 java code:
 public class WebTest extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

WebView webview = new WebView(this);
webview.getSettings().setJavaScriptEnabled(true);

 webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
webview.setClickable(true);
TestJs ts = new TestJs();
webview.addJavascriptInterface(ts, test);

webview.loadUrl(file:///data/1.html);

setContentView(webview);

}
}
 public class TestJs {

public int incr(int num){
return num+1;
}
}

html:
html
head
script type=text/javascript
function loader() {
document.write(begin);
document.write(p);
document.write(window.test);
document.write(p);
 if(window.test){
document.write(success);
document.write(p);
document.write(test.incr(100));
}else{
document.write(failure);
document.write(p);
}

}
/script
/head
body onload=loader()
/body
/html

 Thanks in advance for your help!

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



[android-developers] code to mute using the MODIFY_AUDIO_SETTINGS permission

2009-03-17 Thread Beth

Hi,

At the end of my AndroidManifest xml file you find this tag:
uses-permission
android:name=android.permission.MODIFY_AUDIO_SETTINGS/uses-
permission
/manifest

I am using Eclipse to write code to mute notifications and I get a
java.lang.SecurityException: Permission Denial
from the Emulator every time.  I realize the change will affect other
applications, however, it was unclear that more was needed to mute a
stream.  What am I missing?

Thanks and 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: CheckBox test= (CheckBox) findViewById(R.id.test); returns null

2009-03-17 Thread dan raaka
Try changing the id and see if it makes any difference.

-Dan

On Tue, Mar 17, 2009 at 9:46 AM, zeeshan genx...@gmail.com wrote:


 Hi Android Experts,

 why CheckBox is always null.

 please find the error in my code:

 xml-

 CheckBox id=@+id/checkbox
  android:layout_width=wrap_content
  android:layout_height=wrap_content
/

 code file-

 package com.reblogr.reblogrclient;





 public class Test extends Activity {
/** Called when the activity is first created. */

   public CheckBox checkbox;

   @Override
public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.login);
Button connectButton = (Button)findViewById(R.id.objBtn1);

 checkbox= (CheckBox)findViewById(R.id.checkbox);

 connectButton.setOnClickListener(connectButtonListener);
}
   public OnClickListener connectButtonListener = new OnClickListener
 ()
   {
   public void onClick(View v)
   {

  Athenticate();



   }
   };
   public void Athenticate(){

if(checkbox.isChecked()){   //
 NullPointerException here
//do something

   }


   }

 }

 why checkbox is null?
 


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



[android-developers] Re: Can you requery a Cursor after the database object that created it is closed?

2009-03-17 Thread iliketolearn

Any help is appreciated.

On Mar 15, 8:06 pm, iliketolearn theand...@gmail.com wrote:
 From my own quick tests, this seems to be the case. I just wanted to
 confirm.

 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] React to uninstall of application?

2009-03-17 Thread Marcus

Hi,

my app stores some data on the sd-card.

But when my app is going to be uninstalled, this data will be left.

Is there a possibility to react on the uninstall intent of the user
and delete the data?

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



[android-developers] Re: Thumbnails

2009-03-17 Thread todd

Yes, you can have both thumbnail types. It's just another row in the
DB. The kind fields would be different for the micro and mini rows.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Support from Developers

2009-03-17 Thread Alexander


As a side note, I found a good example of really interesting support,
at least on the
internet (on the phone is a different issue). I really like the
system
at getsatisfaction.com - it is a bit social networking for me, but
then again, it might be the type of support system that the users of
the Market would be into.

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

2009-03-17 Thread My3

And-Rider,

Even I am facing same problem,am trying to load the image using
webview which is throwing this error:
 xxx jpeg error 53 Not a JPEG file: starts with 0x%02x 0x
%02x

Can you please let me know how did you solve this.


On Feb 27, 11:59 pm, And-Rider rahulregunat...@gmail.com wrote:
 Thank you very much for your help.But after changing the query as per
 your advice i am still ending up getting the sameerror..

 Is the way i use to convert images as byte the correct way or is there
 any better way to store retrieve the images...?

 On Feb 27, 10:06 pm, Nathan nathancass...@gmail.com wrote:

  It'snotreally the recommended way to store images but the following
  code has worked for me.

  db.execSQL(UPDATE  + TABLE_NAME +  SET image = ? WHERE id = ?, new
  Object[] { image_bytes, id } );
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Injecting HTTP header into all requests issued by the emulator

2009-03-17 Thread Greg Krimer

Hi everyone,

Is there an easy way to inject a header into all HTTP request sent
from the emulator, including HTTP requests made by my app and also by
the built-in web browser? I need this ability to model the behavior of
a carrier gateway. I tried running the emulator through Fiddler as a
proxy because I know how to manipulate HTTP requests in Fiddler, but
that that didn't work. The emulator was successfully able to make the
first HTTP request, but choked on subsequent ones. Reading this list,
it seems that getting the emulator to use a proxy is not is not that
easy. If this is the only way to do what I need, then I'll certainly
give it another shot and post details about any problems I encounter.
I am just wondering if perhaps there is an easier way to inject a
header.

Thanks,

Greg
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 imageview object supports which formats images other than png and jpg

2009-03-17 Thread My3

Even i am interested to know about this.
Is there any ways to display tiff image?

On Jan 31, 5:10 am, jj jagtap...@gmail.com wrote:
 Hello everybody
     The imageview  object supports, which formats of images other than
 png and jpg?
  Is it supporting *.jif, *.bmp. *.tiff, etc. to display them on sceen
 of activity?

    The picture application(on emulator) shows only *.jpg and *.png
 format it does not shows other format images(*.jif, *.bmp, etc).

 Will anybody clear me regarding this issue?

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



[android-developers] Re: Support from Developers

2009-03-17 Thread Alexander

*Here's a good start of something to this end:

New Google Group for just this kind of thing..

http://groups.google.com/group/android-app-distribution

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



[android-developers] Re: How the use same instances when launching application twice ?

2009-03-17 Thread Derek

Do I need both addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); and
android:launchMode=singleTask in AndroidManifest.xml ?

On Mar 17, 3:04 pm, dillirao malipeddi dillir...@arijasoft.com
wrote:
 when you create a new intent
 set flag as

 your_intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);

  startActivity(your_intent);



 On Tue, Mar 17, 2009 at 2:56 PM, Derek cram.de...@gmail.com wrote:

  Hi,

  Is it possible to re-use all the instances of Activities and Services
  when an application is launched twice. For instance:
  1/ I start my application APP1. Some activities are launched and a
  service is started.
  2/ I click Home device button
  3/ I can see the icon the launch again my application APP1
  4/ I click on it and the APP1 is launched twice

  I would like to re-use the existing the instances of Activities and
  Services from the first launch.
  I guess it is related to SingleTop or SingleTask but it doesn't
  seem to work.

  Any suggestion ?

 --
 Dilli Rao. 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] orientation change crashes when ids are not unique

2009-03-17 Thread skink

hi,

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

LinearLayout
android:layout_width=fill_parent
android:layout_height=wrap_content
android:orientation=horizontal
android:id=@+id/layout0

Button
android:layout_width=fill_parent
android:layout_height=wrap_content
android:id=@+id/child0
/
/LinearLayout

LinearLayout
android:layout_width=fill_parent
android:layout_height=wrap_content
android:orientation=horizontal
android:id=@+id/layout1

ListView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:id=@+id/child0
/
/LinearLayout
/LinearLayout

i heard its perfectly OK to have the same IDs in different sub-trees
(here layout0/child0 and layout1/child0).

not really: press ctrl-F12

if i change one child to be child1 it works without exception

is it a droid's bug?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: orientation change crashes when ids are not unique

2009-03-17 Thread Romain Guy

You can have the same id on different widgets. What is the exception you get?

On Tue, Mar 17, 2009 at 12:00 PM, skink psk...@gmail.com wrote:

 hi,

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

        LinearLayout
            android:layout_width=fill_parent
            android:layout_height=wrap_content
            android:orientation=horizontal
                android:id=@+id/layout0
        
                Button
                    android:layout_width=fill_parent
                    android:layout_height=wrap_content
                    android:id=@+id/child0
                /
        /LinearLayout

        LinearLayout
            android:layout_width=fill_parent
            android:layout_height=wrap_content
            android:orientation=horizontal
                android:id=@+id/layout1
        
                ListView
                    android:layout_width=fill_parent
                    android:layout_height=wrap_content
                    android:id=@+id/child0
                /
        /LinearLayout
 /LinearLayout

 i heard its perfectly OK to have the same IDs in different sub-trees
 (here layout0/child0 and layout1/child0).

 not really: press ctrl-F12

 if i change one child to be child1 it works without exception

 is it a droid's bug?
 




-- 
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: orientation change crashes when ids are not unique

2009-03-17 Thread skink



On 17 Mar, 18:19, Romain Guy romain...@google.com wrote:
 You can have the same id on different widgets. What is the exception you get?


ClassCastException, it's probably the SavedStates are backed by one
linear sparse array (at least i think so)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 there a large efficiency difference between Canvas.drawBitmap or OpenGL?

2009-03-17 Thread William

I am not too familiar with how GL works.  Is the performance gain
happen in writing to the screen or doing the image manipulation or
BOTH.  I mean I know I can convert a bitmap to a texture and put it on
the GL surface.  Most of my code is done using canvas to draw to off
screen bitmaps before i finally draw the composite image to the
screen.

Do I have to convert all that to GL textures or can I keep all the
bitmap work and convert the final image to a texture to be drawn to
the GL surface.  If I have to convert it all to the textures and draw
to the textures, will there be any performance gain by just drawing
the final image to the GL surface but to the rest using Canvas?

On Mar 15, 4:57 pm, Tim Bray timb...@gmail.com wrote:
 On Sun, Mar 15, 2009 at 1:30 PM, Jon Colverson jjc1...@gmail.com wrote:
  Interestingly, the emulator is slower than the G1 when using OpenGL
  because the emulator uses a (emulated) software OpenGL implementation.

 Interestingly, on my app (decorating a map with geotagged points,
 recording and playing back sound, launching web browser) the G1 is not
 significantly slower than the emulator, so I just don't use the
 emulator any more.  Got a surprise the other day when I was doing some
 debugging, had the phone in my hand, and it went off because somebody
 was calling me...

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

2009-03-17 Thread Romain Guy

Oh yeah, we fixed that in Cupcake.

But the bottom line is: don't use the same id for Views of different types.

On Tue, Mar 17, 2009 at 12:27 PM, skink psk...@gmail.com wrote:



 On 17 Mar, 18:19, Romain Guy romain...@google.com wrote:
 You can have the same id on different widgets. What is the exception you get?


 ClassCastException, it's probably the SavedStates are backed by one
 linear sparse array (at least i think so)
 




-- 
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: orientation change crashes when ids are not unique

2009-03-17 Thread skink



On 17 Mar, 18:36, Romain Guy romain...@google.com wrote:
 Oh yeah, we fixed that in Cupcake.

 But the bottom line is: don't use the same id for Views of different types.

ok, thanks for info

but if i used the same ids for the same View types (for example two
ListViews) how its supposed to work? we will not have
ClassCastException but i think different SavedStates would be used by
different ListViews...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: SimpleDateFormat PathClassLoader NullPointerException quandary

2009-03-17 Thread Torgny Bjers
I synchronized the method and it all seems to be working fine now. Thanks
for helping me with this rather obscure error.

On Mar 16, 2009 7:31 PM, sm1 sergemas...@gmail.com wrote:


SimpleDateFormat is known to not be thread-safe, and it's instances
must be either unique to each thread or otherwise be synchronized.

happened to me a while back.

serge

On Mar 16, 7:15 pm, Torgny torgny.bj...@gmail.com wrote:  Yeah, the code
is in its own thread. I...

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



[android-developers] Re: WebView issue...

2009-03-17 Thread Marc

Bump.

On Mar 11, 7:52 am, Marc gram...@gmail.com wrote:
 So I've got a WebView, and in its content is a phone number.  I
 hightlight it and click - voila, taken to the phone app.
 Now, all I do is add this code:
                 wv.setWebViewClient(new WebViewClient() {
                     @Override
                     public boolean shouldOverrideUrlLoading(WebView
 view, String url) {
                         return false;
                     }
                 });
 and hey, presto!, clicks no longer work.

 Can anyone repro/explain this odd behavior?  The docs say that
 returning false is the correct way to indicate that the load has NOT
 been overridden.

 Thanks.
 Marc
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 there a large efficiency difference between Canvas.drawBitmap or OpenGL?

2009-03-17 Thread Jon Colverson

On Mar 17, 7:27 pm, William william.caine...@gmail.com wrote:
 Do I have to convert all that to GL textures or can I keep all the
 bitmap work and convert the final image to a texture to be drawn to
 the GL surface.  If I have to convert it all to the textures and draw
 to the textures, will there be any performance gain by just drawing
 the final image to the GL surface but to the rest using Canvas?

Not in this case, no. The way to think about it is in terms of the
amount of data going from main (CPU) memory to graphics (GPU) memory.
If you do all the compositing in software then you have to send a full
frame's worth of data to the GPU every frame. Using OpenGL to then
draw it would provide no benefit over just sending it straight to the
screen (it would almost certainly be slower, in fact).

The case where using OpenGL provides a benefit is when you have a lot
of bitmap data that doesn't change. That can be just be sent to the
GPU once as textures and then you can draw using those textures and
the compositing will be done quickly by the GPU.

If you have some bitmap data that is static, and some which changes
then it is harder to predict the performance. Trying both ways is
probably the only way to get a definitive answer.

--
Jon

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

2009-03-17 Thread Seer

Even if it does everything I want kenny it will not stop the system
also sending the sms via the gsm network as well. Best case would be 2
sms been sent

On Mar 18, 1:46 am, Kenny yxw...@gmail.com wrote:
 Reading the file frameworks/base/telephony/java/com/android/internal/
 telephony/gsm/SMSDispatcher.java, you can find handleSendComplete( )
 has a PendingIntent to send. I don't understand PendingIntent well,
 only seeing the LOG code saying SMS send complete. Broadcasting
 intent ...

 Is this PendingIntentsendIntent interceptable? Not sure if the
 PendingIntent has extra data of SMS contents. Seer, let me know your
 insight.

 Kenny

 On Mar 17, 12:54 pm, Seer gilligan.ch...@gmail.com wrote:

  So if that is not the way you are meant to services such as alternate
  SMS gateways, what is?  Using intents will not work as most of the sms
  apps have the reply for a thread built in.  This is the only way i
  have been able to discover to capture all outgoing sms so i can either
  redirect them over the web or over the mobile network. I find it sort
  of strange that the developers of Android did not think that people
  would want to also use alternate networks and mediums to the gsm
  network for things like calls and sms.  With sms prices as high as
  they are in Australia the internet can be up to 5 times cheaper to
  send them and even with data costs that is still much cheaper.

  I know all apps are meant to be equal but some apps / services need to
  be able to do things on a much lower level or have intents or
  something for the lower level services of the phone as well.

  I am open to any ideas you have.

  On Mar 17, 3:31 pm, Dianne Hackborn hack...@android.com wrote:

   You can't do this.  Especially from the SDK, on so many levels:

   1. ServiceManager is not public.  The features it contains are not 
   available
   in the SDK.
   2. None of the interfaces of the services published in the service manager
   are published in the SDK, so you wouldn't be able to redefine them anyway.
   3. And even if any of this were in the SDK, applications are not allowed 
   to
   modify what is published in the service manager, and they never will be 
   able
   to.

   On Mon, Mar 16, 2009 at 8:47 PM, Seer gilligan.ch...@gmail.com wrote:

Is there a way to access this class in the SDK or is there another
class that does the same thing?  I need to rename one of the services
listed in the servicemanager so that it will call my service instead
and then pass calls i don't handle onto the original service that i
have renamed.

   --
   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.  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: Intercepting outgoing sms

2009-03-17 Thread Seer

Kenny I now have everything working apart from intercepting the sms. I
can log them etc but only way I can see to intercept them is to either
override smsmanager ( not possible ) or rename the isms service and
place my own service in its place. My service would then call the old
isms service for the things it does not handle. That is less than
ideal but so far it is the possible solution I have found

On Mar 18, 1:48 am, Kenny yxw...@gmail.com wrote:
 I think check database seems not feasible. Seer, I posted a rely to
 you about SMSDispatcher class. Take a look, there may be certain
 intent sent there.

 Kenny

 On Mar 16, 9:44 pm, Kenny yxw...@gmail.com wrote:

  Sms should have provider, through which you may put your SMS to
  database, I think.

  But the topic was about intercepting/redirecting being-sent SMS. Is it
  resolved?

  On Mar 16, 12:52 pm, Seer gilligan.ch...@gmail.com wrote:

   ok i have written an app for sending the sms over the web but how do i
   insert the sms sent over the web into the list of sms sent from the
   phone?

   On Mar 6, 1:25 am, Avraham Serour tovm...@gmail.com wrote:

not sure if you can do that, if not you could do the opposite, make the 
user
send sms using you app, so if the number match your criteria you use 
your
gateway, if not send it using the phone regular sms service

On Thu, Mar 5, 2009 at 5:04 AM, Seer gilligan.ch...@gmail.com wrote:

 Hi,
 What i want to do is intercept outgoing sms.  The reason been that i
 want to redirect some sms over a web based sms sending service and
 others to go over the normal mobile network.  I would really like to
 do this as an invisible background process that does not need
 modifications to any of the existing apps people use to send sms.

 Is this possible or will i have to write my own app to send sms and
 let that app decide how to send the sms?  with so many sms apps out
 there i really did not want to add another to the mix and to instead
 work on a lower level.

 thanks

 Chris- 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: How to add SMS to inbox in android programmatically?

2009-03-17 Thread Seer

 Thanks for your update. So you exactly have done two things:
 1. Call SmsManager::sendTextMessage( )
 2. Put the sent SMS to its database via ContentResolver::insert( )

The code i gave you only adds a record to the phones sms database to
say an sms has been sent and it will be visible to the user.  In my
own code else where i have the code to send the sms.


On Mar 18, 1:53 am, Kenny yxw...@gmail.com wrote:
 Thanks for your update. So you exactly have done two things:
 1. Call SmsManager::sendTextMessage( )
 2. Put the sent SMS to its database via ContentResolver::insert( )

 Kenny

 On Mar 17, 6:42 am, Seer gilligan.ch...@gmail.com wrote:

  i have been trying to do the same thing and just worked it out.  you
  want to do something similar to this.
  uses-permission android:name=android.permission.WRITE_SMS/

     public static final String ADDRESS = address;
     public static final String PERSON = person;
          public static final String DATE = date;
          public static final String READ = read;
          public static final String STATUS = status;
          public static final String TYPE = type;
      public static final String BODY = body;
      public static final int MESSAGE_TYPE_INBOX = 1;
      public static final int MESSAGE_TYPE_SENT = 2;

  ContentValues values = new ContentValues();
             values.put(SMSHelper.ADDRESS, +61408219690);
             values.put(SMSHelper.DATE, 1237080365055);
             values.put(SMSHelper.READ, 1);
             values.put(SMSHelper.STATUS, -1);
             values.put(SMSHelper.TYPE, 2);
             values.put(SMSHelper.BODY, SMS inserting test);
                  Uri inserted = 
  getContentResolver().insert(Uri.parse(content://
  sms), values);

  That is from a few different classes but i am sure you can work out
  how it fits.

  On Mar 13, 8:09 pm, senthil senthil...@gmail.com wrote:

   HI,
   Iam sending the sms by using the below code,
   SmsManager smsManager = SmsManager.getDefault();
   smsManager.sendTextMessage(destAddr, null, mMessageText, il, null);

   But, the same SMS message needs to be reflected in the Native sms
   inbox,
   Can anyone help me out in achieving this

   Thanks in Advance !- 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: Capturing exceptions on user's phones?

2009-03-17 Thread cnordvik

 1) When an exception occurs, the application will just drop back to the home
 screen and the user won't actually know that an exception has occured.

Any luck on sorting this out? A dialog that informs the user of the
error and a report this problem button that opens the email app
would be really nice :-)

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



[android-developers] adb and Eclipse list no device after 1 minute

2009-03-17 Thread Brad

When I plug in the ADP1 and do the following:

   $ adb devices
   List of devices attached
   HT845GZ50887device

But, after connecting via the USB, my ADP1 device goes away after
about a minute.

I can also load an application from Eclipse to the ADP1 fine. But
Eclipse lists in error in the Eclipse consolein about a
min with:

2009-03-17 12:06:08 - DeviceMonitor]Connection Failure when starting
to monitor device 'HT845GZ50887' : device (HT845GZ50887) request
rejected: device not found

If I then:
 $ adb devices
List of devices attached

Why would the device go away?  USB debugging and Stay awake are both
enabled.

I've found that most of these types of problems are on Windows and
have to do with the USB. Im on Linux, though (gentoo)

VITALS:
Model Number: ADP1
Firmware version 1.1
Baseband version 62.33.20.08H_1.22.14.11
Kernel version: 2.6.25-01845-g85d4f0d android-bu...@apa27 #27
Build number: dream_devphone-userdebug 12.1 UNLOCKED 130444 test-keys

$ uname -a
Linux IVES 2.6.28 #2 SMP Thu Jan 29 17:00:05 PST 2009 x86_64 AMD Athlon
(tm) 64 X2 Dual Core Processor 5000+ AuthenticAMD GNU/Linux
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 clicks on xml files in the browser

2009-03-17 Thread Rohit

Hi,
  I am trying to intercept xml links that are clicked in the
android web browser. I want my activity to handle these xml files,
however I cannot seem to get this to work. Whenever I click on the xml
file in the browser it just displays the xml file.  Here is the entry
that I have in my AndroidManifest.xml. Is this enough or do I need to
do something more?

 activity
android:name=handleXML
android:theme=@android:style/Theme.Dialog
android:screenOrientation=portrait

intent-filter
action android:name=android.intent.action.VIEW /
category 
android:name=android.intent.category.DEFAULT /
category 
android:name=android.intent.category.BROWSABLE /

data android:scheme=http /
data android:scheme=https /
data android:mimeType=application/xml/
data android:mimeType=text/xml/
/intent-filter
/activity



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

2009-03-17 Thread Mads Kristiansen
Well, I am using a workaround currently, which means that the application
will restart. On application restart a dialog will then notify the user that
a problem has occurred.
The problem here is that I cannot get a context in the default exception
handler (where I dump the stack trace) and thus I am not able to display a
dialog. Does anybody know if I can steal a system context from somewhere?
I couldn't find anything helpful in the documentation about this.

I'll see if I can come up with something better.

Best regards, Mads Kristiansen

On Tue, Mar 17, 2009 at 9:55 PM, cnordvik cnord...@gmail.com wrote:


  1) When an exception occurs, the application will just drop back to the
 home
  screen and the user won't actually know that an exception has occured.

 Any luck on sorting this out? A dialog that informs the user of the
 error and a report this problem button that opens the email app
 would be really nice :-)

 -Christer
 


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



[android-developers] Re: adb and Eclipse list no device after 1 minute

2009-03-17 Thread Brad Fuller
Could the answer be because a USB hub is between the computer and the ADP1?
Maybe it is timing out and detaching the device? I've moved the connection
from a USB hub to the computer directly and so far the ADP1 continues to be
detected (according to adb devices)


On Tue, Mar 17, 2009 at 2:31 PM, Brad bradallenful...@gmail.com wrote:

 When I plug in the ADP1 and do the following:

   $ adb devices
   List of devices attached
   HT845GZ50887device

 But, after connecting via the USB, my ADP1 device goes away after
 about a minute.

 I can also load an application from Eclipse to the ADP1 fine. But
 Eclipse lists in error in the Eclipse consolein about a
 min with:

 2009-03-17 12:06:08 - DeviceMonitor]Connection Failure when starting
 to monitor device 'HT845GZ50887' : device (HT845GZ50887) request
 rejected: device not found

 If I then:
  $ adb devices
 List of devices attached

 Why would the device go away?  USB debugging and Stay awake are both
 enabled.

 I've found that most of these types of problems are on Windows and
 have to do with the USB. Im on Linux, though (gentoo)

 VITALS:
 Model Number: ADP1
 Firmware version 1.1
 Baseband version 62.33.20.08H_1.22.14.11
 Kernel version: 2.6.25-01845-g85d4f0d android-bu...@apa27 #27
 Build number: dream_devphone-userdebug 12.1 UNLOCKED 130444 test-keys

 $ uname -a
 Linux IVES 2.6.28 #2 SMP Thu Jan 29 17:00:05 PST 2009 x86_64 AMD Athlon
 (tm) 64 X2 Dual Core Processor 5000+ AuthenticAMD GNU/Linux




-- 
Brad Fuller

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



[android-developers] Location.getTime() does not return milliseconds

2009-03-17 Thread Yossi

Hi,

According to the decumentation, android.location.Location.getTime()
returns the fix time in milliseconds. however I keep getting the time
rounded to seconds (e.g. no milliseconds accuracy).
Is this the 'normal' behavior or do I do something wrong?

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

2009-03-17 Thread Dianne Hackborn
If there are features missing from the current system (such as an actual API
for applications to integrate with the low-level telephony SMS layer), you
can look at adding those to the platform and contributing patches to have
the feature in a future version.  In that case, you can start a discussion
on android-platform with the telephony and other engineers to come up with a
design that everyone likes and will be accepted for the platform.

On Mon, Mar 16, 2009 at 9:54 PM, Seer gilligan.ch...@gmail.com wrote:


 So if that is not the way you are meant to services such as alternate
 SMS gateways, what is?  Using intents will not work as most of the sms
 apps have the reply for a thread built in.  This is the only way i
 have been able to discover to capture all outgoing sms so i can either
 redirect them over the web or over the mobile network. I find it sort
 of strange that the developers of Android did not think that people
 would want to also use alternate networks and mediums to the gsm
 network for things like calls and sms.  With sms prices as high as
 they are in Australia the internet can be up to 5 times cheaper to
 send them and even with data costs that is still much cheaper.

 I know all apps are meant to be equal but some apps / services need to
 be able to do things on a much lower level or have intents or
 something for the lower level services of the phone as well.

 I am open to any ideas you have.

 On Mar 17, 3:31 pm, Dianne Hackborn hack...@android.com wrote:
  You can't do this.  Especially from the SDK, on so many levels:
 
  1. ServiceManager is not public.  The features it contains are not
 available
  in the SDK.
  2. None of the interfaces of the services published in the service
 manager
  are published in the SDK, so you wouldn't be able to redefine them
 anyway.
  3. And even if any of this were in the SDK, applications are not allowed
 to
  modify what is published in the service manager, and they never will be
 able
  to.
 
  On Mon, Mar 16, 2009 at 8:47 PM, Seer gilligan.ch...@gmail.com wrote:
 
   Is there a way to access this class in the SDK or is there another
   class that does the same thing?  I need to rename one of the services
   listed in the servicemanager so that it will call my service instead
   and then pass calls i don't handle onto the original service that i
   have renamed.
 
  --
  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.  All such questions should be posted on public
  forums, where I and others can see and answer them.
 



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

Note: please don't send private questions to me, as I don't have time to
provide private support.  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: orientation change crashes when ids are not unique

2009-03-17 Thread Dianne Hackborn
Yes, the ID is used to propagate the saved state to the appropriate view in
the next instance.  Use different IDs.  Why do you even want to use the same
ID?

On Tue, Mar 17, 2009 at 12:45 PM, skink psk...@gmail.com wrote:




 On 17 Mar, 18:36, Romain Guy romain...@google.com wrote:
  Oh yeah, we fixed that in Cupcake.
 
  But the bottom line is: don't use the same id for Views of different
 types.

 ok, thanks for info

 but if i used the same ids for the same View types (for example two
 ListViews) how its supposed to work? we will not have
 ClassCastException but i think different SavedStates would be used by
 different ListViews...
 



-- 
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.  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-register AlarmManager events on upgrades

2009-03-17 Thread Michael Bollmann

I read that the AlarmManager looses all registered intents if case the
application
that registered those intents is upgraded.

What is the correct approach to re-register those intents considering
the user
does NOT start the application after upgrading it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] spinner or similar selection with no selection by default

2009-03-17 Thread daniel.benedykt

Hi

Is there a way to show a spinner or something similar with no selection
(empty or text saying (no selection)) but when the user clicks on the
spinner that item is not there anymore?

Basically yo start I wanted to be empty and I have a label that says
go to:  and a spinner with options: a, b,c
If I have an empty option, it will show on the spinner list, so its
not good.
If I remove that empty option, by default the spinner will be on
option a.

I tried to set the onclick event so I could remove the first item from
the list before showing it but it throws an exception.

Do I have to do a complete custom view for this or there is another
way around?

Thanks

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



[android-developers] Re: Re-register AlarmManager events on upgrades

2009-03-17 Thread daniel.benedykt

Hi

I have the same problem.
As far as I know the only way is to set a Service to start after the
installation is done. Maybe you can put a service that runs once (not
really a service hehe) that it will be initiated after the
installation is complete, set up the alarms and end the service.

Other thing you can do is to react to the
android.permission.RECEIVE_BOOT_COMPLETED so next time the user
reboots the phone you can re-register the alarms.

Hope it helps.

Daniel


On Mar 17, 7:27 pm, Michael Bollmann michael.bollm...@googlemail.com
wrote:
 I read that the AlarmManager looses all registered intents if case the
 application
 that registered those intents is upgraded.

 What is the correct approach to re-register those intents considering
 the user
 does NOT start the application after upgrading it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Emulator not starting

2009-03-17 Thread amiz

I am running Eclipse on XP.  The Emulator was running correctly but
all of sudden today it hang up. I closed Eclipse, rebooted the XP,
now when I invoke eclipse, it displays a ddms alert box with the
message:

Failed to initialize monitor thread: Unable to establish loopback
connection

and eclipe prints in its console:
[2009-03-17 18:41:46 - DeviceMonitor]Connection attempts: 61

I can start the emulator manually but it's not linked to eclipse and
eclipse still gives the same errors.

Why did it stop running and how do I fix it?

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: android.os.ServiceManager

2009-03-17 Thread Seer

Dianne,
Thanks for the reply. The problem is I am not sure there is not
already an API for it.  That is what i am trying to find out but no
one is really responding to say there is or there is not. I find it
really strange that there would not be some way of hooking into the
lower layers or to do what i am trying to do and that is why i keep
asking but getting no responses.

All i want for the min is someone in the know to tell me if it is
possible or not to intercept outgoing sms so that i can redirect them
over the internet instead of the gsm network. Writing your own sending
app and having users use that does not work as most uses will reply to
sms and the reply  part that sends the message is built into each sms
client. The only place to intercept the sms is at a lower level than
that as far as i can tell and it seems to me that anything on that
level is not accessible.  That said i am only learning Android and
that is why i am asking for help to see if there is any options or
anything i have over looked. Maybe on i am on the wrong discussion
group i don't know.  If i am can you point me to the correct one?

I really want to do things correctly and not use hacks but i am having
trouble trying to find info on the correct way to do this.

Regards,

Chris

On Mar 18, 8:59 am, Dianne Hackborn hack...@android.com wrote:
 If there are features missing from the current system (such as an actual API
 for applications to integrate with the low-level telephony SMS layer), you
 can look at adding those to the platform and contributing patches to have
 the feature in a future version.  In that case, you can start a discussion
 on android-platform with the telephony and other engineers to come up with a
 design that everyone likes and will be accepted for the platform.



 On Mon, Mar 16, 2009 at 9:54 PM, Seer gilligan.ch...@gmail.com wrote:

  So if that is not the way you are meant to services such as alternate
  SMS gateways, what is?  Using intents will not work as most of the sms
  apps have the reply for a thread built in.  This is the only way i
  have been able to discover to capture all outgoing sms so i can either
  redirect them over the web or over the mobile network. I find it sort
  of strange that the developers of Android did not think that people
  would want to also use alternate networks and mediums to the gsm
  network for things like calls and sms.  With sms prices as high as
  they are in Australia the internet can be up to 5 times cheaper to
  send them and even with data costs that is still much cheaper.

  I know all apps are meant to be equal but some apps / services need to
  be able to do things on a much lower level or have intents or
  something for the lower level services of the phone as well.

  I am open to any ideas you have.

  On Mar 17, 3:31 pm, Dianne Hackborn hack...@android.com wrote:
   You can't do this.  Especially from the SDK, on so many levels:

   1. ServiceManager is not public.  The features it contains are not
  available
   in the SDK.
   2. None of the interfaces of the services published in the service
  manager
   are published in the SDK, so you wouldn't be able to redefine them
  anyway.
   3. And even if any of this were in the SDK, applications are not allowed
  to
   modify what is published in the service manager, and they never will be
  able
   to.

   On Mon, Mar 16, 2009 at 8:47 PM, Seer gilligan.ch...@gmail.com wrote:

Is there a way to access this class in the SDK or is there another
class that does the same thing?  I need to rename one of the services
listed in the servicemanager so that it will call my service instead
and then pass calls i don't handle onto the original service that i
have renamed.

   --
   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.  All such questions should be posted on public
   forums, where I and others can see and answer them.

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

 Note: please don't send private questions to me, as I don't have time to
 provide private support.  All such questions should be posted on public
 forums, where I and others can see and answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: can not call a java method from javascript using addJavascriptInterface()

2009-03-17 Thread Diego Torres Milano

You should call window.test.incr(100) instead.


--
Have you read my blog ?
http://dtmilano.blogspot.com


On Mar 17, 4:28 am, sherwin huang sherwin@gmail.com wrote:
 hi
 I'm trying to call a java method from javascript using
 addJavascriptInterface();
 but seems does not work, it always  display failure;
  java code:
  public class WebTest extends Activity {
     /** Called when the activity is first created. */
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);

         WebView webview = new WebView(this);
         webview.getSettings().setJavaScriptEnabled(true);

  webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
         webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
         webview.setClickable(true);
         TestJs ts = new TestJs();
         webview.addJavascriptInterface(ts, test);

         webview.loadUrl(file:///data/1.html);

         setContentView(webview);

     }}

  public class TestJs {

 public int incr(int num){
 return num+1;

 }
 }

 html:
 html
 head
 script type=text/javascript
 function loader() {
 document.write(begin);
 document.write(p);
 document.write(window.test);
 document.write(p);
  if(window.test){
 document.write(success);
 document.write(p);
 document.write(test.incr(100));}else{

 document.write(failure);
 document.write(p);

 }
 }

 /script
 /head
 body onload=loader()
 /body
 /html

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



[android-developers] Re: android.os.ServiceManager

2009-03-17 Thread Dianne Hackborn
Sorry I can't help you, I know about the framework but not the telephony
layer or individual apps like SMS.

On Tue, Mar 17, 2009 at 3:54 PM, Seer gilligan.ch...@gmail.com wrote:


 Dianne,
 Thanks for the reply. The problem is I am not sure there is not
 already an API for it.  That is what i am trying to find out but no
 one is really responding to say there is or there is not. I find it
 really strange that there would not be some way of hooking into the
 lower layers or to do what i am trying to do and that is why i keep
 asking but getting no responses.

 All i want for the min is someone in the know to tell me if it is
 possible or not to intercept outgoing sms so that i can redirect them
 over the internet instead of the gsm network. Writing your own sending
 app and having users use that does not work as most uses will reply to
 sms and the reply  part that sends the message is built into each sms
 client. The only place to intercept the sms is at a lower level than
 that as far as i can tell and it seems to me that anything on that
 level is not accessible.  That said i am only learning Android and
 that is why i am asking for help to see if there is any options or
 anything i have over looked. Maybe on i am on the wrong discussion
 group i don't know.  If i am can you point me to the correct one?

 I really want to do things correctly and not use hacks but i am having
 trouble trying to find info on the correct way to do this.

 Regards,

 Chris

 On Mar 18, 8:59 am, Dianne Hackborn hack...@android.com wrote:
  If there are features missing from the current system (such as an actual
 API
  for applications to integrate with the low-level telephony SMS layer),
 you
  can look at adding those to the platform and contributing patches to have
  the feature in a future version.  In that case, you can start a
 discussion
  on android-platform with the telephony and other engineers to come up
 with a
  design that everyone likes and will be accepted for the platform.
 
 
 
  On Mon, Mar 16, 2009 at 9:54 PM, Seer gilligan.ch...@gmail.com wrote:
 
   So if that is not the way you are meant to services such as alternate
   SMS gateways, what is?  Using intents will not work as most of the sms
   apps have the reply for a thread built in.  This is the only way i
   have been able to discover to capture all outgoing sms so i can either
   redirect them over the web or over the mobile network. I find it sort
   of strange that the developers of Android did not think that people
   would want to also use alternate networks and mediums to the gsm
   network for things like calls and sms.  With sms prices as high as
   they are in Australia the internet can be up to 5 times cheaper to
   send them and even with data costs that is still much cheaper.
 
   I know all apps are meant to be equal but some apps / services need to
   be able to do things on a much lower level or have intents or
   something for the lower level services of the phone as well.
 
   I am open to any ideas you have.
 
   On Mar 17, 3:31 pm, Dianne Hackborn hack...@android.com wrote:
You can't do this.  Especially from the SDK, on so many levels:
 
1. ServiceManager is not public.  The features it contains are not
   available
in the SDK.
2. None of the interfaces of the services published in the service
   manager
are published in the SDK, so you wouldn't be able to redefine them
   anyway.
3. And even if any of this were in the SDK, applications are not
 allowed
   to
modify what is published in the service manager, and they never will
 be
   able
to.
 
On Mon, Mar 16, 2009 at 8:47 PM, Seer gilligan.ch...@gmail.com
 wrote:
 
 Is there a way to access this class in the SDK or is there another
 class that does the same thing?  I need to rename one of the
 services
 listed in the servicemanager so that it will call my service
 instead
 and then pass calls i don't handle onto the original service that i
 have renamed.
 
--
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.  All such questions should be posted on
 public
forums, where I and others can see and answer them.
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support.  All such questions should be posted on public
  forums, where I and others can see and answer them.
 



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

Note: please don't send private questions to me, as I don't have time to
provide private support.  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 

  1   2   >