[android-developers] Make a one app appliance (prevent quitting app)

2013-03-06 Thread Tobiah

I am going to hand out Android phones with an app on it
that is geared to a large event.  I'd like to launch the app,
and cause the user to be unable to quit it.  I don't want
them messing around with other software on the phone.  We did
this on our Blackberry app by making the program bring itself
to the foreground every two seconds.  It was cheesy, but worked.
If the user quit the app, it would come right back up.

Any ideas as to how to get an Android program to always be
the focused program?

Thanks!

Tobiah

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Making my app the only one that can run.

2013-03-19 Thread Tobiah

I'm not being unfriendly to users.  I need to hand out
devices at an event so that people can walk around and
use my app.  I don't want them to use other apps on the
phone.

So I put this in my AndroidManifest.xml:








Then I get a choice of launchers from the home button.  I choose my app 
'Always' and everything
is great.  The only problem is that if I reboot the device,
my app indeed comes up as the home screen, but it immediately crashes.
Is there some event or Intent I need to handle to do this?  I can't figure
out how to debug this, because there are no logcat events, and when
I restart my app it works fine.

Also if there are any other thoughts on how to make a one app device,
I'd love to have suggestions.

Thanks!

Tobiah

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Making my app the only one that can run.

2013-03-20 Thread Tobiah

On 03/20/2013 07:50 AM, bob wrote:

