[android-developers] Re: Goodbye friends and thanks for all the help.

2010-09-01 Thread brucko
> Essentially, there has been no new countries added to the list for
> some time. Links like this
>
> http://market.android.com/support/bin/answer.py?hl=en&answer=143779
>


oops. wrong link. the other one has been changed now

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


[android-developers] Re: Goodbye friends and thanks for all the help.

2010-09-01 Thread brucko
>Yes, its extremely frustrating ..
...

> I hate it when business models restrict innovation.


I've moved from frustration to resignation now. Personally, I feel
that Google has been, and still is, one of the most significant
driving forces behind innovation in IT today. Things to some extent go
where Google takes us, and it was generally the open inclusive nature
of Google and Android that brought us to the table - hoping for a few
scraps;).

But reality at some point has to take over.

Developers in Australia (  others in places such as Canada, Ireland
and many countries too numerous to name but worthy to mention) are
simply not part of Googles business plan ATM.

Essentially, there has been no new countries added to the list for
some time. Links like this

http://market.android.com/support/bin/answer.py?hl=en&answer=143779

only add to the confusion.


I suppose I've been made to feel a bit like Marie in the film "When
Harry Met Sally"

Marie, Sallys' friend is having an affair for years with a married man
who is always promising to leave his wife.

Marie: I don't think he's ever going to leave her.
Sally: I know he's never going to leave her.
Marie: You're right, you're right. I know you're right.


Lets be honest with ourselves.

Developers in countries not already enabled for paid  apps are not a
priority for Google - despite the promises.

With PayPal coming, it might be happening (although let's not hold our
breath).

But I doubt GoogleCheckout is happening - or it would have already.
It's GoogleCheckout that demonstrates Googles commitment. At the risk
of sounding very full of myself



I'm right, I'm right.

You know I'm right. ;)

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


[android-developers] Goodbye friends and thanks for all the help.

2010-09-01 Thread brucko
After yesterdays little farce,

http://ausdroid.net/2010/09/01/google-now-supporting-paid-applications-for-aussie-developers/

and the total lack of care factor re: Google and developers in
countries unable to set up merchant accounts...

I've decided to shelve all my consumer Android projects and go back to
other platforms. Unfortunately, not all apps are suitable for all
revenue models. :(

and beer still needs real money.

When things change I will be back, as I still believe Android has a
fantastic potential that is only just beginning to be realised.

Just wanted to say thanks to everyone here for the help and the
general good feeling that exists in this forum.

Best Regards,

Geoff

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


[android-developers] Re: Launching barcode reading from browser

2010-08-11 Thread brucko
Take a look at the zxing web page.

http://code.google.com/p/zxing/wiki/ScanningFromWebPages

Essentially any web developer can do this - but you are probably
relying on the BarcodeScanner app already beibg installed on the
phone. (haven't really tried it out myself)

Best Regards,

Geoff

On Aug 11, 1:38 am, m  wrote:
> Appreciate the snarkiness but that's not even what I'm asking about!
> Nice try though.
>
> On Aug 10, 8:46 am, Kostya Vasilyev  wrote:
>
> >http://tinyurl.com/35o2ell
>
> > 10.08.2010 16:40, m пишет:
>
> > > Surely someone must know...?
>
> > > On Aug 9, 5:22 pm, m  wrote:
>
> > >> On the Google Products page, from an Android device, there is a "scan
> > >> barcode" button that launches a 3rd party barcode scanning app, which
> > >> returns results back to the browser.
>
> > >> 1)  How did they do this?
> > >> 2)  Is this available for any web developer to do, or a Google ->
> > >> Google api only?
>
> > --
> > Kostya Vasilev -- WiFi Manager + pretty widget 
> > --http://kmansoft.wordpress.com
>
>

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


[android-developers] Re: Binder is leaked by binding to a service

2010-08-02 Thread brucko

Sorry for slow reply - been away.

> By the way, if I changed LocalBinder to a static inner class, does it
> make sense ?

I have made a separate generic class that usually use for all my
services ie one that I import in - just a bit of cut and paste. That
way I can reuse the code for all my Services.

> That means to return back the same binder for all connections?

A Java expert may correct me here - but I think you will find that
"static" is one of those words in Java that has different meanings
depending on where it is used. I believe in the case of inner classes
"static"does not mean that the inner class is the same object for all
instances of the outer class. Rather it is an object that no longer
has a reference to the outer class -  and that you will need to pass a
reference in when you instantiate the inner class and get the inner
class to null out that reference when no longer required. ( if you
want to use the outer classes methods and non private fields)

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


[android-developers] Re: Binder is leaked by binding to a service

2010-07-30 Thread brucko
This appears to be a bug

http://code.google.com/p/android/issues/detail?id=6426

watch out. If your LocalBinder is a non-static inner class, then you
will leak your Service as well as non-static inner classes have a
reference to the outer class.

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


[android-developers] Re: Multiple Sliding Drawers

2010-07-30 Thread brucko
Disclaimer - I have no idea about what I am talking about. I have not
tried this.

Could you use one sliding drawer with three views on the handle - but
change the drawer contents based on what part of the handle was
touched to drag up. To make it a better user experience, you might
make the handle section become the whole handle when it is touched?

Good luck.

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


[android-developers] Re: Wrapping content of a TableRow

2010-07-26 Thread brucko
Chris,

You probably need two things.

