[android-beginners] Creating sub sampled Bitmap Objects for images on SDcard

2009-10-21 Thread Samuh

I am working on a small program that is supposed to :
1. Display images on the SD card
2. Get the image chosen by the User and display it on Canvas.
3. Since the image can be large, sub sample it/ scale it or something
appropriate

I got the first two parts done using the following snippets:

1. By launching an intent such as:
Intent photoPickerIntent = new Intent(
Intent.ACTION_GET_CONTENT);
photoPickerIntent.setType("image/*");
startActivityForResult(photoPickerIntent, RQST_CODE);

2. The chosen image URI is received in onActivityResult(..):
Uri chosenImageUri = data.getData();

Now, I can create a Bitmap object from this URI :
Media.getBitmap(this.getContentResolver(),chosenImageUri);

The problem is: I want to resize/sub sample this bitmap. I did a bit
of reading and found a certain
BitmapFactory.Options class that has parameters whereby one can
specify the sample size. This "options" instance can be passed to one
of several overloaded BitmapFactory.decodeXX(..) methods, but none of
these methods take a URI as parameter.

Is there a way to do this?

I even tried this:
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = 2;

AssetFileDescriptor fileDescriptor =null;
try {
fileDescriptor = 
this.getContentResolver().openAssetFileDescriptor
(chosenImageUri,"r");
} catch (FileNotFoundException e) {
e.printStackTrace();
}
finally{
try {
fileDescriptor.close();
} catch (IOException e) {
e.printStackTrace();
}
}

mBitmap = BitmapFactory.decodeFileDescriptor
(fileDescriptor.getFileDescriptor(),
null,
options);

But i am still getting null in mBitmap.




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



[android-beginners] Re: Creating sub sampled Bitmap Objects for images on SDcard

2009-10-21 Thread Alan Cassar





I don't know whether this is your main problem, but you are closing the
fileDescriptor before you are actually using it







Alan Cassar, Software Developer | Tel: +356 21334457 | Fax: +356
21
334156






Alan Cassar, Software
Engineer | Tel: +356 21334457 | Fax: +356 21 334156
ricston Ltd., Northfields Suite 4, Independence Avenue,
Mosta MST9026 - MALTA
email:  alan.cas...@ricston.com
| web:ricston.com

--
Disclaimer
- This email and any files transmitted with it are confidential and
contain
privileged or copyright information. You must not present this message
to
another party without first gaining permission from the sender. If you
are not
the intended recipient you must not copy, distribute or use this email
or the
information contained in it for any purpose other than to notify us. If
you
have received this message in error, please notify the sender
immediately and
delete this email from your system. We do not guarantee that this
material is
free from viruses or any other defects although due care has been taken
to minimise
the risk. Any views stated in this communication are those of the
actual sender
and not necessarily those of Ricston Ltd.
or its
subsidiaries.
 




Samuh wrote:

  I am working on a small program that is supposed to :
1. Display images on the SD card
2. Get the image chosen by the User and display it on Canvas.
3. Since the image can be large, sub sample it/ scale it or something
appropriate

I got the first two parts done using the following snippets:

1. By launching an intent such as:
Intent photoPickerIntent = new Intent(
	Intent.ACTION_GET_CONTENT);
photoPickerIntent.setType("image/*");
startActivityForResult(photoPickerIntent, RQST_CODE);

2. The chosen image URI is received in onActivityResult(..):
Uri chosenImageUri = data.getData();

Now, I can create a Bitmap object from this URI :
Media.getBitmap(this.getContentResolver(),chosenImageUri);

The problem is: I want to resize/sub sample this bitmap. I did a bit
of reading and found a certain
BitmapFactory.Options class that has parameters whereby one can
specify the sample size. This "options" instance can be passed to one
of several overloaded BitmapFactory.decodeXX(..) methods, but none of
these methods take a URI as parameter.

Is there a way to do this?

I even tried this:
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = 2;

AssetFileDescriptor fileDescriptor =null;
	try {
		fileDescriptor = this.getContentResolver().openAssetFileDescriptor
(chosenImageUri,"r");
	} catch (FileNotFoundException e) {
	e.printStackTrace();
	}
	finally{
	try {
	fileDescriptor.close();
		} catch (IOException e) {
		e.printStackTrace();
		}
	}

	mBitmap = BitmapFactory.decodeFileDescriptor
(fileDescriptor.getFileDescriptor(),
		null,
		options);

But i am still getting null in mBitmap.





  


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





[android-beginners] Re: Creating sub sampled Bitmap Objects for images on SDcard

2009-10-21 Thread Samuh

Ouch!

you were right... I was being over cautious I think, closed it before
even using it! :)


On Oct 21, 12:57 pm, Alan Cassar  wrote:
> I don't know whether this is your main problem, but you are closing the 
> fileDescriptor before you are actually using it
>
> AlanCassar, Software Engineer | Tel: +356 21334457 | Fax: +356 21 
> 334156ricstonLtd., Northfields Suite 4, Independence Avenue,MostaMST9026 - 
> MALTA
>
>
>
> email:  alan.cas...@ricston.com| web:ricston.com
>
>
>
> --Disclaimer- This email and any files transmitted with it are 
> confidential and contain privileged or copyright information. You must not 
> present this message to another party without first gaining permission from 
> the sender. If you are not the intended recipient you must not copy, 
> distribute or use this email or the information contained in it for any 
> purpose other than to notify us. If you have received this message in error, 
> please notify the sender immediately and delete this email from your system. 
> We do not guarantee that this material is free from viruses or any other 
> defects although due care has been taken to minimise the risk. Any views 
> stated in this communication are those of the actual sender and not 
> necessarily those ofRicstonLtd. or its subsidiaries.
>
>
>
>  
>
>
> Samuh wrote:I am working on a small program that is supposed to : 1. Display 
> images on the SD card 2. Get the image chosen by the User and display it on 
> Canvas. 3. Since the image can be large, sub sample it/ scale it or something 
> appropriate I got the first two parts done using the following snippets: 1. 
> By launching an intent such as: Intent photoPickerIntent = new Intent( 
> Intent.ACTION_GET_CONTENT); photoPickerIntent.setType("image/*"); 
> startActivityForResult(photoPickerIntent, RQST_CODE); 2. The chosen image URI 
> is received in onActivityResult(..): Uri chosenImageUri = data.getData(); 
> Now, I can create a Bitmap object from this URI : 
> Media.getBitmap(this.getContentResolver(),chosenImageUri); The problem is: I 
> want to resize/sub sample this bitmap. I did a bit of reading and found a 
> certain BitmapFactory.Options class that has parameters whereby one can 
> specify the sample size. This "options" instance can be passed to one of 
> several overloaded BitmapFactory.decodeXX(..) methods, but none of these 
> methods take a URI as parameter. Is there a way to do this? I even tried 
> this: BitmapFactory.Options options = new BitmapFactory.Options(); 
> options.inSampleSize = 2; AssetFileDescriptor fileDescriptor =null; try { 
> fileDescriptor = this.getContentResolver().openAssetFileDescriptor 
> (chosenImageUri,"r"); } catch (FileNotFoundException e) { 
> e.printStackTrace(); } finally{ try { fileDescriptor.close(); } catch 
> (IOException e) { e.printStackTrace(); } } mBitmap = 
> BitmapFactory.decodeFileDescriptor (fileDescriptor.getFileDescriptor(), null, 
> options); But i am still getting null in mBitmap.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] how to create unit tests for AppWidgetProvider

2009-10-21 Thread Carl

Hello all,

I am trying to do unit tests for a Widget that does not have any
activity, only RemoteViews, etc.
I tried to use android.test.AndroidTestCase but I have and issue and
question:

1. When trying to instantiate a service via
context.getSystemService... the test fails with the error,
"java.lang.NullPointerException"
2. How to run tests on Methods inside a AppWidgetProvider? I guess it
is not possible to create instances of AppWidgetProvider and use the
methods inside.

Also I tried to use JUnit, but since the AppWidgetProvider depends on
a context, I was not able to get a context in pure JUnit (with
AndroidTestCase I could use getContext()).

I tried to google and look into source code in the web, but I could
not find any unit tests done for AppWidgetProviders (most were on
Activities).

I would appreciate any information.

Regards.

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



[android-beginners] XML Parser error

2009-10-21 Thread GreenRiver

I get error "java.lang.UnsupportedOperation Exception occurred
invoking method." when i complied this code line below:
xr.parse(new InputSource(url.openStream())) ;

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



[android-beginners] Android newbie development

2009-10-21 Thread Niamathullah sharief
ok is it nessary to learn java to do android development?why?java is only
the UI for android right? If i want to develop the android kernel part..what
should i do?

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



[android-beginners] Re: XML Parser error

2009-10-21 Thread Chaiyasit T
hi

let's try my example : http://www.codemobiles.com/forum/viewtopic.php?t=69



On Wed, Oct 21, 2009 at 4:30 PM, GreenRiver  wrote:

>
> I get error "java.lang.UnsupportedOperation Exception occurred
> invoking method." when i complied this code line below:
> xr.parse(new InputSource(url.openStream())) ;
>
> any ideas?? Thanks in advance :)
> >
>

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



[android-beginners] Re: Android newbie development

2009-10-21 Thread RichardC

Visit
http://groups.google.com/group/android-kernel

