[android-developers] How to create world readable file

2009-06-02 Thread Mattaku Betsujin
I am trying to launch package installer to install an APK file that I have
already installed:

private void installApk(String file) {
Uri pkgUri = Uri.parse("file://" + file);
Intent intent = new Intent();
intent.setData(pkgUri);
intent.setClassName("com.android.packageinstaller",
"com.android.packageinstaller.PackageInstallerActivity");
startActivity(intent);
}
Now, this is all fishy, I know, depending on undocumented (?) behavior of
PackageInstallerActivity. My problem is I need to give a file that
PackageInstallerActivity can read.

I tried many things:

(1)
FileOutputStream fout = Context.openFileOutput("xxx.apk",
Context.MODE_WORLD_READABLE);

But this file is created in a directory /data/data//files, which is
mode drwx--, so other processes cannot read it.

(2)
File dir = Context.getDir("downloader", Context.MODE_WORLD_READABLE);

But there's no way for me to create a File inside the  with world
readable permission

(3) this one works, but is extremely convulsing:

SharedPreferences pref =
mReader.getSharedPreferences("nubi.apk",

Context.MODE_WORLD_READABLE);
SharedPreferences.Editor editor = pref.edit();
editor.putInt("text_size", 0);
editor.commit();
file = mReader.getFilesDir().getParent() +
"/shared_prefs/xxx.apk.xml";

I tried this, and I was actually able to invoke the PackageInstallerActivity
to install my APK file. I tested on cupcake and 1.0 emulator.

On well

I looked at the Browser, and it uses a permission

android.permission.ACCESS_DOWNLOAD_MANAGER

But this doesn't seem to be documented either. (See
http://groups.google.com/group/android-developers/browse_thread/thread/98f63d8bea48a34f
)

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

2009-06-02 Thread Honest

I read the docs for installing android plugin for eclipse. I did it
according to it and i have downloaded and installed the plugin but
after that when i cliced on Windows-prefrences i could not find
Android in left panel. What could be wrong in it ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Clarification on static variables

2009-06-02 Thread Peter Carpenter
Hi all,

 

We are currently porting some java code to work inside a service within
the Android framework.  However one thing I am still puzzling over is
the life cycle of an android application, activity, & service.

 

What I am currently thinking is this:

1.  An android "application" process is created  (The equivalent of
starting a jvm)
2.  An activitiy is loaded which will cause required classes to be
loaded, static initialisers run, and the same for all referenced classes
as the activity runs.
3.  The activity launches a service (more classes loaded & static
initialisers run)
4.  The service stops.
5.  The activity launches the service again. (static variables
remain as last left)
6.  The service stops.
7.  The activity stops  (static variables still remain as last left)
8.  ...
9.  ...
10. The activity starts (static variables still remain as last left)
11. the activity stops
12. ...
13. ...
14. The application is removed from memory by Anrdoid  (only now are
static variables killed)

 

And this is where my question lies...   What happens to the static
variables?  I would assume that because they are in the same "jvm"
effectively as the activity, that they continue to contain their
original values.  Furthermore, I am assuming that even if the the server
or activity is stopped - their respective classes with their static
variables will stay around in memory until Android decides to remove
them.  Meaning that a restart of a service does not guarantee a new set
of initialised static variables.

 

Unfortunately the code I'm porting includes lots of static references
that assumes an initial clean state and leaves the JVM to clear
everything as it's stopped and started. :-(

 

So is my thinking on the lifecycle correct?  If so what would be the way
forward?  Am I forced to pore over this code with a fine tooth comb and
ensure that the static variables are initialised correctly (LOTS of
work), or is there some kind of (dirty) shortcut that I can use that
will allow me to effectively unload the application (on activity exit?)
forcing the 'jvm' to reinitialise the static variables on next activity
startup?

 

Cheers,

 

Peter.


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



[android-developers] Re: Getting Current Location on my Device works on emulator but not on my device

2009-06-02 Thread iDeveloper

I removed the code from onProviderDisabled. Had some other code there  
initially (was getting location from network - but thats very  
inaccurate)
Also tried changing the 2000 to 2 but it doesn;t make a difference. I  
still can't get a fix.

Any help please?



On 02-Jun-09, at 4:03 PM, Mark Murphy wrote:

>
> iDeveloper wrote:
>> Hi
>>
>> This is what I tried based on the suggestions in the below chain mail
>>
>> MyLocationListener myListener = new MyLocationListener();
>> LocationManager myManager =
>> (LocationManager)getSystemService(LOCATION_SERVICE);
>> myManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,  
>> 2000, 0,
>> myListener);
>>
>> This is the LocationListener class
>>
>> public class MyLocationListener implements LocationListener {
>>
>>  private static double latitude;
>>  private static double longitude;
>>
>>
>>
>>  @Override
>>  public void onLocationChanged(Location arg0) {
>>latitude = arg0.getLatitude();
>>longitude = arg0.getLongitude();
>>  }
>>
>>  @Override
>>  public void onProviderDisabled(String provider) {
>>
>>
>>
>>LocationManager myManager =
>> (LocationManager)delegate.getSystemService(Context.LOCATION_SERVICE);
>>LocationProvider name = myManager.getProvider("gps");
>>if(name != null){
>>  Location lastGps = myManager.getLastKnownLocation("gps");
>>  if(lastGps == null){
>>latitude = 0.0;
>>longitude = 0.0;
>>  }
>>  else{
>>latitude = lastGps.getLatitude();
>>longitude = lastGps.getLongitude();
>>  }
>>}
>>  }
>
> Why are you attempting to connect to the system service in
> onProviderDisabled()?
>
>>
>>  @Override
>>  public void onProviderEnabled(String provider) {
>>  }
>>
>>  @Override
>>  public void onStatusChanged(String provider, int status, Bundle  
>> extras) {}
>>
>>  public static double getLatitude() {
>>return latitude;
>>  }
>>
>>  public static double getLongitude() {
>>return longitude;
>>  }
>>
>> }
>>
>> I waited for as long as 30 seconds but none of the listener methods  
>> were
>> called. I am testing on a G1 with 1.5 SDK.
>> Can someone please tell me whats wrong with the code? Thanks
>
>
>
>
> -- 
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Need help for your Android OSS project? http://wiki.andmob.org/hado
>
> >


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



[android-developers] Re: Writing widgets *without* persistent services

2009-06-02 Thread beekeeper

Marc --

Excellent.  I was indeed missing something obvious, and the solution
was much simpler than anything I was contemplating.  Many thanks for
pointing it out.

(I was somewhat familiar with the layout-land mechanism from my
readings, but hadn't realized that it was so automagic and all-
pervasive.  Now I know better.)

-Robert

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

2009-06-02 Thread Android Users
Hi,