1/ make sure your text view is multiline, as opposed to singleLine, if
you want it to wrap to the next line.

2/ you will need to set the column for your  text view (the one that
you want to wrap) to "shrinkable".
have a look at

http://developer.android.com/intl/de/reference/android/widget/TableLayout.html

If you don't do this, Android will just make each column as wide as
its content. It doesn't know which columns are ok to shrink and which
need to stay full width. That's your job.



On Jul 27, 1:49 am, Chris Stewart  wrote:
> Has anyone run into this?  Could use any advice. :)
>
> Chris Stewart
> cstewart...@gmail.com
>
> On Sat, Jul 24, 2010 at 11:51 PM, Chris Stewart wrote:
>
> > I'm adding TableRow objects to my view dynamically based upon how many
> > items are in a collection I've loaded.  Everything loads fine and works
> > nearly as expected.  The one issue I'm having is that the text does not wrap
> > if it's too long for the screen, but instead goes off the side.  Can anyone
> > take a peek and tell me what I'm missing?
>
> >             TableRow tr = new TableRow(this);
> >             tr.setId(100 + current);
> >             tr.setLayoutParams(new LayoutParams(
> >                     LayoutParams.FILL_PARENT,
> >                     LayoutParams.FILL_PARENT));
>
> >             TextView labelTV = new TextView(this);
> >             labelTV.setId(200 + current);
> >             labelTV.setText(rssItem.getTitle() + "\n" +
> > rssItem.getSubTitle() + "\n" + rssItem.getDescription());
> >             labelTV.setTextColor(Color.WHITE);
> >             tr.addView(labelTV);
>
> >             tl.addView(tr, new TableLayout.LayoutParams(
> >                     LayoutParams.FILL_PARENT,
> >                     LayoutParams.FILL_PARENT));
>
> > Chris Stewart
> > cstewart...@gmail.com
> >http://www.androidsdkforum.com

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


[android-developers] Re: Trying to retrieve IMEI but Eclipse says "method getSystemService(String) is undefined"

2010-07-20 Thread brucko
getSystemService() is not a static method and in Context is only an
abstract method. You need to provide an actual Context such as your
current Activity instance.

On Jul 21, 2:52 am, Mystique  wrote:
> Wonder why do I get this error?
>
> String srvcName = Context.TELEPHONY_SERVICE;
> TelephonyManager telephonyManager =
> (TelephonyManager)getSystemService(srvcName);
> String deviceId = telephonyManager.getDeviceId();

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


[android-developers] Re: simplecursoradapter

2010-07-19 Thread brucko
to make things easier, you could use

Activity.startManagingCursor()

and the Activity will take care of it for you

On Jul 20, 1:33 am, ecforu  wrote:
> If I pass a cursor to a simplecursoradapter, do I still need to close the
> cursor?  if so when: after I pass it to the adapter or when the adapter is
> finished?
>
> thanks

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


[android-developers] Re: Activity Stack Problem

2010-07-15 Thread brucko
I suspect you are leaking instances of your Activities.

At one stage, I had similar problems, but they magically went away
when my practices improved and I started using MAT for Eclipse.

Watch out for anything that may have a reference to your Activities
and callbacks. Listeners, drawables, stuff that you have registered
and my favourite - non-static inner classes, especially if they extend
the Binder class for local Services.

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


[android-developers] Re: Using barcode scanner as input method?

2010-06-27 Thread brucko


On Jun 17, 12:44 am, PinkSharK  wrote:
> +1, I am also interested in it. I have installed two of the first free
> applications from the Android Market listed when looking for
> "barcode":BarcodeScanner from ZXing Team and pic2shop by Vision
> Smarts. Unfortunately, both do not allow this simple feature: scan 
> abarcodeusing the camera to put the string of digits at the cursor
> position. Do not tell me I have to develop an application from scratch
> to get this...
> PinkSharK

I am an now actually working on a developing a couple of small apps to
achieve exactly this.

What type of scenarios are you looking to use this functionality?

Do you need to scan barcodes as a one off or many at once?

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


[android-developers] Re: Sharing SQLite Database between activities

2010-06-26 Thread brucko
Probably the model that your looking for is a local service. Keep all
your interaction with the db in the one service. Open the db in
onCreate and close it in onDestroy. You can bind to it from multple
Activities - and if your service is still there when binding so is
your db without replicating code all over the place. Have a look at

http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/index.html

Just one word of caution. Dont use a Binder as a non-static inner
class or you may leak the service.

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


[android-developers] Re: Using barcode scanner as input method?

2010-06-21 Thread brucko
I'm not sure what the question is here, but barcode scanner usually
reads the barcode in less than a couple of seconds - depending on
focus, and how steady your hand is. In my limited experience, I have
had few problems with it.

The app is not usually present on phones and needs to be downloaded
from Market or from

http://code.google.com/p/zxing/

or, as it is open source, you can incorporate it into your app.

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


[android-developers] Re: creating and opening sqlitedb on sdcard for api7

2010-06-21 Thread brucko
kamiseq,

Only just saw your posts.

I have to regularly create db's on sdCard due to my requirements. The
code I use is below.

The main thing that stands out in your code to me is
File.pathSeparator, from memory this returns ":" when you need
File.separator which is "/" - on my system anyhow.

   /**
 * Opens the SDcard database.  If it cannot be opened, it
creates a
 * new instance. If a new instance cannot be created, it throws
an
 * exception and logs the failure.
 *
 * @return true if successful
 * @throws SQLException
 * if the database is unable to be opened or created
 */