--
RichardC

On Oct 21, 10:44 am, Niamathullah sharief 
wrote:
> ok is it nessary to learn java to do android development?why?java is only
> the UI for android right? If i want to develop the android kernel part..what
> should i do?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: how to set a shortcut key to launch an activity ?

2009-10-21 Thread Mark Murphy

swapnil kamble wrote:
> Hello,
>   how to set a shortcut key to launch an activity ?  Lets say I have an
> app "TestApp". I want to set a shortcut key (e.g alt + T ) to launch
> activity of TestApp. Is there any way to set such shortcuts to android
> apps ?

In your own application, you can create "shortcut keys" by overriding
onKeyDown() and doing what you want.

Outside of your application, the other applications would need to
support shortcut keys. This includes the home screen application -- I do
not believe the stock home screen supports shortcut keys, but perhaps a
third-party home screen (e.g., aHome) does.

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

Android Development Wiki: http://wiki.andmob.org

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



[android-beginners] Re: Using external font in android application

2009-10-21 Thread Mark Murphy

kk_Kiran wrote:
> Do you have any idea
> when we can expect this support   in SDK?

No, I have no idea.

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

Android Development Wiki: http://wiki.andmob.org

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



[android-beginners] Re: Is Android GPS more precise than the iPhone GPS?

2009-10-21 Thread jan.rigg...@grabarzundpartner.de

Thanks for the info.

Creating your own GPS calculations doesnt seem to be possible with the
iPhone. Because of those API restrictions.

Did I interpret your answer correctly, that it is possible to create a
more precise GPS tool on the Android, because you can define your own
parameter/rules?
E.g. update every 1-2 seconds and throwing away any fixes that are off
by, lets say, 50m? Cause the app should only be used within speeds
from 0-30km/h.

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



[android-beginners] Using pt-BR locale

2009-10-21 Thread Vinicius Carvalho

Hello there! Is it possible to install support for pt-BR on android? I
can not even use special chars (ISO-8859-1) from portuguese language
like accents and cedilla. Even if T9 is not enable, I would like to at
least use those chars.

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



[android-beginners] Re: http://developer .android.com 被墙了 大家有什么好的跳墙软件推荐啊 ?

2009-10-21 Thread Freeman Zhang
You can try : http://sites.google.com/a/android.com/opensource/
http://androidappdocs.appspot.com

Freeman


2009/10/21 刘永宽 

> 如题!
>
> >
>

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



[android-beginners] Re: Is Android GPS more precise than the iPhone GPS?

2009-10-21 Thread RichardC

Yes, I get frequent updates.  My test program implements the
interfaces GpsStatus.Listener and LocationListener on my Activity
class.

In onCreate
locationManager = (LocationManager) getSystemService
(LOCATION_SERVICE);

In onResume() I do
locationManager.addGpsStatusListener(this);
locationManager.requestLocationUpdates
(LocationManager.GPS_PROVIDER, 1000, 0.0f, this);

and in onPause() I do
locationManager.removeGpsStatusListener(this);
locationManager.removeUpdates(this);

My onGpsStatusChanged method in my Activity class contains:
gpsStatus = locationManager.getGpsStatus(gpsStatus);

My onLocationChanged method in my Activity class contains:
myLocation = location;

I then do "stuff" with the results.

You probably don't need the GpsStatus information, I am using it to
plot the position of the satellites and show their signal strengths
graphically in a custom view.

--
RichardC


On Oct 21, 12:35 pm, "jan.rigg...@grabarzundpartner.de"
 wrote:
> Thanks for the info.
>
> Creating your own GPS calculations doesnt seem to be possible with the
> iPhone. Because of those API restrictions.
>
> Did I interpret your answer correctly, that it is possible to create a
> more precise GPS tool on the Android, because you can define your own
> parameter/rules?
> E.g. update every 1-2 seconds and throwing away any fixes that are off
> by, lets say, 50m? Cause the app should only be used within speeds
> from 0-30km/h.
>
> /Jan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Is Android GPS more precise than the iPhone GPS?

2009-10-21 Thread RichardC

Source is at:
http://code.google.com/p/trivial-android-apps/source/browse/gpswatch/src/com/apptude/android/trivial/gpswatch/GpsWatch.java

Please note that this is "play-pen" code.

--
RichardC

On Oct 21, 1:24 pm, RichardC  wrote:
> Yes, I get frequent updates.  My test program implements the
> interfaces GpsStatus.Listener and LocationListener on my Activity
> class.
>
> In onCreate
>     locationManager = (LocationManager) getSystemService
> (LOCATION_SERVICE);
>
> In onResume() I do
>     locationManager.addGpsStatusListener(this);
>     locationManager.requestLocationUpdates
> (LocationManager.GPS_PROVIDER, 1000, 0.0f, this);
>
> and in onPause() I do
>     locationManager.removeGpsStatusListener(this);
>     locationManager.removeUpdates(this);
>
> My onGpsStatusChanged method in my Activity class contains:
>     gpsStatus = locationManager.getGpsStatus(gpsStatus);
>
> My onLocationChanged method in my Activity class contains:
>     myLocation = location;
>
> I then do "stuff" with the results.
>
> You probably don't need the GpsStatus information, I am using it to
> plot the position of the satellites and show their signal strengths
> graphically in a custom view.
>
> --
> RichardC
>
> On Oct 21, 12:35 pm, "jan.rigg...@grabarzundpartner.de"
>
>  wrote:
> > Thanks for the info.
>
> > Creating your own GPS calculations doesnt seem to be possible with the
> > iPhone. Because of those API restrictions.
>
> > Did I interpret your answer correctly, that it is possible to create a
> > more precise GPS tool on the Android, because you can define your own
> > parameter/rules?
> > E.g. update every 1-2 seconds and throwing away any fixes that are off
> > by, lets say, 50m? Cause the app should only be used within speeds
> > from 0-30km/h.
>
> > /Jan
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] What could be the possible reason for this error?

2009-10-21 Thread Samuh

I am using Sensor data in my code and I am registering for the same in
onStart(..) of my activity.

Whenever, there is an orientation change I am getting the following
exception:

10-21 18:48:30.096: DEBUG/qemud(558): fdhandler_accept_event:
accepting on fd 10
10-21 18:48:30.096: DEBUG/qemud(558): created client 0x1aed8 listening
on fd 15
10-21 18:48:30.096: DEBUG/qemud(558): client_fd_receive: attempting
registration for service 'sensors'
10-21 18:48:30.096: DEBUG/qemud(558): client_fd_receive:->
received channel id 14
10-21 18:48:30.115: DEBUG/qemud(558): client_registration:
registration succeeded for client 14
10-21 18:48:30.127: DEBUG/qemud(558): fdhandler_event: disconnect on
fd 15
10-21 18:48:30.127: DEBUG/SensorManager(2177): found sensor: Goldfish
3-axis Accelerometer, handle=0
10-21 18:48:30.305: DEBUG/dalvikvm(2177): GC freed 955 objects / 86920
bytes in 108ms
10-21 18:48:30.475: DEBUG/dalvikvm(2177): GC freed 168 objects / 6984
bytes in 83ms
10-21 18:48:30.606: DEBUG/dalvikvm(2177): GC freed 3 objects / 88
bytes in 75ms

10-21 18:48:41.616: ERROR/JavaBinder(2177): !!! FAILED BINDER
TRANSACTION !!!
10-21 18:48:41.616: ERROR/SensorManager(2177): mDataChannel == NULL,
exiting

Could this be because of the fact that I am not unregistering the
sensor in onRetainNonConfigurationInstance(..) method?


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



[android-beginners] Re: Alternative Dev Guide Formats

2009-10-21 Thread Corey

Justin,
  Thanks so much for a response. Searching for DroiDoc on the market
yields no results, I'm also not sure this is what I'm looking for.

  While building applications, I'll be using my phone to test them. It
would
be hard to read the documents on my phone while it's running my
application. ^_^

  I'd really like to have a format that I can put on my ebook reader.
That
I may be able place the reader next to my computer, and my phone
(like my other references) while I work on my Android applications.

Thanks again,
  Corey

On Oct 20, 6:31 pm, Justin Anderson  wrote:
> You can try DroiDoc, available on the Android Market
>

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



[android-beginners] Re: What could be the possible reason for this error?

2009-10-21 Thread Samuh

Or is it because I am trying to pass a Bitmap object in
onRetainNonConfigurationInstance(..) and exceeding the Transaction
data limits ??


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



[android-beginners] Re: Alternative Dev Guide Formats

2009-10-21 Thread Justin Anderson
Hmmm... the developer must have removed it from the Market.  Other than that
app, which apparently isn't available anymore, I don't know of anything.

--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--


On Wed, Oct 21, 2009 at 7:28 AM, Corey  wrote:

>
> Justin,
>  Thanks so much for a response. Searching for DroiDoc on the market
> yields no results, I'm also not sure this is what I'm looking for.
>
>  While building applications, I'll be using my phone to test them. It
> would
> be hard to read the documents on my phone while it's running my
> application. ^_^
>
>  I'd really like to have a format that I can put on my ebook reader.
> That
> I may be able place the reader next to my computer, and my phone
> (like my other references) while I work on my Android applications.
>
> Thanks again,
>   Corey
>
> On Oct 20, 6:31 pm, Justin Anderson  wrote:
> > You can try DroiDoc, available on the Android Market
> >
>
> >
>

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