I used an app in Google Play called */SureLock Kiosk Lockdown/*.


Wow, that is perfect!  Unfortunately the license is too
expensive.  We are going to have hundreds of units, and
and at $50 a pop, that adds up quickly.  It's a shame.
We'd probably pay $10 without blinking.

Tobiah


On Tuesday, March 19, 2013 4:35:56 PM UTC-5, Tobiah wrote:

I'm not being unfriendly to users.  I need to hand out
devices at an event so that people can walk around and
use my app.  I don't want them to use other apps on the
phone.

So I put this in my AndroidManifest.xml:

 
  
  
  
  
  

Then I get a choice of launchers from the home button.  I choose my app 
'Always' and everything
is great.  The only problem is that if I reboot the device,
my app indeed comes up as the home screen, but it immediately crashes.
Is there some event or Intent I need to handle to do this?  I can't figure
out how to debug this, because there are no logcat events, and when
I restart my app it works fine.

Also if there are any other thoughts on how to make a one app device,
I'd love to have suggestions.

Thanks!

Tobiah

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




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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Making my app the only one that can run.

2013-03-20 Thread Tobiah

On 03/20/2013 05:38 AM, Android2ee wrote:

Hi,
You should build your own home activity ( a real one that handles all the 
events needed to be handled by a home) then at each key
methods of your activity (onResume, onCreate) you just launch your apllication 
using the intent (startActivity(intent)).
If building a home is a too huge work, a home is already available (under 
apache licence) in the sdk, to be exact in the sample of
the sdk.
Then, as you did, just set this home as the default one on the devices you want 
to manage.
I have the project to make such application  for my kid allowing him to use 
only some applications (the ones I decided).
Hope it helps.
Mathias Seguy
Founder of Android2EE


Hey thanks for the advice.  This looks like the way to go.  I'll check out
the sample launcher.  Are there docs somewhere outlining which methods must
be handled?

Tobiah



Le mardi 19 mars 2013 22:35:56 UTC+1, Tobiah a écrit :

I'm not being unfriendly to users.  I need to hand out
devices at an event so that people can walk around and
use my app.  I don't want them to use other apps on the
phone.

So I put this in my AndroidManifest.xml:

 
  
  
  
  
  

Then I get a choice of launchers from the home button.  I choose my app 
'Always' and everything
is great.  The only problem is that if I reboot the device,
my app indeed comes up as the home screen, but it immediately crashes.
Is there some event or Intent I need to handle to do this?  I can't figure
out how to debug this, because there are no logcat events, and when
I restart my app it works fine.

Also if there are any other thoughts on how to make a one app device,
I'd love to have suggestions.

Thanks!

Tobiah

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




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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Making my app the only one that can run.

2013-03-20 Thread Tobiah

On 03/20/2013 02:22 PM, bob wrote:

The pricing page is right here:

http://www.42gears.com/surelock/androidpurchase.html

Please note this:

SureLock Android 100 License Pack
$1299


Better, but it seems that the program has to 'Phone Home' to verify
the license against the phone's id# or wifi mac address.  My
devices will go for long periods without internet access.

There are some far cheaper alternatives that do the same thing
anyway.  LOCKiosk works fine for $8.  I'm trying to find out
if that's a one time fee or a per device fee.

Tobiah



Thus, if it is hundreds of units you have, you should not have to pay more than 
*12.99* a pop.


On Wednesday, March 20, 2013 1:24:36 PM UTC-5, Tobiah wrote:

On 03/20/2013 07:50 AM, bob wrote:
 > I used an app in Google Play called */SureLock Kiosk Lockdown/*.

Wow, that is perfect!  Unfortunately the license is too
expensive.  We are going to have hundreds of units, and
and at $50 a pop, that adds up quickly.  It's a shame.
We'd probably pay $10 without blinking.

Tobiah

 > On Tuesday, March 19, 2013 4:35:56 PM UTC-5, Tobiah wrote:
 >
 > I'm not being unfriendly to users.  I need to hand out
 > devices at an event so that people can walk around and
 > use my app.  I don't want them to use other apps on the
 > phone.
 >
 > So I put this in my AndroidManifest.xml:
 >
 >  
 >   
 >   
 >   
 >   
 >   
 >
 > Then I get a choice of launchers from the home button.  I choose my 
app 'Always' and everything
 > is great.  The only problem is that if I reboot the device,
 > my app indeed comes up as the home screen, but it immediately 
crashes.
 > Is there some event or Intent I need to handle to do this?  I can't 
figure
 > out how to debug this, because there are no logcat events, and when
 > I restart my app it works fine.
 >
 > Also if there are any other thoughts on how to make a one app device,
 > I'd love to have suggestions.
 >
 > Thanks!
 >
 > Tobiah
 >
 > --
 > --
 > You received this message because you are subscribed to the Google
 > Groups "Android Developers" group.
 > To post to this group, send email to android-d...@googlegroups.com 

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

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




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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Multi app stack problem

2013-03-25 Thread Tobiah

I wrote a home app to lock down my main app.
Any time the home button is pressed, the home
app just launches the main app.
My main app uses the zxing barcode scanner app
when a button is pressed.  I can permanently
cripple zxing by doing this:

1) Press 'scan' button in my app.
2) Scanner pops up
3) press 'Home' key
4) Main app shows up again
4) Press 'scan' button again

Dialog comes up saying:

"Sorry, the Android camera encountered a problem.
You may need to restart the device.".

I'm wondering whether it's because multiple instances
of the apps are getting started.  I know about flags
like FLAG_ACTIVITY_REORDER_TO_FRONT, but it seems that
they are only for starting new activities in the same
task.  Is that correct?  What would be the equivalent
when starting a new task?

Thanks!

Tobiah

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Making sure I only launch one app instance through and Intent

2013-03-28 Thread Tobiah

I'm doing a startActivityForResult() to launch a barcode scanner.
The problem is that if the user presses home from the scanner, then goes back to
my app and launches the scanner again, it appears to be launching a new
instance, and the camera is already busy, so it fails.

Is there a way to launch another app in this way, while insuring
that I will only launch one instance of the other app?

Thanks,

Tobiah

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Getting a message from another app launched with an Intent

2013-03-29 Thread Tobiah

I'm launching another app from my app like this:

Intent LaunchIntent = 
getPackageManager().getLaunchIntentForPackage("com.other.appname");
startActivityForResult(LaunchIntent, EXPOSMART_MESSAGE);

Then I set a result from the launched app:

Intent response = new Intent();
response.putExtra("exit_flag", "y");
setResult(RESULT_OK, response);
finish();

I was expecting onActivityResult() to get called in the original
app, but it never does.  Is there something different about launching
other apps rather than just new activities in the same app?

Thanks!

Toby

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Getting a message from another app launched with an Intent

2013-03-29 Thread Tobiah

On 03/29/2013 01:52 PM, RichardC wrote:

Does the other App call setResult() ?


Yeah, It's shown in the code below.

Thanks,

Tobiah


http://developer.android.com/reference/android/app/Activity.html#setResult(int)


On Friday, March 29, 2013 8:04:27 PM UTC, Tobiah wrote:

I'm launching another app from my app like this:

Intent LaunchIntent = 
getPackageManager().getLaunchIntentForPackage("com.other.appname");
startActivityForResult(LaunchIntent, EXPOSMART_MESSAGE);

Then I set a result from the launched app:

Intent response = new Intent();
response.putExtra("exit_flag", "y");
setResult(RESULT_OK, response);
finish();

I was expecting onActivityResult() to get called in the original
app, but it never does.  Is there something different about launching
other apps rather than just new activities in the same app?

Thanks!

Toby

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




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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Home app selection query

2013-04-03 Thread Tobiah

I am using a modified home app from the sdk samples directory.
It's goal in life is to launch one app for a kiosk style device.
When I first run it, I have to choose my home app over the
regular one.  I can do this as many times as I like; when I choose
my home app, it launches my kiosk app.  The problem is when I make
my app the default home app, it launches my kiosk app, but then
I get problems.  Could there be some difference between running
a home app as default, as compared to choosing it from a list?

The thing that's different, is that my kiosk app launches a
barcode scanner.  When I hit home and choose my home app from
the list, it launches my kiosk app again, but the barcode
scanner is still in the front, and everything works ok.  When
the home app is started automatically, my kiosk app comes up
in front, and trying to start the scanner again causes it to
permanently fail until reboot.  I'm guessing this is because
it tried to start a second instance.  It complains about not
being able to get to the camera.

The main question is whether something is different between
choosing a home program from the list after home button hit,
or just having it launch automatically as the default home app.

Thanks!

Tobiah

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Generate a QR code from within my app?

2013-04-19 Thread Tobiah

I need my app to display a QR code.  Are there any
libraries out there that would allow me to do this?

Thanks!

Tobiah

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Generate a QR code from within my app?

2013-04-19 Thread Tobiah

On 04/19/2013 10:38 AM, Tobiah wrote:

I need my app to display a QR code.  Are there any
libraries out there that would allow me to do this?



Just realized that the zxing app (which I already depend on)
can display barcodes as well.  So, I am starting the app like this:


Intent intent = new Intent("com.google.zxing.client.android.ENCODE");

intent.putExtra("ENCODE_FORMAT", "UPC_A");
intent.putExtra("ENCODE_DATA", "12345678301");

From which I get a 1D barcode, but I want a QR code.
I tried "QR" and "QR_CODE" after searching through
the source a little, but they don't work.  Does anyone
know what I would pass to get a QR code?

Thanks!

Tobiah

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Generate a QR code from within my app?

2013-04-19 Thread Tobiah

On 04/19/2013 01:39 PM, TreKing wrote:


On Fri, Apr 19, 2013 at 12:38 PM, Tobiah mailto:t...@tobiah.org>> wrote:

Are there any libraries out there that would allow me to do this?


This question seems incredibly Googleable.


Yeah, I know.  I did spend a long time on google.  I
should have formed a more directed question.  I knew
about zxing, but using the library looks daunting to
me and I had trouble finding examples.

As it turns out, I'm using the zxing app for this now.
I didn't realize that it could generate barcodes as
well as read them.

I'm fine now.

Thanks,

Tobiah

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Console stopped giving output.

2013-04-30 Thread Tobiah

That's about it.  I went as far as to reboot my system,
but when I run or debug Android apps, I get nothing anymore
out of the Console.  I'm pretty new to Eclipse so thanks
for any help.

Tobiah

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Phone can't download my app

2012-07-30 Thread Tobiah

On 7/30/2012 3:13 PM, Chrystian Vieyra wrote:

Perhaps something on the Build.prop that CyanogenMod uses is causing the
app not being compatible with the phone, why don't you check the
build.prop file?

Have you checked the android developer console to see if you have any
users with a galaxy SII?


It sounds like you are giving me sage advice, but I don't follow
you immediately.  Your terms are over my head.  I'll Google them
tomorrow at work, but in the mean time, if you can elaborate on
what a build.prop file is, as well as the 'android developer console',
I'd be appreciative.

Thanks!

Tobiah


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


[android-developers] SurfaceView drawing seems far too slow to be useful in a game.

2011-11-14 Thread Tobiah

I took an SurfaceView example from the net:

http://tinyurl.com/35x66f5

I replaced the onDraw() contents with a simple
plotting routine that plots (100, 100), then adds
one to x, and one to y, wrapping around at the screen
edge.

So, as expected, I see the pixels being drawn toward
the lower bottom of the screen.  The thing is, that
it's taking around 10 seconds for the draw to span
from one edge of the screen to the next.  That's just
a few hundred plots.  This would be way to slow for
a game.  Is SurfaceView the correct tool to use for
a vector animation game?

I thought that maybe what I was actually looking at
was my final frame rate, and that if I started doing
complex animation, that frame rate wouldn't slow down
very much.  Is that how it is?

Also, my 'dot' is leaving a trail; the old contents
are not erased.  Do people clear out the whole screen
between draws, or just try to make all the objects take
car of redrawing their background when the move?

Thanks,

Tobiah

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


[android-developers] Broken link in docs, and question about command line building

2011-11-28 Thread Tobiah

http://developer.android.com/resources/tutorials/hello-world.html

The link with the text "Building and Running from the Command Line"
seems to be broken.  I figured that someone who cares might be on
the list.

I think it would be behind that link somewhere where I'd find
the answer to my question.  I want to start building a project
that I started to build with Eclipse, from the command line.

I use a script like this:


RELEASE_TYPE=debug 




if [ $1x = releasex ]; then 

RELEASE_TYPE=release 

fi 




if ant $RELEASE_TYPE; then 


#adb shell pm uninstall -k org.tobiah.HelloOpenGLES10
adb uninstall org.tobiah.HelloOpenGLES10
adb -d install bin/HelloOpenGLES10-$RELEASE_TYPE.apk
adb shell am start -n 
org.tobiah.HelloOpenGLES10/org.tobiah.HelloOpenGLES10.HelloOpenGLES10
adb logcat HelloOpenGLES10:V *:E  | grep -v 
'GpsConnectionService\|LightsService'


fi


But I forgot how to initialize the environment so that I
get a build.xml.  It think it's a simple command using ant
or adb or android or something.  Appreciate a reminder.

Thanks!

Tobiah

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


Re: [android-developers] Re: sound effects for android game application

2011-11-28 Thread Tobiah

On 11/28/2011 1:31 PM, John Goche wrote:


Thanks, but what I was asking is what software is available for
creating the sound effects and what is being used for them in
general, cause if I don't have any I cannot load them into memory.




If you want to get serious about creating sound effects, you
could look into csound (csounds.com).  It takes some learning,
but it's capable of anything that you can dream up.

Tobiah

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


[android-developers] Animating a graphics shape.

2011-09-03 Thread Tobiah

I want to make a vector style 2d video game.  I started
with a subclass of View.  I can draw shapes on it.  Now
I want them to move.  I could erase and draw new shapes,
but I know if I do that, I won't get a chance to see the
movement on the screen until my routine is done.

I guess I need another thread to do the drawing.  Can
someone point me in the right direction?  Are there
sprite style facilities that I should look at?  Do I
need android.Animation, or android.view.Animation?
Should I be looking at Canvas, or SurfaceView?

Thanks,

Tobiah

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


[android-developers] Forgot how to log in to update my app.

2011-08-02 Thread Tobiah

I uploaded an app a couple of months ago, and it's in the market.

I want to update it now.  I tried:

http://market.android.com/publish

I get a login box, and I've tried for a couple of days
to log in with what I think might have been the account
that I used to publish.  I only have a few possibilities.
Any that I am successful at logging in, tell me that the
market service is not available with that account.

In the market, the developer email is listed as
deve...@rcsreg.com.  I had an email sent there to
get information about the login, but the email
states "we were unable to find any usernames associated
with your email address".

So I don't know what to do now.  I paid the $25, but
I'll be darned if I can figure out how to go update
or publish apps now.

Thanks,

Tobiah

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


Re: [android-developers] Forgot how to log in to update my app.

2011-08-02 Thread Tobiah

On 08/02/2011 01:11 PM, Mark Murphy wrote:

On Tue, Aug 2, 2011 at 4:08 PM, Tobiah  wrote:

Any that I am successful at logging in, tell me that the
market service is not available with that account.


That sounds like you have a Google Apps for Business account. You will
need to manage that domain and add support for the Android Market.


It may be, but I have already made several updates to the app -
just not recently.  Would it make sense that my account
does not have market support when I was somehow able to update
the app in the past?

Thanks,

Tobiah

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


Re: [android-developers] Forgot how to log in to update my app.

2011-08-02 Thread Tobiah

On 08/02/2011 02:31 PM, Mark Murphy wrote:

On Tue, Aug 2, 2011 at 4:19 PM, Tobiah  wrote:

That sounds like you have a Google Apps for Business account. You will
need to manage that domain and add support for the Android Market.


It may be, but I have already made several updates to the app -
just not recently.  Would it make sense that my account
does not have market support when I was somehow able to update
the app in the past?


Sure. Google made significant changes to Google Apps for Business in
recent months.



I have only two google accounts, and I found the place where
I had to enable market publishing, and turned it on.
Still, when I go to publish and log in, I'm always directed
to make a new account for $25.  Still, my app is in the
market place.

Thanks,

Toby

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


[android-developers] Still can't log in to update app...

2011-08-05 Thread Tobiah

I've been in contact with Market support for a few days and got
some canned answers that did not help.  The bottom line is that
I can no longer log in to update my app - any time I log in
(Isn't it http://market.android.com/publish?) it only gives
me a page where I can sign up for a new account.  Even then,
it tells me my business name is in use, which of course it is.

I'd buy a new account at this point, but the app is signed, and
some users have it already.  I really need to be able to update
the app.  A client needs to use it tomorrow.  The app is
called ExpoSmart - I don't know what to do.  I feel like I'm
in trouble with my boss.  I don't suppose there is any human
anywhere to talk to?

Thanks,

Tobiah

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


Re: [android-developers] Still can't log in to update app...

2011-08-05 Thread Tobiah

On 08/05/2011 12:09 PM, Nick Risaro wrote:

If you are in a hurry you can send the signed apk to your client, or put
it on some webserver for him to download it.



I know it doesn't solve your problem but at least you can deliver the
app to some "critical users".


Thanks, that's what I'm going to have to do.  I can send this guy
a link, but then the best way I can imagine to have him install it
is to have the browser save it, then have him install and use Astro
file manager to get to it.  The stock browser on our phones doesn't
seem to handle the .apk specially.

Is there a better way?

Thanks,

Tobiah




On Fri, Aug 5, 2011 at 3:41 PM, Tobiah mailto:t...@tobiah.org>> wrote:

I've been in contact with Market support for a few days and got
some canned answers that did not help.  The bottom line is that
I can no longer log in to update my app - any time I log in
(Isn't it http://market.android.com/__publish
<http://market.android.com/publish>?) it only gives
me a page where I can sign up for a new account.  Even then,
it tells me my business name is in use, which of course it is.

I'd buy a new account at this point, but the app is signed, and
some users have it already.  I really need to be able to update
the app.  A client needs to use it tomorrow.  The app is
called ExpoSmart - I don't know what to do.  I feel like I'm
in trouble with my boss.  I don't suppose there is any human
anywhere to talk to?

Thanks,

Tobiah

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to
android-developers@__googlegroups.com
<mailto:android-developers@googlegroups.com>
To unsubscribe from this group, send email to
android-developers+__unsubscr...@googlegroups.com
<mailto:android-developers%2bunsubscr...@googlegroups.com>
For more options, visit this group at
http://groups.google.com/__group/android-developers?hl=en
<http://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


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


Re: [android-developers] Still can't log in to update app...

2011-08-08 Thread Tobiah

On 08/06/2011 06:44 AM, rich friedel wrote:

True, which is why they make tAttachApkInstaller ;)

All this aside though, none of this drives to the heart of the problem... the 
OP cannot login to their account... I should also have asked what they have 
done to deal with that issue as well.




I found a support link, and I get an email back from them,
about every three or four days, so the process is very slow.

First, they said that one of my accounts had been masked,
as toby%tobiah@gtempaccount.com, I guess because I had
started to let Google manage the mail to tobiah.org.

I was able to take that temp email, and log in, and  move
stuff over to the admin account.  I still could not get
to my app though.  They wrote back that my ExpoSmart app
was under developer%rcsreg@gtempaccount.com.  That  makes
sense, because rcsreg.com is my company's domain name.
Still, none of my passwords will get into that login, and sending
a reset request goes to nowhere that I or anyone from my company
can retrieve it.

I'm still waiting for a reply about that.  It's been over a week
now since I first contacted them.  I'm sure I could clear this up
with a two minute phone call. I'm very disappointed in Google's
customer service, considering the fact that I paid money for
the account.  In the mean time, I have clients that want to
install and use the app.

Thanks,

Toby


Thanks,

Tobiah


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


Re: [android-developers] Still can't log in to update app...

2011-08-08 Thread Tobiah

On 08/06/2011 06:44 AM, rich friedel wrote:

True, which is why they make tAttachApkInstaller ;)

All this aside though, none of this drives to the heart of the problem... the 
OP cannot login to their account... I should also have asked what they have 
done to deal with that issue as well.



I found a support link, and I get an email back from them,
about every three or four days, so the process is very slow.

First, they said that one of my accounts had been masked,
as toby%tobiah@gtempaccount.com, I guess because I had
started to let Google manage the mail to tobiah.org.

I was able to take that temp email, and log in, and  move
stuff over to the admin account.  I still could not get
to my app though.  They wrote back that my ExpoSmart app
was under developer%rcsreg@gtempaccount.com.  That  makes
sense, because rcsreg.com is my company's domain name.
Still, none of my passwords will get into that login, and sending
a reset request goes to nowhere that I or anyone from my company
can retrieve it.

I'm still waiting for a reply about that.  It's been over a week
now since I first contacted them.  I'm sure I could clear this up
with a two minute phone call. I'm very disappointed in Google's
customer service, considering the fact that I paid money for
the account.  In the mean time, I have clients that want to
install and use the app.

Thanks,

Toby

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


[android-developers] Out of space on install, but only *my* app?

2011-08-10 Thread Tobiah

I pushed a new version of my app up today, and when it appeard
in the market, I tried to upgrade.  The download completed, but
during install, I got an alert saying "Insufficient storage available".
I have enough space, I think.  3Gig SD, and 40MB internal.  My
app's .apk is around 100k.  I went to the market to download a 10MB
game, and it went fine.

I'm worried that my users might have the same problem.  Where
shall I look?

Thanks,

Tobiah

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


Re: [android-developers] Out of space on install, but only *my* app?

2011-08-10 Thread Tobiah

On 08/10/2011 12:10 PM, TreKing wrote:

On Wed, Aug 10, 2011 at 1:59 PM, Tobiah mailto:t...@tobiah.org>> wrote:

The download completed, but during install, I got an alert saying
"Insufficient storage available". I have enough space, I think.
  3Gig SD, and 40MB internal.  My app's .apk is around 100k.


Funny, I was just having similar issues - my phone was perpetually on
the "low disk space" message and trying to push my development app would
fail due to insufficient storage, even after clearing room. A reboot of
the device has alleviated the problem.


I rebooted a few times, but I still have the problem.  The app
can be installed on another phone without problems.

Thanks,

Toby

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


Re: [android-developers] Out of space on install, but only *my* app?

2011-08-10 Thread Tobiah

On 08/10/2011 12:16 PM, Kostya Vasilyev wrote:

Check the logcat while installing.

The error message you see in Market may not match what's actually
happening at the low level.


I'm seeing this.  There is no 'main' directory in
/data/data/com.android.vending/cache.

Thanks,

Tobiah

I/LSState (  102): EventReceiver:android.intent.action.NOTIFICATION_REMOVE
D/Finsky  (  771): [1] DownloadBroadcastReceiver.onReceive: Intent 
received at DownloadBroadcastReceiver
D/Finsky  (  771): [1] DownloadImpl.setState: Download 'ExpoSmart' 
transitioned from (DOWNLOADING) to (SUCCESS).
D/Finsky  (  771): [1] DownloadCompleteListener.onComplete: Download 
Download : ExpoSmart: onComplete called
D/Finsky  (  771): [1] DownloadQueueImpl.remove: Download Download : 
ExpoSmart removed from DownloadQueue
I/global  (  771): Default buffer size used in BufferedInputStream 
constructor. It would be better to be explicit if an 8k buffer is required.

I/installd(   67): free_cache(0) avail 42352640
D/dalvikvm(  771): GC_FOR_MALLOC freed 25572 objects / 1820464 bytes in 99ms
D/Finsky  (  771): [1] NotificationManager.showNotification: Showing 
notification: [package=com.rcsreg.exposmart, Title=ExpoSmart, 
Message=Installing "ExpoSmart"…]

I/LSState (  102): EventReceiver:android.intent.action.NOTIFICATION_ADD
D/Volley  (  771): [11] DiskBasedCache.put: Could not clean up file 
/data/data/com.android.vending/cache/main/-1575309320-1022924841
D/Volley  (  771): [10] DiskBasedCache.put: Could not clean up file 
/data/data/com.android.vending/cache/main/6765004521107159724

D/dalvikvm( 1171): GC_EXPLICIT freed 68 objects / 3400 bytes in 107ms
D/Volley  (  771): [11] DiskBasedCache.put: Could not clean up file 
/data/data/com.android.vending/cache/main/-1575309323-1022924841

D/dalvikvm(  102): GC_EXPLICIT freed 8153 objects / 389448 bytes in 164ms
D/Finsky  (  771): [35] 1.packageInstalled: Package install status for 
"null" is -4

E/lights  (  102): write ok string=0,len=1
E/lights  (  102): write ok string=0,len=1
E/lights  (  102): write ok string=0 0,len=3
E/lights  (  102): write ok string=1,len=1
E/lights  (  102): write ok string=0,len=1
E/lights  (  102): write ok string=0 0,len=3
D/NotificationService(  102): cancelNotification, 
ACTION_NOTIFICATION_REMOVE,pkg=com.android.vending,id=-1066954264

I/LSState (  102): EventReceiver:android.intent.action.NOTIFICATION_REMOVE
D/Volley  (  771): [11] DiskBasedCache.put: Could not clean up file 
/data/data/com.android.vending/cache/main/6765004521107159724
D/Volley  (  771): [10] DiskBasedCache.put: Could not clean up file 
/data/data/com.android.vending/cache/main/-1575309320-1022924841

D/dalvikvm(  771): GC_FOR_MALLOC freed 29898 objects / 2402904 bytes in 76ms
D/Volley  (  771): [11] DiskBasedCache.put: Could not clean up file 
/data/data/com.android.vending/cache/main/-1575309323-1022924841





10.08.2011 22:59, Tobiah пишет:

I pushed a new version of my app up today, and when it appeard
in the market, I tried to upgrade. The download completed, but
during install, I got an alert saying "Insufficient storage available".
I have enough space, I think. 3Gig SD, and 40MB internal. My
app's .apk is around 100k. I went to the market to download a 10MB
game, and it went fine.

I'm worried that my users might have the same problem. Where
shall I look?

Thanks,

Tobiah





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


Re: [android-developers] Out of space on install, but only *my* app?

2011-08-11 Thread Tobiah

On 08/10/2011 01:05 PM, Kostya Vasilyev wrote:

I'd try cleaning the Market app's cache (in system settings, under app
management).


I've uninstalled my app, so there is no entry for it in the App
Management area.  Is there a global place that I can do this?

Thanks,

Tobiah

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


Re: [android-developers] display data in database

2011-08-15 Thread Tobiah

On 08/15/2011 08:36 AM, abhijit chakra wrote:

just tell me the codes.


The codes are: 49-52-21-11


I think that people are making fun of you because
your question is far too general.  Just to learn
how to build an SQL database in Android is a day's
work.  Getting data out of it involves creating
some sort of user interface, which is really the
whole of Android programming, and is too broad
to fit into the answer to a brief post.

Look first at Cursor if you already have the
database.




On Mon, Aug 15, 2011 at 8:52 PM, Appaholics mailto:raghavs...@appaholics.in>> wrote:

Read is from the database with an SQL statement and display it.

On Mon, Aug 15, 2011 at 8:48 PM, abhijit chakra mailto:kanh...@gmail.com>> wrote:

how to display data's that are stored in database..please tell
me the
procedure.
thanks in advance.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to
android-developers@googlegroups.com

To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com

For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en




--

Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all
titles required to have complete control)
http://www.raghavsood.com/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to
android-developers@googlegroups.com

To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com

For more options, visit this group at
http://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


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


Re: [android-developers] Re: Data safety when writing important data to SD card

2012-11-27 Thread Tobiah

On 11/27/2012 2:38 PM, Lew wrote:

Tobiah wrote:

I am opening a file for append using BufferedWriter.  Each time the app
is run, more data is added to the file.  At first a made a little class
representing the file and gave it a write() method that would take a
string
and send it out, then flush() the Writer.  I was wondering when I
should
close the file, or whether I really needed to.  Will java [sic]
close the file
for me when the app goes away?  Right now, since the writes are few and
far between, I'm just opening and closing the file each time I write
a line to it, but that seems really awkward.


What does "seems awkward" mean, let alone "really" awkward?

What harm does "awkward" cause?


I think inelegant would have been a better choice of words but


What's "awkward" is holding a resource like a file open for a really
long time
when you aren't using it.


Nice.  I feel better already.


File handles are a finite resource. Like all such, you should manage
them wisely.

Assess the objective costs and benefits of the approach in the context
where you use it.

"Writes are few and far between", depending on what you mean by "few"
and "far", could
very well be a use case for closing the file between writes. Or not.


A record would be written to the file sometimes every few minutes,
and at most every 10 seconds or so.


At what point does "not few" and "not far" become significant enough to
justify
not closing the file?

Almost certainly the non-measurable degree of "awkwardness" is not relevant.



Thanks for clearing the waters.  I feel a lot better about the way I 
wrote this bit of the code.


Cheers.

Tobiah

P.S., why did you put the [sic] in my quote?  Was it because
it would not be java that closes the file, but rather the OS,
or rather I'm not even close?




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


[android-developers] BluetoothSocket connect() hangs forever after many attempts

2016-10-11 Thread Tobiah
I have a connection loop something like this:


while(true){

try{

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/eae69a03-226d-4f5b-870b-222f5b343bc6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: BluetoothSocket connect() hangs forever after many attempts

2016-10-11 Thread Tobiah


On Tuesday, October 11, 2016 at 2:52:12 PM UTC-7, Tobiah wrote:
>
> I have a connection loop something like this:
>
>
> while(true){
>
>try{
>
   my_socket.connect();
   start_reading();
  } catch(IOException e){
  }
 }


So if the device goes away, the loop comes back around, and tries to 
connect again.
This works fine for most android devices, except for some LG's I have 
running Android 5.1.1.
If the bluetooth device becomes unavailable for a couple of hours or more, 
eventually
the connect() above will just hang forever.   Here is a snip of some of the 
actual code.

Thanks for any help!


private void connect_scanner(){

BluetoothSocket scanner_socket = null;

Set pairedDevices = adapter.getBondedDevices();
for(BluetoothDevice device: pairedDevices){

String device_name = device.getName();

if(device_name.startsWith("FocusBT")){

//* FOUND DEVICE, GET SOCKET *//