protected synchronized boolean open() throws SQLException {

if (mDb != null && mDb.isOpen()) {
return true;
} else {
StringBuilder builder = mBuilder;
// open or create a new directory
builder.setLength(0);

builder.append(Environment.getExternalStorageDirectory())
.append(File.separator)
.append(getPackageName());
File directory = new File(builder.toString());
directory.mkdirs();
builder.setLength(0);
builder.append(directory.getAbsolutePath())
.append(File.separator)
.append(DATABASE_NAME);
String fullPathName =  builder.toString() ;
try {
Log.d(TAG, "Opening database: " + 
fullPathName); //$NON-NLS-1$
mDb = 
SQLiteDatabase.openOrCreateDatabase(fullPathName, null);
createTables();//my sql statement to create 
tables if not exist
} catch (SQLException e) {
Log.e(TAG, "failed to open" + e);
throw e;
}
}
return true;
}

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


[android-developers] Re: Using barcode scanner as input method?

2010-06-19 Thread brucko
> Do not tell me I have to develop an application from scratch
> to get this...

OK. I wont :)

... and you don't.

You can launch the barcode app with an Intent using
startActivityForResult(). You will get back a result with Extras that
will have the barcode content - and also I believe the barcode format.
Implement onActivityResult() to catch the callback.

I have done it before but don't have the details at hand ATM. Just
download the source and it will take about 10min to work out. Look for
the name of the Intent in the manifest. Just be aware that I believe
some other barcode shopping type apps try to catch the same Intent
which may cause conflicts as to the experience you expect your users
to have - it may open a different app to that you expect depending on
what is on your users phone. As the project is open sourced you may be
better off incorporating zxing into your project somehow and launching
it with a specific Intent for the class that serves as an entry point.

Sorry but I can't be more specific ATM.

Geoff

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


[android-developers] Re: CANNOT manage to get ADB working whatever I do.

2010-06-02 Thread brucko
> for all "adb devices"(windows XP64bit) show no device (service started
> successfully, device recognized in Device Manager correctly).

When you say "correctly" do you mean that it appears in the Device
Manager BOTH as a ( Portable Device / Android Phone ) AND (Android
Phone / ADB Interface).

If you have the phone installed as both devices, save your time,
please ignore me.

With USB Debugging ON it should be present as two devices.

With USB Debugging OFF the phone should only appear as one device.

Otherwise, uninstall the phone. Turn off USB debugging. Reconnect the
phone. It should install as a portable device. Turn on USB Debugging.
If it now starts looking for drivers then point it at the "usb_driver"
folder in the SDK. If you don't have a usb_driver folder then install
it through the SDK AVD Manager.

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


[android-developers] Re: Bottom of one LinearLayout being hidden by other LinearLayout?

2010-05-27 Thread brucko
Hi Mike,

It appears you may be running out of room. RelativeLayout is drawing
your first LinearLayout and then placing the other on top. My
understanding is that Relative Layout (and FrameLayout) maintain a Z-
ordering of children essentially each child is on a layer above the
previous and will obscure previous children unless you tell it to do
otherwise. You got lucky with your portrait layout.

You could consider trying the following :

1/ Declare your button bar linear layout aligning it with the parent
bottom.

2/ Declare your other LinearLayout next aligning it's top with the
parent and bottom with the button bar.

3/ make this second linear layout scrollable with
android:isScrollContainer="true"

http://developer.android.com/intl/de/reference/android/view/View.html#attr_android:isScrollContainer

The idea is that your top linear layout will scroll if there is
insufficient room and your layout will be more flexible to cope with
more devices.

If this doesn't work try a ScrollView.


http://developer.android.com/intl/de/reference/android/widget/ScrollView.html

Don't let any of this put you off RelativeLayout. They are extremely
powerful and help to reduce the depth/levels of your view hierarchy.
In fact, you might consider using a second relative layout which would
allow you to get rid of all those nested LinearLayouts with one
Relative Layout. They are trickier but definitely worth it.

http://developer.android.com/intl/de/resources/articles/layout-tricks-efficiency.html

Best Regards,

Geoff

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


[android-developers] Re: Combining "OR" calls in managedQuery

2010-05-24 Thread brucko