[android-beginners] Re: What could be the possible reason for this error?

2009-10-21 Thread Justin Anderson
We'd have to see some code to be able to help

--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--


On Wed, Oct 21, 2009 at 7:42 AM, Samuh  wrote:

>
> Or is it because I am trying to pass a Bitmap object in
> onRetainNonConfigurationInstance(..) and exceeding the Transaction
> data limits ??
>
>
> >
>

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



[android-beginners] Re: how to i check if an EditText is empty

2009-10-21 Thread Roman ( T-Mobile USA)

You cannot check the emptiness of a String using the "=" operator!

You would need to use the equals method which is a method in the
String class

String yourString = someEditText.getText().toString();

if (yourString.equals("") ){

}

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.



On Oct 20, 1:48 pm, JasonMP  wrote:
> using "if(someEditText.getText().toString == null) " doesnt work
>
> im passing information from this editText into a database.  Ive
> already limited it to 2 characters and numbers only in the xml file,
> but i need to run a check to fill its defaults to 0 if nothing is
> entered.  I could set its default to 0, but then my hint text would
> show up.  Could someone give me a hand with this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: plz help with sdcard image file and push command not working!!

2009-10-21 Thread Matt Kanninen

I am having the same issue, SDK 1.6, on snow leopard.  I recall the
pictures showing up in the default agllery applciation more easily on
an earlier versions of the SDK, on windows.

I'll try with more images of different types to see if that fixes it.

On Oct 7, 6:15 pm, wahib haq  wrote:
> i want to know how to push images to the emulator gallery. I tried
> using with push command but its not displayed in gallery and not
> accessed by my code. Actually i have to access the image taken by the
> camera in my code. i tried to push a jpeg image to sdcard/DCIM/Camera
> and file is shown there using shell. but its not displayed in camera
> pictures folder in gallery and also not accessible by my code :S
>
> plz help
>
> On 10/8/09, Jeffrey Blattman  wrote:
>
>
>
> >http://developer.android.com/guide/tutorials/views/hello-gallery.html
>
> > On 10/7/09 5:03 PM, wahib haq wrote:
> >> thanks john. how to enter images in the gallery ???
>
> >> On 10/7/09, jbrohan  wrote:
>
> >>> I'm a beginner too.
> >>> I use ddms. Run the command window in Windows, then type ddms here. If
> >>> you have the paths set up properly it will work, else you need to go
> >>> to/tools and enter ddms. This program links with
> >>> the debugger and provides real time readings of logcat and also
> >>> device>file explorer shows the files and offers an easy upload and
> >>> download.
>
> >>> Images as such do not show up in teh gallery, they need to be entered
> >>> into the gallery which creates a thumbnail for them.
> >>> best of luck
> >>> John
> >>> On Oct 5, 10:40 pm, wahib  wrote:
>
>  hi !! I have created a image file in a folder /androidimages and when
>  i try to run emulator from terminal giving path to this image file it
>  gives error:
>
>  i try =>  $ emulator -sdcard /home/soms/androidemuimages/androidnew.img
>  -avd androidnew
>  error=>  SDL init failure, reason is: No available video device
>
>  as a second alternative i give path to this image file in AVD manager
>  in eclipse but even it doesnt recognises it i guess. coz when i try to
>  use camera it display the toast that sdcard is not enabled.
>
>  =
>
>  second problem is that when i try to push a .bmp file to sdcard using
>  $ adb push bar3.bmp /sdcard
>  there is no error but there is no change in logcat and no image added
>  to gallery. or is it somewhere else?:S
>
>  Plz forgive if i sound childish.
>
>  Thanks in advance,
>  regards,
>  wahib
>
> > --
>
> --
> Wahib-ul-haq
>
> Communications Engineering Student,
> NUST, Pakistan.www.sizzlotech.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Activity launch timeout even with wakelock

2009-10-21 Thread Balwinder Kaur (T-Mobile USA)

Your onCreate method is taking too long to return.

Check out : 
http://developer.android.com/guide/practices/design/responsiveness.html

Balwinder Kaur
Mobile.Software.Development
·T· · ·Mobile· stick together

The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


On Oct 19, 3:14 pm, Kiran  wrote:
> Hi,
> I have the following code in Oncreate of my activity:
>
> 
>     static String linkUrl = "http://www.google.com/";;
>
>         protected void onCreate(Bundle savedInstanceState) {
>                 super.onCreate(savedInstanceState);
>
>                 PowerManager pm = (PowerManager) getSystemService
> (Context.POWER_SERVICE);
>                 PowerManager.WakeLock wl = pm.newWakeLock
> (PowerManager.SCREEN_DIM_WAKE_LOCK, "My Tag");
>                 wl.acquire();
>
>         try {
>                 URL connectURL = new URL(linkUrl);
>                 HttpURLConnection conn = (HttpURLConnection)
> connectURL.openConnection();
>                 DataInputStream dis = new DataInputStream (conn.getInputStream
> ());
>                 byte[] data = new byte[1024];
>                 int len = dis.read(data, 0, 1024);
>                 dataText = new String(data, 0, len);
>         }
>         catch(Exception e)
>         {
>             Log.e(TAG, "Exception");
>             return;
>         }
>
>         TextView bodyText = (EditText) findViewById
> (R.id.android_fetchtext);
>         bodyText.setText(dataText);
>         setContentView(R.layout.notes_fetch);
>         wl.release();
>         }
>
> 
> I declared the following permissions in manifest:
> 
>     
>     
> 
> Here is my xml layout file:
> 
> 
> http://schemas.android.com/apk/res/
> android"
>       android:layout_width="wrap_content"
>         android:layout_height="wrap_content">
>
>                android:layout_width="wrap_content"
>                 android:layout_height="wrap_content"/>
>                    android:layout_width="wrap_content"
>                 android:layout_height="wrap_content"/>
> 
> 
>
> Problem is, application goes to force close with following error:
> 
> 10-19 22:11:49.404: DEBUG/FetchData(715): Entered OnCreate
> 10-19 22:11:49.413: DEBUG/FetchData(715): Set URL
> 10-19 22:11:49.435: DEBUG/FetchData(715): HttpURLConnection
> 10-19 22:11:49.464: DEBUG/FetchData(715): DIS
> 10-19 22:11:56.013: DEBUG/FetchData(715): Read
> 
> 10-19 22:11:59.191: WARN/ActivityManager(574): Launch timeout has
> expired, giving up wake lock!
> --
> 10-19 22:11:59.307: WARN/ActivityManager(574): Activity idle timeout
> for HistoryRecord{438d4478 com.android.demo.notepad3/.FetchData}
> ---
> 10-19 22:12:01.455: DEBUG/AndroidRuntime(715): Shutting down VM
>
> 10-19 22:12:01.455: WARN/dalvikvm(715): threadid=3: thread exiting
> with uncaught exception (group=0x4001aa28)
> 10-19 22:12:01.465: ERROR/AndroidRuntime(715): Uncaught handler:
> thread main exiting due to uncaught exception
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715):
> java.lang.RuntimeException: Unable to start activity ComponentInfo
> {com.android.demo.notepad3/com.android.demo.notepad3.FetchData}:
> java.lang.NullPointerException
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715):     at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> 2401)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715):     at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
> 2417)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715):     at
> android.app.ActivityThread.access$2100(ActivityThread.java:116)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715):     at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715):     at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715):     at
> android.os.Looper.loop(Looper.java:123)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715):     at
> android.app.ActivityThread.main(ActivityThread.java:4203)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715):     at
> java.lang.reflect.Method.invokeNative(Native Method)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715):     at
> java.lang.reflect.Method.invoke(Method.java:521)
> 10-19 22:12

[android-beginners] Re: I Need Help Setting Up My ADB On MY Mac

2009-10-21 Thread Balwinder Kaur (T-Mobile USA)

do "which adb" to see if it is on your path. If not you may have to
specify it.

Balwinder Kaur
Senior Mobile Software Engineer
·T· · ·Mobile· stick together

The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


On Oct 20, 9:13 pm, "kevin.hooke"  wrote:
> This might be a stupid question, but did you replace  with
> the full path to where you installed the SDK?
>
> On Oct 20, 12:23 am, AlbertDroid  wrote:
>
> > These are the instructions I followed:
>
> > - Download the Android SDK for Macintosh 
> > at:http://developer.android.com/sdk/
> > - Extract it
> > - Download Fastboot for OSX (If not included with SDK)
> > - Extract fastboot and place it in your /tools folder.
> > - Open up a terminal window
> > - type: pico .bash_profile (this will create a .bash_profile)
> > - type the following in the new screen: export PATH=$
> > {PATH}:/tools
> > - Hit CNTRL + X
> > - Hit Y (for yes to save)
> > - It will return you to the terminal screen… type: exit
> > - Restart terminal.
>
> > Now when i go into terminal i type adb and it says
>
> > -bash: adb: command not found
>
> > what did i do wrong
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: plz help with sdcard image file and push command not working!!

2009-10-21 Thread Matt Kanninen

Restarting the emulator didn't help.  Shutting it down then going to
my run configuations->target and selecting wipe user data worked.  I
think forced it to rebuild the database of images.  The wipe user data
option doesn't wipe the virtual sdcard I had attached to the emulator.