UUID uuid = 
UUID.fromString("1101--1000-8000-00805F9B34FB"); 
//SerialPortService ID

try{
scanner_socket = 
device.createInsecureRfcommSocketToServiceRecord(uuid);
 scanner_socket.connect();

if(scanner_socket.isConnected()){
break;  //  Got a live one - don't look any further
}

} catch(IOException ex){
es.borg.log.write("BLUETOOTH +IO EXCEPT " + 
ex.getMessage());
 try {
scanner_socket.close();
} catch(IOException e){
}
}
}
}
}

 

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/ba8c6bb4-70e0-4bc5-98be-13dee7cfdd7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Can't always get unique identifier

2013-07-24 Thread Tobiah

I needed to send an identifier to our server to identify
users as they use my application.  I first used the phone
number, but found that tablets without service had none.  So failing
getting a phone number, I did this:

android_id = Secure.getString(this.getContentResolver(), Secure.ANDROID_ID);

But it seems now, that a handful of users, notably those using T-mobile,
have phones that will not yield the above ID.

So I was wondering whether there was some other unique identifier
I could use, or failing that, would like to here suggestions on
generating an identifier that would (almost?) never be a duplicate.

I was thinking of using the time to the millisecond that the app was first
run, plus some random digits.  Still, I thought that there might be a more 
standard
practice or library for this.