This will help you.Pass in the source and destination points and you'll get
the directions.
Intent mapIntent = new Intent(Intent.ACTION_VIEW,
Uri.parse("http://maps.google.com/maps?f=d&saddr=
"+sourceLat+","+sourceLongt+"&daddr="+destLat+","+destLongt+""));
mapintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(mapIntent);


On Tue, Jun 2, 2009 at 8:39 PM, Tushar  wrote:

>
> Hi,
>
> We can launch default map application using the Intent specified at
> http://developer.android.com/guide/appendix/g-app-intents.html.
>
> This launches maps application for one specified location . Is there
> any way to inform the application to also draw directions between to
> geo points also ?
>
>
> Thanks ,
>
> Tushar
> >
>

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



[android-developers] Re: shut off shutter sound

2009-06-02 Thread Sheado

bump =)
still stuck.. i even tried:
((AudioManager)context.getSystemService
(Context.AUDIO_SERVICE)).unloadSoundEffects();
but no luck =(


On Jun 2, 9:57 am, "admin.androidsl...@googlemail.com"
 wrote:
> Curious about this I tried the free spy camera app on the market. I
> have Cupcake and it made no shutter sound, so I would say, good
> conspiracy theory but not true in this case.
>
> On Jun 2, 5:39 pm, ivan  wrote:
>
> > Foiled by the nanny state!
>
> > I feel like making a libertarian public service announcement!
>
> > On Jun 2, 9:59 am, Keith Wiley  wrote:
>
> > > I have absolutely no idea if I'm right about this, so this is pure
> > > speculation...but Google may have "hard-coded" a shutter sound to the
> > > camera due to security concerns about people taking surreptitious
> > > photos.  In other words, we're all stuck listening to stupid shutters
> > > sounds now because a few criminals and perverts behave badly and the
> > > powers-that-be think the best solution is assume that the entire
> > > population consists of criminals and must therefore be treated as
> > > such...
>
> > > ...but I ***readily admit*** that I could be completely wrong about
> > > that.  I have only looked at the camera UI a tiny bit so far, and that
> > > was before 1.5 anyway, so I'm really not up to speed on the current
> > > camera UI at all.
>
> > > I only mention it because I have heard of similar measures in other
> > > cases:http://www.opencongress.org/bill/111-h414/showhttp://www.thetechheral..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
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 start other activity by code

2009-06-02 Thread Augustin.CL

Thanks for your help.

I also find I could use the other method provided by Intent to achieve
my goal.
Here is the method.
 intent.setClassName(String packageName,String className);

We could replace the orginal one with the following.
 i.setClassName
("com.android.phone","com.android.phone.Settings");


On Jun 2, 8:31 pm, Mark Murphy  wrote:
> Augustin.CL wrote:
> > Dear all,
>
> >            I want to start the activity owned by other application. I
> > know we could construct the Intent(setAction,setClass), and then call
> > context.startActivity(intent) to start a new activity owned by the
> > same application. When we start the activity not owned by the same
> > application,doest this also work? For example, I have a activity
> > (com.test.StartTest) and there is a button that used to start some
> > activity Settings owned by the Phone:
>
> Try startActivity(Settings.ACTION_WIRELESS_SETTINGS) (substituting in
> the proper value for whatever setting screen you want).
>
> http://developer.android.com/reference/android/provider/Settings.html
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to run android source code in linux eclipse??

2009-06-02 Thread Akash Gupta

Correction:
*I m not talking about running android project in eclipse...

On Jun 3, 9:27 am, Akash Gupta  wrote:
> My friend...
> I m not about running android project in eclipse...
> I m talking about running google android source code and debugging it
> using eclipse in Ubuntu...
> I m using Eclipse Ganymede 3.4  and os is Ubuntu 7.10 Limo...
>
> On Jun 2, 10:31 pm, Mike Garcia  wrote:
>
> > It depends entirely on what version of linux and the version of eclipse that
> > it supports.  I run both WIndows 7/Eclipse 3.4, Fedora 10/Eclipse 3.4 and
> > Ubuntu 8.10/Eclipse 3.4 and each install was completely different.
> > Windows/Eclipse was by far the easiest to setup and is really just a matter
> > of following the instructions on the developers sitehttp://d.android.com
>
> > On Tue, Jun 2, 2009 at 4:40 AM, dark_messiah 
> > wrote:
>
> > > how to run android source code in linux eclipse??
>
> > --
> > Mike Garcia
>
> > There is no coincidence!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem with getChildCount method???

2009-06-02 Thread Akash Gupta

Thankyou my friend for helping
but Aaron i m not able to uderstand your tiplet me provide the
complete scenario...
MainActivity class is extending ListActivity class and i making use of
adapter which is subclass to BaseAdapter class...the data source is
String Array...
So i m not able to get point in putting ischecked field with very
string element???
Plz help...

On Jun 2, 8:37 pm, "Aaron D'Souza"  wrote:
> The solution to your problem is this:
>
> - You must have some backing array that stores the data that you
> populate the list with right? Add an "isChecked" field to each object
> in that array.
> - In your ListAdapter subclass where you generate the view for each
> item, use that field to figure out whether checkbox in the view should
> be rendered as checked.
> - In onOptionsItemSelected(), if you want to check every item, go to
> the *backing array*, and set the isChecked field for all items to
> "true". Then call notifyDataSetChanged() on your ListAdapter.
>
> Aaron
>
> On Jun 2, 12:12 am, dark_messiah  wrote:
>
> > @ Roman Guy
> > So whats the solution for my problem...i need to select all the views
> > in listview using checkbox...plz help
>
> > On Jun 2, 11:57 am, Romain Guy  wrote:
>
> > > No, the report is correct. The number of views in the ListView is
> > > different from the number of items in the adapter.
>
> > > On Mon, Jun 1, 2009 at 10:11 PM, dark_messiah
>
> > >  wrote:
>
> > > > No the the childcount i m getting is not correct...there are 12 views
> > > > in the listview..but the count i m getting is 8...
>
> > > > On Jun 2, 9:50 am, Marco Nelissen  wrote:
> > > >> On Mon, Jun 1, 2009 at 9:27 PM, dark_messiah 
> > > >> wrote:
>
> > > >> > I have problem...i m using a base adapter for binding a data from
> > > >> > array to listviewthe listview has a checkbox with it...i wanted 
> > > >> > to
> > > >> > create a menu to select all or deselect all view inside that
> > > >> > list...but the getchildCount method is behaving abnormally..i m not
> > > >> > able to get the correct child count...can anybody help me 
> > > >> > plz..???
>
> > > >> I'm pretty sure that the reported child count is correct. What value 
> > > >> is it
> > > >> reporting, and what value were you expecting?
>
> > > --
> > > 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: Writing widgets *without* persistent services

2009-06-02 Thread Marc Lester Tan
Hi,

You can add res/layout-land and put your landscape layout there.  So
basically you have res/layout for portrait and res/layout-land for landscape
layouts.

Marc


On Wed, Jun 3, 2009 at 12:57 PM, beekeeper  wrote:

>
> I'm trying to write a set of widgets and, in contrast to too many of
> the widgets being put on the market, I'm trying to actually conform to
> the widget design guidelines (http://developer.android.com/guide/
> practices/ui_guidelines/widget_design.html).
>  Unfortunately, in order
> to do this properly and look right, the widget needs to be able to
> instantly change layouts when the screen changes orientation from
> portrait to landscape.
>
> Thus far, the *only* way that I've found to detect and react to the
> orientation change is to keep a service running at all times with an
> "onConfigurationChanged" method that updates the widget in a timely
> manner.  Unfortunately, this leaves an expensive process constantly
> cluttering up memory and pretty much defeats the broadcast-based
> design of the widget mechanism.
>
> It seems that there's got to be a better (and more efficient) way to
> meet this basic requirement.  Am I missing something obvious?
>
> -Robert
>
>
> >
>

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



[android-developers] Writing widgets *without* persistent services

2009-06-02 Thread beekeeper

I'm trying to write a set of widgets and, in contrast to too many of
the widgets being put on the market, I'm trying to actually conform to
the widget design guidelines (http://developer.android.com/guide/
practices/ui_guidelines/widget_design.html).  Unfortunately, in order
to do this properly and look right, the widget needs to be able to
instantly change layouts when the screen changes orientation from
portrait to landscape.

Thus far, the *only* way that I've found to detect and react to the
orientation change is to keep a service running at all times with an
"onConfigurationChanged" method that updates the widget in a timely
manner.  Unfortunately, this leaves an expensive process constantly
cluttering up memory and pretty much defeats the broadcast-based
design of the widget mechanism.

It seems that there's got to be a better (and more efficient) way to
meet this basic requirement.  Am I missing something obvious?

-Robert


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



[android-developers] How to run the android application on G1

2009-06-02 Thread cindy

After I upgrade to 1.5, how can I run my application on gphone from
eclipse?

Thanks!

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

2009-06-02 Thread Akash Gupta

My friend...
I m not about running android project in eclipse...
I m talking about running google android source code and debugging it
using eclipse in Ubuntu...
I m using Eclipse Ganymede 3.4  and os is Ubuntu 7.10 Limo...


On Jun 2, 10:31 pm, Mike Garcia  wrote:
> It depends entirely on what version of linux and the version of eclipse that
> it supports.  I run both WIndows 7/Eclipse 3.4, Fedora 10/Eclipse 3.4 and
> Ubuntu 8.10/Eclipse 3.4 and each install was completely different.
> Windows/Eclipse was by far the easiest to setup and is really just a matter
> of following the instructions on the developers sitehttp://d.android.com
>
> On Tue, Jun 2, 2009 at 4:40 AM, dark_messiah 
> wrote:
>
>
>
> > how to run android source code in linux eclipse??
>
> --
> Mike Garcia
>
> There is no coincidence!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Why can "Maps" find a location on demand but not my app

2009-06-02 Thread Numan Ahmed
--- On wed, 6/3/09, numan <> wrote:

hello my friend how are u
latest summer fashion hot fashion videos
visit my website http://www.fashioninfokit.com/

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



[android-developers] Re: Android Market Data

2009-06-02 Thread Numan Ahmed
--- On wed, 6/3/09, numan <> wrote:

hello my friend how are u
latest summer fashion hot fashion videos
visit my website http://www.fashioninfokit.com/

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



[android-developers] Re: Handling volume controls

2009-06-02 Thread Numan Ahmed
--- On wed, 6/3/09, numan <> wrote:

hello my friend how are u
latest summer fashion hot fashion videos
visit my website http://www.fashioninfokit.com/

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



[android-developers] Re: setText for EditText is not working in 1.5

2009-06-02 Thread cindy

 After I switch the sequence of 2 lines, it is working.

mEditText = (EditText)findViewById(R.id.text_edit);
mEditText.setText("123456");
mEditText.addTextChangedListener(new TextContentWatcher());


On Jun 2, 12:11 pm, "Mark Murphy"  wrote:
> > There is no problem with addTextChangedListener. As long as I
> > commented out mEditText.setText("123456"), it is working.
>
> What does your stack trace tell you?
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ADC 2 Partners

2009-06-02 Thread Muthu Ramadoss
Hiya folks,

Looking for people to work as a team, for ADC2. I have a Social Networking
idea and would need expert server developers to build the social network.
Drop me a line if you are looking for working as a team for ADC2.

NOTE: We work towards a share on the winnings, so don't expect to get paid
upfront :)

take care,
Muthu Ramadoss.

http://groups.google.com/group/adc-2 - ADC2 Freaks!
http://linkedin.com/in/tellibitz
http://androidrocks.googlecode.com - Android Consulting.

Sent from Chennai, TN, India
George Bernard 
Shaw
- "A government that robs Peter to pay Paul can always depend on the
support of Paul."

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
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 way for us to show ProgressBarIndeterminate in Theme.Dialog activity?

2009-06-02 Thread Numan Ahmed
--- On wed, 6/3/09, numan <> wrote:

hello my friend how are u
latest summer fashion hot fashion videos
visit my website http://www.fashioninfokit.com/

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



[android-developers] Re: My good god, bugs in Android brick phone, and it's not difficult to reproduce...

2009-06-02 Thread Numan Ahmed
--- On wed, 6/3/09, numan <> wrote:

hello my friend how are u
latest summer fashion hot fashion videos
visit my website http://www.fashioninfokit.com/

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



[android-developers] Re: Detect Physical Keyboard Layout (ex: QWERTY vs QWERTZ)

2009-06-02 Thread Numan Ahmed
--- On wed, 6/3/09, numan <> wrote:

hello my friend how are u
latest summer fashion hot fashion videos
visit my website http://www.fashioninfokit.com/

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



[android-developers] Re: Enhanced Sensor API

2009-06-02 Thread Numan Ahmed
--- On wed, 6/3/09, numan <> wrote:

hello my friend how are u
latest summer fashion hot fashion videos
visit my website http://www.fashioninfokit.com/

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



[android-developers] Re: Database Pattern - What's your method?

2009-06-02 Thread Numan Ahmed
--- On wed, 6/3/09, numan <> wrote:

hello my friend how are u
latest summer fashion hot fashion videos
visit my website http://www.fashioninfokit.com/

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



[android-developers] Re: How to get just updated screen data instead of reading all data from framebuffer?

2009-06-02 Thread Numan Ahmed
--- On wed, 6/3/09, numan <> wrote:

hello my friend how are u
latest summer fashion hot fashion videos
visit my website http://www.fashioninfokit.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 to get just updated screen data instead of reading all data from framebuffer?

2009-06-02 Thread Ruiming Li
any help?


On Wed, Jun 3, 2009 at 10:33 AM, Ruiming Li wrote:

> Hi experts,
>
> I just  want to capture the updated screen data instead of  reading all
> data from framebuffer.
> Can I get this data by what method?
>
> Thanks!
>
> Robert.
>
>

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



[android-developers] Detect Physical Keyboard Layout (ex: QWERTY vs QWERTZ)

2009-06-02 Thread csvy

Is there any way to determine the layout of a physical keyboard (if
there is one)?
I would like to map commands to keyboard keys if there is a hardware
keyboard available, but the layout is very important.  I have had
users from Germany complaining that layout is not optimized for their
phones (since the Y and Z keys are swapped).  Is there any way to
automatically detect this, or am I stuck making it a setting?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Database Pattern - What's your method?

2009-06-02 Thread hina naz
* **visit my site and earn more money**  *

*  http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/**  *

* http://latesttechnologyinfo.com/*

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



[android-developers] Re: Key down events on answer and end call not working anymore in cupcake

2009-06-02 Thread hina naz
* **visit my site and earn more money**  *

*  http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/**  *

* http://latesttechnologyinfo.com/*

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



[android-developers] Re: Radio's Colorthon Tutorial Now Available on YouTube

2009-06-02 Thread hina naz
* **visit my site and earn more money**  *

*  http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/**  *

* http://latesttechnologyinfo.com/*

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



[android-developers] Re: Enhanced Sensor API

2009-06-02 Thread hina naz
* **visit my site and earn more money**  *

*  http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/**  *

* http://latesttechnologyinfo.com/*

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



[android-developers] Re: My good god, bugs in Android brick phone, and it's not difficult to reproduce...

2009-06-02 Thread hina naz
* **visit my site and earn more money**  *

*  http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/**  *

* http://latesttechnologyinfo.com/*

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



[android-developers] Re: Is there a way for us to show ProgressBarIndeterminate in Theme.Dialog activity?

2009-06-02 Thread hina naz
* **visit my site and earn more money**  *

*  http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/**  *

* http://latesttechnologyinfo.com/*

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



[android-developers] Re: Handling volume controls

2009-06-02 Thread hina naz
* **visit my site and earn more money**  *

*  http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/**  *

* http://latesttechnologyinfo.com/*

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



[android-developers] Re: Why can "Maps" find a location on demand but not my app

2009-06-02 Thread hina naz
* **visit my site and earn more money**  *

*  http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/**  *

* http://latesttechnologyinfo.com/*

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



[android-developers] Re: How to get just updated screen data instead of reading all data from framebuffer?

2009-06-02 Thread hina naz
* **visit my site and earn more money**  *

*  http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/**  *

* http://latesttechnologyinfo.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 to get just updated screen data instead of reading all data from framebuffer?

2009-06-02 Thread Ruiming Li
Hi experts,

I just  want to capture the updated screen data instead of  reading all
data from framebuffer.
Can I get this data by what method?

Thanks!

Robert.

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



[android-developers] Re: EditText linkfy?

2009-06-02 Thread hina naz
* **visit my site and earn more money**  *

*  http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/**  *

* http://latesttechnologyinfo.com/*

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



[android-developers] Re: Why can "Maps" find a location on demand but not my app

2009-06-02 Thread pawpaw17

Mark,

Thanks for the reply. I need to serach harder for blog posts with
"working" code, I've
been reading posts that complain about problems :)

Here's what I do:

// Favor the network location source

String bestProvider = null;
if (locationManager.isProviderEnabled("network")){
   bestProvider = "network";
}
else if (locationManager.isProviderEnabled("gps")){
   bestProvider = "gps";
}
else{
  bestProvider = null;
  locationDisabled = true;
  lastlocation = null;
return;
}

try{

  myLocationListener = new LocationListener(){
  public void onLocationChanged(Location location){
 if (location != null){
lastlocation = location;
 }
  }
  public void onProviderDisabled(String provider){
locationDisabled = true;
lastlocation = null;
   if (locationManager != null && myLocationListener != null){
  locationManager.removeUpdates(myLocationListener);
   }
   myLocationListener = null;
  }

  public void onStatusChanged(String provider, int status, Bundle
extras)
  {
 // 0 means the provider is out of service
if (0 == status){
  locationDisabled = true;
  lastlocation = null;
  if (locationManager != null && myLocationListener != null){
 locationManager.removeUpdates(myLocationListener);
  }
  myLocationListener = null;
}
   else{
 locationDisabled = false;
   }
   }
   public void onProviderEnabled(String arg0) {
   locationDisabled = false;
   }
   };
locationDisabled = false;
locationManager.requestLocationUpdates(bestProvider, 5000, 0,
myLocationListener);
}
catch(Exception e)
{
};

}

I call this code again whever the location provider "goes away."

Thanks for the suggestions about debugging. Will give it a go.











On Jun 2, 8:42 pm, Mark Murphy  wrote:
> pawpaw17 wrote:
> > In my activities onCreate method I start listening for location
> > updates as follows:
>
> > locationManager.requestLocationUpdates(bestProvider, 5000, 0,
> > myLocationListener);
>
> > Previously I used 60,000 ms instead of 5,000 ms.
>
> > The problem is that I have trouble getting the first update.
>
> > public void onLocationChanged(Location location){
> > if (location != null){
> > lastlocation = location;
> > }
> > }
>
> > onLocationChanged doesn't get called.
>
> > Now, if I switch to Maps and find the current location there, then
> > switch back to
> > my app, I finally get the onLocatinoChanged method to fire.
>
> > This whole location changed stuff seems rinky in Android. Is there a
> > way to
> > more directly insist that the Location hardware do it's thing?
>
> You assume the existence of location hardware. Not all devices will have
> location hardware (a.k.a., GPS).
>
> > Any help would be very much appreciated.
>
> 1. What location provider are you attempting to use?
>
> 2. Does LogCat tell you anything? You can examine this via adb logcat,
> DDMS, or the DDMS perspective in Eclipse.
>
> 3. Have you tried any location code that is known to work (e.g., from a
> blog post)?
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android App Developer Training:http://commonsware.com/training.html- 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] EditText linkfy?

2009-06-02 Thread quill

Hi all,
I put "http://www.google.com\";>link to google " in my
edittext, When I click "link to google", it works well. But I can't
edit my text. If I click other place of the text, the application
crushed. Why? How to correct this?

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: Handling volume controls

2009-06-02 Thread Josh Dobbs
let me also add that for some reason even when the sound is playing and you
press the hardware volume keys nothing happens. the volume does not change
and the volume indidcator does not appear on  the screen.

On Sun, May 24, 2009 at 4:19 PM, Josh  wrote:

>
> Im using a mediaPlayer to play sounds in my application. I want the
> user to be able to adjust the volume by using the hardware buttons on
> the device. I tried putting this in my oncreate (setVolumeControlStream
> (AudioManager.STREAM_MUSIC);) but it didnt seem to work. Is there
> something else I have to do to allow the user to be able to adjust the
> volume?
> >
>

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



[android-developers] Re: Handling volume controls

2009-06-02 Thread Josh Dobbs
can anyone help me with this?

On Sun, May 24, 2009 at 4:19 PM, Josh  wrote:

>
> Im using a mediaPlayer to play sounds in my application. I want the
> user to be able to adjust the volume by using the hardware buttons on
> the device. I tried putting this in my oncreate (setVolumeControlStream
> (AudioManager.STREAM_MUSIC);) but it didnt seem to work. Is there
> something else I have to do to allow the user to be able to adjust the
> volume?
> >
>

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



[android-developers] Re: Light theme doen't work properly in 1.5 SDK

2009-06-02 Thread hina naz
* **visit my site and earn more money**  *

*  http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/**  *

* http://latesttechnologyinfo.com/*

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



[android-developers] Re: Don't understand how to use SurfaceView for my game, have it working with nomrla View.

2009-06-02 Thread hina naz
* **visit my site and earn more money**  *

*  http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/**  *

* http://latesttechnologyinfo.com/*

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



[android-developers] Re: Is there a way for us to show ProgressBarIndeterminate in Theme.Dialog activity?

2009-06-02 Thread Mark Murphy

Billy Cui wrote:
> Anybody here?

No, we're not here. ;-)

> On 6月2日, 下午5时21分, Billy Cui  wrote:
>> I make android:theme="@android:style/Theme.Dialog" for an Activity.
>>
>> And then add these 2 lines in onCreate:
>>  requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
>>  setProgressBarIndeterminateVisibility(true);
>>
>> But find them not function.
>>
>> Is there a way to make them function?

If I had to guess, and this is just a guess, the window feature you want
is incompatible with the theme you want.

Do you have any examples of an application using a dialog theme window
that is using an indeterminate progress bar in the dialog title?

Have you considered putting your own ProgressBar in the body of your
activity, rather than in the title?

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

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

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



[android-developers] Re: How to add Google Maps library, Maps to the Android 1.5 version device?

2009-06-02 Thread hina naz
* **visit my site and earn more money**  *

*  http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/**  *

* http://latesttechnologyinfo.com/*

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



[android-developers] Re: Why can "Maps" find a location on demand but not my app

2009-06-02 Thread hina naz
* **visit my site and earn more money**  *

*  http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/**  *

* http://latesttechnologyinfo.com/*

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



[android-developers] Re: Is there a way for us to show ProgressBarIndeterminate in Theme.Dialog activity?

2009-06-02 Thread Billy Cui

Anybody here?

On 6月2日, 下午5时21分, Billy Cui  wrote:
> I make android:theme="@android:style/Theme.Dialog" for an Activity.
>
> And then add these 2 lines in onCreate:
>  requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
>  setProgressBarIndeterminateVisibility(true);
>
> But find them not function.
>
> Is there a way to make them function?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: no way to scroll through AutoCompleteTextView in landscape with onscreen keyboard

2009-06-02 Thread hina naz
*visit my site and earn more money**  *

*  http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/**  *

* http://latesttechnologyinfo.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] no way to scroll through AutoCompleteTextView in landscape with onscreen keyboard

2009-06-02 Thread Ty

Is this possible?  Lets say I have an ACTV that shows you a list of
contacts.  If I place a T in the ACTV then it may generate a result of
10 contacts. In landscape mode (physical keyboard not open but phone
turned sideways), the dropdown list gets covered by the onscreen
keyboard.  This will generate completion hints at the top of the
keyboard.  But these hints do not cover all of the data behind the
ACTV.  There is no way for the user to scroll through the entire list
to see all of the data.

There should be someway to force the ACTV to scroll as I move through
the onscreen completion hints.  This would be an acceptable
replacement of the ACTV list.  There does not seem to be any such
association.

Also, there does not seem to be any public association between the
completion hints and your ACTV adapter.  Currently, the only way that
I know of matching a view(custom and holds data such as phone #, etc)
referenced by my ACTV adapter is to do a match on the text placed in
the ACTV when selected from the completion hint.

I am posting here as the 
http://groups.google.com/group/android-developers/browse_frm/thread/59cab6045bf5dfe2
thread appears to be dead.

Ty

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



[android-developers] Re: Why can "Maps" find a location on demand but not my app

2009-06-02 Thread Mark Murphy

pawpaw17 wrote:
> In my activities onCreate method I start listening for location
> updates as follows:
> 
> locationManager.requestLocationUpdates(bestProvider, 5000, 0,
> myLocationListener);
> 
> Previously I used 60,000 ms instead of 5,000 ms.
> 
> The problem is that I have trouble getting the first update.
> 
> public void onLocationChanged(Location location){
> if (location != null){
> lastlocation = location;
> }
> }
> 
> onLocationChanged doesn't get called.
> 
> Now, if I switch to Maps and find the current location there, then
> switch back to
> my app, I finally get the onLocatinoChanged method to fire.
> 
> This whole location changed stuff seems rinky in Android. Is there a
> way to
> more directly insist that the Location hardware do it's thing?

You assume the existence of location hardware. Not all devices will have
location hardware (a.k.a., GPS).

> Any help would be very much appreciated.

1. What location provider are you attempting to use?

2. Does LogCat tell you anything? You can examine this via adb logcat,
DDMS, or the DDMS perspective in Eclipse.

3. Have you tried any location code that is known to work (e.g., from a
blog post)?

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

Android App Developer Training: http://commonsware.com/training.html

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



[android-developers] Re: My good god, bugs in Android brick phone, and it's not difficult to reproduce...

2009-06-02 Thread Blake B.

I have not installed any system builds other than those pushed by T-
Mobile OTA.  So, 1.5 was the first update since 1.1.  The OS is
completely stock, non-rooted.

I have both aHome and dxTop desktops installed, and have developed
widgets that support both of those desktops, pre-Cupcake.  However, I
have NOT developed any 1.5-compatible widget yet, so would be suprised
if this affected the Android system, unless these desktops are somehow
updated a widget list/registry that is shared by the Android default
desktop?  I haven't heard of such a thing, but then, I haven't had a
chance to dig into the 1.5 release much yet.

Blake

On Jun 2, 3:22 pm, Jeff Sharkey  wrote:
> When you saw this error, was it a direct upgrade from the last-OTA'ed
> release, or had you installed other builds in the meantime without
> wiping data?  I think there was an obscure bug if you somehow had
> allocated, but unmanaged, appWidgetIds.
>
> j
>
>
>
>
>
> On Tue, Jun 2, 2009 at 5:19 AM, Blake B.  wrote:
>
> > Any update on this?  I'm encountering the samecrashand would rather
> > not wipe my phone if I don't have to.  Safe mode does not work.  Phone
> > (stock G1) just keeps cycling at the Android logo image and I have to
> > pull the battery to kill it.
>
> > I received theCupcakeOTA update on Saturday, and yesterday (Monday)
> > was the first time I rebooted the phone after the update.  So, I've
> > never had a successful reboot withCupcake.  The offending call is in
> > com.android.server.AppWidgetService.readStateFromFileLocked
> > (AppWidgetService.java:972), getting IndexOutOfBoundsException.
>
> > (BTW, great work onCupcake.  er except for this of course.   :-)
>
> > My stacktrace is the same as AndroidApp's:
>
> > 
> > 06-01 22:14:51.893: VERBOSE/WifiStateTracker(62): Connection to
> > supplicant established, state=SCANNING
> > 06-01 22:14:51.903: VERBOSE/WifiStateTracker(62): Changing supplicant
> > state: SCANNING ==> SCANNING
> > 06-01 22:14:51.913: INFO/SystemServer(62): Starting Location Manager.
> > 06-01 22:14:51.943: DEBUG/GpsLocationProvider(62): enable
> > 06-01 22:14:51.953: VERBOSE/WifiMonitor(62): Event [Trying to
> > associate with 00:1d:5a:d4:eb:d9 (SSID='2WIRE456' freq=2412 MHz)]
> > 06-01 22:14:51.953: VERBOSE/WifiMonitor(62): Event [CTRL-EVENT-STATE-
> > CHANGE id=-1 state=3]
> > 06-01 22:14:51.953: VERBOSE/WifiStateTracker(62): Changing supplicant
> > state: SCANNING ==> ASSOCIATING
> > 06-01 22:14:51.963: DEBUG/GpsLocationProvider(62): GpsEventThread
> > starting
> > 06-01 22:14:51.973: DEBUG/GpsLocationProvider(62): NetworkThread
> > starting
> > 06-01 22:14:51.973: DEBUG/GpsLocationProvider(62): NetworkThread wait
> > for network
> > 06-01 22:14:51.993: INFO/SystemServer(62): Starting Search Service.
> > 06-01 22:14:52.003: INFO/SystemServer(62): Starting Checkin Service.
> > 06-01 22:14:52.003: INFO/SystemServer(62): Starting Wallpaper Service
> > 06-01 22:14:52.013: DEBUG/WallpaperService(62): WallpaperService
> > startup
> > 06-01 22:14:52.023: INFO/SystemServer(62): Starting Audio Service
> > 06-01 22:14:52.083: DEBUG/AudioHardwareMSM72XX(35): setVoiceVolume
> > (0.60)
> > 06-01 22:14:52.083: INFO/AudioHardwareMSM72XX(35): Setting in-call
> > volume to 3 (available range is 0 to 5)
> > 06-01 22:14:52.163: DEBUG/AudioHardwareMSM72XX(35): setVoiceVolume
> > (1.00)
> > 06-01 22:14:52.163: INFO/AudioHardwareMSM72XX(35): Setting in-call
> > volume to 5 (available range is 0 to 5)
> > 06-01 22:14:52.183: DEBUG/dalvikvm(62): Trying to load lib /system/lib/
> > libsoundpool.so 0x0
> > 06-01 22:14:52.203: DEBUG/dalvikvm(62): Added shared lib /system/lib/
> > libsoundpool.so 0x0
> > 06-01 22:14:52.233: INFO/SystemServer(62): Starting HeadsetObserver
> > 06-01 22:14:52.293: INFO/SystemServer(62): Starting AppWidget Service
> > 06-01 22:14:52.763: DEBUG/dalvikvm(62): GC freed 4358 objects / 252408
> > bytes in 417ms
> > 06-01 22:14:52.883: INFO/WindowManager(62): Menu key state: 0
> > safeMode=false
> > 06-01 22:14:52.913: INFO/WindowManager(62): Config changed:
> > { scale=1.0 imsi=0/0 locale=en_US touch=3 key=2/1/1 nav=3 orien=1 }
> > 06-01 22:14:52.943: DEBUG/PowerManagerService(62): system ready!
> > 06-01 22:14:52.963: WARN/ResourceType(62): No package identifier when
> > getting value for resource number 0x7f03
> > 06-01 22:14:52.983: WARN/ResourceType(62): No package identifier when
> > getting value for resource number 0x7f03000c
> > 06-01 22:14:52.993: WARN/ResourceType(62): No package identifier when
> > getting value for resource number 0x7f03
> > 06-01 22:14:53.003: WARN/ResourceType(62): No package identifier when
> > getting value for resource number 0x7f030003
> > 06-01 22:14:53.253: DEBUG/dalvikvm(62): GC freed 2153 objects / 118592
> > bytes in 235ms
> > 06-01 22:14:53.263: WARN/dalvikvm(62): threadid=13: thread exiting
> > with uncaught exception (group=0x4000fe70)
> > 06-01 22:14:53.273: ERROR/AndroidRuntime(62): Uncaught handler: thread
> > android.server.ServerThread ex

[android-developers] Don't understand how to use SurfaceView for my game, have it working with nomrla View.

2009-06-02 Thread klirr

Problems with using SurfaceView, I don't understand how to draw to it.
It has to be done manually? How?



package com.android.WWS;

import android.app.Activity;
import android.content.Context;
import android.graphics.*;
import android.os.Bundle;
import android.view.SurfaceView;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnKeyListener;

public class WWS extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(new GameView(this));
}

private static class GameView extends SurfaceView implements
OnKeyListener {
private Paint mPaint = new Paint();
private int x;
private int y;

public GameView(Context context) {
super(context);
x = 135;
y = 303;
setFocusable(true);
requestFocus();
}

@Override
public void onDraw(Canvas canvas) {
Paint paint = mPaint;
canvas.translate(10, 10);
canvas.drawColor(Color.rgb(184,134,11));
paint.setColor(Color.rgb(107,142,35));
paint.setStrokeWidth(1);
canvas.drawRect(x, y, x+30, y+7, paint);
canvas.drawRect(x+10, y+7, x+20, y+27, paint);
canvas.drawRect(x+5, y+27, x+25, y+32, paint);
}

public boolean onKey(View v, int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_DPAD_UP) {
y -= 3;
} else if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) {
x -= 3;
} else if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) {
y += 3;
} else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) {
x += 3;
}
return true;
}

}

}


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



[android-developers] Enhanced Sensor API

2009-06-02 Thread RickB

I had a discussion with a few of the Android team member at Google IO,
and I'd like to throw the idea out here for general brainstorming with
the community.

My view is that it is not a good approach to create "sensor-specific"
APIs with iterative releases of the Android platform and SDK's.  By
this, I mean that instead of adding a "location API", and an
"accelerometer API", and whatever comes next, we should create a
"generic" sensor API that can work with a broad range of sensor types,
including sensor configuration, demand read/write/configuration, event
notifications, and other functions.  In this way, 3rd parties could
also add innovative sensing capabilities (or external sensors) to
their Android devices which would be "instantly" supported by the
platform.  Well-known sensor such as geolocation and acceleration
could have agreed-to sensor names/namespaces, with full extensibility
for additional sensor types.

As an example, geolocation as a 2D longitude/latitude is fine for some
apps, but for "inside the building" applications or for other apps
involving the need to accurate location of people or resources in 3
dimensions, it doesn't cut it.  Additionally, one can easily envision
inclusion of RFID, environmental, and other sensors in devices that
could dramatically enhance the capabilities of Android applications.

I welcome your thoughts and comments!

Rick

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



[android-developers] Radio's Colorthon Tutorial Now Available on YouTube

2009-06-02 Thread radiolistener

Hi All,

I just finished my fourth video, of the Colorthon Video Tutorial.
It's a basic tutorial that explains how you can set shared preferences
and layout manipulation.  This will enable you to allow the users of
your application to customize the look and feel  of the application.
In this instance it's the colors.  It allows users to pick from 64
different collors on six different settings.

There are 4, 10 minute video in the series.  The source code I will be
putting on my web site, radiolistenersElectricEasel.com, as soon as I
get a chance to.  This is my way of giving back to the community.

Feedback is always appreciated,
radioliste...@radiolistenerselectriceasel.com

The YouTube link is: http://www.youtube.com/view_play_list?p=A4FF04A11E7C4FE5
And they will also be embedded into my web site where I'll put the
source code, under Apache License.

Thanks,

John Leone
AKA Radiolistener


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



[android-developers] Re: Database Pattern - What's your method?

2009-06-02 Thread Mark Murphy

Gavin Aiken wrote:
> Do you close a database after each query? 

No, I close the database when the component holding the connection
closes (e.g., onDestroy()). AFAIK, SQLite database connections are
cheap, in terms of the RAM they consume.

> Do you close the cursor inside
> a method 'close()' of FilterDBHelper that also closes the cursor?

I close the Cursor once I'm done with it, though I tend not to use a
SQLiteOpenHelper for that role.

But, that's just me.

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

Android App Developer Training: http://commonsware.com/training.html

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



[android-developers] Re: SoftHashMap implementation - For use as a Cache of thumbnails

2009-06-02 Thread Mark Murphy

Gavin Aiken wrote:
> Just in case you thought I was being cheeky and passing this off as my
> own, his name with a link is right at the top of the source :).

Oh, no, no, no. It was more that I was doing some Google searching and
stumbled across the newer edition.

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

Android App Developer Training: http://commonsware.com/training.html

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



[android-developers] Why can "Maps" find a location on demand but not my app

2009-06-02 Thread pawpaw17

In my activities onCreate method I start listening for location
updates as follows:

locationManager.requestLocationUpdates(bestProvider, 5000, 0,
myLocationListener);

Previously I used 60,000 ms instead of 5,000 ms.

The problem is that I have trouble getting the first update.

public void onLocationChanged(Location location){
if (location != null){
lastlocation = location;
}
}

onLocationChanged doesn't get called.

Now, if I switch to Maps and find the current location there, then
switch back to
my app, I finally get the onLocatinoChanged method to fire.

This whole location changed stuff seems rinky in Android. Is there a
way to
more directly insist that the Location hardware do it's thing?

Any help would be very much appreciated.

Best,

pawpaw17

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

2009-06-02 Thread Subba

Thanks. I was able to install Maps library and Maps application in my
device.



On Jun 1, 6:27 pm, XC He  wrote:
> Try adb remount
>
> XC He
> 2009/6/2 Subba 
>
>
>
> > I extracted com.google.android.map.jar and com.google.android.map.xml
> > and Map.apk files from the another development device which has google
> > maps in it.
>
> > I started with following procedure..
>
> > 1. adb -d shell
>
> > 2. # mount -o rw -t yaffs2 /dev/block/mtdblock3 /system
> > mount -o rw -t yaffs2 /dev/block/mtdblock3 /system
> > mount: Device or resource busy
>
> > I can't copy the above files to the /system/framework/ , /system/etc/
> > permissions/ , and /system/app to these directories.
>
> > C:\>adb -d push C:\GoogleMAPS\Maps.apk /system/framework/
> > failed to copy 'C:\GoogleMAPS\Maps.apk' to '/system/framework//
> > Maps.apk': Read-only file system
>
> > Is there any way to change the system image to Read write mode.?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SoftHashMap implementation - For use as a Cache of thumbnails

2009-06-02 Thread Gavin Aiken
Hi Mark,

Thanks so much for the pointer. It is indeed from the newsletter you
mentioned, I shall be signing up too I think.

Just in case you thought I was being cheeky and passing this off as my own,
his name with a link is right at the top of the source :).

Thanks again,

Gavin

On Tue, Jun 2, 2009 at 11:31 PM, Mark Murphy wrote:

>
> > Can you let me know if there is a better way of doint this, any errors in
> > my
> > design (Essentially lifted from
> > DevX >),
> > especially with respect to any differences in Dalvik or bonus classes in
> > the
> > SDK which render it useless.
>
> I think that is based on Dr. Heinz' original article (newsletter #15). He
> revised it for Java5 in newsletter #98:
>
> http://www.javaspecialists.eu/archive/Issue098.html
>
> A quick read of #98 suggests there are some memory leaks in his
> implementation of #15, so you might want to double-check which one yours
> is based upon.
>
> I do need to re-susbscribe to his newsletter sometime...
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>
>
>
> >
>

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



[android-developers] Database Pattern - What's your method?

2009-06-02 Thread Gavin Aiken
Hi All,

I was wondering if you could shed any light on the pattern you use for your
database connections.

I have a class;


public class FilterDBHelper extends SQLiteOpenHelper{...}

With a method;

public Cursor getFilterNodes(int _id) {...}

That returns a cursor.

The activity then takes care of closing the cursor but how is it that I
close the database at the appropriate time? I presume I must wait until
after the cursor has been closed to close the database.

Do you close a database after each query? Do you close the cursor inside a
method 'close()' of FilterDBHelper that also closes the cursor?

Any advice or links to source would be greatly appreciated.

Kind regards,

Gavin

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



[android-developers] Android Market Data

2009-06-02 Thread SizzlingSkizzorsProgrammer

Hi!

I was wondering if there is a way that I could access the market data
from Google's (android's) servers, in a similar fashion to Cyrket.com
(such as an open web service, etc)

This would definitely increase the market's potential and usability,
and I was wondering how I could go about getting that data, since
cyrket obviously has a way.

Thanks!

PS:  I don't want a link to cyrket, I want a way to get this data on
my own (rss feeds, web service, etc from 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: Light theme doen't work properly in 1.5 SDK

2009-06-02 Thread jacek

So what EXACTLY did you do as the working workaround?

PS. I am surprised that the Googlers (Romain, Jeff) did not
close this topic with a workaround before the bug gets fixed in trunk.

On May 5, 11:41 pm, havexz  wrote:
> Got a workaround by explicitly setting the background forscrollview.
> But any ways theLightthemehas some other issues also. For example
> in 1.1, the preferences doesnt work properly withlightthemeand in
> 1.5 preferences work fine but if you have a alert dialog with multiple
> items (check boxes), then text with the check boxes rendered white on
> white background (making them invisible). Someone really have to fix
> thelighttheme.
>
> PS: Jeff please confirm that there is an issue withlighttheme, if
> you are able to reproduce the bug?
>
> Thanks to all ..for reply
>
> On May 4, 9:51 pm, Jeff Sharkey  wrote:
>
> > Are you calling setTheme() /before/ setContentView()?  Inflating the
> > content will use the currentthemein effect at that time.
>
> > j
>
> > On Mon, May 4, 2009 at 7:43 PM, havexz  wrote:
>
> > > Hi Jeff
>
> > > Got any solution.or find what the problem is with 1.5? Thanks in
> > > advance.
>
> > > On Apr 28, 10:29 pm, Jeff Sharkey  wrote:
> > >> Hmm wait, that wouldn't explain the background colors.  Are you
> > >> setting thethemefrom the android:themeattribute in your manifest,
> > >> or in onCreate() somewhere?
>
> > >> j
>
> > >> On Tue, Apr 28, 2009 at 8:27 PM, Jeff Sharkey  
> > >> wrote:
> > >> > That's because you're probably looking to use textColorPrimaryInverse. 
> > >> >  ;)
>
> > >> > j
>
> > >> > On Tue, Apr 28, 2009 at 7:18 PM, havexz  
> > >> > wrote:
>
> > >> >> Thats right what I am trying to say is that when I apply whitetheme
> > >> >> then the text views become black. I mean the text become black but the
> > >> >> background also remains black. But this wont happen with the list
> > >> >> view. So do i have to explicitly set the color of the background for
> > >> >> the them. Currently I am not setting any background. Here is what I am
> > >> >> doing : this is the xml for Activity
>
> > >> >> http://schemas.android.com/apk/res/
> > >> >> android"
> > >> >>        android:layout_height="fill_parent"
> > >> >> android:layout_width="fill_parent"
> > >> >>        android:orientation="vertical" android:id="@+id/view_xyz">
>
> > >> >>         > >> >>                android:layout_height="wrap_content" 
> > >> >> android:layout_weight="1"
> > >> >>                android:layout_width="fill_parent">
>
> > >> >>                 > >> >>                        android:layout_width="wrap_content"
> > >> >> android:layout_height="wrap_content">
> > >> >>                         > >> >>                                android:layout_width="fill_parent" 
> > >> >> android:text="@string/title"
> > >> >>                                
> > >> >> android:gravity="center_vertical|center_horizontal" android:id="@
> > >> >> +id/title_text"
> > >> >>                                android:textSize="10pt" 
> > >> >> android:textColor="?android:attr/
> > >> >> textColorPrimary">
> > >> >>                         > >> >>                                android:layout_height="wrap_content" 
> > >> >> android:id="@+id/xyz_text"
> > >> >>                                android:layout_below="@+id/title_text" 
> > >> >> android:text="@string/
> > >> >> xyz_text_string"
> > >> >>                                android:textSize="6pt">
> > >> >>                
> > >> >>        
> > >> >> 
>
> > >> >> Please help. Same code works fine on 1.1 but not on 1.5
>
> > >> >> On Apr 28, 8:00 pm, Romain Guy  wrote:
> > >> >>> TextView andScrollViewdo not have a background.
>
> > >> >>> On Tue, Apr 28, 2009 at 5:55 PM, havexz  
> > >> >>> wrote:
>
> > >> >>> > When apply the whitetheme, the text views and scrollviews display
> > >> >>> > black backgroundand its very hard to read the text. The same 
> > >> >>> > app
> > >> >>> > works fine on the 1.1 SDK. I am running the application on the Dev
> > >> >>> > Phone (but emulator also have same symptoms)
>
> > >> >>> --
> > >> >>> 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
>
> > >> > --
> > >> > Jeff Sharkey
> > >> > jshar...@google.com
>
> > >> --
> > >> Jeff Sharkey
> > >> jshar...@google.com
>
> > --
> > Jeff Sharkey
> > jshar...@google.com
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--

[android-developers] Re: Whole lotta garbage collecting going on.... How do I find out what is being collected?

2009-06-02 Thread David Turner
On Tue, Jun 2, 2009 at 11:27 PM, Robert Green  wrote:

>
> David,
>
> That's not my code - that was a package method ripped from
> java.lang.Integer.  I had to copy/post it because it's needed to make
> write an int's String's char[] directly without instantiating
> anything.
>

no problem :-) I was just seeing you complaining about "that much more code"
so I thought I could help reduce the burden. After all, if something's not
broken...


>
> On Jun 2, 7:27 am, David Turner  wrote:
> > On Tue, May 26, 2009 at 12:47 AM, Robert Green 
> wrote:
> >
> > > That is SO MUCH more code than I ever wanted there but it's
> > > ridiculously more efficient than it was before so I'm going to call it
> > > good and move on.
> >
> > It looks like a lot of your code comes from C code that had to run very
> very
> > fast
> > on very old CPUs that didn't have fast multiplication instructions.
> > Unfortunately,
> > they risk to be slower than necessary on Dalvik. May I suggest the much
> > simpler
> > alternative:
> >
> > public static void getChars(int i, int index, char[] buf)
> > {
> > if (i == Integer.MIN_VALUE) {
> > System.arraycopy("-2147483648".toCharArray(), 0, buf, 0,
> > buf.length);
> > }
> > int q, r;
> > // assumes 'index' accounts for the sign if present
> > int charPos = index;
> > char sign = 0;
> >
> > if (i < 0) {
> > sign = '-';
> > i = -i;
> > index -= 1;
> > }
> >
> > while (index > 0) {
> > q = i / 10;
> > r = i - q*10;
> > buf[--charPos] = '0' + r;
> > i = q;
> > index--;
> > }
> >
> > if (sign != 0) {
> > buf[--charPos] = sign;
> > }
> >
> > }
> >
> > > Thanks for the help everyone!
> >
> > > On May 25, 5:19 pm, Jason Proctor  wrote:
> > > > i'll suggest this again :-)
> >
> > > > when the score changes, convert to a string then, save it away, and
> > > > draw that each frame. at least then, you're only doing an allocation
> > > > when it changes.
> >
> > > > good enough?
> >
> > > > >My new method doesn't have problems with concatenating but no
> solution
> > > > >so far has gotten around converting an integer into a String or
> > > > >CharSequence.  Any time you put an integer where a String should be,
> > > > >java automatically uses Integer.toString(i) to build a String out of
> > > > >it which allocates a char[] and also makes a new String.
> >
> > > > >So, besides ripping out stringSize and getChars from integer and
> > > > >holding my own char[] for the converted int, is there a clean way to
> > > > >handle that without new allocations?
> >
> > > > >On May 25, 4:29 pm, Jason Proctor 
> wrote:
> > > > >>  i think Mark is saying that you could redraw the score separately
> > > > >>  from the label, potentially saving an implicit new StringBuffer
> > > > >>  (stuff).toString () ?
> >
> > > > >>  if score is a number, then it will need to make a new String
> anyway.
> > > > >>  but you could cache the string of the score until the score
> changes,
> > > > >>  so that drawing the score becomes drawing to strings as opposed
> to
> > > > >>  going through StringBuffer.
> >
> > > > >>  hth
> >
> > > > >>  >It's a surface view so the whole scene must be rendered every
> frame.
> > > > >>  >I could put it on the background I suppose but it's simple
> enough to
> > > > >>  >just redraw the text.
> >
> > > > >>  >On May 25, 4:10 pm, Mark Murphy 
> wrote:
> > > > >>  >>  Robert Green wrote:
> > > > >>  >>  > I said StringBuffer but I meant "Implied" StringBuffer, you
> > > know:
> >
> > > > >>  >>  > canvas.drawText(score + POINTS_LABEL, x, y, paint);
> >
> > > > >>  >>  Why redraw POINTS_LABEL every time? Can't you rework your
> > > scoreboard to
> > > > >>  >>  only draw that once?
> >
> > > > >>  >>  --
> > > > >>  >>  Mark Murphy (a Commons
> > > > >>  >>Guy)http://commonsware.com|http://twitter.com/commonsguy
> >
> > > > >>  >>  Android App Developer Training:
> > >http://commonsware.com/training.html
> >
> > > > >>  --
> > > > >>  jason.software.particle
> >
> > > > --
> > > > jason.software.particle
> >
> >
> >
>

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



[android-developers] Re: Hide the virtual keyboard

2009-06-02 Thread Alex B

I'm still trying to figure out how to suppress the soft keyboard from
showing because I have my own custom buttons for input. I have several
EditText input fields, and all of them get filled by the custom on-
screen buttons. I don't want the soft keyboard to show up at all.
Could someone please help?

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



[android-developers] Re: SoftHashMap implementation - For use as a Cache of thumbnails

2009-06-02 Thread Mark Murphy

> Can you let me know if there is a better way of doint this, any errors in
> my
> design (Essentially lifted from
> DevX),
> especially with respect to any differences in Dalvik or bonus classes in
> the
> SDK which render it useless.

I think that is based on Dr. Heinz' original article (newsletter #15). He
revised it for Java5 in newsletter #98:

http://www.javaspecialists.eu/archive/Issue098.html

A quick read of #98 suggests there are some memory leaks in his
implementation of #15, so you might want to double-check which one yours
is based upon.

I do need to re-susbscribe to his newsletter sometime...

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



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



[android-developers] Translucent GLSurfaceView issues: emulator white screen and G1 flicker

2009-06-02 Thread George

I ran the Translucent GLSurfaceView sample in the APIDemos that ships
with the 1.5 SDK and found the following issues:

(1) On the emulator, only a white blank screen turns up. It shows up
on the G1 though. Any workarounds for this to work on the emulator?
Other openGL apps work fine on the emulator; only the transparent one
fails.

(2) On running the Translucent GLSurfaceView sample on the G1 multiple
times, a slight flicker will be noticed when the GlSurfaceView
appears, if one looks carefully. In order to ascertain there was a
really a flickering problem, I added the translucent GLSurfaceView to
a Toast and allowed the Toast to show while the Activities below
transitioned. While the activities transition, the flickering
increases. Looks like an issue when the SurfaceFlinger is updating the
screen while compositing a transparent GL surface. Since this is
happening on the device, I am not sure if it is related to the G1 impl
of OpenGL. Is this a known bug?

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



[android-developers] SoftHashMap implementation - For use as a Cache of thumbnails

2009-06-02 Thread Gavin Aiken
Hi All,

I have adapted a SoftHashMap that I found online for use in my Android
application. I generate many thumbnails which use a lot of memory and are
easily traversed, I want to use an ADT like this so that I don't run out of
memory but do make use of the memory available. The cache is meant to retain
the most recently used items using hard links, the number of MRU hard links
is set via the constructor.

Can you let me know if there is a better way of doint this, any errors in my
design (Essentially lifted from
DevX),
especially with respect to any differences in Dalvik or bonus classes in the
SDK which render it useless.

Otherwise, feel free to use it obviously :)

SoftHashMap.java

Gav


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



[android-developers] Html.fromHtml in 1.5 strips out line Separator's

2009-06-02 Thread mathiastck

This looks like a bug to me.  Under SDK 1.5 this code:

String lineSeparator = System.getProperty
( "line.separator" );
String testString = "first line"+lineSeparator+"second line";
Log.i("helloworld15","testString.indexOf(lineSeparator))
"+testString.indexOf(lineSeparator));
Spanned spanned = Html.fromHtml(testString);
Log.i("helloworld15","spanned.toString().indexOf
(lineSeparator)) "+spanned.toString().indexOf(lineSeparator));

ouputs:

06-02 21:57:46.255: INFO/helloworld15(1210): testString.indexOf
(lineSeparator)) 10
06-02 21:57:46.284: INFO/helloworld15(1210): spanned.toString().indexOf
(lineSeparator)) -1


Under SDK 1.1 it output:

06-02 21:58:38.176: INFO/helloworld15(471): testString.indexOf
(lineSeparator)) 10
06-02 21:58:38.715: INFO/helloworld15(471): spanned.toString().indexOf
(lineSeparator)) 10

So it appears that as of SDK 1.5 Html.fromHtml is stripping out
lineSeparators.

This is also true for the method:

fromHtml(String source, Html.ImageGetter imageGetter, Html.TagHandler
tagHandler)

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



[android-developers] Key down events on answer and end call not working anymore in cupcake

2009-06-02 Thread Jay-andro

On the 1.1 platform, we were successfully getting callbacks for the
overridden method ‘onKeyDown(int keyCode, KeyEvent event)’ of an
Activity
particularly in an In-Call situation. And we were able to handle the
‘keyCode == KeyEvent.KEYCODE_CALL’ case when the call is accepted or
‘keyCode == KeyEvent.KEYCODE_ENDCALL’ case when the call is rejected
with a key press.

On the 1.5 platform we are finding that there is no call back made
through the overridden method ‘onKeyDown(int keyCode, KeyEvent event)’
of an
Activity in the same In-Call situation for either of KEYCODE_CALL or
KEYCODE_ENDCALL.

Has anyone else run into this?

Google,
Is this a bug in 1.5 or is it an intentional fix or de-support of
something Google considers as "should never have worked"?
Is there any alternative way of handling onKeyDown specifically on the
1.5 platform?

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



[android-developers] Re: Whole lotta garbage collecting going on.... How do I find out what is being collected?

2009-06-02 Thread Robert Green

David,

That's not my code - that was a package method ripped from
java.lang.Integer.  I had to copy/post it because it's needed to make
write an int's String's char[] directly without instantiating
anything.

On Jun 2, 7:27 am, David Turner  wrote:
> On Tue, May 26, 2009 at 12:47 AM, Robert Green  wrote:
>
> > That is SO MUCH more code than I ever wanted there but it's
> > ridiculously more efficient than it was before so I'm going to call it
> > good and move on.
>
> It looks like a lot of your code comes from C code that had to run very very
> fast
> on very old CPUs that didn't have fast multiplication instructions.
> Unfortunately,
> they risk to be slower than necessary on Dalvik. May I suggest the much
> simpler
> alternative:
>
> public static void getChars(int i, int index, char[] buf)
> {
>     if (i == Integer.MIN_VALUE) {
>         System.arraycopy("-2147483648".toCharArray(), 0, buf, 0,
> buf.length);
>     }
>     int q, r;
>     // assumes 'index' accounts for the sign if present
>     int charPos = index;
>     char sign = 0;
>
>     if (i < 0) {
>             sign = '-';
>             i = -i;
>             index -= 1;
>     }
>
>     while (index > 0) {
>         q = i / 10;
>         r = i - q*10;
>         buf[--charPos] = '0' + r;
>         i = q;
>         index--;
>     }
>
>     if (sign != 0) {
>             buf[--charPos] = sign;
>     }
>
> }
>
> > Thanks for the help everyone!
>
> > On May 25, 5:19 pm, Jason Proctor  wrote:
> > > i'll suggest this again :-)
>
> > > when the score changes, convert to a string then, save it away, and
> > > draw that each frame. at least then, you're only doing an allocation
> > > when it changes.
>
> > > good enough?
>
> > > >My new method doesn't have problems with concatenating but no solution
> > > >so far has gotten around converting an integer into a String or
> > > >CharSequence.  Any time you put an integer where a String should be,
> > > >java automatically uses Integer.toString(i) to build a String out of
> > > >it which allocates a char[] and also makes a new String.
>
> > > >So, besides ripping out stringSize and getChars from integer and
> > > >holding my own char[] for the converted int, is there a clean way to
> > > >handle that without new allocations?
>
> > > >On May 25, 4:29 pm, Jason Proctor  wrote:
> > > >>  i think Mark is saying that you could redraw the score separately
> > > >>  from the label, potentially saving an implicit new StringBuffer
> > > >>  (stuff).toString () ?
>
> > > >>  if score is a number, then it will need to make a new String anyway.
> > > >>  but you could cache the string of the score until the score changes,
> > > >>  so that drawing the score becomes drawing to strings as opposed to
> > > >>  going through StringBuffer.
>
> > > >>  hth
>
> > > >>  >It's a surface view so the whole scene must be rendered every frame.
> > > >>  >I could put it on the background I suppose but it's simple enough to
> > > >>  >just redraw the text.
>
> > > >>  >On May 25, 4:10 pm, Mark Murphy  wrote:
> > > >>  >>  Robert Green wrote:
> > > >>  >>  > I said StringBuffer but I meant "Implied" StringBuffer, you
> > know:
>
> > > >>  >>  > canvas.drawText(score + POINTS_LABEL, x, y, paint);
>
> > > >>  >>  Why redraw POINTS_LABEL every time? Can't you rework your
> > scoreboard to
> > > >>  >>  only draw that once?
>
> > > >>  >>  --
> > > >>  >>  Mark Murphy (a Commons
> > > >>  >>Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > > >>  >>  Android App Developer Training:
> >http://commonsware.com/training.html
>
> > > >>  --
> > > >>  jason.software.particle
>
> > > --
> > > jason.software.particle
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Passing pointer to AsyncTask that changes GUI to onRetainNonConfigurationInstance?

2009-06-02 Thread Streets Of Boston

This is how i solved these type of issues. I'm not sure if it's the
most correct way to do this, but it works for me :-), at least for a
task that takes place in one process.

In the onCreate() of my activity, i save 'this' (reference to this
activity) into a static variable:
public static MyActivity ACTIVE_INSTANCE;
...
...
// in onCreate
  ACTIVE_INSTANCE = this;

// in onDestroy
  ACTIVE_INSTANCE = null; // very important! you don't want memory
leaks.

In my code i don't use AsyncTasks. I wrote my own classes that do the
same thing (sdk 1.1 code) and this class posts back to a Handler()
held by a static reference (doesn't post back to an activity's
window). If AsyncTask's onPostExecute() method is still called after
the original instance of the activity has been destroyed, then you
should be all set.

Then in the onPostExecute(), i would call
MyActivity.ACTIVE_INSTANCE.getMyEditBox().setText(myResultText).
Since creation of tasks in a process and the onPostExecute all will
happen on the same messaging thread (UI-thread), you don't have to
worry about thread-safety.


On Jun 2, 4:23 pm, twan  wrote:
> Good morning,
>
> I'm a little confused how to correctly handle tasks (AsyncTask) when
> the screen orientates.
>
> The documentation states that the object passed to
> onRetainNonConfigurationInstance should have no refererence to the
> destroyed activity/context. When i pass a pointer to a AsyncTask it
> shouldn't have such a reference.
>
> But in the AsyncTask onPostExecute() method (which is executed in the
> UI thread) the result of the task should be displayed in the fields of
> a activity.
>
> How can i display the result of a AsyncTask in a activity when i may
> not use anything that references to the destroyed activity?
>
> For example i can't pass my EditBox to the constructor of the
> AsyncTask, because it is a reference to the activity that will be
> destroyed, but i do want to put the result of the task in that
> EditBox ;-)
>
> I buzzles me.
>
> One solution comes in mind and that is to save the pointer to the task
> in onRetainNonConfigurationInstance() and restore it in onCreate().
> Then call a method on the task class and pass a pointer to the new
> EditBox. But it isn't 100% save, cause while the screen is rotating
> (things are destroyed/created) the task might finish and cause
> unpredictable results.
>
> Can anybody give me advice on this subject?
>
> Kind regards,
> Twan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: What is the android equvilant of scale(-1, 1), I want to flip an image

2009-06-02 Thread z

got it working, you were right :-) thanks for sharing

On Jun 2, 5:01 pm, skink  wrote:
> z wrote:
> > Can you post full codes, I couldnt get your snippet to work.
>
> sure, it has also nice alpha blending effect
>
> Bitmap reflectedBitmap = Bitmap.createBitmap(originalBitmap.getWidth
> (), originalBitmap.getHeight(), Config.ARGB_);
> Canvas c = new Canvas(reflectedBitmap);
> c.save();
> c.scale(1, -1);
> // draw mirrored bitmap
> c.drawBitmap(originalBitmap, 0, -originalBitmap.getHeight(), null);
> c.restore();
> // apply alpha gradient
> Paint paint = new Paint();
> LinearGradient shader = new LinearGradient(0, 0, 0,
> originalBitmap.getHeight()*0.75f, 0x80ff, 0x00ff,
> TileMode.CLAMP);
> paint.setShader(shader);
> paint.setXfermode(new PorterDuffXfermode(Mode.DST_IN));
> c.drawRect(0, 0, originalBitmap.getWidth(), originalBitmap.getHeight
> (), paint);
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to create a pop up window?

2009-06-02 Thread Mark Murphy

> I was wondering how we would attach a pop up window to a button so
> that when the button is clicked the pop up window will appear showing
> a message and still until the user closes it. How should I go about
> this and what classes should I use? Also if there are any examples for
> this it would really helpful as well. Thank you.

AlertDialog may be what you want.

http://developer.android.com/guide/samples/ApiDemos/src/com/example/android/apis/app/AlertDialogSamples.html

http://developer.android.com/guide/topics/ui/dialogs.html

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



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



[android-developers] Re: ACTION_PACKAGE_INSTALL intent does not work

2009-06-02 Thread patrick

u need permission to use PACKAGE_INSTALL... but to set PACKAGE_INSTALL
permission, u need system right.
If u set Intent.VIEW instead of PACKAGE_INSTALL, it will launch the ui
to ask user if he want to install the apk.

On 2 juin, 19:13, "bestpriv...@googlemail.com"
 wrote:
> I try to install a package by using the ACTION_PACKAGE_INSTALL intent.
> But I always get a android.content.ActivityNotFoundException
> exception.
>
> Intent intent = new Intent(Intent.ACTION_PACKAGE_INSTALL);
> intent.setDataAndType(Uri.parse(update.getUrl()), "application/
> vnd.android.package-archive");
> startActivity(intent);
>
> Any ideas?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] how to create a pop up window?

2009-06-02 Thread automerc

I was wondering how we would attach a pop up window to a button so
that when the button is clicked the pop up window will appear showing
a message and still until the user closes it. How should I go about
this and what classes should I use? Also if there are any examples for
this it would really helpful as well. 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: What is the android equvilant of scale(-1, 1), I want to flip an image

2009-06-02 Thread skink



z wrote:
> Can you post full codes, I couldnt get your snippet to work.
>

sure, it has also nice alpha blending effect

Bitmap reflectedBitmap = Bitmap.createBitmap(originalBitmap.getWidth
(), originalBitmap.getHeight(), Config.ARGB_);
Canvas c = new Canvas(reflectedBitmap);
c.save();
c.scale(1, -1);
// draw mirrored bitmap
c.drawBitmap(originalBitmap, 0, -originalBitmap.getHeight(), null);
c.restore();
// apply alpha gradient
Paint paint = new Paint();
LinearGradient shader = new LinearGradient(0, 0, 0,
originalBitmap.getHeight()*0.75f, 0x80ff, 0x00ff,
TileMode.CLAMP);
paint.setShader(shader);
paint.setXfermode(new PorterDuffXfermode(Mode.DST_IN));
c.drawRect(0, 0, originalBitmap.getWidth(), originalBitmap.getHeight
(), paint);

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 us Cursor::registerContentObserver() and Cursor::registerDataSetObserver()?

2009-06-02 Thread Mark Wyszomierski

Hi,

I'm wondering if anyone can point me to an example of using
Cursor::registerContentObserver() or Cursor:: registerDataSetObserver
(). I'm not sure which one to use.

I'll be fetching all the rows in a particular sqlite database table,
the result of which is a Cursor. I'd like to be notified if any record
within that table changes as a result of any other process. It looks
something like:

 SQLiteDatabase db = new(...);
 Cursor cursor = db.query("tablename", new String[] { "col1",
"col2" }, null, null, null, null, null);
 // Now what can we use to listen for changes?
 cursor.registerContentObserver(...);
 // or
 cursor.registerDataSetObserver(...);

If either of those methods will work, does the cursor object need to
remain in memory, or just the registered listeners?

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



[android-developers] Re: What is the android equvilant of scale(-1, 1), I want to flip an image

2009-06-02 Thread z

Can you post full codes, I couldnt get your snippet to work.

On Jun 2, 4:29 pm, skink  wrote:
> z wrote:
> > Nope, didnt work
>
> hmm, it makes vertically reflected bitmap.
>
> isn't it what you wanted to do?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] EditText Auto Focused in Tab

2009-06-02 Thread Tim H.

I can't seem to find the answer to this. Most questions were about the
tab stealing focus.

I have a layout in a Tab which is longer than the screen size. When
clicking the tab, it jumps towards the bottom of the page, which is
where the first EditText is located. I assume this is because EditText
are set to take focus first?

I can't set focusable or focusable in touch mode to false, because I
do want it to be focusable. I just don't want it to automatically jump
down to the EditText when I first click on the tab.

Thanks,
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: What is the android equvilant of scale(-1, 1), I want to flip an image

2009-06-02 Thread skink

z wrote:
> Nope, didnt work
>

hmm, it makes vertically reflected bitmap.

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



[android-developers] Passing pointer to AsyncTask that changes GUI to onRetainNonConfigurationInstance?

2009-06-02 Thread twan

Good morning,

I'm a little confused how to correctly handle tasks (AsyncTask) when
the screen orientates.

The documentation states that the object passed to
onRetainNonConfigurationInstance should have no refererence to the
destroyed activity/context. When i pass a pointer to a AsyncTask it
shouldn't have such a reference.

But in the AsyncTask onPostExecute() method (which is executed in the
UI thread) the result of the task should be displayed in the fields of
a activity.

How can i display the result of a AsyncTask in a activity when i may
not use anything that references to the destroyed activity?

For example i can't pass my EditBox to the constructor of the
AsyncTask, because it is a reference to the activity that will be
destroyed, but i do want to put the result of the task in that
EditBox ;-)

I buzzles me.

One solution comes in mind and that is to save the pointer to the task
in onRetainNonConfigurationInstance() and restore it in onCreate().
Then call a method on the task class and pass a pointer to the new
EditBox. But it isn't 100% save, cause while the screen is rotating
(things are destroyed/created) the task might finish and cause
unpredictable results.

Can anybody give me advice on this subject?

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



[android-developers] Re: My good god, bugs in Android brick phone, and it's not difficult to reproduce...

2009-06-02 Thread Jeff Sharkey

When you saw this error, was it a direct upgrade from the last-OTA'ed
release, or had you installed other builds in the meantime without
wiping data?  I think there was an obscure bug if you somehow had
allocated, but unmanaged, appWidgetIds.

j


On Tue, Jun 2, 2009 at 5:19 AM, Blake B.  wrote:
>
> Any update on this?  I'm encountering the same crash and would rather
> not wipe my phone if I don't have to.  Safe mode does not work.  Phone
> (stock G1) just keeps cycling at the Android logo image and I have to
> pull the battery to kill it.
>
> I received the Cupcake OTA update on Saturday, and yesterday (Monday)
> was the first time I rebooted the phone after the update.  So, I've
> never had a successful reboot with Cupcake.  The offending call is in
> com.android.server.AppWidgetService.readStateFromFileLocked
> (AppWidgetService.java:972), getting IndexOutOfBoundsException.
>
> (BTW, great work on Cupcake.  er except for this of course.   :-)
>
> My stacktrace is the same as AndroidApp's:
>
> 
> 06-01 22:14:51.893: VERBOSE/WifiStateTracker(62): Connection to
> supplicant established, state=SCANNING
> 06-01 22:14:51.903: VERBOSE/WifiStateTracker(62): Changing supplicant
> state: SCANNING ==> SCANNING
> 06-01 22:14:51.913: INFO/SystemServer(62): Starting Location Manager.
> 06-01 22:14:51.943: DEBUG/GpsLocationProvider(62): enable
> 06-01 22:14:51.953: VERBOSE/WifiMonitor(62): Event [Trying to
> associate with 00:1d:5a:d4:eb:d9 (SSID='2WIRE456' freq=2412 MHz)]
> 06-01 22:14:51.953: VERBOSE/WifiMonitor(62): Event [CTRL-EVENT-STATE-
> CHANGE id=-1 state=3]
> 06-01 22:14:51.953: VERBOSE/WifiStateTracker(62): Changing supplicant
> state: SCANNING ==> ASSOCIATING
> 06-01 22:14:51.963: DEBUG/GpsLocationProvider(62): GpsEventThread
> starting
> 06-01 22:14:51.973: DEBUG/GpsLocationProvider(62): NetworkThread
> starting
> 06-01 22:14:51.973: DEBUG/GpsLocationProvider(62): NetworkThread wait
> for network
> 06-01 22:14:51.993: INFO/SystemServer(62): Starting Search Service.
> 06-01 22:14:52.003: INFO/SystemServer(62): Starting Checkin Service.
> 06-01 22:14:52.003: INFO/SystemServer(62): Starting Wallpaper Service
> 06-01 22:14:52.013: DEBUG/WallpaperService(62): WallpaperService
> startup
> 06-01 22:14:52.023: INFO/SystemServer(62): Starting Audio Service
> 06-01 22:14:52.083: DEBUG/AudioHardwareMSM72XX(35): setVoiceVolume
> (0.60)
> 06-01 22:14:52.083: INFO/AudioHardwareMSM72XX(35): Setting in-call
> volume to 3 (available range is 0 to 5)
> 06-01 22:14:52.163: DEBUG/AudioHardwareMSM72XX(35): setVoiceVolume
> (1.00)
> 06-01 22:14:52.163: INFO/AudioHardwareMSM72XX(35): Setting in-call
> volume to 5 (available range is 0 to 5)
> 06-01 22:14:52.183: DEBUG/dalvikvm(62): Trying to load lib /system/lib/
> libsoundpool.so 0x0
> 06-01 22:14:52.203: DEBUG/dalvikvm(62): Added shared lib /system/lib/
> libsoundpool.so 0x0
> 06-01 22:14:52.233: INFO/SystemServer(62): Starting HeadsetObserver
> 06-01 22:14:52.293: INFO/SystemServer(62): Starting AppWidget Service
> 06-01 22:14:52.763: DEBUG/dalvikvm(62): GC freed 4358 objects / 252408
> bytes in 417ms
> 06-01 22:14:52.883: INFO/WindowManager(62): Menu key state: 0
> safeMode=false
> 06-01 22:14:52.913: INFO/WindowManager(62): Config changed:
> { scale=1.0 imsi=0/0 locale=en_US touch=3 key=2/1/1 nav=3 orien=1 }
> 06-01 22:14:52.943: DEBUG/PowerManagerService(62): system ready!
> 06-01 22:14:52.963: WARN/ResourceType(62): No package identifier when
> getting value for resource number 0x7f03
> 06-01 22:14:52.983: WARN/ResourceType(62): No package identifier when
> getting value for resource number 0x7f03000c
> 06-01 22:14:52.993: WARN/ResourceType(62): No package identifier when
> getting value for resource number 0x7f03
> 06-01 22:14:53.003: WARN/ResourceType(62): No package identifier when
> getting value for resource number 0x7f030003
> 06-01 22:14:53.253: DEBUG/dalvikvm(62): GC freed 2153 objects / 118592
> bytes in 235ms
> 06-01 22:14:53.263: WARN/dalvikvm(62): threadid=13: thread exiting
> with uncaught exception (group=0x4000fe70)
> 06-01 22:14:53.273: ERROR/AndroidRuntime(62): Uncaught handler: thread
> android.server.ServerThread exiting due to uncaught exception
> 06-01 22:14:53.273: ERROR/AndroidRuntime(62): *** EXCEPTION IN SYSTEM
> PROCESS.  System will crash.
> 06-01 22:14:53.333: ERROR/AndroidRuntime(62):
> java.lang.IndexOutOfBoundsException: Invalid location 1, size is 1
> 06-01 22:14:53.333: ERROR/AndroidRuntime(62):     at
> java.util.ArrayList.get(ArrayList.java:353)
> 06-01 22:14:53.333: ERROR/AndroidRuntime(62):     at
> com.android.server.AppWidgetService.readStateFromFileLocked
> (AppWidgetService.java:972)
> 06-01 22:14:53.333: ERROR/AndroidRuntime(62):     at
> com.android.server.AppWidgetService.loadStateLocked
> (AppWidgetService.java:750)
> 06-01 22:14:53.333: ERROR/AndroidRuntime(62):     at
> com.android.server.AppWidgetService.systemReady(AppWidgetService.java:
> 125)
> 06-01 22:14:53.333: ERROR/AndroidRuntime(62):     at
> 

[android-developers] Re: What is the android equvilant of scale(-1, 1), I want to flip an image

2009-06-02 Thread z

Nope, didnt work

On Jun 2, 3:42 pm, skink  wrote:
> On 2 Cze, 15:45, z  wrote:
>
> > That did the trick, thanks
>
> > for those who are looking to do the same, here are the codes
>
> >     Matrix matrix = canvas.getMatrix();
> > matrix.postRotate(180, icon.getWidth()/2, icon.getHeight()/2);
> >     matrix.postScale(-1, 1);
> >     matrix.postTranslate(icon.getWidth(), 0);
> >     canvas.concat(matrix);
> >     canvas.translate(0,-icon.getHeight());
>
> what about this:
>
> Canvas c = new Canvas(reflectionBitmap);
> c.scale(1, -1);
> c.drawBitmap(orig, 0, -orig.getHeight(), 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: What is the android equvilant of scale(-1, 1), I want to flip an image

2009-06-02 Thread skink



On 2 Cze, 15:45, z  wrote:
> That did the trick, thanks
>
> for those who are looking to do the same, here are the codes
>
>     Matrix matrix = canvas.getMatrix();
> matrix.postRotate(180, icon.getWidth()/2, icon.getHeight()/2);
>     matrix.postScale(-1, 1);
>     matrix.postTranslate(icon.getWidth(), 0);
>     canvas.concat(matrix);
>     canvas.translate(0,-icon.getHeight());
>

what about this:

Canvas c = new Canvas(reflectionBitmap);
c.scale(1, -1);
c.drawBitmap(orig, 0, -orig.getHeight(), 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: Where do i put 45 MB Audio Files.

2009-06-02 Thread Ed Burnette

For voice, try the AMR format. You can get reasonable quality speech
at between 4 and 12 kilobits per second. So in 45MB you could store as
much as 3 hours of audio. Android 1.5 can record in AMR-NB format and
play back in either AMR-NB or AMR-WB.

For more information see:
  http://blogs.zdnet.com/Burnette/?p=1133
  http://developer.android.com/guide/appendix/media-formats.html
  http://en.wikipedia.org/wiki/AMR-NB

--
Ed Burnette, @eburnette on twitter, Dev Connection on ZDNet
"Hello, Android", http://pragprog.com/titles/eband -- now updated for
1.5 Cupcake
Planet Android, http://www.planetandroid.com -- over 50 feeds and
growing


On May 31, 9:47 pm, Mark Murphy  wrote:
> Freshman wrote:
> > yes , i need 45MB of audio files.
>
> Perhaps not.
>
> > I am trying to make a kind of english to thai dictionary.
>
> Great!
>
> > and i have a list view which displays some words and sentences.
>
> Great!
>
> > i need to play audio of that words and sentences.
>
> Great!
>
> > i want to play that files in .wav formate.
>
> U...
>
> 1. Experiment with MP3 or Ogg Vorbis, to see if you can get your audio
> clips to be much smaller, while still retaining acceptable quality. I
> suspect either of those formats will work much better than .WAV.
>
> 2. Give the users options of downloading the whole set of audio clips at
> once (to their SD card) or downloading them on the fly as needed
> (requires Internet connection).
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 0.95 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: which junit to use when creating reusable library for Android apps?

2009-06-02 Thread Peter

I agree that running tests OOC would be very nice...of course, a VM is
a container. I'm kind of surprised Google didn't build a Valtik unit
testing container.

On May 28, 5:06 pm, Anton Slutsky  wrote:
> For more sophisticated apps with a large number of team members and
> contributors, running unit tests in an emulator may be impractical.
> Emulator requires some sort of a some sort of a graphics/windowing setup.
> Usually though (at least in my experience), unit tests are run on an
> integrated build machines running things like Hudson or Cruise Control.
> Most of the time, these machines are not or can not be set up to run a
> windowing system especially when running linux.  It would be very cool if
> there was a way to get around the the true emulator for unit test purposes.
>
>
>
> On Thu, May 28, 2009 at 4:55 PM, Peter  wrote:
>
> > Yeah, I've discovered that I need to run them on the device if they
> > concern any Android objects. In any case, for what I need I can use
> > standard JUnit for the non-Android specifics to get some out of
> > container testing.
>
> > The tests do not go in the library (jar). The test application seems
> > like a possibility but I don't really like to run tests in container
> > (although something like Android makes this a necessity).
>
> > On May 28, 4:30 pm, Brett Chabot  wrote:
> > > I'm not sure exactly what you mean by "using a JUnit library". If the
> > JUnit
> > > tests reference android.jar objects, you will need to run them on an
> > Android
> > > device or emulator.
>
> > > But a more basic question I have is why does your Android library need to
> > > use JUnit? Will you be packaging the tests for the library inside the
> > > library itself? One approach is to separate the tests for the library
> > from
> > > the library itself. You could define an Android test application with a
> > > manifest, etc, that references the library and contains all the tests for
> > > the library.
>
> > > On Wed, May 27, 2009 at 2:42 PM, Peter  wrote:
>
> > > > I am creating an Android library that does stuff like http requests,
> > > > etc, that uses android.jar objects. There will be no manifest or
> > > > resources, etc, however. What is the best practice regarding the JUnit
> > > > library to use in this library? DO I use standard JUnit, or the one
> > > > included in android.jar?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: setText for EditText is not working in 1.5

2009-06-02 Thread Mark Murphy

> There is no problem with addTextChangedListener. As long as I
> commented out mEditText.setText("123456"), it is working.

What does your stack trace tell you?

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



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



[android-developers] Re: setText for EditText is not working in 1.5

2009-06-02 Thread cindy

There is no problem with addTextChangedListener. As long as I
commented out mEditText.setText("123456"), it is working.

On Jun 2, 11:14 am, "Mark Murphy"  wrote:
> > I upgraded my project from 1.0 to 1.5.
>
> > I found the function setText is no longer working in 1.5. Does any one
> > knows why?
>
> > Following is my code:
> >  mEditText = (EditText)findViewById(R.id.text_edit);
> >         mEditText.addTextChangedListener(new TextContentWatcher());
> >       //  mEditText.setText(Common.mTextContent);
> >         mEditText.setText("123456");
>
> > the last line will let the simulator throw error message:
> > THe application com.application.easyblog has stopped unexpectedly.
> > Please try again.
>
> The source of your problem will be deeper in the stack trace ("Caused
> by"). Take a closer look at the stack trace and you can probably find the
> source of the difficulty. You can see the stack trace via adb logcat,
> DDMS, or the DDMS perspective in Eclipse.
>
> You might also consider temporarily commenting out your
> addTextChangedListener(), as I suspect that is more likely where your
> problem lies than with setText().
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: 30 Days of Android Applications

2009-06-02 Thread Luis Alberto Pérez García

I have another idea for a simple widget and/or sqlite example: a counter 
widget. I mean:

A widget that stays on your desktop and, every time you tap it it 
increases hte previous value. For example, for counting coffes or 
cigarretes :D

lucky4me escribió:
> Day 02: Flashlight
> http://bakhtiyor.com/2009/06/flashlight/
> 
> What application would you like to see next?
> > 

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



[android-developers] Re: AndCooper Build Tool Release

2009-06-02 Thread Mark Murphy

> I think he meant:
>
> http://mobilebytes.wordpress.com
>
> with an "r".

Hah! Didn't catch that. That link definitely works.

Thanks!

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



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



[android-developers] Re: AndCooper Build Tool Release

2009-06-02 Thread Ed Burnette

I think he meant:

http://mobilebytes.wordpress.com

with an "r".

On Jun 1, 9:13 pm, Mark Murphy  wrote:
> Fred Grott(shareme) wrote:
> > The link to the project pages can be found at the MobileBytes blog
> > under the FOSS page:
>
> >http://mobilebytes.wordpess.com
>
> Um...
>
> I get a "Welcome to your source for Message Boards" page at that URL
> that doesn't seem to have anything to do with you or your work. For
> example, there's no FOSS on the home page, the Blog tab leads to a bunch
> of AdSense ads for blogging, etc.
>
> Got a better link?
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Whole lotta garbage collecting going on.... How do I find out what is being collected?

2009-06-02 Thread Dan Bornstein

On Mon, Jun 1, 2009 at 9:20 PM, Robert Green  wrote:
> Dan, thanks for clearing that up.

Glad to be of service.

> It's always nice to have *the* guy who wrote the VM

(emphasis mine) I definitely can't take all that credit, not being
surrounded[*] as I am by the *many* fine folks who also worked and
continue to work on it. Main designer and tech lead? Sure, but my
fingers would be bloody pulpy stumps if I wrote it all.

-dan

[*] literally

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



[android-developers] Re: Internal JVM memory questions

2009-06-02 Thread Fred Grott(shareme)

A question any word on if the conversion tool in sdk 1.5 for use in
the Eclipse MAT via heap dumps wiil be able to read the process stuff
in sdk 2.0.
I have only played with heap dumps in sdk 1.1. not sdk 1.5 as of yet
but read that in sdk 1.5 the process stuff in heap dumps is not
converted for Eclipse MAT to read and analyze.

Oh, yes someone is working on a services leak PMD rule..



On Jun 2, 1:38 pm, "Mark Murphy"  wrote:
> > But may Android kill an Activity and leave the service running?
>
> AFAIK, yes.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] PMD Android ruleset

2009-06-02 Thread Fred Grott(shareme)

I am extending the PMD ruleset used in AndCooper to cover more:

-Services leaks
-Changes on non UI threads


it already has the rule about non hard writing the sdcard location

Any more issues you see that should be a PMD rule?

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



[android-developers] Re: Internal JVM memory questions

2009-06-02 Thread Mark Murphy

> But may Android kill an Activity and leave the service running?

AFAIK, yes.

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



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



[android-developers] Re: Internal JVM memory questions

2009-06-02 Thread Matt

> > 1.       In the event that the Android system is running low on
> > memory, Android starts shutting down activities and/or processes.  Can
> > Android shut down individual components, as opposed to the whole
> > process?  In other words, can Android close down an activity but leave
> > the service running? (I believe the answer is 98% yes, but there were
> > some ambiguities on the Android dev framework page)
>
> Whole processes are killed, usually without any warning to the process
> involved.

OK.  Sorry to ask again, but I am still confused.  Yes, Android may
kill processes, that's a given.  But may Android kill an Activity and
leave the service running?

Here is the ambiguity:
>From http://developer.android.com/guide/topics/fundamentals.html in
the section "Application Components" -> "Shutting down components"

"Components might also be shut down by the system when they are no
longer being used or when Android must reclaim memory for more active
components. A later section, Component Lifecycles, discusses this
possibility and its ramifications in more detail."

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



[android-developers] Re: 30 Days of Android Applications

2009-06-02 Thread Luis Alberto Pérez García

Talking about the market... what i said this morning in another 
thread... "UpdateWithOneClick" for... just what says, update all apps 
with only one click ;)

Rob Franz escribió:
> How about an app to remove other spam apps from the Market? (hint: the 
> Top Sexy Ladies apps ;)
> 
> On Tue, Jun 2, 2009 at 12:58 PM, Peli  > wrote:
> 
> 
> I would like to see an extension to OI Notepad that can transform
> selected text in a special way.
> 
> For example, the ROT13 extension shifts all letters by 13 positions in
> the alphabet, "Hello" -> "Uryyb" (which transformed again is again
> "Hello").
> 
> http://code.google.com/p/openintents/source/browse/#svn/trunk/extensions/ROT13
> 
> Maybe count the number of words currently selected, or make all text
> UPPERCASE, or reverse or translate or search or find a synonym, 
> 
> Peli
> www.openintents.org 
> 
> On Jun 2, 12:44 pm, lucky4me  > wrote:
>  > Day 02: Flashlighthttp://bakhtiyor.com/2009/06/flashlight/
> 
>  >
>  > What application would you like to see next?
> 
> 
> 
> > 

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



[android-developers] Re: 30 Days of Android Applications

2009-06-02 Thread Rob Franz
How about an app to remove other spam apps from the Market? (hint: the Top
Sexy Ladies apps ;)

On Tue, Jun 2, 2009 at 12:58 PM, Peli  wrote:

>
> I would like to see an extension to OI Notepad that can transform
> selected text in a special way.
>
> For example, the ROT13 extension shifts all letters by 13 positions in
> the alphabet, "Hello" -> "Uryyb" (which transformed again is again
> "Hello").
>
> http://code.google.com/p/openintents/source/browse/#svn/trunk/extensions/ROT13
>
> Maybe count the number of words currently selected, or make all text
> UPPERCASE, or reverse or translate or search or find a synonym, 
>
> Peli
> www.openintents.org
>
> On Jun 2, 12:44 pm, lucky4me  wrote:
> > Day 02: Flashlighthttp://bakhtiyor.com/2009/06/flashlight/
> >
> > What application would you like to see next?
> >
>

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



[android-developers] Re: setText for EditText is not working in 1.5

2009-06-02 Thread Mark Murphy

> I upgraded my project from 1.0 to 1.5.
>
> I found the function setText is no longer working in 1.5. Does any one
> knows why?
>
> Following is my code:
>  mEditText = (EditText)findViewById(R.id.text_edit);
> mEditText.addTextChangedListener(new TextContentWatcher());
>   //  mEditText.setText(Common.mTextContent);
> mEditText.setText("123456");
>
> the last line will let the simulator throw error message:
> THe application com.application.easyblog has stopped unexpectedly.
> Please try again.

The source of your problem will be deeper in the stack trace ("Caused
by"). Take a closer look at the stack trace and you can probably find the
source of the difficulty. You can see the stack trace via adb logcat,
DDMS, or the DDMS perspective in Eclipse.

You might also consider temporarily commenting out your
addTextChangedListener(), as I suspect that is more likely where your
problem lies than with setText().

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



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



  1   2   >