On Oct 21, 10:21 am, Matt Kanninen  wrote:
> I am having the same issue, SDK 1.6, on snow leopard.  I recall the
> pictures showing up in the default agllery applciation more easily on
> an earlier versions of the SDK, on windows.
>
> I'll try with more images of different types to see if that fixes it.
>
> On Oct 7, 6:15 pm, wahib haq  wrote:
>
> > i want to know how to push images to the emulator gallery. I tried
> > using with push command but its not displayed in gallery and not
> > accessed by my code. Actually i have to access the image taken by the
> > camera in my code. i tried to push a jpeg image to sdcard/DCIM/Camera
> > and file is shown there using shell. but its not displayed in camera
> > pictures folder in gallery and also not accessible by my code :S
>
> > plz help
>
> > On 10/8/09, Jeffrey Blattman  wrote:
>
> > >http://developer.android.com/guide/tutorials/views/hello-gallery.html
>
> > > On 10/7/09 5:03 PM, wahib haq wrote:
> > >> thanks john. how to enter images in the gallery ???
>
> > >> On 10/7/09, jbrohan  wrote:
>
> > >>> I'm a beginner too.
> > >>> I use ddms. Run the command window in Windows, then type ddms here. If
> > >>> you have the paths set up properly it will work, else you need to go
> > >>> to/tools and enter ddms. This program links with
> > >>> the debugger and provides real time readings of logcat and also
> > >>> device>file explorer shows the files and offers an easy upload and
> > >>> download.
>
> > >>> Images as such do not show up in teh gallery, they need to be entered
> > >>> into the gallery which creates a thumbnail for them.
> > >>> best of luck
> > >>> John
> > >>> On Oct 5, 10:40 pm, wahib  wrote:
>
> >  hi !! I have created a image file in a folder /androidimages and when
> >  i try to run emulator from terminal giving path to this image file it
> >  gives error:
>
> >  i try =>  $ emulator -sdcard /home/soms/androidemuimages/androidnew.img
> >  -avd androidnew
> >  error=>  SDL init failure, reason is: No available video device
>
> >  as a second alternative i give path to this image file in AVD manager
> >  in eclipse but even it doesnt recognises it i guess. coz when i try to
> >  use camera it display the toast that sdcard is not enabled.
>
> >  =
>
> >  second problem is that when i try to push a .bmp file to sdcard using
> >  $ adb push bar3.bmp /sdcard
> >  there is no error but there is no change in logcat and no image added
> >  to gallery. or is it somewhere else?:S
>
> >  Plz forgive if i sound childish.
>
> >  Thanks in advance,
> >  regards,
> >  wahib
>
> > > --
>
> > --
> > Wahib-ul-haq
>
> > Communications Engineering Student,
> > NUST, Pakistan.www.sizzlotech.com
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] When I run getSize() on my text view it returns 0

2009-10-21 Thread jax

When I run getSize() on my text view it returns 0? I put text inside
it by running setText() immediately preceeding the call to getSize()

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



[android-beginners] Re: When I run getSize() on my text view it returns 0

2009-10-21 Thread Mark Murphy

jax wrote:
> When I run getSize() on my text view it returns 0?

TextView does not have a getSize() method.

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

Android Development Wiki: http://wiki.andmob.org

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



[android-beginners] Re: Is your Android app on Archos Market ?

2009-10-21 Thread blindfold

> 1. no way to unpublish an app?
> 2. no way to unpublish an app release?

Definitely a showstopper. Additionally there is the allegation
http://groups.google.com/group/android-discuss/browse_frm/thread/4d5c562f514c8c6f/
so there are multiple things that first need to be cleared up to gain
a minimum of trust.

On Oct 20, 5:29 pm, Jeffrey Blattman 
wrote:
> some comments on the appslib market,
>
> 1. no way to unpublish an app?
> 2. no way to unpublish an app release?
> 3. no way to edit an app release (comments, binary, or anything else)
> 4. app description doesn't maintain newlines
>
> so yes, make sure you really want your app there, forever, before you
> publish it.
>
> in general, i wish "the" android market  would just facilitate this sort
> of thing ... i know they now allow tagging by cell provider, tagging by
> device seems a small stretch.  this proliferation of markets could
> really dilute android. developers now have to manage their apps across N
> markets, and users have to browse N different markets to look for apps :(
>
> On 10/20/09 1:56 AM, arnouf wrote:
>
>
>
> > If you  have developed or if you are developing applications, and they
> > are on the Android Market - Great! - But these apps are only
> > available for devices that have contracts with Google.
>
> > Archos, a major PMP manufacturer, launched its first device on 25th of
> > September: the Archos 5 IT. Archos has a real community of fans who
> > are waiting for applications for their devices. This device is the
> > first of a long product line (the first Archos phone should be
> > available soon too!).
>
> > It's a new opportunity for your applications to find new fans!
>
> > You can post your apps, for free, on the Archos Market called Appslib
> > (http://www.appslib.com).
>
> > Today, only free applications are available for distribution on
> > AppsLib, but Archos promises the possibility to distribute your paid
> > apps soon !
>
> > Don't wait : more applications, more users, more fans...and more
> > revenue (soon)!
>
> > Arnaud
>
> --

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



[android-beginners] Re: Activity launch timeout even with wakelock

2009-10-21 Thread zhen guo
Try to split the http operation in a single thread?


On Tue, Oct 20, 2009 at 6:14 AM, Kiran  wrote:

>
> Hi,
> I have the following code in Oncreate of my activity:
>
>
> 
>static String linkUrl = "http://www.google.com/";;
>
>protected void onCreate(Bundle savedInstanceState) {
>super.onCreate(savedInstanceState);
>
>PowerManager pm = (PowerManager) getSystemService
> (Context.POWER_SERVICE);
>PowerManager.WakeLock wl = pm.newWakeLock
> (PowerManager.SCREEN_DIM_WAKE_LOCK, "My Tag");
>wl.acquire();
>
>try {
>URL connectURL = new URL(linkUrl);
>HttpURLConnection conn = (HttpURLConnection)
> connectURL.openConnection();
>DataInputStream dis = new DataInputStream
> (conn.getInputStream
> ());
>byte[] data = new byte[1024];
>int len = dis.read(data, 0, 1024);
>dataText = new String(data, 0, len);
>}
>catch(Exception e)
>{
>Log.e(TAG, "Exception");
>return;
>}
>
>TextView bodyText = (EditText) findViewById
> (R.id.android_fetchtext);
>bodyText.setText(dataText);
>setContentView(R.layout.notes_fetch);
>wl.release();
>}
>
>
> 
> I declared the following permissions in manifest:
>
> 
>
>
>
> 
> Here is my xml layout file:
>
> 
> 
> http://schemas.android.com/apk/res/
> android"
>  android:layout_width="wrap_content"
>android:layout_height="wrap_content">
>
>  android:layout_width="wrap_content"
>android:layout_height="wrap_content"/>
>  android:layout_width="wrap_content"
>android:layout_height="wrap_content"/>
> 
>
> 
>
> Problem is, application goes to force close with following error:
>
> 
> 10-19 22:11:49.404: DEBUG/FetchData(715): Entered OnCreate
> 10-19 22:11:49.413: DEBUG/FetchData(715): Set URL
> 10-19 22:11:49.435: DEBUG/FetchData(715): HttpURLConnection
> 10-19 22:11:49.464: DEBUG/FetchData(715): DIS
> 10-19 22:11:56.013: DEBUG/FetchData(715): Read
> 
> 10-19 22:11:59.191: WARN/ActivityManager(574): Launch timeout has
> expired, giving up wake lock!
> --
> 10-19 22:11:59.307: WARN/ActivityManager(574): Activity idle timeout
> for HistoryRecord{438d4478 com.android.demo.notepad3/.FetchData}
> ---
> 10-19 22:12:01.455: DEBUG/AndroidRuntime(715): Shutting down VM
>
> 10-19 22:12:01.455: WARN/dalvikvm(715): threadid=3: thread exiting
> with uncaught exception (group=0x4001aa28)
> 10-19 22:12:01.465: ERROR/AndroidRuntime(715): Uncaught handler:
> thread main exiting due to uncaught exception
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715):
> java.lang.RuntimeException: Unable to start activity ComponentInfo
> {com.android.demo.notepad3/com.android.demo.notepad3.FetchData}:
> java.lang.NullPointerException
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715): at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> 2401)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715): at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
> 2417)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715): at
> android.app.ActivityThread.access$2100(ActivityThread.java:116)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715): at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715): at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715): at
> android.os.Looper.loop(Looper.java:123)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715): at
> android.app.ActivityThread.main(ActivityThread.java:4203)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715): at
> java.lang.reflect.Method.invokeNative(Native Method)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715): at
> java.lang.reflect.Method.invoke(Method.java:521)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715): at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
> (ZygoteInit.java:791)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715): at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
> 10-19 22:12:01.834: ERROR/AndroidRuntime(715): at
> dalvik.system.NativeStart.mai

[android-beginners] Re: images from images.google.com

2009-10-21 Thread jphaberman