Thanks!

Tobiah

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Can't always get unique identifier

2013-07-25 Thread Tobiah

On 07/24/2013 02:41 PM, TreKing wrote:


On Wed, Jul 24, 2013 at 2:45 PM, Tobiah mailto:t...@tobiah.org>> wrote:

So I was wondering whether there was some other unique identifier
I could use, or failing that, would like to here suggestions on
generating an identifier that would (almost?) never be a duplicate.


http://lmgtfy.com/?q=android+unique+ID
First Hit: http://stackoverflow.com/questions/3115918/android-unique-id, which 
also leads to
Third Hit: 
http://android-developers.blogspot.com/2011/03/identifying-app-installations.html


The first two hits outline the technique that I listed in my original
post.  It fails on some T-mobile devices.  That's why I was
looking for alternatives.  The third really just states why the other
methods are not satisfying.

It looks like I'll have to go with creating my own GUID in the rare
case that the ANDROID_ID fails.  I'll have to keep it on the filesystem
in order to survive app upgrades.

Given the correct permissions, am I guaranteed to be able to write to
the filesystem on any device?

Thanks,

Tobiah


-
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago transit 
tracking app for Android-powered devices

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




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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Which MediaPlayer format to convert to .mp3 or .wav

2014-01-22 Thread Tobiah

I'm letting users record voice notes within my app.  Right
now they are getting saved with a .3gp extension.  I installed
sox on Linux but it knows nothing of the format.  What I need
is to convert these files on a Linux server to some format that
will allow users to simply click on a web link and immediately
hear the file that they recorded.

Are some of the other choices for encoding and output format
a better fit for what I am trying to do?

Thanks!

Tobiah


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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Crash when running Bluetooth example from Android Docs

2014-02-13 Thread Tobiah


I'm going through the Bluetooth docs and right off I
am having a problem.  The code below is cut right from

http://developer.android.com/guide/topics/connectivity/bluetooth.html

BluetoothAdapter mBluetoothAdapter = 
BluetoothAdapter.getDefaultAdapter();
if (!mBluetoothAdapter.isEnabled()) {
Intent enableBtIntent = new 
Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
}

I'm setting REQUEST_ENABLE_BT to an arbitrary integer.

I tried running this on two devices, starting with
bluetooth off.  On the tablet, the app crashes when checking
mBluetoothAdapter.isEnables().  On my Galaxy note 3, it
makes it past that check, but then the app crashes when
startActivityForResult() is called.

There is no output in the Logcat in either case.

Thanks for any help!

Tobiah

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Crash when running Bluetooth example from Android Docs

2014-02-14 Thread Tobiah

On 02/13/2014 10:46 PM, gjs wrote:

Hi,

On the same page -

BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if (mBluetoothAdapter == null) {
 // Device does not support Bluetooth
}

Regards



Yeah, I knew that both devices had bluetooth and mBluetoothAdapter was not null.
I actually put that test in there afterward, and it came out false, and the
execution when on to crash as it had before.

Toby

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: Crash when running Bluetooth example from Android Docs

2014-02-14 Thread Tobiah

So I tried a third device, and finally got a trace out of Logcat.

It says I don't have the right permissions, but I did put them
into my manifest in the same place as all of my other permissions:




I'm not sure how else to make sure I have the right permissions.

Thanks,

Toby

On 02/13/2014 03:31 PM, Tobiah wrote:


I'm going through the Bluetooth docs and right off I
am having a problem.  The code below is cut right from

http://developer.android.com/guide/topics/connectivity/bluetooth.html

 BluetoothAdapter mBluetoothAdapter = 
BluetoothAdapter.getDefaultAdapter();
 if (!mBluetoothAdapter.isEnabled()) {
 Intent enableBtIntent = new 
Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
 startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
 }

I'm setting REQUEST_ENABLE_BT to an arbitrary integer.

I tried running this on two devices, starting with
bluetooth off.  On the tablet, the app crashes when checking
mBluetoothAdapter.isEnables().  On my Galaxy note 3, it
makes it past that check, but then the app crashes when
startActivityForResult() is called.

There is no output in the Logcat in either case.

Thanks for any help!

Tobiah


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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: Crash when running Bluetooth example from Android Docs

2014-02-14 Thread Tobiah

On 02/14/2014 11:18 AM, Tobiah wrote:

So I tried a third device, and finally got a trace out of Logcat.

It says I don't have the right permissions, but I did put them
into my manifest in the same place as all of my other permissions:

 
 

I'm not sure how else to make sure I have the right permissions.


Meh, something was out of sync.  I just played with the manifest a little
more and saved it again and things started working.



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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] how often to look for bluetooth data

2014-02-18 Thread Tobiah

I'm reading data from a bluetooth barcode scanner.  I
found an example and things work well.  The example
though, starts a thread that pretty much just goes:


while(1){
if(check_for_data()){
handle_data();
}
}

So wouldn't this tank the CPU?  Should I just
put a small sleep in there?  Would all of that
checking the bluetooth socket also tank the battery?
Is there nothing to worry about and I should leave it
as it?

Thanks,

Tobiah

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] how often to look for bluetooth data

2014-02-18 Thread Tobiah

On 2/18/2014 5:03 PM, Trevor Page wrote:

I would expect that your "check_for_data()" is actually performing an
InputStream.read() or .read(buffer) or .read(buffer, byteOffset,
byteCount), all of which are calls that block until data is available.
While in a call that blocks, the thread won't load the CPU.

Trev


Hey, thanks, it does. I should have included the
actual code.  There is an InputStream.read() in there.
I'm a java newb, so I'll have to investigate that class
at another time.

So, I have another question then.  When doing this,
am I taxing the bluetooth connection, and if not, how
does the remote device let me know that there is more
data available?

Thanks for answering the sophomore questions.

Tobiah

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Questions about copied code.

2014-02-19 Thread Tobiah

I'm using the code below to read data from a bluetooth scanner.  I basically
copied it off of the net, so I have some questions about the code.

1) There is a check for bytesAvailable that will usually fail,
   so the code will just spin, I assume, wasting CPU and battery.
   Would it be better to just use an array that is large enough
   to handle any possible barcode, then lset the scanner_input_stream.read()
   call block while it waits for data?

2) I'm assuming that by creating the Handler in the main thread, the
   later handler.post() make the Runnable() execute in that same thread
   rather than the reader thread.  Is that so?

3) Why did the author take the time to copy scanner_buffer to encodedBytes?
   Couldn't she have just used the original scanner_buffer to create the data
   string?

Thanks!

Tobiah

The code is also here, in case the mailing list mangles it:

http://tobiah.org/code