> and so on, in various permutations.
> mActivity.managedQuery("content_uri", [id, title, tags], "title LIKE ?
> OR tags LIKE ?", [%A% OR %C%, %A% OR %C%], "title ASC")

Not familiar with the syntax you are using, but this is how I would
try it

mActivity.managedQuery("content_uri", //table
new String[]{id, title, tags}, //
columns
   "title LIKE ? OR title LIKE  ? OR
tags LIKE ? OR tags LIKE ?",//where
new String[]{"%" + A + "%" , "%" +
C + "%", "%" + A + "%" , "%" + C + "%"}, //args
   "title ASC")//assuming this
parameter is order by

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


[android-developers] Re: Restricting Softkeyboard Kyes for EditText

2010-05-20 Thread brucko
try,

android:inputType="number|phone"

will still have letter on buttons, but bigger, fewer buttons

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


[android-developers] Re: Can't stop debugging

2010-05-18 Thread brucko
Do you happen to have...

Debug.wait for debugger()

 somewhere in your code?

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


[android-developers] Re: Sqllite database join query

2010-05-12 Thread brucko
Have a look at the SQLite website.

SQLite does have support for joining separate databases, but I am not
sure how it is done.

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


[android-developers] Re: Using same sqlite database from multiple Activities and Services

2010-05-12 Thread brucko
This all sounds like a local Service to me. Open the db in onBind if
its not open. Let the service take care of how many Activities/
Services are bound and close the db in onUnbind.

Easy, simple everything you need is already there.

Or you can complicate things and reinvent singletons and counting how
many Activities and Services have references to your db object   ;P

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


[android-developers] Re: How to disable home and other buttons so as to persist an app?

2010-05-11 Thread brucko
Quick question guys. I have no real knowledge in this but am quite
interested.

Assuming that the devices belong to an enterprise, can you just
replace the Home application with your application? Like...

http://developer.android.com/resources/samples/Home/index.html

That way when the home button was pressed it would just open up the
app again. Additionally, could you use some of the "single task",
"single instance" type flags to ensure "there can be only one".

Home -> goes back to you.

is the user offered a choice of home apps? Can that be made permanent?

Back -> goes back to you or can be disabled.

Menu - > can be disabled
  ->  no longer exposes the settings to manage applications
(or is there an alternate way?)

I would imagine that user permission is required to initially set the
home application? Again  is this a permanent? Can enterprise users be
prevented from resetting the home app?

Whilst the average user would never want to do such a thing. There are
many enterprise applications - including the one I am working on.

Best Regards,
Geoff

PS. I'll have a play and see what happens with the sample app.

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


[android-developers] Re: Debugg problem source not found

2010-05-11 Thread brucko
Hi Mohammad,

I suspect you are using Eclipse and whilst stepping through the code
you are getting "source not found" whilst calling methods that you
have not written yourself.

There is no bug. You probably don't have the source code files for
Android on your system. This is the default and is not your fault.

In this case, Eclipse will display the class file for the method that
has been called. If you want to dig a bit deeper and have a look at
the actual source code for that Android class, have a look at the
following blog. Whilst I have no idea as to how up to date the various
source code files are, I still find it fairly useful.

http://android.opensourceror.org/2010/01/18/android-source/

Once done, you should get to see the actual source code for Android
when debugging, and can also view source when inspecting the
android.jar in your Eclipse project.

Best Regards,

Geoff

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


[android-developers] Re: Local Service not Registering

2010-05-09 Thread brucko
My bad, somewhere I managed to call the unbind method OF the service I
was trying to unbind. Of, course the service is NOT registered as
being bound to itself.

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


[android-developers] Re: Process Crash whilst using JUnit

2010-05-07 Thread brucko
This problem is caused by calling Binder.finalize() on the Binder.
Whilst the documentation says that finalize() may be called. Its
causing all sorts of problems for me. As a result I am accepting the
rather small memory leak and moving on. I have reported Issue 8046 for
this as it appears to be a bug.

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


[android-developers] Local Service not Registering

2010-05-06 Thread brucko
Essentially my problem is this, I open my Activity. It binds to a
local service that "appears" to be connected. I get a force close when
I press the back button

"IllegalArgumentException: Service not registered" when unbind is
called in my onPause method...

public void onPause() {
super.onPause();
if (isFinishing()) {
if (mConnection != null){
Log.i(TAG,"onPause, mConnection" + 
mConnection.toString());
mDbS.unbindService(mConnection);
}else {
Log.i(TAG,"mConnection is null");
}
The service is bound in onCreate

// bind to our sdCard database using our Service Connection
mServiceIntent = new Intent(this,DatabaseService.class);
if(bindService(mServiceIntent, mConnection,
Context.BIND_AUTO_CREATE)){
Log.e(TAG, "service bound");
}else{
Log.e(TAG, "service not bound");
}

bindService is returning true.

My Service connection is as follows. onServiceConnected is called and
goes to completion. onService Disconnected is never called (presumably
because my service is in same process)

private ServiceConnection mConnection = new ServiceConnection() {
public final String TAG = "LoadView.ServiceConnection"; //$NON-
NLS-1$

public void onServiceConnected(ComponentName className, IBinder
service) {
mDbS = ((LocalBinder) 
service).getService();
  .
stuff not relevant
   
Log.i(TAG, "finished onServiceConnected"); //$NON-NLS-1$
}
public void onServiceDisconnected(ComponentName className) {
Log.e(TAG, "onServiceDisconnectedCalled"); //$NON-NLS-1$
}
};

The only thing I do a little different is that I don't use an inner
class in my service for the Binder object - I use a separate class.
This is mostly because I have several databases and wanted code I
could reuse and set up simply rather than worry about all the ins and
outs and memory leak issues.

import android.os.Binder;
import android.util.Log;

public class LocalBinder extends Binder {
private String TAG = "LocalBinder";
private  S mService;

@SuppressWarnings("unused")
private LocalBinder() {
}

public LocalBinder(S service){
mService = service;
}

public S getService() {
return mService;
}

public void finalize(){
mService = null;
try {
//TODO reinstate this after Issue 8046 is resolved
//super.finalize();
} catch (Throwable e) {
Log.e(TAG,"Unable to finalize Binder");
}

}
}

Any ideas?

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


[android-developers] Re: Sliding Drawer question

2010-05-05 Thread brucko
Never done this before, Tommy.

Have a look at

http://developer.android.com/reference/android/widget/ImageView.html#attr_android:scaleType

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


[android-developers] Re: Simple LinearLayout doesn't work

2010-05-05 Thread brucko
Gravity defines the layout of elements laid out within that view - not
the view itself.

For what I think you may be trying to achieve, you may be better off
with a RelativeLayout instead of a LinearLayout for your outer layout.

Set the relative layout gravity to center_horizontal, then put the
Image view to the right of the linear layout.
There may be some fiddling depending on the exact look you are after.

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


[android-developers] Re: How to narrow down the method that is involved in exception from the pid

2010-05-05 Thread brucko
> Ljava/lang/IllegalStateException;: Finalizing cursor
> android.database.sqlite.sqlitecur...@437c0e60 on null that has not
> been deactivated or closed

This is a strange one. I find that this error is given in two
situations
1/ When I forgot to close a cursor.
2/ When I dumbly tried to reuse a cursor without first closing the old
instance.

That is I forgot to close a cursor.

The two hints you have to finding the cursor are
1/ the table name - which mysteriously in your case is null, and
2/ the object address

I'd look for a query that has "null" where the table name should be.

and

If you have some idea as to roughly where this is,and not to many
cursors, splash a few..

Log.i(TAG, myCursorHere.toString())

after your queries to get the address for each cursor you created.



> Could anybody help me to know, how could I understand which cursor /
> line of code , from the error that I see in the logcat
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Parcelable datatype in AIDL file

2010-05-05 Thread brucko
I had something like that once when I was dumb and used
setDataPosition() in a readFromParcel() method. Threw the pointer out
of position. Otherwise, sorry i cant help.

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


[android-developers] Re: Sliding Drawer question

2010-05-04 Thread brucko
Tommy,

Whilst RelativeLayout is quite powerful, and as Mark stated earlier,
is what you need for your sliding drawer - especially as you have
other elements - you may need to be a little more careful in the order
you declare your view elements.

If you want your SlidingDrawer to go over the top of all of the other
elements, then declare it last in your Relative Layout.

Better still, as it appears you may not be used to RelativeLayout yet
- just try dropping the SlidingDramer for now (Ctrl-c will comment out
the rows in the XML Editor in Eclipse) - put it back in last in your
relative layout when you have the rest of your layout where you want
it.

You need to declare your elements in the correct order.

For example, you should declare tvStationName before TideLoadMessage
if you want TideLoadMessage to obey android:layout_below="@+id/
tvStationName" .


I don't think you want to use "android:layout_below="@+id/lvReport" "
for your Sliding drawer if you want it to open  over your lvReport - I
think (not really sure on that).

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


[android-developers] Re: Development and debugging tools

2010-05-03 Thread brucko
Hi Sandy,

I'm bit of an amatuer, and other people here know a lot more about
this than I do.

Have a look at this blog...

http://ttlnews.blogspot.com/2010/01/attacking-memory-problems-on-android.html

It will help you with some of the automated heap dump stuff I think
you are looking for. I had all sorts of memory leak problems until I
found this.

As for the rest, maybe someone else will respond as I haven't really
gone into that yet.

All the best,
Geoff

On May 4, 2:42 am, Sandy  wrote:
> Can someone please help answer these questions?
>
> On Apr 29, 2:41 pm, Sandy  wrote:
>
>
>
> > I'm trying to figure out a way to do the following in android,
> > appreciate any help on this.
>
> > 1. How to generate a Full Java stack trace (basically thread stack) in
> > Android. In J2SE, we use to use something like this -  send a signal
> > to the JVM; the JVM generates a stack trace for you; or we can also
> > usedebuggingtools or Java API calls like Thread.dumpStack. What are
> > the android equivalents to get the same output?
> > .
> > 2. How to generate a java heap dump? And are there any tools to
> > analyze the heap dumps ?
>
> > 3. Does thread and heap dump be generated if the Application crashes
> > due to a segment violation ? Where does the core files be generated?
>
> > 4. Are there any profiling APIs in android APIs that will allow to
> > measure the UI performance and responsiveness (basically times taken
> > to launch an activity/application and also times taken to scroll a
> > list)?
>
> > 5. Is there a tool similar to hprof that is available in J2SE for CPU
> > usage, heap allocation statistics etc?
>
> > 6. Tool on GC activities..
>
> > Thanks in advance,
> > Sandy
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: ButtonDown and ButtonUp events for Android buttons?

2010-05-03 Thread brucko
Have you tried an OnTouchListener?

This will send you motion events which you can check for ACTION_DOWN
and ACTION_UP

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


[android-developers] Re: Process Crash whilst using JUnit

2010-05-01 Thread brucko
Thanks for the reply Bob.

I'm a little out of my depth here. Luckily, or I suppose yes by plan,
I am using subversion and have found a  much smaller subset of my code
that causes the problem. Actually using System.gc() did help me
isolate and was actually an earlier post of yours that gave me the
idea. Essentially it occurs when I am using a SQLite database in a
Service I have. By chance it can be  brought to the fore after a
single test case and i am attempting to narrow down exactly where/why
it is occurring.

I have logged Issue 8046 (rather poorly at first) so  the Android
people can see if it is something important to them - although usually
in these instances it is something naive I have done.

Hopefully, I'll find a workaround.

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


[android-developers] Re: Running activity from remote service

2010-04-29 Thread brucko
not an expert here, but have you put an intent filter in the manifest
for the activity you want to start?
Gives the system an idea that you want that activity to catch that
intent.


Something like this?...





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


[android-developers] Process Crash whilst using JUnit

2010-04-29 Thread brucko
Nearly at my wits end. Been slowly building my app and now JUnit is
crashing regularly with logcat as below.

There are no other real hints. No relevant code as this can happen at
multiple points of the code. There are no other errors or exceptions
thrown. As far as I can tell there is plenty of memory left and my app
does not appear to have any leaks I can find during a run outside of
JUnit.

Any ideas?


04-29 15:05:23.125 I/DEBUG   (10948): Build fingerprint: 'htc_asia_wwe/
htc_hero/hero/hero:1.5/2.73.707.9/62020:user/release-keys'
04-29 15:05:23.125 I/DEBUG   (10948): pid: 11005, tid: 11006  >>>
com.mydomain.myapp <<<
04-29 15:05:23.125 I/DEBUG   (10948): signal 11 (SIGSEGV), fault addr
0004
04-29 15:05:23.125 I/DEBUG   (10948):  r0   r1 4356abd0  r2
4108dd50  r3 0010
04-29 15:05:23.125 I/DEBUG   (10948):  r4 ad03dc11  r5 00156d78  r6
4356abd0  r7 
04-29 15:05:23.125 I/DEBUG   (10948):  r8 100ffd00  r9 4100af98  10
4100af84  fp 0001
04-29 15:05:23.125 I/DEBUG   (10948):  ip ad374dd0  sp 100ffcd4  lr
ad33a6f1  pc a9d214b6  cpsr 0030
04-29 15:05:23.235 D/AK8973  (   41): Compass CLOSE
04-29 15:05:23.305 I/DEBUG   (10948):  #00  pc 000214b6  /
system/lib/libutils.so
04-29 15:05:23.305 I/DEBUG   (10948):  #01  lr ad33a6f1  /
system/lib/libandroid_runtime.so
04-29 15:05:23.345 D/UserCreator(11005): onStop
04-29 15:05:23.345 I/ActivityManager(   63): Stopping service:
com.mydomain.myapp/.database.UserDbAdapter
04-29 15:05:23.355 D/UserCreator(11005): unbind
04-29 15:05:23.375 I/DEBUG   (10948): stack:
04-29 15:05:23.375 I/DEBUG   (10948): 100ffc94  afe39dd0
04-29 15:05:23.375 I/DEBUG   (10948): 100ffc98  a000  [heap]
04-29 15:05:23.375 I/DEBUG   (10948): 100ffc9c  afe39dd0
...and so on
then...
04-29 15:36:42.557: INFO/DEBUG(12024): debuggerd committing suicide to
free the zombie!
04-29 15:36:42.567: INFO/DEBUG(12175): debuggerd: Aug 28 2009 20:35:01
04-29 15:36:42.577: INFO/ActivityManager(63): Process
com.mydomain.myapp (pid 12117) has died.
04-29 15:36:42.577: WARN/ActivityManager(63): Crash of app
com.mydomain.myapp running instrumentation
ComponentInfo{com.ozdroid.scanner.tests/
android.test.InstrumentationTestRunner}

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


[android-developers] Re: IllegalArgument Exception: Service is not registered: when unbindservice is called.

2010-04-05 Thread brucko
Hi Prajakta,

Not sure here - but I dont think you really need to call stopService.
Stop service is usually used when you have started your service with
startService(). Unbind service is used when you started the service
with bindService. If you really needed to kill your service when
unbinding then you might use stopSelf() in your services onUnbind()
method which I believe is called when there are no remaining bound
services.

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

To unsubscribe, reply using "remove me" as the subject.


[android-developers] Re: App not visible in Australia

2010-03-25 Thread brucko
Just an update..

Paid apps are now accessible through Optus in Australia.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.


[android-developers] Re: App not visible in Australia

2010-03-20 Thread brucko
String,

Its right about Optus. They will not support Android Market and at one
stage were talking of their own app store. Also drawn into this are
the vitrual carriers TPG (which I am on), Virgin Mobile and Dodo ( I
think). There is a forum on the problem at Whirlpool

http://forums.whirlpool.net.au/forum-replies.cfm?t=1248135&p=5

Which mostly is a bit of a frustrated whinge at Google and anyone in
general before people realised Optus was not coming to the table. They
have launched their own app store

http://appstore.optusbusiness.com.au


On Mar 20, 8:20 pm, String  wrote:

> IMHO, Google should just keep the 30% in this case. That'd give the
> carrier a clear incentive to get their act together. But nobody asks
> me. :^)

Couldn't agree more

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.


[android-developers] Re: Custom Dialog

2010-03-17 Thread brucko
Sorry to single you out Mark, but you just write stuff that makes
sense.

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


[android-developers] Re: Custom Dialog

2010-03-17 Thread brucko
Bob,

Thanks for this and other posts. If it weren't for yourself, Mark
Murphy and TreKing I would be pulling my hair out - and its getting
too precious to be doing that these days.

As someone with not a lot of experience in things Android, the Context
is one of the most confusing things to me and I would love to see a
blog article/ Mark Murphy chapter specifically on each of the various
levels of Context returned by the various methods and when they should
be used.

 Frankly there are that many posts about:-

* dialogs and conflicts with documentation like this one.

* toasts and leaks (
http://groups.google.com/group/android-developers/browse_thread/thread/de2f0cebec002303/475f545e947a5915?lnk=gst&q=toast+leak+context#475f545e947a5915)

* leaks and using ApplicationContext with long lived objects

"There are two easy ways to avoid context-related memory leaks. The
most obvious one is to avoid escaping the context outside of its own
scope. The example above showed the case of a static reference but
inner classes and their implicit reference to the outer class can be
equally dangerous. The second solution is to use the Application
context. This context will live as long as your application is alive
and does not depend on the activities life cycle. If you plan on
keeping long-lived objects that need a context, remember the
application object. You can obtain it easily by calling
Context.getApplicationContext() or Activity.getApplication()." -
http://developer.android.com/resources/articles/avoiding-memory-leaks.html

* Binder.java having internal comments warning about potential
memory leaks using non-static sub-classes - but nothing in the javadoc
documentation. (Well, maybe experienced Java developers are fully
aware of the references inner classes have on their outer class - but
some of us have very little experience and are putting our apps
alongside yours)


THAT quite frankly confuses the hell out of anyone new to Android.
There doesn't appear to be any real documentation in the developer
Resources area (I apologise if I have missed it) that really explains
what all the different hierarchies of context are, what they give you
or with what types of objects they are to be used. Hopefully I am
correct in saying that every Intent is either passed or receives from
somewhere a Context of some form - but there is little information on
what that is or should be.

I'll be the first to admit that, when I first started and until quite
recently, been passing contexts that  are as non-specific or higher up
in the hierarchy as possible with the perhaps misguided opinion that -
" well at least if I leak this it wont keep around anything else
that's not there anyway". Yes, I agree with you I am an idiot who
doesn't know the first thing about leaks, SoftReferences and memory
management. But until I started learning about these things and MAT
and tracking leaks, without a real resource on Contexts - can you
forgive me for succumbing to temptation? After all, until you know
better isn't Java supposed to take care of all this for you?

With the ease of publishing apps on the market, goods apps put out
there by people like yourselves - are next to apps by teenagers with
little experience in Java let alone Android. Bad apps impact the good
ones, not just whilst they are running, but also through the entire
"Android experience" that users get. If an app force closes one gets
this little voice in the back of their head telling them that Android,
and not just that app, is prone to being buggy. When most of the time
it is newbies like me who fail to really understand the Android
environment whinging and complaining about Androids faults when all we
are really doing is externalising our own shortcomings.

On the whole, I love Android, but an article on Context best practice
(or maybe half a chapter, or Appendix table, in one of Mark Murphys
books) is really needed so that Learner drivers like myself don't ruin
the Android experience for everyone.

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


[android-developers] Re: where can I get the source code of button

2010-03-12 Thread brucko
Don't know how up to date this is but it may give you a start.

http://www.google.com/codesearch/p?hl=en#uX1GffpyOZk/core/java/android/widget/Button.java&d=2

Geoff

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


[android-developers] Re: OnPause() - how to resume to an activity which has a Bundle passed to it when it is created

2010-03-12 Thread brucko
I'm not really sure as to how you want to implement this, but can you
just store the image file name/resource id and the text view for the
song in the preferences for your activity and just reload the
preferences when the activity is recreated? Or alternatively, get the
service to store the details and fetch them from there after rebinding
to it?

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


[android-developers] Re: OnPause() - how to resume to an activity which has a Bundle passed to it when it is created

2010-03-12 Thread brucko
I'm not really sure as to how you want to implement this, but can you
just store the image file name/resource id and the text view for the
song in the preferences for your activity and just reload the
preferences when the activity is recreated? Or alternatively, get the
service to store the details and fetch them from there after rebinding
to it?

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


[android-developers] Re: EditText uncontrollable/unpredicatable soft keyboards

2010-03-08 Thread brucko
Thanks jamesc,

Sorry about the late reply, for quite some time I couldn't find my
post earlier. I had given up and then stumbled across your reply
today.

> You're not using a Hero by any chance, are you?

Why actually, yes I am. Is there an issue you are aware of with the
Hero?

> Try putting this into your Manifest for that activity:
>
> android:windowSoftInputMode="stateHidden"
>
> That may, or may not be what you're after, but look at the
> documentation for that attribute for further information on
> controlling the IME's behaviour.

This fixed it ! The thing I find strange is that I don't have to use
this in each Activity. I have several Activities with an EditText that
is focussed when the Activity opens but only one where "stateHidden"
is required - and I still have no idea as to why :(

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


[android-developers] Re: EditText uncontrollable/unpredicatable soft keyboards

2010-03-08 Thread brucko
Thanks jamesc,

Sorry about the late reply, for quite some time I couldn't find my
post earlier. I had given up and then stumbled across your reply
today.

> You're not using a Hero by any chance, are you?

Why actually, yes I am. Is there an issue you are aware of with the
Hero?

> Try putting this into your Manifest for that activity:
>
> android:windowSoftInputMode="stateHidden"
>
> That may, or may not be what you're after, but look at the
> documentation for that attribute for further information on
> controlling the IME's behaviour.

This fixed it ! The thing I find strange is that I don't have to use
this in each Activity. I have several Activities with an EditText that
is focussed when the Activity opens but only one where "stateHidden"
is required - and I still have no idea as to why :(

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


[android-developers] EditText uncontrollable/unpredicatable soft keyboards

2010-03-03 Thread brucko
Does anyone have an idea as to what determines whether the soft
keyboard will be opened with an EditText.

I have a single Edit Text, in a RelativeLayout, that has an attached
onEditorActionListener which for some strange reason grabs focus and
opens the soft keyboard whenever the activity is started. Essentially,
I do not want the EditText to be focussed or the keyboard opened until
the user touches it. For a start it steals all my screen real-estate.

I am unable to make any other View take focus away from the EditText
programatically.

If I make the EditText unfocussable in onCreate() then the keyboard
does not open. If I make it focussable again later in the code, say
onResume(),  the keyboard opens. Removing the listener makes no
difference.

Am I missing something?.

Frankly I am starting to get sick of buggy Android and the constant
workarounds required.

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


[android-developers] Re: Petition: Google, please improve the Android Market.

2010-02-23 Thread brucko

> So throwing a T-Mobile sim card inside the Nexus One will net T-Mobile
> with those fees. If you load up an Archos and use the Market Enabler,
> T-Mobile might get those too, depending if you use those tmobile
> "credentials" to access the market.
>
> The market is filtered by your carrier, then your device (by software
> id). That doesn't stop someone with a low software version and no
> carrier from spoofing everything and having the "fee" go to someone it
> theoretically shouldn't...
>
> -Tim Strazzere

This is correct. I have been using an unlocked phone in Australia and
my carrier (optus) does not support Market so I have no access.

Throw in my wifes SIM from the "3" network and paid apps magically
appear. Market access is controlled through the carrier named on the
SIM.

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


[android-developers] Re: Access barcode app from website

2010-02-17 Thread brucko
Not sure if this is what you want, but a lot of apps like Compare
Everywhere are based around the zxing app Barcode Scanner.

This can be launched if on your phone via Intent
--- >http://code.google.com/p/zxing/wiki/ScanningViaIntent

Alternatively the packages are open source and can be put in your app
- cant remember which license.

As I'm not familiar with the Droid or what you really want to do -I
hope Im not leading you astray.

On Feb 17, 9:29 am, JB  wrote:
> How can I access the barcode app on the Droid from a webpage like
> Google is doing with the Shopping page?

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


[android-developers] Re: Trapping onItemSelected events from an Auto complete list

2010-02-11 Thread brucko
Hi had same problem.

What I suspect you need is an AdapterView.OnItemClickListener. This
captures events when the item is clicked. OnItemSelected appears to
capture when the list item gains focus such as when the DPad buttons
are used to shift focus. Change all your "selected" 's to"click" 's
 and things should be dandy.


On Feb 7, 3:07 pm, androided  wrote:
> I am trying to write an application with a list of items read in from
> a file. This item list and the fields that go with each item are fed
> into a DB. The item names are presented to the user as an auto-
> completing list. Once the list item is selected, I would like to get
> the value from the list and use it to query the database and display
> all the detail information.
>
> The problem I am having is trapping the event usingonItemSelectedListenerand 
> onItemSelected. Below is what I am trying.
>
>         protected void onCreate(Bundle savedInstanceState) {
>             super.onCreate(savedInstanceState);
>             setContentView(R.layout.main);
>
>                 sitedb=(new SiteListSQLiteHelper(this)).getReadableDatabase();
>
>                 model=Site.getAll(sitedb);
>                 startManagingCursor(model);
>
>             sitelistArray=loadsiteArray(model);
>
>            AutoCompleteTextViewtextView = (AutoCompleteTextView)
> findViewById(R.id.autocomplete_site);
>
>             ArrayAdapter adapter = new ArrayAdapter(this,
> R.layout.site_list, sitelistArray);
>             textView.setAdapter(adapter);
>             textView.setOnClickListener(onClick);
>             textView.setOnItemSelectedListener(siteSelect);
>         }
>
> I implement the listener:
>
>         private View.OnItemSelectedListener siteSelect=new
> View.OnItemSelectedListener() {
>                 public void siteSelect(View v) {
> // Do some interesting stuff here
>                 }
>         };
>
> This doesn't compile, but it has the fewest syntax errors.
>
> Could someone tell me how to get anOnItemSelectedListenerto work?
> and how I grab the value selected?

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


[android-developers] Re: International emergency number support

2009-12-06 Thread brucko


On Dec 5, 11:35 am, "Eric Wong (hdmp4.com)" 
wrote:
> Why do you bother to find out when you can use 112?
I need to find out as I am looking at importing some specific Android
devices for a project I am working on. Voice communication equipment
in Australia needs to be able to access 000 as an emergency number for
regulatory approval. From what I have found so far this is usual done
by diverting users 000 calls to 112 on mobile networks (not the other
way around). I'm trying to find out if that is something Android "just
does", or modifications will need to be made.

>
> Btw, are you a programmer? we could collaborate if so.
>
Thanks but I'm really flat out atm. Probably not much use to anyone
presently. Glad to help when I can.

Thanks Eric,

Geoff

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


[android-developers] Discussion on localizing-android-apps-draft

2009-12-04 Thread brucko
Guys, Im using a HTC Hero and downloaded "MoreLocale" from Market. It
seems to change the locale on my Hero with no problems. seems to work
fine with the L10nDemo app although it exposes a few flaws.

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


[android-developers] International emergency number support

2009-12-04 Thread brucko
Does any one have any idea as to which countries Android supports
interms of Emergency Number dialling. Is there a list of supported
countries and emergency numbers? For example US has 911, Australia has
000 and there is also the international numbers 112.

How can we find out which numbers/countries are supported for
emergency dialling?

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