On Oct 18, 3:33 pm, pti4ik  wrote:
> Hi everybody!
> I need to search web for images by keyword or phrase with
> images.google.com and then to show some of the found images in my app.
> So does that web site have any API for this? Or what are the ways for
> solving this problem?
> Thanks!
>
> Andrew

Google AJAX Search API
http://code.google.com/apis/ajaxsearch/

Jeremy

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



[android-beginners] Barcode Scanning App

2009-10-21 Thread McLevesque

Hi,

A few questions:

First, is it possible to use the Zxing apps/code to convert a scanned
image into useful database info.  For example, can I scan and convert
to product features (ie. name, size, price etc).  Is the data freely
available from the internet for my application (commercial)?

Second and coupled with the above, how do I go about reading the code,
convert to searchable data, perform the internet search (on which
internet database) and retieve the data to my application?

Third, is it better for my application to store data, in the form of a
database, on the phone or in a user account on a web site somewhere?
If the data is simply pure numeric data, I would think this could be
easily stored on the SD card.  I want the user using my app to be able
to retrieve the data at a future point in time without having to worry
about connectivity.  Is the SQLite object/class easy enough to work
with.

Lots of questions - thanks for any response !

Marc

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



[android-beginners] Re: I Need Help Setting Up My ADB On MY Mac

2009-10-21 Thread javaco...@gmail.com

You need to create the file

~/.bash_profile

and you need to restart the terminal to be effective. 


Sent from my HTC

- Reply message -
From: "AlbertDroid" 
Date: Tue, Oct 20, 2009 3:23 PM
Subject: [android-beginners] I Need Help Setting Up My ADB On MY Mac
To: "Android Beginners" 


These are the instructions I followed:

- Download the Android SDK for Macintosh at: http://developer.android.com/sdk/
- Extract it
- Download Fastboot for OSX (If not included with SDK)
- Extract fastboot and place it in your /tools folder.
- Open up a terminal window
- type: pico .bash_profile (this will create a .bash_profile)
- type the following in the new screen: export PATH=$
{PATH}:/tools
- Hit CNTRL + X
- Hit Y (for yes to save)
- It will return you to the terminal screen… type: exit
- Restart terminal.

Now when i go into terminal i type adb and it says


-bash: adb: command not found


what did i do wrong



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



[android-beginners] Including pre-compiled 3rd party jar files to android application & building it with source code

2009-10-21 Thread Harsha

Hi,
I have an android application which uses 3rd party libraries(of which
I don't have source code). In eclipse I can include them as external
jars and build the APK without any problem.
But problem arises when I try to build the application with android
source code.

My question is how to include those 3rd party jars in the source(in
Android.mk)?

If any one of you came across this and have the solution please let me
know.

Thanks in advance,
Harsha C

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



[android-beginners] Re: Creating sub sampled Bitmap Objects for images on SDcard

2009-10-21 Thread zhen guo
using openFileDescriptor instead of openAssetFileDescriptor.

On Wed, Oct 21, 2009 at 3:09 PM, Samuh  wrote:

>
> I am working on a small program that is supposed to :
> 1. Display images on the SD card
> 2. Get the image chosen by the User and display it on Canvas.
> 3. Since the image can be large, sub sample it/ scale it or something
> appropriate
>
> I got the first two parts done using the following snippets:
>
> 1. By launching an intent such as:
> Intent photoPickerIntent = new Intent(
>Intent.ACTION_GET_CONTENT);
> photoPickerIntent.setType("image/*");
> startActivityForResult(photoPickerIntent, RQST_CODE);
>
> 2. The chosen image URI is received in onActivityResult(..):
> Uri chosenImageUri = data.getData();
>
> Now, I can create a Bitmap object from this URI :
> Media.getBitmap(this.getContentResolver(),chosenImageUri);
>
> The problem is: I want to resize/sub sample this bitmap. I did a bit
> of reading and found a certain
> BitmapFactory.Options class that has parameters whereby one can
> specify the sample size. This "options" instance can be passed to one
> of several overloaded BitmapFactory.decodeXX(..) methods, but none of
> these methods take a URI as parameter.
>
> Is there a way to do this?
>
> I even tried this:
> BitmapFactory.Options options = new BitmapFactory.Options();
>options.inSampleSize = 2;
>
> AssetFileDescriptor fileDescriptor =null;
>try {
>fileDescriptor =
> this.getContentResolver().openAssetFileDescriptor
> (chosenImageUri,"r");
>} catch (FileNotFoundException e) {
>e.printStackTrace();
>}
>finally{
>try {
>fileDescriptor.close();
>} catch (IOException e) {
>e.printStackTrace();
>}
>}
>
>mBitmap = BitmapFactory.decodeFileDescriptor
> (fileDescriptor.getFileDescriptor(),
>null,
>options);
>
> But i am still getting null in mBitmap.
>
>
>
>
> >
>

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



[android-beginners] problem related to submit the data

2009-10-21 Thread pinkee

hello,
 i just want some code to refer  as to submit my entered data in
the textfield, i.e some backhand connection or some more examples on
changing the focus of my window.


thank you
in advance
  drashti

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



[android-beginners] Installtion problem

2009-10-21 Thread Dev Jangir

hi i have created a mobile app in blackberry in which .JAD file is
required to install th e application and now i have to work on android
so which file is required to install in device.
thanx in advance

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



[android-beginners] Ad test problem in app with AdMob

2009-10-21 Thread erick nicolas

Hi,

I've got a problem with my Android app. It doesn't show test ad and I
don't understand why.

Here is my java code:

package org.ifies.android;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
import com.admob.android.ads.AdManager;
import com.admob.android.ads.AdView;

public class AdmobExample extends Activity{
  private TextView example_message;
  private AdView example_adview;

  @Override
  public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.main);

example_adview = (AdView) findViewById(R.id.ad);
example_adview.setVisibility(AdView.VISIBLE);

example_message = (TextView) findViewById(R.id.example_message);
example_message.setVisibility(TextView.VISIBLE);
  //  example_message.setText("This is an example of AdMob for
Android");

  }
}

Here my xml layout

http://schemas.android.com/apk/res/android";
   xmlns:app="http://schemas.android.com/apk/res/org.ifies.android";
   android:orientation="vertical"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   android:layout_gravity="bottom">







Here is the AndroidManifest.xml


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














And here is the logcat when app starts

10-21 17:57:25.064: INFO/AdMob SDK(722): The user ID is null
10-21 17:57:25.124: DEBUG/AdMob SDK(722): Publisher ID read from
AndroidManifest.xml is null
10-21 17:57:25.144: ERROR/AdMob SDK(722): Could not read
ADMOB_PUBLISHER_ID meta-data from AndroidManifest.xml.
10-21 17:57:25.144: ERROR/AdMob SDK(722):
java.lang.NullPointerException
10-21 17:57:25.144: ERROR/AdMob SDK(722): at
com.admob.android.ads.AdManager.getPublisherId(AdManager.java:157)
10-21 17:57:25.144: ERROR/AdMob SDK(722): at
com.admob.android.ads.AdRequester.buildParamString(AdRequester.java:
184)
10-21 17:57:25.144: ERROR/AdMob SDK(722): at
com.admob.android.ads.AdRequester.requestAd(AdRequester.java:67)
10-21 17:57:25.144: ERROR/AdMob SDK(722): at
com.admob.android.ads.AdView$1.run(AdView.java:317)
10-21 17:57:25.244: WARN/AdMob SDK(722): Could not get ad from AdMob
servers.
10-21 17:57:25.244: WARN/AdMob SDK(722):
java.lang.IllegalStateException: Publisher ID is not set!  To serve
ads you must set your publisher ID assigned from www.admob.com.
Either add it to AndroidManifest.xml under the  tag or
call AdManager.setPublisherId().
10-21 17:57:25.244: WARN/AdMob SDK(722): at
com.admob.android.ads.AdRequester.buildParamString(AdRequester.java:
188)
10-21 17:57:25.244: WARN/AdMob SDK(722): at
com.admob.android.ads.AdRequester.requestAd(AdRequester.java:67)
10-21 17:57:25.244: WARN/AdMob SDK(722): at
com.admob.android.ads.AdView$1.run(AdView.java:317)
10-21 17:57:25.264: INFO/AdMob SDK(722): Server replied that no ads
are available (141ms)


I'm developing with Eclipse, Android SDK 1.5 under Kubuntu.

Can anyone help me please?

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



[android-beginners] Re: Load youtube videos

2009-10-21 Thread Jeroen Beckers
No answer... Is it maybe possible to load the default youtube player? And
how would it work exactly? Would it open up fullscreen above my application,
or would it switch tot hat application and put my application in the
background?