void beginListenForData() {
final Handler handler = new Handler();
final byte delimiter = 10; //This is the ASCII code for a newline 
character

stop_scanner = false;

scanner_buffer_position = 0;
scanner_buffer = new byte[1024];
scanner_thread = new Thread(

new Runnable(){
public void run(){
int c = 0;
while(!Thread.currentThread().isInterrupted() && 
!stop_scanner){
c += 1;
try{
int bytesAvailable = 
scanner_input_stream.available();
if(bytesAvailable > 0){
byte[] packetBytes = new 
byte[bytesAvailable];

scanner_input_stream.read(packetBytes);
for(int i = 0; i < 
bytesAvailable; i++){
byte b = packetBytes[i];
if(b == delimiter){
byte[] 
encodedBytes = new byte[scanner_buffer_position];

System.arraycopy(scanner_buffer, 0, encodedBytes, 0, encodedBytes.length);
final String data = new 
String(encodedBytes, "US-ASCII");

scanner_buffer_position = 0;

handler.post(

new 
Runnable(){

public void run(){

// deal with the data.

}
}
);

} else {


scanner_buffer[scanner_buffer_position++] = b;
}
}

borg.log.write(String.format("Looking for bluetooth!! %d", c));
}
} catch (IOException ex){
stop_scanner = true;
}
}
}
});

scanner_thread.start();

}

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Handle Bluetooth device out of range then back.

2014-02-20 Thread Tobiah

I'm connecting to a barcode scanner and reading scans from it.
I'm having trouble handling the case where the scanner goes
out of range, buffers a few scans, then comes back within range.
 
For some reason, the scanner loses some or all of the buffered

data during the process of reconnecting.  I get an IOException
when the scanner is out of range, and I close the Bluetooth
InputStream, OutputStram, and BluetoothSocket.  Then I attempt
to connect to the scanner again, every three seconds until that
is successful.  For some reason, actually only on some devices,
the scanner loses some of the early scans, or in some cases all
of the scans it has in its buffer.  On my phone it works fine,
but on my tablet I get this problem.

Now the scanner company sells an app for $50 that handles
communication with the scanner, and I could communicate with
that app through their Intent() API.  That app somehow handles
this case flawlessly.  The problem is that we are looking at
deploying hundreds of units, and the license fee is an obstacle.

So the question is as to whether there are some more steps I
need to take into account when handling a bluetooth device that
may get turned off, or go out of range during use.

Thanks,

Tobiah

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Making menu-key menus stay open all the time.

2014-07-10 Thread Tobiah

I have a simple app that's in use for my company.
Being my first app, I hid most of the functionality
behind menu-key menus.  I had a meeting today, and we
decided that the app would be greatly improved if those
menu choices were just there all the time.  I get that
I probably should have used buttons in the layout or
something, but it would be so easy at this point if
I could just inject some code that would allow those menus
to stay open no matter what.

Thanks,

Tobiah

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Tracking down reason for app not showing in play store for some devices.

2014-07-11 Thread Tobiah

Had an app in the play store for years.  People from my company
just bought some new Galaxy Tab 3's, and the app won't show up
on those devices.  How would I go about finding out why?

Thanks!

Toby

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Force a vertical LinearLayout cell smaller than content

2014-11-07 Thread Tobiah

I need to have some scrolling text in the top half of the screen,
and a different view on the bottom.  I'm using a LinearLayout for
this.  So I have some text in a ScrollView in the top half, but
that section always grows to accomodate the full text, only scrolling
when it's reached the bottom of the window, which makes the bottom
half invisible.

So my question is whether I can limit the size of one cell of a
LinearLayout so that it always takes up half of the screen.

I tried putting the text in another LinearLayout and then doing this
as an experiment:

layout.setLayoutParams(new LinearLayout.LayoutParams(100, 200);

This did limit the text to a 100 pixel wide strip, but did nothing to
limit the height of the inner Layout.

Thanks for any help,

Tobiah


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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Making my app a home app.

2016-07-12 Thread Tobiah

When I install something like Nova Launcher, the app comes up as a choice
when I hit the home button, with an option to make it the permanent home app.

What do I need to do to my application to make it behave this way?

Thanks!


Tobiah

--
You received this message because you are subscribed to the Google Groups "Android 
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/578510A0.1020402%40tobiah.org.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Gradle files out of sync?

2016-09-13 Thread Tobiah
I clicked to upgrade Android Studio and when it was finished, I got this 
message at the top of the editor:

"Gradle files have changed since last sync.  A project sync may be 
necessary or the IDE to work properly."

There is a link right there to "Sync Now" but it doesn't help the problem. 
 I also deleted .gradle and did an Invalidate and Restart.

I followed the few hints on Google, but I can't make this annoying bar go 
away, and I fear that my builds may not come out correctly.

Possibly related, I get a popup saying "External file changes sync may be 
slow".  My project was on NFS, but I went ahead and copied the project to 
the local drive, and I still get this error.  I'm wondering whether I can 
easily just obliterate this project and build it fresh in the eyes of 
Studio.

Thanks for any help!

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/e02d0278-998d-4a06-b92e-676904e916f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Moved to Android Studio - how do I migrate my publishing key?

2015-10-09 Thread Tobiah

I've published under Eclipse (quite some time ago) but now I've
switched to Studio and need to update the app.  It asks for a
Key Alias, Key Password, Store file, and Store password.  I only
need one password with Eclipse.  I see that I have ~/.android/adbkey
is that the key I was using previously?  What do I need to do
to get Studio to use the same key?

Thanks!

Tobiah

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Is this list dying?

2015-10-23 Thread Tobiah

I used to get dozens of posts per day from this
list.  Has the buzz moved to another forum?

Thanks,

Tobiah

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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Relative accelerometer reading.

2015-12-21 Thread Tobiah
Given that I can read the effects of gravity on my device on three axes, 
I'm looking for some math that will get me a more logical view of what's 
happening to the device in my hands. I want to create a two dimensional 
control based on tilting the device forward and back, and tilting the 
device to the right and left.


The seemingly complex part is that I'd like to have the controls behave 
in a predictable way regardless of the starting position that the device 
happened to be in when starting the controls. For instance, if the user 
is in bed holding the phone upside down above their head, everything 
should still work the same from the user's perspective even though the 
numbers coming off of the accelerometer will be entirely different. I 
can envision some sort of transformation that would yield numbers that 
look like the device is starting off on a flat table, given the actual 
state of the device when the controls start to be used.


Thanks for any help.

--
You received this message because you are subscribed to the Google Groups "Android 
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/56780DAE.8050105%40tobiah.org.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] TextView - how to make appended text visible?

2011-01-28 Thread Tobiah

On 01/28/2011 09:50 AM, John Lussmyer wrote:

I have a TextView that frequently has text appended from a service.
I can append the text just fine, but how do I make the TextView scroll so the 
newly appended text is visible?
Once the view fills, the new text is below the bottom edge.


I haven't used it for Android, but usually there is a Scrollable container
that lets you put things into it that are larger than the screen.  There must
be such a widget... check the methods.  I imagine that you can set the scroll
position  programmatically.

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


[android-developers] PreferenceScreen conflict?

2011-02-03 Thread Tobiah

I'm using a third party binary only barcode scanner by dropping
in their .jar file.  Today I was learning how to implement preferences.
I made a .xml file:

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

   
E/AndroidRuntime( 2886): java.lang.RuntimeException: Unable to start activity 
ComponentInfo{com.rcsreg.exposmart/com.rcsreg.exposmart.ScannerActivity}: android.view.InflateException: Binary XML file line #2: 
Error inflating class PreferenceScreen

E/AndroidRuntime( 2886):at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2787)
E/AndroidRuntime( 2886):at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
E/AndroidRuntime( 2886):at 
android.app.ActivityThread.access$2300(ActivityThread.java:135)

When I remove my res/layout/preferences.xml, the barcode scanning works again.
So has the third party software locked me out from using preferences?

Thanks,

Tobiah

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


[android-developers] Focus and raise keyboard for Dialog with EditText

2011-02-09 Thread Tobiah

I have a Dialog with an EditText widget in it that I'd like
to use to get a string from the user.  Right now, they have
to touch inside the EditText to get the keyboard.  Would it
be possible to have the keyboard open up with the Dialog and
have focus in the EditText?  This would be similar to what
happens when I use the search button.

Thanks,

Tobiah

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


Re: [android-developers] Focus and raise keyboard for Dialog with EditText

2011-02-09 Thread Tobiah

On 02/09/2011 01:25 PM, Kostya Vasilyev wrote:

You can try setting an onShowListener for the dialog, and calling 
editText.requestFocus.


You got me on the right track, thanks.  Just requesting focus was not enough
however.  At first I was trying to do this:

InputMethodManager input_manager = (InputMethodManager) 
getSystemService(borg.INPUT_METHOD_SERVICE);
input_manager.showSoftInput(dialog_edit_text, input_manager.SHOW_IMPLICIT);

Where borg is an ApplicationContext.  This was not working, but I was doing it
right in onCreateDialog() callback.  Presumably since there was at that time
no editable field on the screen, the keyboard refused to open.  Where would
the keystrokes go?

So I put the two lines in the onShowListener callback, and
everything works.  Requesting focus was not necessary, but
that is probably be cause there was only one EditText in the
dialog.

By the way, when doing this, should I test for the presence
and state of a physical keyboard (my device doesn't have one)
or will that be done automatically?

Thanks!

Tobiah




-- Kostya

09.02.2011 23:56, Tobiah пишет:

I have a Dialog with an EditText widget in it that I'd like
to use to get a string from the user. Right now, they have
to touch inside the EditText to get the keyboard. Would it
be possible to have the keyboard open up with the Dialog and
have focus in the EditText? This would be similar to what
happens when I use the search button.

Thanks,

Tobiah






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


Re: [android-developers] Focus and raise keyboard for Dialog with EditText

2011-02-10 Thread Tobiah

On 02/09/2011 02:15 PM, Kostya Vasilyev wrote:

No idea about the hardware keyboard, sorry.

Have you tried requesting focus inside the show listener? I would think it'd do 
the right thing for both soft/hard keyboards


I did.  That was your original suggestion.

So I have:

notes_dialog.setOnShowListener(
 new DialogInterface.OnShowListener(){
  public void onShow(DialogInterface d){
  dialog_edit_text.requestFocus();
  //InputMethodManager input_manager = (InputMethodManager) 
getSystemService(borg.INPUT_METHOD_SERVICE)
  //input_manager.showSoftInput(dialog_edit_text, 
input_manager.SHOW_IMPLICIT);
  }
}
 );