(I don't have an android phone yet, and no experience with android)

On Tue, Oct 20, 2009 at 10:45 AM, Dauntless  wrote:

>
> Hi,
>
> Is it possible to load youtube videos? I'm trying to port a flex
> mashup to android and I want to play some youtube video's inside the
> application. Is that possible?
>
> Greets,
> Dauntless
>
> >
>

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



[android-beginners] HttpClient and httpParams not working

2009-10-21 Thread trostum

Hi.
I have a simple android app that posts data to a php page where i just
print out GETand POST variable named "quest".

Problem is that i can't get HttpClient to add the "quest" POST
parameter.  Why is the parameter missing in the POST?

DefaultHttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost("http://jordarundt.org/
turen.php");
client.getParams().setParameter("quest", "testing");
post.getParams().setParameter("quest", "testing");
BufferedReader br = null;

try{
HttpResponse response = client.execute(post);
int returnCode = response.getStatusLine().getStatusCode();

if(returnCode == HttpStatus.SC_NOT_IMPLEMENTED) {
System.err.println("The Post method is not implemented
by this URI");
// still consume the response body
response.getEntity().getContent().toString();
} else {
br = new BufferedReader(new InputStreamReader
(response.getEntity().getContent()));
String readLine;
String innhold = "";
while(((readLine = br.readLine()) != null)) {
innhold += readLine;
}
text.setText(innhold);
}
} catch (Exception e) {
System.err.println(e);
} finally {
client.getConnectionManager().shutdown();
if(br != null) try { br.close(); } catch (Exception fe) {}
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: HttpClient and httpParams not working

2009-10-21 Thread James Yum
Hi,
You can probably find some examples looking on Google. In any case, you
would do something like this:

List nvps = new ArrayList();
   nvps.add(new BasicNameValuePair("quest", "testing"));
post.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));


Cheers,
James


On Wed, Oct 21, 2009 at 11:50 AM, trostum  wrote:

>
> Hi.
> I have a simple android app that posts data to a php page where i just
> print out GETand POST variable named "quest".
>
> Problem is that i can't get HttpClient to add the "quest" POST
> parameter.  Why is the parameter missing in the POST?
>
>DefaultHttpClient client = new DefaultHttpClient();
>HttpPost post = new HttpPost("http://jordarundt.org/
> turen.php");
>client.getParams().setParameter("quest", "testing");
>post.getParams().setParameter("quest", "testing");
>BufferedReader br = null;
>
>try{
>HttpResponse response = client.execute(post);
>int returnCode = response.getStatusLine().getStatusCode();
>
>if(returnCode == HttpStatus.SC_NOT_IMPLEMENTED) {
>System.err.println("The Post method is not implemented
> by this URI");
>// still consume the response body
>response.getEntity().getContent().toString();
>} else {
>br = new BufferedReader(new InputStreamReader
> (response.getEntity().getContent()));
>String readLine;
>String innhold = "";
>while(((readLine = br.readLine()) != null)) {
>innhold += readLine;
>}
>text.setText(innhold);
>}
>} catch (Exception e) {
>System.err.println(e);
>} finally {
>client.getConnectionManager().shutdown();
>if(br != null) try { br.close(); } catch (Exception fe) {}
>}
> >
>

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



[android-beginners] OnLocationChanged never called

2009-10-21 Thread Vinicius Carvalho

Hello there! I'm trying to create a simple app to test GPS
integration. Using the emulator and geo fix commands from telnet I'm
able to get it working as expected. But installing it on a device,
when I click on the first button to start listening for updates I can
see the the GPS is active (by the small radar icon) but, moving
around, It never updates the textfields it were suppose to update.

Any ideas?

package com.furiousbob.android.gps;

import android.app.Activity;
import android.content.Context;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.sax.TextElementListener;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

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

  private boolean amIListening = false;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button btn = (Button)this.findViewById(R.id.Button01);
Button btn2 = (Button)this.findViewById(R.id.Button02);


final LocationManager lm = (LocationManager)getSystemService
(Context.LOCATION_SERVICE);
final LocationListener gpsListener = new MyGPSListener(this);

btn.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
if(!amIListening){
lm.requestLocationUpdates("gps", 5000, 
0, gpsListener);
amIListening = true;
}
}
});

btn2.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
if(amIListening){
lm.removeUpdates(gpsListener);
amIListening = false;
}

}
});
}

private class MyGPSListener implements LocationListener{

private Activity activity;

public MyGPSListener(Activity parent){
this.activity = parent;
}

@Override
public void onLocationChanged(Location location) {
Double lat = location.getLatitude();
Double lon = location.getLongitude();
Double alt = location.getAltitude();

((TextView)activity.findViewById(R.id.TextView01)).setText
("Latitude: " + lat);

((TextView)activity.findViewById(R.id.TextView02)).setText
("Longitude: " + lon);

((TextView)activity.findViewById(R.id.TextView03)).setText
("Altitude: " + alt);
}

@Override
public void onProviderDisabled(String provider) {
// TODO Auto-generated method stub

}

@Override
public void onProviderEnabled(String provider) {
// TODO Auto-generated method stub

}

@Override
public void onStatusChanged(String provider, int status, Bundle
extras) {
// TODO Auto-generated method stub

}

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



[android-beginners] Re: bounce not working for my layout

2009-10-21 Thread Indicator Veritatis

Well, I am stumped. But perhaps someone would be able to offer you
better help if you tell us a little more about your layout. You do,
after all, seem pretty confident that it is with your layout that it
fails. Do you really have, for example, room for all the views to fit
in either a single row or a single column? Which one of row/column are
you trying to lay them out in?

BTW: I am assuming you changed nothing in the snippet below from the
API demo.

On Oct 20, 3:30 am, jax  wrote:
> From the API demo i tried the bounce animation
>
>         final View target = findViewById(R.id.target);
>         final View targetParent = (View) target.getParent();
>
>         Animation a = new TranslateAnimation(0.0f,
>                 targetParent.getWidth() - target.getWidth() -
> targetParent.getPaddingLeft() -
>                 targetParent.getPaddingRight(), 0.0f, 0.0f);
>         a.setDuration(1000);
>         a.setStartOffset(300);
>         a.setRepeatMode(Animation.RESTART);
>         a.setRepeatCount(Animation.INFINITE);
>
> The problem is that this does not work with my layout.  I finally got
> working but had to hard code a value for:
>
> targetParent.getWidth() - target.getWidth() -
> targetParent.getPaddingLeft() - targetParent.getPaddingRight()
>
> I don't like hard coding this in but it is the only way I could get it
> to work.  My View is inside a LinearLayout and I put a padding of
> 10dip.
>
> Any ideas?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] make seekbar (un)clickable depending on RadioButton

2009-10-21 Thread Stefan

Hello,

i want to have following layout:

if a radiobutton is checked:  the user can't use the seekbar.
if the radiobutton is unchecked: the user can use the seekbar.

Can I implement this behaviour in the layout xml file or must i check
the the status of the radiobutton in the onCreate method and than make
the seekbar (un)clickable?!

Thanks,
Stefan

PS: if the radiobutton is checked, i want to see the seekbar, but it
shouldnt be active. perhaps the color of the seekbar should become
gray to show the user, that this seekbar isnt available now.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Error early in development

2009-10-21 Thread hawksd20

Does anyone know how to fix this? I've tried reinstalling and
installing in different locations on my computer and I can't find
anything about the user.home property online and it is very
frustrating because I would like to start developing android apps but
I can't even start.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: OnLocationChanged never called

2009-10-21 Thread Vinicius Carvalho

I got this to work, but only after opening Google Maps app. If I open
GMaps and then hit back, re open my app, the listener start working.
Is this the expected behavior?

On Oct 21, 9:12 pm, Vinicius Carvalho 
wrote:
> Hello there! I'm trying to create a simple app to test GPS
> integration. Using the emulator and geo fix commands from telnet I'm
> able to get it working as expected. But installing it on a device,
> when I click on the first button to start listening for updates I can
> see the the GPS is active (by the small radar icon) but, moving
> around, It never updates the textfields it were suppose to update.
>
> Any ideas?
>
> package com.furiousbob.android.gps;
>
> import android.app.Activity;
> import android.content.Context;
> import android.location.Location;
> import android.location.LocationListener;
> import android.location.LocationManager;
> import android.os.Bundle;
> import android.sax.TextElementListener;
> import android.util.Log;
> import android.view.View;
> import android.view.View.OnClickListener;
> import android.widget.Button;
> import android.widget.EditText;
> import android.widget.TextView;
>
> public class MainActivity extends Activity {
>     /** Called when the activity is first created. */
>
>       private boolean amIListening = false;
>
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.main);
>         Button btn = (Button)this.findViewById(R.id.Button01);
>         Button btn2 = (Button)this.findViewById(R.id.Button02);
>
>         final LocationManager lm = (LocationManager)getSystemService
> (Context.LOCATION_SERVICE);
>         final LocationListener gpsListener = new MyGPSListener(this);
>
>         btn.setOnClickListener(new OnClickListener() {
>
>                         @Override
>                         public void onClick(View v) {
>                                 if(!amIListening){
>                                         lm.requestLocationUpdates("gps", 
> 5000, 0, gpsListener);
>                                         amIListening = true;
>                                 }
>                         }
>                 });
>
>         btn2.setOnClickListener(new OnClickListener() {
>
>                         @Override
>                         public void onClick(View v) {
>                                 if(amIListening){
>                                         lm.removeUpdates(gpsListener);
>                                         amIListening = false;
>                                 }
>
>                         }
>                 });
>     }
>
>     private class MyGPSListener implements LocationListener{
>
>         private Activity activity;
>
>         public MyGPSListener(Activity parent){
>                 this.activity = parent;
>         }
>
>                 @Override
>                 public void onLocationChanged(Location location) {
>                         Double lat = location.getLatitude();
>                         Double lon = location.getLongitude();
>                         Double alt = location.getAltitude();
>                         
> ((TextView)activity.findViewById(R.id.TextView01)).setText
> ("Latitude: " + lat);
>                         
> ((TextView)activity.findViewById(R.id.TextView02)).setText
> ("Longitude: " + lon);
>                         
> ((TextView)activity.findViewById(R.id.TextView03)).setText
> ("Altitude: " + alt);
>                 }
>
>                 @Override
>                 public void onProviderDisabled(String provider) {
>                         // TODO Auto-generated method stub
>
>                 }
>
>                 @Override
>                 public void onProviderEnabled(String provider) {
>                         // TODO Auto-generated method stub
>
>                 }
>
>                 @Override
>                 public void onStatusChanged(String provider, int status, 
> Bundle
> extras) {
>                         // TODO Auto-generated method stub
>
>                 }
>
>     }
>
> }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Including pre-compiled 3rd party jar files to android application & building it with source code