The keyboard does not raise.

If I uncomment the two input manager lines, the keyboard raises with the dialog.
In any case, whether the requestFocus() is called makes no difference.

Can I get the actual dialog back from the DialogInterface?   I have an EditText
and a Save/Cancel button combo in the Dialog.  I don't understand how to get the
information back from the dialog.  I'm firing it off with showDialog(), but I've
seen what look like examples of how to do this with an Intent and
startActivityForResult() which would do the trick I think.

Thanks,

Tobiah

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


[android-developers] Help raising keyboard from modal activity.

2011-02-10 Thread Tobiah

I traded my Dialog for an Activity with the theme 
android:theme="@android:style/Theme.Dialog".

It's cool.  It operates just like a Dialog, but I can just use an intent to
get my input back from the Activity.  My problem is getting the activity to
raise the soft keyboard.  I tried this:

public void onResume(){
super.onResume();
note_text.requestFocus();
InputMethodManager input_manager = (InputMethodManager) 
borg.getSystemService(this.INPUT_METHOD_SERVICE);
input_manager.showSoftInput(note_text, 
input_manager.SHOW_FORCED);
}
}

I moved it to onResume so that the Activity would be as 'alive' as possible.
So this didn't work, but if I put the same code inside the onClick() for a
button, the keyboard shows.  I'd have to assume that the activity isn't
really really fully alive during onResume.  A second later when I click the
button, the keyboard raises.

Thanks

Tobiah

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


[android-developers] I need an activity context, but from a class that does not extend Activity

2010-12-14 Thread Tobiah

I'm making a database wrapper from the Notepad example to fit my own database.
I decided that I'd have a generic 'Row' class that I'd subclass for each
table in the database.  It would be responsible for setting and getting
and syncing data between the app and the database.

So, in the Notepad example, the NoteEdit class does this:

mDbHelper = new NotesDbAdapter(this);
mDbHelper.open();

But the NoteEdit class extends Activity.  I don't see that
my Row class should extend Activity.  Would it matter? If it
does, can I just extend Activity even though the Row class
will never be called as one?

Thanks,

Toby

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


Re: [android-developers] I need an activity context, but from a class that does not extend Activity

2010-12-14 Thread Tobiah

On 12/14/2010 11:18 AM, Kostya Vasilyev wrote:

NotesDbAdapter actually doesn't need Activity, it needs a Context (which is a 
superclass of Activity). It's then passed into
SQLiteOpenHelper subclass, to get application-specific database file location.

I'm not entirely clear on what Row class is supposed to be. Can you pass an 
Activity or Context reference through class/methods
parameters, all the way to where you need it?


I guess that's what I'm wondering.  If Activity gets the context from
one of its superclasses, then can I get one some other way?  I guess you
are saying that when I instantiate the Row class, I could just pass 'this'
to it from the Activity that I am using it from, then pass that to
the database instantiator in the Row class.  Is that the best way to
get the context?

Is the context specific to the app, or to the activity?

Thanks,

Toby

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


[android-developers] Command line device debugging -- set breakpoint in the code?

2010-12-14 Thread Tobiah

I read how to forward the proper port and connect to my app
with jdb (ddms shows green bug next to app).  I'm using
android.os.Debug.waitForDebugger(); early in my app, and
when I launch it, it does hang.

Looking at the jdb help, I should be able to set breakpoints
given a method name or line number, but it would be nice
to just edit them right into the code.  Is this possible?

Thanks,

Tobiah

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


Re: [android-developers] Command line device debugging -- set breakpoint in the code?

2010-12-15 Thread Tobiah

On 12/14/2010 09:48 PM, Frank Weiss wrote:

I'm surprised no one has answered.
Learn how to us the Eclipse debugger.
Fall in love with the Eclipse debugger.


I was hoping not to have to fire up that
beast.  I saw a post somewhere that suggested
putting in a while loop that is contingent on
some variable, then after entering jdb, set a
breakpoint after the loop and unset the variable
to let fly.  There has to be a better way.

Thanks,

Tobiah

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


Re: [android-developers] Command line device debugging -- set breakpoint in the code?

2010-12-15 Thread Tobiah

On 12/15/2010 10:53 AM, Frank Weiss wrote:

Are you debugging Android OS or Android SDK code?


Just a small app I'm writing using the SDK.

In Python, or PHP, I can issue a call in the code
that becomes a breakpoint.  I'm just hoping that
there is a way to do that for android.

I heard somewhere that I could  list the
breakpoints in a config file somewhere,
but I can't find that reference anymore.

Thanks,

Toby

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


Re: [android-developers] Command line device debugging -- set breakpoint in the code?

2010-12-15 Thread Tobiah

On 12/15/2010 12:40 PM, Frank Weiss wrote:

Well, our perception of Eclipse is 180 degrees from mine. I'm curious, what did you meant 
by "beast"?


I guess it just seems really complex.  I've never used and IDE, so there is a 
lot to learn.
I did the android HelloWorld and Notepad in Eclipse and just decided to go back 
to the command
line.  I still push a button to compile install and run the app - it's just 
that the button
is a scriipt.  I'm comfortable on the command line, and I don't like to use the 
mouse.  I also
couldn't live without vim.  I understand that there are plugins for that, but I 
googled around
and gave up.

Step debugging is the last thing that I need.  Otherwise, I'm super happy with 
the SDK from
the command line.  I don't have Ctrl-Shift+O, but I'm new to Java, and new to 
android, so I
don't mind that I'm forced to get familiar with the object heirarchy.  I'm sure 
that the docs
are more readily available from Eclipse, but the online android reference rocks.



In the OP you asked about setting breakpoints right in the code. In Eclipse 
debugger (and just about every GUI debugger, including
Firebug) you just double click in the left margin of the source code line to 
set a breakpoint, which is indicated by a small dot in
the left margin.


By "in the code" I mean that I want to be able to edit my source code with an 
editor
and have that generate the breakpoint.  With some other debuggers, there is a 
function
call that can make this happen.


When the breakpoint fires, Eclipse highlights that line. From there you can 
inspect variables, the stack, etc. and
step through the code. I've debugged with the command line before, but once I 
started debugging with Eclipse, Visual Studio, and
Firebug, I would think that having to use a command line debugger is painful.


I get that it must be more streamlined, and I wanted to try it.  I thought that 
I could just
go to Eclipse for debugging and do everything else the same way I've been 
doing.  I created
a new android project from existing source, and pointed to my source tree.  
There were many
errors listed, even though my app compiles and runs fine.  I couldn't make 
sense of them.
I tried to run the project and I got an error.  I just gave up.  I guess that 
made me think
of the program as a beast.  I will give it a try some other time.  I can't make 
a valid choice
until I have reached some level of familiarity with what Eclipse can do.  I 
notice that there
are two well represented camps on the net: those that love Eclipse and those 
that hate it.
There's very little in between.  I shy from GUI's in general.  I always find 
myself doing
repetitive mouse movements to get the same things done over and over.  On the 
command line,
anything repetitive is scripted.  I guess I tried to further justify my 
original choice by
thinking that I'd learn Java and the SDK in greater depth this way, and I might 
say that I
believe that I was correct in that respect.

Thanks,

Toby

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


[android-developers] rawQuery selection args?

2010-12-21 Thread Tobiah

I am unable to find an example of how to use the 'selection args' in the
second argument to rawQuery:

public Cursor rawQuery (String sql, String[] selectionArgs)

Can someone explain what they would be for and how to use them?

Thanks,

Tobiah

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


Re: [android-developers] rawQuery selection args?

2010-12-21 Thread Tobiah

On 12/21/2010 11:38 AM, Mark Murphy wrote:

String[] args={"somebaldingguy"};
rawQuery("SELECT _id, title FROM books WHERE author=?", args);

The string array elements replace the question mark placeholders.
SQLite handles quotation rules for strings for you, so you do not have
to worry about embedded quotes or apostrophes.


Oh I see, so that would eliminate any worries of say, sql injection
attack right off?  Is there any other reason that one would go
through this?  Any performance gain, etc?

Thanks,

Tobiah

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


Re: [android-developers] rawQuery selection args?

2010-12-21 Thread Tobiah

Is there any other reason that one would go
through this?  Any performance gain, etc?


Convenience. Beats doing the string concatenation and
apostrophe-escaping yourself.


Makes sense, thanks.

Tobiah


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


[android-developers] How do you manipulate content in an Activity from an external class or another Activity?

2010-12-21 Thread Tobiah

Can one Activity manipulate the Views of another?
Even with a class that is external to the Activity,
it seems that I need to pass a pointer to the View
in question around.  I have a subclass of Application
that I could use to keep the View pointers in.  Will
that work?  Does it sound necessary?

Thanks,

Tobiah

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


[android-developers] Getting Eclipse to see a third party .jar file.

2011-01-05 Thread Tobiah

I'm using the Big in Japan SDK to add barcode scanning to my app.
All of their stuff comes in a .jar file that I had to put in the
lib directory.  I can use ant and adb to compile and install my
app, and it runs fine.  I tried to put it into eclipse, but it
can't see any of the stuff that is defined in the .jar file.  Do
I need to tell Eclipse to do that?  I couldn't figure out how.

Thanks,

Tobiah

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


[android-developers] Launch an app on the phone remotely with adb?

2011-01-05 Thread Tobiah

Or some other tool?  I'd like my build script to launch the app
at the end, but I can't see how to do that with adb.  Right now
I have to find the app on the phone and start it.

Thanks,

Tobiah

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


Re: [android-developers] Getting Eclipse to see a third party .jar file.

2011-01-06 Thread Tobiah

On 01/05/2011 02:01 PM, TreKing wrote:

On Wed, Jan 5, 2011 at 3:57 PM, Tobiah mailto:t...@tobiah.org>> wrote:

Do I need to tell Eclipse to do that?


You do.

  I couldn't figure out how.


Like this: http://lmgtfy.com/?q=add+jar+to+eclipse&l=1 
<http://lmgtfy.com/?q=add+jar+to+eclipse&l=1>


Love the sarcasm.

Ok, the .jar file was already in the lib directory at the project root.
Unzipping it, I see things like:

com/biggu/barcodescanner/client/android/CaptureActivityHandler.class
com/biggu/barcodescanner/client/android/CaptureActivity$1.class
com/biggu/barcodescanner/client/android/CaptureActivity$BeepListener.class
com/biggu/barcodescanner/client/android/CaptureActivity$Source.class
com/biggu/barcodescanner/client/android/CaptureActivity.class

etc...

I hit did a refresh on the project, but it still won't run.  Under the
problems tab, I still see:

The import com.biggu cannot be resolved.

I'm guessing that this means that the .jar file is still not
being searched.  The offending line looks like this:

import com.biggu.barcodescanner.client.android.Intents;

The class Intents does exist in the .jar file under that path.

Thanks!

Tobiah

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


Re: [android-developers] Getting Eclipse to see a third party .jar file.

2011-01-06 Thread Tobiah




Unzipping it, I see things like:


There's no reason to unzip a jar file that you're going to use as a library.


I get that, all though I am a total java noob.  I was just illustrating that
it did represent at least com.biggu.


I hit did a refresh on the project, but it still won't run.



This means you did not add it correctly.


Ok, believe me, I'm not an idiot, but when I looked at the
site that you linked to, my browser window was small, and it
looked as though the first three steps were the entire process.
I hit F5, and it still didn't work!  Scrolling is good.  It worked
this time.

Thanks,

Tobiah

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


[android-developers] class name (Dbi) does not match path (classes/Dbi.class)

2011-01-06 Thread Tobiah

My app installs and runs fine from Eclipse, but
the Console is filled with many warnings like
the one in the subject line.  Should I worry about that?
I tried googling for this, and saw others with the
same concerns, but no answers.

Others are more arcane to me:

class name (com/rcsreg/exposmart/ExpoSmart$2) does not match path (classes/com/rcsreg/exposmart/ExpoSmart$2.class)class name 
(com/rcsreg/exposmart/R$id) does not match path (classes/com/rcsreg/exposmart/R$id.class)


I don't understand the "$" stuff.

Thanks,

Tobiah

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


Re: [android-developers] class name (Dbi) does not match path (classes/Dbi.class)

2011-01-06 Thread Tobiah



I'd say - uninstall the application from the phone ("adb remove your.package.name.here"), exit 
Eclipse, delete "gen" and "bin"
folders in your project.

Then restart Eclipse, and clean the project so it auto-builds (Project -> 
Clean). May take a few iterations until all the
auto-generated stuff snaps into place.


That took care of it.  Thanks.  I normally build
and run this project from the command line.  In fact
I just recently made an Eclipse project out of it.
Could that be why I had the problem?

Thanks,

Tobiah

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


Re: [android-developers] class name (Dbi) does not match path (classes/Dbi.class)

2011-01-06 Thread Tobiah

On 01/06/2011 01:11 PM, Kostya Vasilyev wrote:

[ below ]

07.01.2011 0:01, Tobiah пишет:



I'd say - uninstall the application from the phone ("adb remove your.package.name.here"), exit 
Eclipse, delete "gen" and "bin"
folders in your project.

Then restart Eclipse, and clean the project so it auto-builds (Project -> 
Clean). May take a few iterations until all the
auto-generated stuff snaps into place.


That took care of it. Thanks. I normally build
and run this project from the command line. In fact
I just recently made an Eclipse project out of it.
Could that be why I had the problem?


Yes, that's probably it. I believe some files are used by both builds systems.


Oh, but now I see that if I run my build script:

if ant debug; then
adb uninstall com.rcsreg.exposmart
adb -d install bin/ExpoSmart-debug.apk
adb -d logcat
fi

And then build from Eclipse again, the warnings are back ever time
I try to run the app from Eclipse.  Is this going to be ok?  The
app still seems to run fine either way I build it.

Thanks!

Tobiah

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


Re: [android-developers] class name (Dbi) does not match path (classes/Dbi.class)

2011-01-06 Thread Tobiah

On 01/06/2011 01:45 PM, Kostya Vasilyev wrote:

07.01.2011 0:40, Tobiah пишет:


Oh, but now I see that if I run my build script:

if ant debug; then
adb uninstall com.rcsreg.exposmart
adb -d install bin/ExpoSmart-debug.apk
adb -d logcat
fi

And then build from Eclipse again, the warnings are back ever time
I try to run the app from Eclipse. Is this going to be ok? The
app still seems to run fine either way I build it.


Sorry, I've never built my Android applications with Ant... (not yet)



More information for whoever.  The warnings come every time
I save a file.  Not when I run the app.

Thanks,

Tobiah

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


[android-developers] ListView seems to consume screen from its location downward.

2011-01-12 Thread Tobiah

I'm making my screen up programmatically:

LinearLayout l = new LinearLayout(this);
l.setOrientation(LinearLayout.VERTICAL);

l.addView(getBarcodeButton());

result = new TextView(this);
result.setText(borg.phone_number);
l.addView(result);

ListView lv = new ListView(this);
String[] a = {"cat", "dog", "foo", "bar", "cat", "dog", "foo", "bar", "cat", "dog", 
"foo", "bar"};
lv.setAdapter(new ArrayAdapter(this, 
android.R.layout.simple_list_item_1, a));
l.addView(lv);

setContentView(l);


This works fine so long as the ListView is the last item in the LinearLayout.
If I move the button or the text below the ListView, the become invisible; the
ListView always extends to the bottom of the screen.

Am I doing something wrong?

Thanks,

Tobiah

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


[android-developers] SQLite database is puffed every time I run my app.

2011-01-12 Thread Tobiah

I took my code from the NotePad tutorial:

private static class DatabaseHelper extends SQLiteOpenHelper {

DatabaseHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}

@Override
public void onCreate(SQLiteDatabase db) {

Log.e(TAG, "CREATING DAG");
createDB(db);
}

@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int 
newVersion) {
Log.e(TAG, "Upgrading database from version " + oldVersion + 
" to "
+ newVersion + ", which will destroy all old 
data");

db.execSQL("DROP TABLE IF EXISTS scan");
db.execSQL("DROP TABLE IF EXISTS notes");
db.execSQL("DROP TABLE IF EXISTS attendee");
db.execSQL("DROP TABLE IF EXISTS attendeeqanswerlink");
db.execSQL("DROP TABLE IF EXISTS lead");
db.execSQL("DROP TABLE IF EXISTS leadnotes");
db.execSQL("DROP TABLE IF EXISTS qanswer");
db.execSQL("DROP TABLE IF EXISTS qquestion");
db.execSQL("DROP TABLE IF EXISTS rolodex");
db.execSQL("DROP TABLE IF EXISTS showinfo");

onCreate(db);
}
}

I can tell from the log that onCreate() is being called every time I start up 
my app.  onUpgrade() is not
being called.  I can add data to the database using rawQuery().  While the app 
is running I can pull
the database file to my dev box and select records from the copy.  If I restart 
the app, then pull
the database, it's empty.

What could be wrong?

Thanks!

Tobiah

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


Re: [android-developers] SQLite database is puffed every time I run my app.

2011-01-13 Thread Tobiah

On 01/12/2011 07:53 PM, Kumar Bibek wrote:

You should change your Version of database to let it call the onUpgrade method. 
Really, it should. And, the onCreate should not be
called everytime.


I have tried incrementing the version.  What's odd is that the onUpgrade method
never gets called.


It seems that your onUpgrade method is being called, and everytime you run the 
app, it deletes all the tables and recreates them.
That should explain why your tables are empty. Check the logcat for more info. 
It should be  there.


No, just the onCreate() is being called.  Not sure why that puffs the data.

Thanks,

Tobiah

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


[android-developers] Development cycle without losing database?

2011-01-13 Thread Tobiah

I use this script to test my app after making changes:

if ant debug; then
adb uninstall com.rcsreg.exposmart
adb -d install bin/ExpoSmart-debug.apk
adb shell am start -n 
com.rcsreg.exposmart/com.rcsreg.exposmart.ExpoSmart
adb -d logcat
fi

I appears that when I do the adb uninstall, my database is getting
puffed.  I'd like to keep the database from app version to app version.
If I don't do the adb uninstall, I get an error:

Failure [INSTALL_FAILED_ALREADY_EXISTS]

Is there another way to keep upgrading my app without losing
the database?

Thanks,

Tobiah

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


Re: [android-developers] Development cycle without losing database?

2011-01-13 Thread Tobiah

On 01/13/2011 10:49 AM, Kostya Vasilyev wrote:

adb install -r 

Note the "-r" - reinstall, keeping the data.


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] ListView onItemClick - I need something more than just the position of the click

2011-01-13 Thread Tobiah

I'm getting a call to my AdapterView.OnItemClickListener() when I
touch an item in my ListView.  The ListView (subclass of) is populated from
a String[] data like this:

this.setAdapter(new ArrayAdapter(this.context, 
android.R.layout.simple_list_item_1, data));

Each row in the data holds an individual's first and last name along
with their database ID#.  Here is what I'm getting back from the call:

parent   The AdapterView where the click happened.
view The view within the AdapterView that was clicked (this will be a view 
provided by the adapter)
position The position of the view in the adapter.
id   The row id of the item that was clicked.

Now, if I keep a representation of the data set somewhere else in an array, then
I could index that array by the position parameter.  I'd like to get the 
information
from the parameters to the event handler though.  Right now, the 'id' param 
mirrors
the position parameter.  Is that something that I can set somewhere?  Otherwise,
it's ugly, but I could glean the information from the text that is displayed in
each row.  How would I do that given the 'parent' or 'view' parameter.

Thanks,

Tobiah

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


Re: [android-developers] ListView onItemClick - I need something more than just the position of the click

2011-01-13 Thread Tobiah

On 01/13/2011 01:30 PM, TreKing wrote:

On Thu, Jan 13, 2011 at 3:02 PM, Tobiah mailto:t...@tobiah.org>> wrote:

I'd like to get the information from the parameters to the event handler 
though.