2009-10-21 Thread Naveen Krishna Ch
In Andoird APIDemos there is an application PlatformLibrary.

There he shows exactly how to use a Jar file to build our application.

Add an xml linking the path and add in the Android.mk,
Hope it helps
2009/10/21 Harsha 

>
> Hi,
> I have an android application which uses 3rd party libraries(of which
> I don't have source code). In eclipse I can include them as external
> jars and build the APK without any problem.
> But problem arises when I try to build the application with android
> source code.
>
> My question is how to include those 3rd party jars in the source(in
> Android.mk)?
>
> If any one of you came across this and have the solution please let me
> know.
>
> Thanks in advance,
> Harsha C
>
> >
>


-- 
Shine bright,
(: Naveen Krishna Ch :)

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



[android-beginners] Re: When I run getSize() on my text view it returns 0

2009-10-21 Thread jax

Sorry Mark...I mean getWidth() here is the sample that I am following
from API demo.

("target" is a TextView)


final View target = findViewById(R.id.target);
final View targetParent = (View) target.getParent();

Animation a = new TranslateAnimation(0.0f,
targetParent.getWidth() - target.getWidth() -
targetParent.getPaddingLeft() -
targetParent.getPaddingRight(), 0.0f, 0.0f);
a.setDuration(1000);
a.setStartOffset(300);
a.setRepeatMode(Animation.RESTART);
a.setRepeatCount(Animation.INFINITE);

   a.setInterpolator(AnimationUtils.loadInterpolator
(this,android.R.anim.bounce_interpolator));

  target.startAnimation(a);

On Oct 22, 12:58 am, Mark Murphy  wrote:
> jax wrote:
> > When I run getSize() on my text view it returns 0?
>
> TextView does not have a getSize() method.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Development Wiki:http://wiki.andmob.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: When I run getSize() on my text view it returns 0

2009-10-21 Thread nirav shah
To get size first of all you need to display that view on screen. after that
you can have size of view.

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



[android-beginners] Re: Radio Transmitter

2009-10-21 Thread aggie_hellcat2009

Which is the best method for transmitting and receiving signals at 433
Mhz? This frequency is not the same as the phone network. The device
that I am transmitting to does not have bluetooth or Wifi either.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: XML Parser error

2009-10-21 Thread GreenRiver

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



[android-beginners] Correct way to measure a view

2009-10-21 Thread Samuh

I wanted to know if I am doing this right? Or is there something that
I am missing?


I have created a custom view by extending the View class. The sole
purpose of the view is to display a Bitmap on the canvas. The Bitmap
to be displayed in View is supplied by the view-containing-activity
using a setter method, say setImage(Bitmap).I want the view to be
sized according to the Bitmap dimensions, something like a wrap
content and also to be displayed in the center of the Activity. So, in
the layout XML for the activity I have :

http://schemas.android.com/apk/res/android";
android:gravity="center">




 Also, I have coded the onMeasure(..) for the view as:

protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
{
if(mBitmap != null){
setMeasuredDimension(
mBitmap.getWidth(),
mBitmap.getHeight());
}
else{
   Log.e(TAG,"Bitmap not initialized");
}
}

Now when the screen orientation changes, I want to:
1. Resize the bitmap according to screen dimensions
2. Re-measure the view.

For this, I have coded the onSizeChanged(..) as:

@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
// TODO Auto-generated method stub
super.onSizeChanged(w, h, oldw, oldh);
mBitmap = BitmapUtils.resizeBitmap(mBitmap, w, h);
}

When I run this code, everything works fine in Potrait mode: the view
is displayed in the center
However, in landscape mode, though the view is displayed in center,
the bitmap is not resized neither is the view re-measured. This is
probably because onSizeChanged is called after onMeasure(..). Maybe, I
could resize the Bitmap in the activity and them pass it to the View.






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



[android-beginners] Run the Previous Activity

2009-10-21 Thread Shobhit Kasliwal

Hi
I am using tabbed Activity and Inside every tab I have different
activities. on one of the activity (inside tabs) on click of a button
I am starting a new activity(with a button it )  now I want to come
back on previous activity on click of that button in new Activity and
do some click events.
I used the finish() on the new activity and I am getting back to the
previous tabbed activity but I am not able to do any click event on
that activity.
I checked the Logs and it is saying that " No Window to dispatch
pointer 1"  what can be the problem  ?
I also tried opening a new activity (to open the previous tabbed
activity) but still no luck.
can anyone suggest me any alternate way of doing that
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Run the Previous Activity

2009-10-21 Thread Naveen Krishna Ch
Add a onDestroy or onPause in the 2nd activity,
and do a finish there..

2009/10/22 Shobhit Kasliwal 

>
> Hi
> I am using tabbed Activity and Inside every tab I have different
> activities. on one of the activity (inside tabs) on click of a button
> I am starting a new activity(with a button it )  now I want to come
> back on previous activity on click of that button in new Activity and
> do some click events.
> I used the finish() on the new activity and I am getting back to the
> previous tabbed activity but I am not able to do any click event on
> that activity.
> I checked the Logs and it is saying that " No Window to dispatch
> pointer 1"  what can be the problem  ?
> I also tried opening a new activity (to open the previous tabbed
> activity) but still no luck.
> can anyone suggest me any alternate way of doing that
> >
>


-- 
Shine bright,
(: Naveen Krishna Ch :)

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



[android-beginners] Trouble with a cursor

2009-10-21 Thread brucko

I'm having trouble with a SQLite database that I have on the SDCard.

when I do a query that returns a cursor I keep getting an error when i
try to call the count() method.

Here's the code

Cursor cursor = mDb.query
(LOGON_TABLE,// table
new String[] { KEY_ROW_ID },
//
columns,
KEY_USER_NAME + " = ? AND " +
KEY_CARRIER_ID + " = ? AND " +
KEY_DEPOT + " = ? AND " +
KEY_TIME + " = ? AND " +
KEY_RUN + " = ?",   
  //selection,
new String[] { user, carrier, depot, logonTime, 
run },//
selectionArgs,
null, null, null,   
//
groupBy, having, orderBy
" 1
");//
limit

if (cursor.getCount() < 1) {<--error occurs here
 ...
}

It  gives a datatype mismatch as a result of calling count...

10-22 04:20:21.330: ERROR/AndroidRuntime(15768):
android.database.sqlite.SQLiteException: datatype mismatch

10-22 04:20:21.330: ERROR/AndroidRuntime(15768): at
android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
10-22 04:20:21.330: ERROR/AndroidRuntime(15768): at
android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:75)
10-22 04:20:21.330: ERROR/AndroidRuntime(15768): at
android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:288)
10-22 04:20:21.330: ERROR/AndroidRuntime(15768): at
android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:269)
10-22 04:20:21.330: ERROR/AndroidRuntime(15768): at
android.database.AbstractCursor.moveToPosition(AbstractCursor.java:
171)
10-22 04:20:21.330: ERROR/AndroidRuntime(15768): at
android.database.AbstractCursor.moveToFirst(AbstractCursor.java:248)
10-22 04:20:21.330: ERROR/AndroidRuntime(15768): at
com.paperfree.database.DatabaseService.insertLogon
(DatabaseService.java:288)
10-22 04:20:21.330: ERROR/AndroidRuntime(15768): at
com.paperfree.load.LoadView$2.onServiceConnected(LoadView.java:76)
10-22 04:53:20.471: ERROR/AndroidRuntime(22252):
android.database.sqlite.SQLiteException: datatype mismatch
10-22 04:53:20.471: ERROR/AndroidRuntime(22252): at
android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
10-22 04:53:20.471: ERROR/AndroidRuntime(22252): at
android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:75)
10-22 04:53:20.471: ERROR/AndroidRuntime(22252): at
android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:288)

10-22 04:53:20.471: ERROR/AndroidRuntime(22252): at
android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:269)

10-22 04:53:20.471: ERROR/AndroidRuntime(22252): at
com.paperfree.database.DatabaseService.insertLogon
(DatabaseService.java:268)

The database file is on the sdCard and all the columns are there, but
I haven't put any data there so I am expexcting a cursor with zero
rows.

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



[android-beginners] Re: Run the Previous Activity

2009-10-21 Thread shobhit kasliwal
Thanks for the reply
but if I do that .then how can I finish activity on button click event ?
And also My problem is on the previous activity coz I am getting to the
previous activity from button click event on the new activity but I am not
able to do any event on the previous activity after that.
So how can I do that ..??