http://developer.android.com/reference/android/widget/ListView.html#getAdapter()


I looked at the ListAdapter docs.  It's not clear to me, given the methods 
available
what to do with the Adapter once I have it.  At best, I'm assuming that I could 
somehow pull
out the display text given the position of the item?

Thanks,

Tobiah

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


Re: [android-developers] ListView onItemClick - I need something more than just the position of the click

2011-01-13 Thread Tobiah

On 01/13/2011 02:39 PM, Kostya Vasilyev wrote:

Yes you can. Call Adapter.getItemAtPosition() with the position value passed 
into onClick().


I'm new to this.  I forgot to look at the inherited methods in the docs.
What seems most interesting is getItemId(int position).  If I could set
that Id when creating the Adapter then I'd be all set.  Is this the
same Id that will be sent to my onItemClick handler?  I'm just not
sure how to set the Id.

Thanks!

Tobiah

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


Re: [android-developers] ListView onItemClick - I need something more than just the position of the click

2011-01-13 Thread Tobiah

On 01/13/2011 02:56 PM, Kostya Vasilyev wrote:

It's the same id as returned by the adapter's getItemId, but I'm not sure 
ArrayAdapter returns anything useful there.

I'd actually recommend you implement your own adapter, subclassing from 
BaseAdapter.

It's not that difficult, there are plenty of samples and tutorials. And yet the 
stuff you can learn this way, getting insight into
listview/adapter interaction, can be quite useful.


I didn't realize that my onItemClick handler would have access to the members 
in the class in
which it was defined.  I just stuffed a list of Id values in a String array and 
index that
with the position parameter I'm getting.  It's not as pretty as I'd like, and 
I'm keeping
and extra list around that has to be updated when the ListView is updated, but 
it works.

Thanks for the help.

Tobiah

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


[android-developers] Do I need to stall and extra thread to avoid tanking CPU?

2011-01-13 Thread Tobiah

I need to launch a thread that will periodically look at the
database to see whether records need to be synced to a remote server;
I need the requests to the server to happen in the backgound.
If this thread just spins away without being checked, won't the
cpu be tanked?  Should I put some sort of 'sleep' in the thread
so that it only runs every so often?

Thanks,

Tobiah

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


Re: [android-developers] Do I need to stall and extra thread to avoid tanking CPU?

2011-01-13 Thread Tobiah

On 01/13/2011 03:40 PM, TreKing wrote:

On Thu, Jan 13, 2011 at 5:37 PM, Tobiah mailto:t...@tobiah.org>> wrote:

Should I put some sort of 'sleep' in the thread so that it only runs every 
so often?


You should probably use an IntentService.


That looks like a pretty good idea.  If the app
exits while I'm in the middle of performing the
service, can I get some notice and a little time
to clean up?

Thanks,

Tobiah

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


[android-developers] Adding software to the phone OS?

2011-01-14 Thread Tobiah

I developed on a WebOS phone for a while.  The command line seemed to have more
of the usual Unix commands available then Android.  I was able to use a command
sort of like apt-get to suck down most of what I could imagine.  I put a 
webserver
on that phone with PHP.  I could SSH into it over the network.  How are the
resources for Android?  Specifically, I'd rather like to put the sqlite client
on my phone so that I can browse my databases without copying them off of the 
phone.

Thanks,

Tobiah

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


[android-developers] Can't figure out this compile error

2011-01-14 Thread Tobiah

Trying to launch an IntentService:


package com.rcsreg.exposmart;
import android.app.IntentService;
import android.util.Log;
import android.content.Intent;

public class Sync extends IntentService{

Integer counter = 0;

public void Sync(){
super("Sync");
}

@Override
protected void onHandleIntent(Intent intent){
while(1 == 1){
Log.e("INTENT", String.format("COUNT IS %d", 
counter++));
try{
Thread.sleep(3000);
} catch (Exception e){
}
}
}
}


Compiler says:

[javac] Compiling 2 source files to /home/toby/android/exposmart/bin/classes
[javac] /home/toby/android/exposmart/src/com/rcsreg/exposmart/Sync.java:6: 
cannot find symbol
[javac] symbol  : constructor IntentService()
[javac] location: class android.app.IntentService
[javac] public class Sync extends IntentService{
[javac]^
[javac] /home/toby/android/exposmart/src/com/rcsreg/exposmart/Sync.java:11: 
call to super must be first statement in constructor
[javac] super("Sync");
[javac]  ^
[javac] 2 errors

Thanks,


Tobiah

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


Re: [android-developers] Re: Can't figure out this compile error

2011-01-14 Thread Tobiah

On 01/14/2011 11:28 AM, Hari Edo wrote:



public class Sync extends IntentService
{

--->Integer counter;


  public void Sync() {
  super("Sync");

--->counter = 0;

  }

...

}




It turned out that I needed to axe the 'void' in the
constructor.

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] Pay for free app later?

2011-01-18 Thread Tobiah

If someone puts a crippled free app on the market,
but allows a user to follow a link to say PayPal
to unlock the app, it seems that the end result
would be that a paid app ended up getting on the
phone without Google taking a cut of the revenue.  What's Google's
(or anyone else's) take on this?

Thanks,

Tobiah

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


[android-developers] Running SDK samples

2010-12-03 Thread Tobiah

I did the Hellow World using tools/android to create the project
from the command line.  I don't understand how to run the projects
in the sample directory.  There is no build.xml in them.  How do
I get them on my phone?  I usually install like this:

ant debug
adb uninstall com.rcsreg.exposmart
adb -d install bin/exposmart-debug.apk


But ant wants the build.xml that the android tool
creates.

Thanks,

Tobiah

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


[android-developers] Posting failed? Please ping me back

2010-12-03 Thread Tobiah

I've noticed that some lists don't seem to send me my own posts - just
replies, so It's possible that my problem is that my question did not
draw any answers.  In order for me to determine whether my posts are seen,
could someone just reply to this, copying me off list as well please?
It will help me know whether I'm getting through, and whether I'm receiving
replies and my original posts.

Thanks!

Tobiah

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


[android-developers] Can't see quickly incrementing integer until incrementing stops.

2010-12-03 Thread Tobiah

I filled a LinearLayout with a bunch of TextView's filled with
numbers.  Then I used a for loop to run over every TextView, get
the content with TextView.getText(), increment the value (after casting)
and put it back with TextView.setText().  I do this 50 times.  This all 
works, but I can't
see anything but a black screen while the program is running.  At the
end of the loop I see that all of the TextView's have increased in
value by 50, but I can't see anything until the loop is done.

Is there a way to make the display refresh between each iteration
of the loop?

Thanks,

Tobiah

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


[android-developers] Decryption key that only works with your phone number?

2010-12-08 Thread Tobiah

Is it possible to encrypt data in such a way, that given a particular
phone number, I could distribute a key that would decrypt the data,
but only when mixed with that phone number?

Thanks,

Tobiah

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


Re: [android-developers] Re: Decryption key that only works with your phone number?

2010-12-08 Thread Tobiah

Good news.  More info please?

On 12/08/2010 12:05 PM, DanH wrote:

Yep.

On Dec 8, 12:19 pm, Tobiah  wrote:

Is it possible to encrypt data in such a way, that given a particular
phone number, I could distribute a key that would decrypt the data,
but only when mixed with that phone number?

Thanks,

Tobiah




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


Re: [android-developers] Re: Decryption key that only works with your phone number?

2010-12-08 Thread Tobiah

I don't understand most of these terms.

On 12/08/2010 12:22 PM, Wajid Hussain wrote:

Use symmetric key encryption and make your key extended by adding phone number 
of the mobile with the key like new_key = your_key +
customer_mobile_number

But you can't do this with asymmetric key(key pair).
But you can also implement this using a double encryption technique. Means 
encrypt using public key and then encrypt it with
your_key, and same as with decryption, means first decrypt with your_key and 
then decrypt with private key. But keep in mind that
hash and message digest can only performs before and after you your_key encrypt 
and decrypt.

Hope this will solve your problem.

Wajid


On Thu, Dec 9, 2010 at 1:08 AM, Tobiah mailto:t...@tobiah.org>> wrote:

Good news.  More info please?


On 12/08/2010 12:05 PM, DanH wrote:

Yep.

On Dec 8, 12:19 pm, Tobiahmailto:t...@tobiah.org>>  
wrote:

Is it possible to encrypt data in such a way, that given a 
particular
phone number, I could distribute a key that would decrypt the data,
but only when mixed with that phone number?

    Thanks,

Tobiah



--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com 
<mailto:android-developers@googlegroups.com>
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com 
<mailto:android-developers%2bunsubscr...@googlegroups.com>
For more options, visit this group at
http://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


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


[android-developers] Can I compile against this SDK? They give me an .apk that installs...

2010-12-08 Thread Tobiah

I went to shopsavvy.mobi and got their 'sdk' for barcode scanning.
I get the normal tree, and do an android update project to get the
build.xml.  When I try to build, I see that I don't seem to have
all of the source:

compile:
[javac] Compiling 3 source files to 
/home/toby/bart/ScannerSDK.Android/Demo/bin/classes
[javac] /home/toby/bart/ScannerSDK.Android/Demo/src/com/biggu/scannerdemo/Demo.java:3: package 
com.biggu.barcodescanner.client.android does not exist

[javac] import com.biggu.barcodescanner.client.android.Intents;

I notice that under the lib directory, there is a .jar file called
biggu_scanner-1.1.0.jar.  Unzipping that, I find files like:


 inflating: com/biggu/barcodescanner/client/android/CaptureActivityHandler.class
  inflating: com/biggu/barcodescanner/client/android/CaptureActivity$1.class
  inflating: 
com/biggu/barcodescanner/client/android/CaptureActivity$BeepListener.class

So I guess I'm missing including that .jar file?  Is there something that I need
to do in order to include the classes in the .jar file in the build?

Thanks,

Toby

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


[android-developers] Include .jar file in my project?

2010-12-09 Thread Tobiah

If I have a .jar file that contains libraries that I want to
use in my android application, how can I make them available
to my main code?

Thanks,

Toby

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


  1   2   >