On Thu, Oct 22, 2009 at 12:02 AM, Naveen Krishna Ch  wrote:

> Add a onDestroy or onPause in the 2nd activity,
> and do a finish there..
>
> 2009/10/22 Shobhit Kasliwal 
>
>>
>> Hi
>> I am using tabbed Activity and Inside every tab I have different
>> activities. on one of the activity (inside tabs) on click of a button
>> I am starting a new activity(with a button it )  now I want to come
>> back on previous activity on click of that button in new Activity and
>> do some click events.
>> I used the finish() on the new activity and I am getting back to the
>> previous tabbed activity but I am not able to do any click event on
>> that activity.
>> I checked the Logs and it is saying that " No Window to dispatch
>> pointer 1"  what can be the problem  ?
>> I also tried opening a new activity (to open the previous tabbed
>> activity) but still no luck.
>> can anyone suggest me any alternate way of doing that
>>
>>
>
>
> --
> Shine bright,
> (: Naveen Krishna Ch :)
>
>
> >
>


-- 
Shobhit Kasliwal
Application Developer Intern
Liventus Designs
3400 Dundee Rd Northbrook IL 60062
skasli...@liventus.com
office: 847-291-1395 ext. 192
Cell: (309) 826 4709

Charles de 
Gaulle
- "The better I get to know men, the more I find myself loving dogs."

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



[android-beginners] Re: Run the Previous Activity

2009-10-21 Thread Naveen Krishna Ch
This should be working
Activity 1   Activity 2

onCreate
onStart <-
onButton ---> onCreate/ |
onStart |
onButtondo a finish|
onDestroy> finish()-->|
onDestroy i will be out of ur app



2009/10/22 shobhit kasliwal 

> Thanks for the reply
> but if I do that .then how can I finish activity on button click event
> ?
> And also My problem is on the previous activity coz I am getting to the
> previous activity from button click event on the new activity but I am not
> able to do any event on the previous activity after that.
> So how can I do that ..??
>
>
>  On Thu, Oct 22, 2009 at 12:02 AM, Naveen Krishna Ch  gmail.com> wrote:
>
>>  Add a onDestroy or onPause in the 2nd activity,
>> and do a finish there..
>>
>> 2009/10/22 Shobhit Kasliwal 
>>
>>>
>>> Hi
>>> I am using tabbed Activity and Inside every tab I have different
>>> activities. on one of the activity (inside tabs) on click of a button
>>> I am starting a new activity(with a button it )  now I want to come
>>> back on previous activity on click of that button in new Activity and
>>> do some click events.
>>> I used the finish() on the new activity and I am getting back to the
>>> previous tabbed activity but I am not able to do any click event on
>>> that activity.
>>> I checked the Logs and it is saying that " No Window to dispatch
>>> pointer 1"  what can be the problem  ?
>>> I also tried opening a new activity (to open the previous tabbed
>>> activity) but still no luck.
>>> can anyone suggest me any alternate way of doing that
>>>
>>>
>>
>>
>> --
>> Shine bright,
>> (: Naveen Krishna Ch :)
>>
>>
>>
>>
>
>
> --
> Shobhit Kasliwal
> Application Developer Intern
> Liventus Designs
> 3400 Dundee Rd Northbrook IL 60062
> skasli...@liventus.com
> office: 847-291-1395 ext. 192
> Cell: (309) 826 4709
>
> Charles de 
> Gaulle - 
> "The better I get to know men, the more I find myself loving dogs."
>  >
>


-- 
Shine bright,
(: Naveen Krishna Ch :)

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



[android-beginners] "unknown socket error " Is anyone know this error??

2009-10-21 Thread GreenRiver

I got that error because of code line below:

url = new URL("http://www.helloandroid.com";);
InputStream mystream = null;
   try{
   mystream = url.openStream();
   }catch (SocketException e)
   {
   tv.setText("Error: " + e.getMessage());
   }


Something wrongs here??? I can't debug . Please help me :)
Thanks in advance :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Trouble with a cursor

2009-10-21 Thread zhen guo
before getCount,  you should add cursor.moveToFirst().

On Thu, Oct 22, 2009 at 1:05 PM, brucko  wrote:

>
> I'm having trouble with a SQLite database that I have on the SDCard.
>
> when I do a query that returns a cursor I keep getting an error when i
> try to call the count() method.
>
> Here's the code
>
> Cursor cursor = mDb.query
> (LOGON_TABLE,// table
>new String[] { KEY_ROW_ID },
>//
> columns,
>KEY_USER_NAME + " = ? AND " +
>KEY_CARRIER_ID + " = ? AND "
> +
>KEY_DEPOT + " = ? AND " +
>KEY_TIME + " = ? AND " +
>KEY_RUN + " = ?",
>   //selection,
>new String[] { user, carrier, depot,
> logonTime, run },//
> selectionArgs,
>null, null, null,
> //
> groupBy, having, orderBy
>" 1
> ");//
> limit
>
>if (cursor.getCount() < 1) {<--error occurs here
> ...
>}
>
> It  gives a datatype mismatch as a result of calling count...
>
> 10-22 04:20:21.330: ERROR/AndroidRuntime(15768):
> android.database.sqlite.SQLiteException: datatype mismatch
>
> 10-22 04:20:21.330: ERROR/AndroidRuntime(15768): at
> android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
> 10-22 04:20:21.330: ERROR/AndroidRuntime(15768): at
> android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:75)
> 10-22 04:20:21.330: ERROR/AndroidRuntime(15768): at
> android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:288)
> 10-22 04:20:21.330: ERROR/AndroidRuntime(15768): at
> android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:269)
> 10-22 04:20:21.330: ERROR/AndroidRuntime(15768): at
> android.database.AbstractCursor.moveToPosition(AbstractCursor.java:
> 171)
> 10-22 04:20:21.330: ERROR/AndroidRuntime(15768): at
> android.database.AbstractCursor.moveToFirst(AbstractCursor.java:248)
> 10-22 04:20:21.330: ERROR/AndroidRuntime(15768): at
> com.paperfree.database.DatabaseService.insertLogon
> (DatabaseService.java:288)
> 10-22 04:20:21.330: ERROR/AndroidRuntime(15768): at
> com.paperfree.load.LoadView$2.onServiceConnected(LoadView.java:76)
> 10-22 04:53:20.471: ERROR/AndroidRuntime(22252):
> android.database.sqlite.SQLiteException: datatype mismatch
> 10-22 04:53:20.471: ERROR/AndroidRuntime(22252): at
> android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
> 10-22 04:53:20.471: ERROR/AndroidRuntime(22252): at
> android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:75)
> 10-22 04:53:20.471: ERROR/AndroidRuntime(22252): at
> android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:288)
>
> 10-22 04:53:20.471: ERROR/AndroidRuntime(22252): at
> android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:269)
>
> 10-22 04:53:20.471: ERROR/AndroidRuntime(22252): at
> com.paperfree.database.DatabaseService.insertLogon
> (DatabaseService.java:268)
>
> The database file is on the sdCard and all the columns are there, but
> I haven't put any data there so I am expexcting a cursor with zero
> rows.
>
> Thanks
> >
>

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



[android-beginners] Re: HttpClient and httpParams not working

2009-10-21 Thread trostum

Thank you!

That worked perfectly :)

On Oct 21, 9:03 pm, James Yum  wrote:
> Hi,
> You can probably find some examples looking on Google. In any case, you
> would do something like this:
>
>         List nvps = new ArrayList();
>    nvps.add(new BasicNameValuePair("quest", "testing"));
> post.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));
>
> Cheers,
> James
>
> On Wed, Oct 21, 2009 at 11:50 AM, trostum  wrote:
>
> > Hi.
> > I have a simple android app that posts data to a php page where i just
> > print out GETand POST variable named "quest".
>
> > Problem is that i can't get HttpClient to add the "quest" POST
> > parameter.  Why is the parameter missing in the POST?
>
> >        DefaultHttpClient client = new DefaultHttpClient();
> >        HttpPost post = new HttpPost("http://jordarundt.org/
> > turen.php");
> >        client.getParams().setParameter("quest", "testing");
> >        post.getParams().setParameter("quest", "testing");
> >        BufferedReader br = null;
>
> >        try{
> >            HttpResponse response = client.execute(post);
> >            int returnCode = response.getStatusLine().getStatusCode();
>
> >            if(returnCode == HttpStatus.SC_NOT_IMPLEMENTED) {
> >                System.err.println("The Post method is not implemented
> > by this URI");
> >                // still consume the response body
> >                response.getEntity().getContent().toString();
> >            } else {
> >                br = new BufferedReader(new InputStreamReader
> > (response.getEntity().getContent()));
> >                String readLine;
> >                String innhold = "";
> >                while(((readLine = br.readLine()) != null)) {
> >                    innhold += readLine;
> >                }
> >                text.setText(innhold);
> >            }
> >        } catch (Exception e) {
> >            System.err.println(e);
> >        } finally {
> >            client.getConnectionManager().shutdown();
> >            if(br != null) try { br.close(); } catch (Exception fe) {}
> >        }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: "unknown socket error " Is anyone know this error??

2009-10-21 Thread GreenRiver

Althougt i have added " " in AndroidManifest.xml
file but still appears error. I got output in textview "Error: Host is
unresolve: www.helloandroid.com:80"

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