[android-developers] Re: Jelly bean http post basic authantication give No authentication challenges found exception.

2013-01-21 Thread John Gaby
I don't know if this will help, but I had a similar problem a while back. 
 Only in my case, it worked in the newer versions of Android, but not in 
the older versions.  After consulting with the people running the server 
that I was trying to connect to, I found the problem.  In the header, I was 
sending:

Authorization: Bearer XX,


but they were receiving:

authorization: Bearer XX,


For some reason, the earlier versions of Android were converting 
'Authorization' to 'authorization' and the particular host that I was 
talking to did not accept the lowercase version.  The fix was to get the 
server to accept both.

I don't know if this has anything to do with your problem, buy you might 
want to consider if the case of your request is correct.



On Monday, January 21, 2013 4:00:47 AM UTC-8, AndroidDev wrote:

 Hello Friends,

 I have a http post basic authentication webservice. I used 
 HttpURLConnection and all thing work fine before Android version Jelly 
 Bean. In Jelly Bean its give a run time exception  No authentication 
 challenges found. I have try all thing but not got exact solution. Kindly 
 help me. I will appreciate your great help.

 Thanks


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

[android-developers] Re: Updating app with keystore not being valid long enough

2012-11-08 Thread John Gaby
I too would like the answer to this.  I have an app that appears to be only 
1 year away from not being updatable anymore.

On Tuesday, November 6, 2012 5:32:14 AM UTC-8, Kevin Penhoat wrote:

 Is there any way to change my keystore values so it'll be valid longer? 
 When I uploaded the app it was 33 years or something, now it's become 50! 
 What do do

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

Re: [android-developers] Re: [Android LVL] Sporadic false negatives on client devices

2012-10-30 Thread John Gaby
I also have a small number of users who fail the LVL test ( 1%).  My 
solution is to have my app call my website first to ask if it should do the 
LVL test.  That way, if a user contacts me that it is not working I can set 
it up so that his device no longer performs the check.  I actually 
implemented this from the very beginning, because the whole LVL test 
worried me and I wanted to have a way to override the check if, for some 
reason, it failed to work.  As it turned out, I am glad I did.

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

[android-developers] Re: Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE

2012-03-30 Thread John Gaby
If you are using the emulator, you can change the size of the internal
storage by adding the following command line argument when you launch
the emulator:

-partition-size 200

On Mar 30, 2:37 am, Kirupa answerofandr...@gmail.com wrote:
 [2012-03-30 15:05:16 - Information Exchanger 2.7.3] Installation
 error: INSTALL_FAILED_INSUFFICIENT_STORAGE
 [2012-03-30 15:05:16 - Information Exchanger 2.7.3] Please check
 logcat output for more details.
 [2012-03-30 15:05:16 - Information Exchanger 2.7.3] Launch canceled!
 How can i solve the problem?

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


[android-developers] setRequetProperty seems to change the case of the Field string to lowercase on pre 2.3 Android devices

2012-01-06 Thread John Gaby
I am having a problem with setRequestProperty on pre 2.3 versions of
Android.  I am trying to implement an OAuth2 protocol to connect to a
website (which is not under my control), and it requires the header
field 'Authorization' to have the first letter capitalized.  Since
setRequestProperty is converting it to lower case my app fails on pre
2.3 devices.  Here is a thread that I found from 2010 that refers to
this problem:

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

Does any have a workaround for this problem that will allow me to
create a version of my app which will work on pre 2.3 devices?

Thanks.

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


[android-developers] Re: User cannot install an update

2011-12-05 Thread John Gaby
Thanks for the suggestions.  I had the user try taking out the battery
but it didn't help (I HAD previously had him reboot his phone which
didn't work either).  I am beginning to think that there is something
screwed up with the permissions as you suggest.  I have actually had a
similar problem on my HTC Hero phone running 2.1 (he is running 2.2).
It gets into a state where I can no longer install my app and it
clearly appears to be a permissions problem (I can't remember the
exact message, but it fails to install something complaining that the
folder doesn't exist).  I have had this happen a number of times and
it usually occurs when I have installed a debug signed apk, un-
installed and then tried to install a signed apk.  However my user has
only ever had properly signed apks.

Ultimately the only way I was able to get it to work again on my HERO
was to reset the entire phone to the factory settings (which deletes
everything), which is not something that my user is wanting to do.



On Dec 5, 8:44 am, mot12 martin.hu...@gmail.com wrote:
 Lucky you. This happened because of a firmware bug in Samsung devices
 2.2.1. See here:

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

 or

 https://groups.google.com/forum/#!topic/android-developers/Sm7WCWZYcK...

 In the first post, the author describes how he ended up with an app
 having a different user ID than the app data directory.

 @John Coryat : If you read the original post in this thread and his
 follow up, you will see that John already tried uninstalling to no
 avail.

 -- Martin
 mobitobi

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


[android-developers] Re: User cannot install an update

2011-12-05 Thread John Gaby
You are, of course, correct.  I just wanted to understand what is
happening here so that I can determine whether it is my fault or not,
and whether I am going to have others that have this problem.  The
reality is that for every person that takes the time to report a
problem there are probably dozens (or hundreds?) who don't bother.


On Dec 5, 10:32 am, John Coryat cor...@gmail.com wrote:
 You'll have to decide what level of support you want to offer. For me, once
 I've determined it isn't a problem with the app, the user has to look
 elsewhere for support. I can't help solve problems with the countless
 versions of Android/carrier/manufacturer OS's and devices. I'd rather spend
 my time staring off into empty space than do that.

 If you want to be 100% support for any problem a user encounters, that's
 strictly up to you but if your app ever gets popular, then you'll be
 swamped. Better to send them to Android support and let them deal with it.

 -John Coryat

 @martin - I pasted the text I send to users, it wasn't modified to fit the
 poster's experience already. I have found this text to either solve all
 these problems or send the user to a place where they should seek help.
 That's why I posted it.

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


[android-developers] Re: User cannot install an update

2011-12-05 Thread John Gaby
Thanks for all your help, the user does not have root access and is
not willing to reset his phone.  Rebooting the phone also does not
help (or so he tells me). So I guess that he is simply stuck with his
current version.

Thanks again.

On Dec 5, 12:39 pm, mot12 martin.hu...@gmail.com wrote:
 I would agree with John that this is not worth your time as a support
 issue. But if your user has root access, I would try deleting the app
 data folder. This has worked for the issue that I addressed.
 Otherwise, factory reset :(.

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


[android-developers] User cannot install an update

2011-12-04 Thread John Gaby
I have a user who is trying to install an update and it is failing.
He has sent me the logcat and it seems to be failing because of some
kind of incompatibility with the shared UserID.  However, I am able to
install the same update over the same old version without this
problem.  Here is the relevant logcat section.  Does anyone have an
idea as to what might be going wrong.

12-04 22:48:02.803 I/ActivityManager(1784): Starting activity: Intent
{ act=android.intent.action.VIEW dat=file:///mnt/sdcard/
oubliette20B5.apk typ=application/vnd.android.package-archive
cmp=com.android.packageinstaller/.PackageInstallerActivity }
12-04 22:48:03.173 I/ActivityManager(1784): Displayed activity
com.android.packageinstaller/.PackageInstallerActivity: 354 ms (total
354 ms)
12-04 22:48:03.923 I/ActivityManager(1784): Starting activity: Intent
{ dat=file:///mnt/sdcard/oubliette20B5.apk
cmp=com.android.packageinstaller/.InstallAppProgress (has extras) }
12-04 22:48:04.203 D/PackageParser(1784): Scanning package: /data/app/
vmdl24026.tmp
12-04 22:48:04.273 I/ActivityManager(1784): Displayed activity
com.android.packageinstaller/.InstallAppProgress: 315 ms (total 315
ms)
12-04 22:48:04.403 D/PackageManager(1784): Scanning package
com.gabysoft.oubliette
12-04 22:48:04.403 D/PackageManager(1784): Shared UserID
com.gabysoft.oubliette (uid=10083): packages=[PackageSetting{46644bf0
com.gabysoft.oubbeta/10083}, PackageSetting{4660ffd0
com.gabysoft.oubliettelite/10083}]
12-04 22:48:04.413 I/PackageManager(1784): /data/app/
com.gabysoft.oubliette-1.apk changed; unpacking
12-04 22:48:04.413 D/PackageManager(1784): Caching shared lib lib/
armeabi/liboubliette-jni.so
12-04 22:48:04.413 E/PackageManager(1784): Package
com.gabysoft.oubliette has mismatched uid: 10113 on disk, 10083 in
settings
12-04 22:48:04.423 W/PackageManager(1784): Failed to cache package
shared libs
12-04 22:48:04.423 W/PackageManager(1784): java.io.IOException:
Permission denied
12-04 22:48:04.423 W/PackageManager(1784):  at
java.io.File.createNewFileImpl(Native Method)
12-04 22:48:04.423 W/PackageManager(1784):  at
java.io.File.createNewFile(File.java:1160)
12-04 22:48:04.423 W/PackageManager(1784):  at
java.io.File.createTempFile(File.java:1224)
12-04 22:48:04.423 W/PackageManager(1784):  at
com.android.server.PackageManagerService.cacheNativeBinaryLI(PackageManagerService.java:
3767)
12-04 22:48:04.423 W/PackageManager(1784):  at
com.android.server.PackageManagerService.cachePackageSharedLibsForAbiLI(PackageManagerService.java:
3647)
12-04 22:48:04.423 W/PackageManager(1784):  at
com.android.server.PackageManagerService.cachePackageSharedLibsLI(PackageManagerService.java:
3718)
12-04 22:48:04.423 W/PackageManager(1784):  at
com.android.server.PackageManagerService.scanPackageLI(PackageManagerService.java:
3233)
12-04 22:48:04.423 W/PackageManager(1784):  at
com.android.server.PackageManagerService.installNewPackageLI(PackageManagerService.java:
5602)
12-04 22:48:04.423 W/PackageManager(1784):  at
com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java:
5949)
12-04 22:48:04.423 W/PackageManager(1784):  at
com.android.server.PackageManagerService.access
$2100(PackageManagerService.java:137)
12-04 22:48:04.423 W/PackageManager(1784):  at
com.android.server.PackageManagerService
$5.run(PackageManagerService.java:4752)
12-04 22:48:04.423 W/PackageManager(1784):  at
android.os.Handler.handleCallback(Handler.java:587)
12-04 22:48:04.423 W/PackageManager(1784):  at
android.os.Handler.dispatchMessage(Handler.java:92)
12-04 22:48:04.423 W/PackageManager(1784):  at
android.os.Looper.loop(Looper.java:123)
12-04 22:48:04.423 W/PackageManager(1784):  at
android.os.HandlerThread.run(HandlerThread.java:60)
12-04 22:48:04.423 W/PackageManager(1784): Package couldn't be
installed in /data/app/com.gabysoft.oubliette-1.apk

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


[android-developers] Re: User cannot install an update

2011-12-04 Thread John Gaby
There is one more relevant point.  I have had the user completely
uninstall the app and re-install the new version and the above log is
what he is seeing

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

2011-11-01 Thread John Gaby
I have a ListView which displays rows which can have a variety of
controls.  If the row contains TextViews, ImageViews, and/or Buttons,
everything works as expected.  However, if I add a EditText control to
a row, then I no longer seem to be able to select a row (touching
outside of the EditText control, of course).  Note that if I have a
button on the row, it still works, but if I touch the row itself,
onItemClick never fires.  Is it not possible to have EditText controls
on rows of a ListView?

Thanks.

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


[android-developers] Re: This application is available to over 0 devices

2011-10-13 Thread John Gaby
You wer correct in that when I activated the APK the number is shown
correctly.  Thanks for your help.

On Oct 12, 7:38 pm, J Handal jhand...@gmail.com wrote:
 Are you saying that I will not be able to see the correct number of
 devices until I activate the APK 

 Yes.

 Then you click on publish.

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


[android-developers] This application is available to over 0 devices

2011-10-12 Thread John Gaby
I have uploaded an APK file for a new app, and it is telling me that
'This application is available to over 0 devices'.  The Manifest for
this app is nearly identical to another of my apps which shows it
being compatible with over 600 devices.  Does anyone have any idea
what might be wrong?  If I publish this app as it is, will it actually
be available on devices?

Thanks.

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


[android-developers] Re: This application is available to over 0 devices

2011-10-12 Thread John Gaby
Are you saying that I will not be able to see the correct number of
devices until I activate the APK (I don't remember it working this way
before)?  If I do activate the APK, will that automatically publish,
or will I still be able to do that later?

Thanks.

On Oct 12, 6:46 pm, J Handal jhand...@gmail.com wrote:
   Check it up if the apk  have been uploaded and if it is active.



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


[android-developers] Replacing an APK file for a not yet published app

2011-08-16 Thread John Gaby
I have created a new app and uploaded an APK file but have not
published it.  Now I would like to replace the APK file with a
different one.  If I try and upload another with the same version
code, it will not accept it.  If I try and delete the existing APK
file first, the ENTIRE freaking app is deleted and I have to start
over.  Surely, there is a way to replace the APK file for a non-
published app without having to re-enter all of the other meta data.
I used to be able to do this.

Thanks

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


[android-developers] Re: Replacing an APK file for a not yet published app

2011-08-16 Thread John Gaby
Really?  Wow.  I know that I can bump the version code, but since I
haven't released it yet, that should not be necessary.  Actually I
like to get all of my meta data entered and only upload the final APK
file as the last step.  Since they would not let me enter the meta
data without uploading an APK file (why is that?) I uploaded my
current version at the time.  Then when I tried to upload the final
version, the entire thing was deleted (I never dreamed that clicking
the 'delete' on the APK page would delete the whole app). Why do they
make this so hard?

Thanks.

On Aug 16, 5:01 pm, TreKing treking...@gmail.com wrote:
 On Tue, Aug 16, 2011 at 6:54 PM, John Gaby jg...@gabysoft.com wrote:
  Surely, there is a way to replace the APK file for a non- published app
  without having to re-enter all of the other meta data. I used to be able to
  do this.

 You'd think, but doesn't look like it. All you need to do is bump up the
 Version Code though, shouldn't be too bad.

 -
 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


[android-developers] ImageView scaling produces poor results

2011-08-03 Thread John Gaby
I have an ImageView control, and if the image in question needs to be
scaled down, it seems to be down, the quality of the resulting image
is very poor.  I have looked for a way to control the scaling (e.g.
set it to bicubic), but am unable to find a way to do it.  Can someone
tell me how to improve the scaling of images?

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] App Icon not present on Samsung Tablet

2011-06-20 Thread John Gaby
I have a customer with a Samsung Tablet and he tells me that the app
Icon does not show in his list of applications.  It does show on the
settings page, however, and if he goes to it using the Android Market,
he can launch it from there.  I do not have a Samsung Tablet to try.
Can anyone tell me why this might be happening?

Thanks.

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


[android-developers] Re: App Icon not present on Samsung Tablet

2011-06-20 Thread John Gaby
The app is Quizard Flashcards.  There is also a lite version, but I am
not sure if it is happening with that one as well.  I will ask the
user to scroll down through the entire list to see if he can find it.

Thanks.

On Jun 20, 1:00 pm, Mike j.m.roya...@gmail.com wrote:
 I can - what's the app?

 The Galaxy Tab does not sort the application list as one would expect
 - it seems to sort all the bloatware apps alphabetically, but the user
 installed apps appear in the order they were installed and not
 alphabetically, so it may be there.

 On Jun 20, 2:28 pm, John Gaby jg...@gabysoft.com wrote:

  I have a customer with a Samsung Tablet and he tells me that the app
  Icon does not show in his list of applications.  It does show on the
  settings page, however, and if he goes to it using the Android Market,
  he can launch it from there.  I do not have a Samsung Tablet to try.
  Can anyone tell me why this might be happening?

  Thanks.



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


[android-developers] Re: App Icon not present on Samsung Tablet

2011-06-20 Thread John Gaby
Thanks for giving it a try.  I have asked my user to look for it at
the end of the list.  Hopefully he will find it there.


On Jun 20, 1:54 pm, Mike j.m.roya...@gmail.com wrote:
 I installed the Lite version and it shows up - it's the last icon in
 my list - on screen 4 of the applications - even though screen 3 has
 some vacant slots.

 The Tab doesn't organize things very well on that set of screens. The
 first two screens are almost all bloatware - screen 2 has 3 slots that
 contain apps I have installed.

 A few weeks ago, I wrote on app to sort the Galaxy Tab app list
 alphabetically as I got tired of looking for stuff myself.

 On Jun 20, 3:43 pm, John Gaby jg...@gabysoft.com wrote:

  The app is Quizard Flashcards.  There is also a lite version, but I am
  not sure if it is happening with that one as well.  I will ask the
  user to scroll down through the entire list to see if he can find it.

  Thanks.

  On Jun 20, 1:00 pm, Mike j.m.roya...@gmail.com wrote:

   I can - what's the app?

   The Galaxy Tab does not sort the application list as one would expect
   - it seems to sort all the bloatware apps alphabetically, but the user
   installed apps appear in the order they were installed and not
   alphabetically, so it may be there.

   On Jun 20, 2:28 pm, John Gaby jg...@gabysoft.com wrote:

I have a customer with a Samsung Tablet and he tells me that the app
Icon does not show in his list of applications.  It does show on the
settings page, however, and if he goes to it using the Android Market,
he can launch it from there.  I do not have a Samsung Tablet to try.
Can anyone tell me why this might be happening?

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] I am trying to receive broadcast datagrams

2011-06-15 Thread John Gaby
I would like to be able to receive broadcast datagrams.  I am using
the following code:

public void Receive()
{
EnableMulticast();

String text;
byte[] message = new byte[1500];
DatagramPacket p = new DatagramPacket(message,
message.length);
try {
DatagramSocket s = new DatagramSocket(45454);
s.receive(p);
text = new String(message, 0, p.getLength());
Log.d(GabySoft, message: + text);
s.close();
} catch (SocketException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

Now if I send a datagram to the ip address of this device, it receives
the message.  However, if I send a broadcast datagram, I do not get
it.

By doing web searches, I found that it appears that most phones have
the ability to receive broadcast datagrams turned off to conserve
power.  I found the following code which supposedly turns that ability
back on, and I am calling it at the beginning of the 'Receive'
function:

private void EnableMulticast()
{
if (lock == null)
{
try
{
android.net.wifi.WifiManager wifi =
(android.net.wifi.WifiManager)
 
getSystemService(android.content.Context.WIFI_SERVICE);
 lock = wifi.createMulticastLock(HeeereDnssdLock);
 lock.setReferenceCounted(true);
 lock.acquire();
}
catch (Exception e)
{
e.printStackTrace();
}
}
}

However, even after calling this function (which succeeds), I still do
not receive broadcast datagrams.

Can anyone tell me how to make this work?

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] Website not working when displayed in a WebView

2011-06-12 Thread John Gaby
I have a website which has a forum, and if I view the site using the
phone's browser, it works fine.  However, if I view the site from
within a WebView inside my app, some of the buttons do not work.  For
example, if I click the 'New Post' button, nothing happens when in a
WebView, but it works fine inside the browser.

Does anyone have any idea why it behaves differently in a WebView than
a browser?

Thanks

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


[android-developers] Re: Website not working when displayed in a WebView

2011-06-12 Thread John Gaby
Never mind, I see that I needed to enable Java Script for the WebView.

On Jun 12, 10:02 am, John Gaby jg...@gabysoft.com wrote:
 I have a website which has a forum, and if I view the site using the
 phone's browser, it works fine.  However, if I view the site from
 within a WebView inside my app, some of the buttons do not work.  For
 example, if I click the 'New Post' button, nothing happens when in a
 WebView, but it works fine inside the browser.

 Does anyone have any idea why it behaves differently in a WebView than
 a browser?

 Thanks

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


[android-developers] Re: Received authentication challenge is null

2011-06-11 Thread John Gaby
I have found the problem.  It turns out that if the time stamp on your
oAuth call is incorrect, the server returns a 401 status error which
on Android devices causes the Received authentication challenge is
null exception to be thrown.  All of the devices that were having
this problem had incorrect times, and fixing the times fixed the
problem.

On Jun 10, 7:30 pm, John Gaby jg...@gabysoft.com wrote:
 I am trying to connect to a site using the oAuth protocol, and I am
 getting the exception 'Received authentication challenge is null' on
 some devices when I attempt to make a https post.  Now this was
 previously working in the emulator, but I now see the error there as
 well.  I did a web search, and it seems like I would get this
 exception when I receive an 401 error from the site.  Others said this
 was due to a malformed authentication header, but I am not setting a
 authentication header at all for this call.

 This exact same code works on a number of devices, and used to work in
 the emulator (I cannot figure out what has changed).  The person who
 runs the site has checked his logs, and does not see an error on his
 side at all. Does anyone have any idea what might be going on here?

 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] Received authentication challenge is null

2011-06-10 Thread John Gaby
I am trying to connect to a site using the oAuth protocol, and I am
getting the exception 'Received authentication challenge is null' on
some devices when I attempt to make a https post.  Now this was
previously working in the emulator, but I now see the error there as
well.  I did a web search, and it seems like I would get this
exception when I receive an 401 error from the site.  Others said this
was due to a malformed authentication header, but I am not setting a
authentication header at all for this call.

This exact same code works on a number of devices, and used to work in
the emulator (I cannot figure out what has changed).  The person who
runs the site has checked his logs, and does not see an error on his
side at all. Does anyone have any idea what might be going on here?

Thanks.

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


[android-developers] Re: Comments/Ratings not showing up on Market

2011-05-21 Thread John Gaby
I have had this happen at least 3 times.  A user told me that they has
submitted a review, but I could not see it.  I asked them about it and
they send me a screen shot clearly showing the review, however, when I
looked at the same page it simply was not there.  There is something
definitely fubar with their rating system.


On May 20, 11:56 pm, webmonkey webmonke...@gmail.com wrote:
 Maybe they are working on a comment rating system like Amazon? When
 they improve something, it usually breaks first, so it could be good
 sign ;-)

 On May 21, 8:39 am, Zsolt Vasvari zvasv...@gmail.com wrote:

  Yes, same for me -- I even had the user blow away the cached Market
  data and still, he says he can see his own commnent, but nobody else
  can.   As unbelievable as that sounds -- the Android Market team had
  managed to pull off the improbablity of introducing a bug where a
  comment only shows up for the user who made it -- after all, it must
  involve some extra logic in the code that returns the comments list to
  filter them out for eveybody else.

  On May 21, 9:55 am, Halsafar shinhalsa...@gmail.com wrote:

   To further add to the frustration.  If I look at the persons phone who
   made the comment, they see their own review/rating when looking at my
   app page.  Each person can see just the review/rating they gave.  None
   of these people can see the others.  I can't see any.  It is quite
   weird.

   Thanks for all the quick answers.  My fingers are crossed the comments
   are just stuck in limbo and will eventually appear.

   On May 20, 7:36 pm, Zsolt Vasvari zvasv...@gmail.com wrote:

Yes, same thing on my end.  I even sent an e-mail to support, but of
course, no response.  Why even waste my time, I don't know.

But I've had 4 commens in a 24 hr period, so things maybe back to
normal.

On May 21, 6:35 am, TreKing treking...@gmail.com wrote:

 On Fri, May 20, 2011 at 2:31 PM, Halsafar shinhalsa...@gmail.com 
 wrote:
  I have physically watched more than 3 people now make a comment on 
  my App
  from their device.  24 hours later none of these comments or 
  ratings appear.

 I have noticed issues with the comments as well. There just doesn't 
 seem to
 be as many flowing through as usual. One day 3 popped in all of 
 sudden, then
 two of them were gone hours later. Something's definitely up.

  Is there any particular reason for this?

 The Android Market is very, very buggy.

  Did I disable comments/rating by accident?

 That's not possible.

   Do I have to verify them?

 No.

    Do they take longer than 24 hours to appear?

 Not usually, when working correctly.

   This is my first app but it seems like something is definitely 
 wrong.

 I like to call this the Android Market Experience™. Get used to it.

 ---
  ­--
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices- Hide quoted text -

   - Show quoted text -



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


[android-developers] Controlling allowed orientations at runtime

2011-05-13 Thread John Gaby
I have an application which I want to behave differently depending on
whether it is installed on and phone or tablet sized device.  On the
phone devices, I want to support both portrait and landscape mode.
When it is installed on a tablet device, I wish to only support
landscape.  Now, using the manifest, I can add a line:

   android:screenOrientation=landscape

to the activity, and it will force the app to remain in landscape
mode.  However, I want to be able to set this at runtime only when I
detect that the device is a Tablet.  Is there a way to do this?

Thanks.

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


[android-developers] Re: HttpsURLConnection's getResponseCode() returns -1

2011-05-11 Thread John Gaby
Thanks for the tip, that does indeed fix the problem.  Can you tell me
what the ramifications of setting the keepAlive to false are?

Thanks.

On May 11, 3:18 am, Mika mika.ristim...@gmail.com wrote:
 Hi,

 I sometimes had similar kind of problems, where one request received
 the correct responseCode but the second request to the same URL failed
 with request code -1. After setting http.keepAlive system property to
 false, everything started to function properly. So maybe you could try
 adding this line  System.setProperty(http.keepAlive, false); to
 your code. Maybe it'll help.

 -Mika

 On May 11, 3:36 am, John Gaby jg...@gabysoft.com wrote:

  I am trying to use HttpsURLConnection to connect to a secure site, and
  it is failing and getResponseCode() is returning -1.  The following is
  the code that I am using.  Note that this very same code works in
  other cases.  Can anyone give me a clue as to why I might get the -1,
  and how I can get more information about what is going wrong.  Also
  note, that if I take the URL that I am trying to connect to in this
  call and paste it into a browser, I get the correct response, so I am
  pretty sure that the URL itself is correct.  In this particular call,
  m_data is null, so it is performing a GET and no data is written.

  Thanks

      HttpsURLConnection connection = null;

      try
      {
          URL url = new URL(arg0[0]);
          connection = (HttpsURLConnection) url.openConnection();

          // Allow Inputs  Outputs if there is data to send
          connection.setDoInput(true);
          connection.setDoOutput(m_data != null);
          connection.setUseCaches(false);

          // Enable GET or POST depending on whether there is data to
  send
          connection.setRequestMethod((m_data == null) ? GET :
  POST);

          connection.setRequestProperty(Connection, Keep-Alive);
          connection.setRequestProperty(Content-Type, application/
  octet-stream);

          if (m_data != null)
          {
              DataOutputStream outputStream = null;

              connection.setFixedLengthStreamingMode(m_data.length);

              outputStream = new
  DataOutputStream( connection.getOutputStream() );
              outputStream.write(m_data);

              outputStream.flush();
              outputStream.close();
          }

          // Responses from the server (code and message)
          int serverResponseCode = connection.getResponseCode();
          String serverResponseMessage =
  connection.getResponseMessage();

          InputStream inputStream = connection.getInputStream();

          int nBytes;

          m_curBytes    = 0;
          m_totBytes    = connection.getContentLength();

          byte[] bytes = new byte[65536];

          while ((nBytes = inputStream.read(bytes))  0)
          {
              if (m_file != null)
              {
                  m_file.write(bytes, 0, nBytes);
              }
              else if (m_result != null)
              {
                  m_result.append(bytes, 0, nBytes);
              }

              m_curBytes    += nBytes;

              m_handler.post(new Runnable()
              {
                  public void run()
                  {
                      if (m_pInet != 0)
                      {
                          GDownloadProgress(m_pInet, m_curBytes,
  m_totBytes);
                      }
                      else
                      {
                          int i = 0;
                      }
                  }
              });

          }

          if (m_file != null)
          {
              m_error = false;
          }
          else if (m_result != null)
          {
              m_error    = (m_result.length() = 0);
          }
          else
          {
              m_error    = true;
          }
      }
      catch (Exception ex)
      {
          GSystem.GLogWarning(GINet: error =  + ex.getMessage());
      }



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


[android-developers] HttpsURLConnection's getResponseCode() returns -1

2011-05-10 Thread John Gaby
I am trying to use HttpsURLConnection to connect to a secure site, and
it is failing and getResponseCode() is returning -1.  The following is
the code that I am using.  Note that this very same code works in
other cases.  Can anyone give me a clue as to why I might get the -1,
and how I can get more information about what is going wrong.  Also
note, that if I take the URL that I am trying to connect to in this
call and paste it into a browser, I get the correct response, so I am
pretty sure that the URL itself is correct.  In this particular call,
m_data is null, so it is performing a GET and no data is written.

Thanks

HttpsURLConnection connection = null;

try
{
URL url = new URL(arg0[0]);
connection = (HttpsURLConnection) url.openConnection();

// Allow Inputs  Outputs if there is data to send
connection.setDoInput(true);
connection.setDoOutput(m_data != null);
connection.setUseCaches(false);

// Enable GET or POST depending on whether there is data to
send
connection.setRequestMethod((m_data == null) ? GET :
POST);

connection.setRequestProperty(Connection, Keep-Alive);
connection.setRequestProperty(Content-Type, application/
octet-stream);

if (m_data != null)
{
DataOutputStream outputStream = null;

connection.setFixedLengthStreamingMode(m_data.length);

outputStream = new
DataOutputStream( connection.getOutputStream() );
outputStream.write(m_data);

outputStream.flush();
outputStream.close();
}

// Responses from the server (code and message)
int serverResponseCode = connection.getResponseCode();
String serverResponseMessage =
connection.getResponseMessage();

InputStream inputStream = connection.getInputStream();

int nBytes;

m_curBytes= 0;
m_totBytes= connection.getContentLength();

byte[] bytes = new byte[65536];

while ((nBytes = inputStream.read(bytes))  0)
{
if (m_file != null)
{
m_file.write(bytes, 0, nBytes);
}
else if (m_result != null)
{
m_result.append(bytes, 0, nBytes);
}

m_curBytes+= nBytes;

m_handler.post(new Runnable()
{
public void run()
{
if (m_pInet != 0)
{
GDownloadProgress(m_pInet, m_curBytes,
m_totBytes);
}
else
{
int i = 0;
}
}
});

}


if (m_file != null)
{
m_error = false;
}
else if (m_result != null)
{
m_error= (m_result.length() = 0);
}
else
{
m_error= true;
}
}
catch (Exception ex)
{
GSystem.GLogWarning(GINet: error =  + ex.getMessage());
}

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


[android-developers] Notification bar always shown on ViewSonic g tablet

2011-04-20 Thread John Gaby
I have an app which hides the title and notification bar and runs full
screen.  I use the following line in the manifest to accomplish this:

android:theme=@android:style/Theme.NoTitleBar.Fullscreen

This seems to work find on phones and some tablets that I have tried.
However, on the ViewSonic g tablet, although my app still runs
'Fullscreen', the notification bar is still present and overlays my
view.  The problem is, that if I have controls that are underneath the
controls on the notification bar, the user cannot access them.

Is there a way I can specifically hid the notification bar?

Thanks.

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


[android-developers] Re: Notification bar always shown on ViewSonic g tablet

2011-04-20 Thread John Gaby
Thanks for the response, you are correct in that it does not have the
Android Market.  However, there are apps that run full screen without
that bar, so there must be some way to turn it off.

On Apr 20, 1:56 pm, Mark Murphy mmur...@commonsware.com wrote:
 If I had to guess, they do not have the Android Market on that device.
 I don't quite know how they would qualify for the Market with that
 behavior. You will have to take this issue up with Viewsonic, I guess.

 That being said, do bear in mind that the system bar (bottom bar) on
 Android 3.0 cannot be removed by applications.



 On Wed, Apr 20, 2011 at 4:52 PM, John Gaby jg...@gabysoft.com wrote:
  I have an app which hides the title and notification bar and runs full
  screen.  I use the following line in the manifest to accomplish this:

  android:theme=@android:style/Theme.NoTitleBar.Fullscreen

  This seems to work find on phones and some tablets that I have tried.
  However, on the ViewSonic g tablet, although my app still runs
  'Fullscreen', the notification bar is still present and overlays my
  view.  The problem is, that if I have controls that are underneath the
  controls on the notification bar, the user cannot access them.

  Is there a way I can specifically hid the notification bar?

  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

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

 Android Training in NYC:http://marakana.com/training/android/

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


[android-developers] Re: ListView leaks memory II

2011-03-30 Thread John Gaby
Kostya asked if you were running under the debugger.  This is relevant
because previously I too had a memory leak involved with ListViews and
eventually discovered that it only happened if I was running under the
debugger.  So if you are running under the debugger, you might check
it without the debugger running to see if you still have a problem.

On Mar 30, 10:53 am, ivan istas...@gmail.com wrote:
 Also, I'm using Android SDK build 8 (2.2).

 On Mar 30, 11:37 am, ivan istas...@gmail.com wrote:

  In addition, I've read that the leak doesn't occur while the app is
  running in a non-debug session.  This is not the case with my
  experiments.  I see the leak regardless.

  On Mar 30, 11:28 am, ivan istas...@gmail.com wrote:

   onDestory has been called every time, which I've tested with a break
   point .

   On Mar 30, 11:23 am, Mark Murphy mmur...@commonsware.com wrote:

On Wed, Mar 30, 2011 at 1:18 PM, ivan istas...@gmail.com wrote:
 I accidentally posted that last one before I was done.

 I have read copious posts on this, but no solution.  After using MAT
 extensively on a simple ApiDemo list view sample, I am ABSOLUTELY
 convinced that the ListView/ListActivity is leaking memory.  I say
 this because I can see every instance I've created persisting in
 memory -- regardless of forcing a garbage collection.  To repeat copy
 the code below into a project, create another simple Activity and go
 back and forth between the two a few times.  Then in DDMS force a GC
 and dump the heap hprof file.  Open the OQL tab in MAT and type the
 following query select * from com.package name.TmpTestActivity and
 run... you'll notice multiple instances of TmpTestActivity in memory.

Has onDestroy() been called on the multiple instances of
TmpTestActivity in memory?

If not, they are not leaked. Android just hasn't kicked them out of
RAM yet. That is perfectly normal behavior.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 Available!



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


[android-developers] Strange problem with SurfaceView on a tablet device

2011-03-29 Thread John Gaby
I am trying to create a class that extends SurfaceView which I am
using to animate some images.  On a particular tablet device
(800x600), if I create an instance of my view and set it as the main
view (i.e by calling setContentView), it works fine, even in landscape
mode where the with is 800 pixels.  However if I place it in a Linear
Layout, and make the width greater than about 700 pixels, then the
view paints with an odd skewed transform.  If my view extends View,
instead of SurfaceView, then it paints correctly at any size (but, of
course, I cannot animate it).

Now this does not happen when using the emulator, and on some other
devices, so I am guessing that it is some kind of bug with this
device.  However it worries me a bit (i.e. I wonder what other devices
might exhibit this behavior), and was wondering if anyone else has
seen anything like this when using SurfaceViews, and whether there is
any kind of workaround.

Thanks.

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


[android-developers] Re: Strange problem with SurfaceView on a tablet device

2011-03-29 Thread John Gaby
As an update, I have further discovered that if I make the width 800
(i.e. the width of the display in landscape mode), then it will work
properly even if it is a child of a LinearLayout.  It only seems to
fail if the size is somewhere between 700 and 800 pixels.

On Mar 29, 5:52 pm, John Gaby jg...@gabysoft.com wrote:
 I am trying to create a class that extends SurfaceView which I am
 using to animate some images.  On a particular tablet device
 (800x600), if I create an instance of my view and set it as the main
 view (i.e by calling setContentView), it works fine, even in landscape
 mode where the with is 800 pixels.  However if I place it in a Linear
 Layout, and make the width greater than about 700 pixels, then the
 view paints with an odd skewed transform.  If my view extends View,
 instead of SurfaceView, then it paints correctly at any size (but, of
 course, I cannot animate it).

 Now this does not happen when using the emulator, and on some other
 devices, so I am guessing that it is some kind of bug with this
 device.  However it worries me a bit (i.e. I wonder what other devices
 might exhibit this behavior), and was wondering if anyone else has
 seen anything like this when using SurfaceViews, and whether there is
 any kind of workaround.

 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] Bonjour client for android?

2011-03-12 Thread John Gaby
I would like to be able to create an app which can discover and
communicate with servers running on a PC using Windows or OSX.  This
is very easy to do using Apple's Bonjour, but there does not seem to
be any implementation of this for Android.  Does anyone know of a way
to do this for Android apps, either with some sort of implementation
of Bonjour, or some other mechanism?

Thanks.

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


[android-developers] Re: How to make apps installable to SD card keeping them compatible to version 2.1 and lower ?

2011-03-02 Thread John Gaby
You have to use the 2.2 SDK when you build, but you can still set the
minSdkVersion to an earlier version.  You just need to make sure that
you don't make any calls which are specific to 2.2 when running on an
earlier version.

On Mar 1, 2:17 am, Arpit Mittal m.ar...@gmail.com wrote:
 Hi,

 I have an app which compatible onwards from 2.1, but with feasibility
 of installing apps from 2.2, i added the required attribute
 android:installLocation=auto

 But using this means i have to make the min version 8, which makes my
 app not compatible with 2.1.

 I do not want my users of 2.1 to suffer because of incompatibility and
 users of 2.2 for unable to install app on SD card.

 Is there any other way to achieve both i.e. compatibility and
 installation to external memory ?

 Regards
 Arpit Mittal

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


[android-developers] Deleting cached SD card files on uninstall

2011-02-17 Thread John Gaby
I am downloading and caching some files to the SD card.  I am placing
the files at:

/Android/data/com.gabysoft.myapp

When the app is uninstalled, on some phones (e.g. the emulator and
Motorola Droid), these files are automatically delete (which is what I
want).  On other phones (e.g. HTC Hero and HTC Legend), they are not.

Where can I put these files so that they will be deleted on uninstall
for all devices?

Thanks.

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


[android-developers] Re: Deleting cached SD card files on uninstall

2011-02-17 Thread John Gaby
As a clarification, I am placing the files in the SD card folder as
obtained via a call to getExternalStorageDirectory(), e.g:

/sdcard/Android/data/com.gabysoft.myapp

On Feb 17, 8:40 am, John Gaby jg...@gabysoft.com wrote:
 I am downloading and caching some files to the SD card.  I am placing
 the files at:

 /Android/data/com.gabysoft.myapp

 When the app is uninstalled, on some phones (e.g. the emulator and
 Motorola Droid), these files are automatically delete (which is what I
 want).  On other phones (e.g. HTC Hero and HTC Legend), they are not.

 Where can I put these files so that they will be deleted on uninstall
 for all devices?

 Thanks.

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


[android-developers] Re: Deleting cached SD card files on uninstall

2011-02-17 Thread John Gaby
So there is no way to clean up my files on pre 2.2 systems?

On Feb 17, 8:52 am, Mark Murphy mmur...@commonsware.com wrote:
 You can't. Deleting files on uninstall via getExternalFilesDir() was
 added in API Level 8 (a.k.a., Android 2.2).



 On Thu, Feb 17, 2011 at 11:40 AM, John Gaby jg...@gabysoft.com wrote:
  I am downloading and caching some files to the SD card.  I am placing
  the files at:

  /Android/data/com.gabysoft.myapp

  When the app is uninstalled, on some phones (e.g. the emulator and
  Motorola Droid), these files are automatically delete (which is what I
  want).  On other phones (e.g. HTC Hero and HTC Legend), they are not.

  Where can I put these files so that they will be deleted on uninstall
  for all devices?

  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

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

 _Android Programming Tutorials_ Version 3.1 Available!

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


[android-developers] Cannot install App on HTC Hero

2011-02-03 Thread John Gaby
I have an application (which contains an NDK component) which will not
install on my HTC Hero (OS ver = 2.1u1) It does install on the
emulator, and on a Motorola Droid (OS ver = 2.2).  The following is
the logcat which seems to indicate some problem with installing my .so
file.

Does anyone have an idea at to what might be wrong here?

Thanks

02-03 12:02:07.131: WARN/dalvikvm(92): disableGcForExternalAlloc: true
02-03 12:02:07.131: INFO/ActivityManager(92): Starting activity:
Intent { dat=file:///sdcard/download/oubliettelite.1.3.apk
cmp=com.android.packageinstaller/.InstallAppProgress (has extras) }
02-03 12:02:08.101: INFO/ActivityManager(92): Displayed activity
com.android.packageinstaller/.InstallAppProgress: 930 ms (total 930
ms)
02-03 12:02:08.101: WARN/dalvikvm(92): disableGcForExternalAlloc:
false
02-03 12:02:08.921: DEBUG/PackageParser(92): Scanning package: /data/
app/vmdl49598.tmp
02-03 12:02:10.291: INFO/PackageManager(92): /data/app/vmdl49598.tmp
changed; unpacking
02-03 12:02:10.341: DEBUG/PackageManager(92): Caching shared lib lib/
armeabi/liboubliette-jni.so
02-03 12:02:10.351: WARN/PackageManager(92): Failed to cache package
shared libs
02-03 12:02:10.351: WARN/PackageManager(92): java.io.IOException:
Parent directory of file does not exist: /data/data/
com.gabysoft.oubliettelite/lib/tmp49599tmp
02-03 12:02:10.351: WARN/PackageManager(92): at
java.io.File.createNewFile(File.java:1263)
02-03 12:02:10.351: WARN/PackageManager(92): at
java.io.File.createTempFile(File.java:1330)
02-03 12:02:10.351: WARN/PackageManager(92): at
com.android.server.PackageManagerService.cacheSharedLibLI(PackageManagerService.java:
2971)
02-03 12:02:10.351: WARN/PackageManager(92): at
com.android.server.PackageManagerService.cachePackageSharedLibsForAbiLI(PackageManagerService.java:
2912)
02-03 12:02:10.351: WARN/PackageManager(92): at
com.android.server.PackageManagerService.cachePackageSharedLibsLI(PackageManagerService.java:
2936)
02-03 12:02:10.351: WARN/PackageManager(92): at
com.android.server.PackageManagerService.scanPackageLI(PackageManagerService.java:
2520)
02-03 12:02:10.351: WARN/PackageManager(92): at
com.android.server.PackageManagerService.installNewPackageLI(PackageManagerService.java:
3863)
02-03 12:02:10.351: WARN/PackageManager(92): at
com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java:
4323)
02-03 12:02:10.351: WARN/PackageManager(92): at
com.android.server.PackageManagerService.access
$1600(PackageManagerService.java:109)
02-03 12:02:10.351: WARN/PackageManager(92): at
com.android.server.PackageManagerService
$5.run(PackageManagerService.java:3795)
02-03 12:02:10.351: WARN/PackageManager(92): at
android.os.Handler.handleCallback(Handler.java:609)
02-03 12:02:10.351: WARN/PackageManager(92): at
android.os.Handler.dispatchMessage(Handler.java:92)
02-03 12:02:10.351: WARN/PackageManager(92): at
android.os.Looper.loop(Looper.java:123)
02-03 12:02:10.351: WARN/PackageManager(92): at
android.os.HandlerThread.run(HandlerThread.java:60)
02-03 12:02:10.351: WARN/PackageManager(92): Package couldn't be
installed in /data/app/com.gabysoft.oubliettelite.apk

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


[android-developers] Re: Cannot install App on HTC Hero

2011-02-03 Thread John Gaby
Yes, they are compatible, in fact, I have previously installed this
app on the Hero before and it has worked fine.  The version I was
tying to install was signed, so I decided to rebuild the app and
install the Eclipse signed version (which previously worked).  However
now it tells me that it the signatures don't match even though I had
deleted the old signed one from the phone before I tried to install
the new one.

On Feb 3, 12:36 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 John,

 The log mentions something about shared libs - are you native libraries
 compatible with the Hero (which has a different processor from the
 Motorola Droid / Milestone)?

 -- Kostya

 03.02.2011 23:19, John Gaby пишет:



  I have an application (which contains an NDK component) which will not
  install on my HTC Hero (OS ver = 2.1u1) It does install on the
  emulator, and on a Motorola Droid (OS ver = 2.2).  The following is
  the logcat which seems to indicate some problem with installing my .so
  file.

  Does anyone have an idea at to what might be wrong here?

  Thanks

  02-03 12:02:07.131: WARN/dalvikvm(92): disableGcForExternalAlloc: true
  02-03 12:02:07.131: INFO/ActivityManager(92): Starting activity:
  Intent { dat=file:///sdcard/download/oubliettelite.1.3.apk
  cmp=com.android.packageinstaller/.InstallAppProgress (has extras) }
  02-03 12:02:08.101: INFO/ActivityManager(92): Displayed activity
  com.android.packageinstaller/.InstallAppProgress: 930 ms (total 930
  ms)
  02-03 12:02:08.101: WARN/dalvikvm(92): disableGcForExternalAlloc:
  false
  02-03 12:02:08.921: DEBUG/PackageParser(92): Scanning package: /data/
  app/vmdl49598.tmp
  02-03 12:02:10.291: INFO/PackageManager(92): /data/app/vmdl49598.tmp
  changed; unpacking
  02-03 12:02:10.341: DEBUG/PackageManager(92): Caching shared lib lib/
  armeabi/liboubliette-jni.so
  02-03 12:02:10.351: WARN/PackageManager(92): Failed to cache package
  shared libs
  02-03 12:02:10.351: WARN/PackageManager(92): java.io.IOException:
  Parent directory of file does not exist: /data/data/
  com.gabysoft.oubliettelite/lib/tmp49599tmp
  02-03 12:02:10.351: WARN/PackageManager(92):     at
  java.io.File.createNewFile(File.java:1263)
  02-03 12:02:10.351: WARN/PackageManager(92):     at
  java.io.File.createTempFile(File.java:1330)
  02-03 12:02:10.351: WARN/PackageManager(92):     at
  com.android.server.PackageManagerService.cacheSharedLibLI(PackageManagerService.java:
  2971)
  02-03 12:02:10.351: WARN/PackageManager(92):     at
  com.android.server.PackageManagerService.cachePackageSharedLibsForAbiLI(PackageManagerService.java:
  2912)
  02-03 12:02:10.351: WARN/PackageManager(92):     at
  com.android.server.PackageManagerService.cachePackageSharedLibsLI(PackageManagerService.java:
  2936)
  02-03 12:02:10.351: WARN/PackageManager(92):     at
  com.android.server.PackageManagerService.scanPackageLI(PackageManagerService.java:
  2520)
  02-03 12:02:10.351: WARN/PackageManager(92):     at
  com.android.server.PackageManagerService.installNewPackageLI(PackageManagerService.java:
  3863)
  02-03 12:02:10.351: WARN/PackageManager(92):     at
  com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java:
  4323)
  02-03 12:02:10.351: WARN/PackageManager(92):     at
  com.android.server.PackageManagerService.access
  $1600(PackageManagerService.java:109)
  02-03 12:02:10.351: WARN/PackageManager(92):     at
  com.android.server.PackageManagerService
  $5.run(PackageManagerService.java:3795)
  02-03 12:02:10.351: WARN/PackageManager(92):     at
  android.os.Handler.handleCallback(Handler.java:609)
  02-03 12:02:10.351: WARN/PackageManager(92):     at
  android.os.Handler.dispatchMessage(Handler.java:92)
  02-03 12:02:10.351: WARN/PackageManager(92):     at
  android.os.Looper.loop(Looper.java:123)
  02-03 12:02:10.351: WARN/PackageManager(92):     at
  android.os.HandlerThread.run(HandlerThread.java:60)
  02-03 12:02:10.351: WARN/PackageManager(92): Package couldn't be
  installed in /data/app/com.gabysoft.oubliettelite.apk

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.com

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


[android-developers] Re: TextView with a top margin that is proportional to the height of the parent view

2011-01-29 Thread John Gaby
That works great.  Thanks!

On Jan 29, 12:46 am, Kostya Vasilyev kmans...@gmail.com wrote:
 John,

 You can do this with LinearLayout and layout_weight attribute that it
 supports:

 LinearLayout layout_height=fill_parent orientation=vertical
 View
 layout_height=0dp
 layout_weight=20/
 TextView
 layout_height=0dp
 layout_weight=80/
 /LinearLayout

 The top view acts as a spacer, taking up 20% of the screen height, and
 the TextView starts below that.

 -- Kostya

 29.01.2011 10:59, Jonathan Foley пишет:





  Yes, but you'll have to do it at runtime as there is not a way to do
  proportional layout as you describe in xml. To prevent a visible
  transition from the xml size to the correct size, you'll probably want
  to extend LinearLayout and override its onLayout(). You'll want to
  layout your child textview within that and you'll want to use
  getHeight() to get the height of the LinearLayout at runtime. I'd
  suggest looking through the code of ListView or RelativeLayout to see
  how children are measured and layout.

  The other option would be to do this after everything is inflated. You
  can override onFinishInflate of the LinearLayout and then adjust the
  height of the TextView from there. You'll need to invalidate the
  TextView after adjusting it's height.

  Jonathan

  On Jan 28, 9:48 pm, John Gabyjg...@gabysoft.com  wrote:
  Is there a way to position text within a linear layout such that the
  position of the text is proportional to the height, rather than a
  fixed distance.  For example, I would like the text to be displayed
  down from the top a distance equal to 20% of the height of the view.

  Thanks.

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.com

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


[android-developers] TextView with a top margin that is proportional to the height of the parent view

2011-01-28 Thread John Gaby
Is there a way to position text within a linear layout such that the
position of the text is proportional to the height, rather than a
fixed distance.  For example, I would like the text to be displayed
down from the top a distance equal to 20% of the height of the view.

Thanks.

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


[android-developers] Re: Data Transfer between Android Phone and PC

2011-01-24 Thread John Gaby
You might take a look at:

http://code.google.com/p/android-notifier/



On Jan 22, 5:43 pm, Joseph bates josephbate...@gmail.com wrote:
 So, I'm in the early stages of developing an Android app that is
 supposed to transfer data between it and the PC (Windows Only for
 now). Not really files, but data. (I can't reveal what the app will be/
 do just yet. Sorry)
 Anyways, I am having trouble thinking of a way to complete data
 transfers. So far I've considered using Bluetooth, however I am having
 trouble finding Bluetooth api's for Windows that use Visual C# (the
 language im using). I was wondering if there was a way to do what
 Google did with chrome2phone. I believe they transfered data through a
 user's google account. If anyone has any other ideas, let me know!
 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] Sharing files between apps

2011-01-16 Thread John Gaby
I have two applications which can access each others files.  To get a
path to a file in the other app, I am using the context.getDir(...)
function to get a path to the file for the running app, and then
changing the package name component of that path to the package name
of the other app.  This seems to work, but I am wondering if this is a
reliable way of doing this, or if there is another more appropriate
way.

Thanks.

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


[android-developers] Re: Sharing files between apps

2011-01-16 Thread John Gaby
 If you want to find out about an application, use
 Context.createPackageContext() to create a Context configured for another
 application.


This seems to be what I am looking for, however, when I call it with
the package name of the other app, it returns null (I get nothing from
logCat either).  I can use the PackageManager and retrieve the info
for that same package, so I am pretty sure I have the name correct and
the app is installed.  Do you have any ideas about what might be
wrong?

  And if you are using sharedUserId for this...  please do reconsider, this
 locks you into that forever and has pretty deep repercussions on the apps
 since they are now one unified entity whose permissions must be the union of
 both apps etc.)

I am using a sharedUserId, however, the two apps are unified.  In
fact, I would much rather have just a SINGLE app.  However, I want the
user to be able to install the app to the SD card, but it includes a
AppWidget component (which is optionally used) which cannot reside on
the SC card.  This seems to be forcing me to create two apps, may main
app, and a separate app to handle the AppWidget.  If there is a better
way to do this, I am all ears.

Thanks

On Jan 16, 2:54 pm, Dianne Hackborn hack...@android.com wrote:
 That can break, there is no guarantee the apps are installed the same place,
 for example if one is on the SD card and one isn't.

 If you want to find out about an application, use
 Context.createPackageContext() to create a Context configured for another
 application.

 (I assume you are doing tricks like creating the files world read/write to
 allow access between them.  If so, note this can open up security holes.  I
 would strongly recommend using one of the standard facilities for
 interacting between them, such as a receiver, service, or content provider.
  And if you are using sharedUserId for this...  please do reconsider, this
 locks you into that forever and has pretty deep repercussions on the apps
 since they are now one unified entity whose permissions must be the union of
 both apps etc.)



 On Sun, Jan 16, 2011 at 2:27 PM, John Gaby jg...@gabysoft.com wrote:
  I have two applications which can access each others files.  To get a
  path to a file in the other app, I am using the context.getDir(...)
  function to get a path to the file for the running app, and then
  changing the package name component of that path to the package name
  of the other app.  This seems to work, but I am wondering if this is a
  reliable way of doing this, or if there is another more appropriate
  way.

  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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

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


[android-developers] Re: Sharing files between apps

2011-01-16 Thread John Gaby
 Well no idea from just your paragraph description there. :)  This API
 certainly works -- it is used a lot, for things like inflating the UI of app
 widgets.


The following is the routine that I wrote to test the function.  The
call to manager.getPackageInfo works, but the call to
GetPackageContents returns null.

private void Test()
{
String pkg = com.gabysoft.quizardwidget;

PackageManager manager= getPackageManager();
PackageInfoinfo;

try
{
info = manager.getPackageInfo(pkg, 0);

int v = info.versionCode;
}
catch (NameNotFoundException e)
{
}

Context c = GetPackageContext(pkg, CONTEXT_INCLUDE_CODE);
File file = c.getDir(data, Context.MODE_PRIVATE);
String path = file.getAbsolutePath();
}

 Oh my.  Well personally I would really strongly discourage doing that.  I
 think you are going to end up with continual pain in app maintenance, not to
 mention support for your users dealing with multiple apps like this.

I actually tend to agree, but I really hate to force the user to
install the app to internal memory (there is a fair amount of
content).  The feedback I have gotten so far from the users that I
have asked is that they would rather see a separate app than loose the
ability to install on the SD card.  Is there ANY other way to deal
with this?

Thanks.

On Jan 16, 4:46 pm, Dianne Hackborn hack...@android.com wrote:
 On Sun, Jan 16, 2011 at 4:21 PM, John Gaby jg...@gabysoft.com wrote:
  This seems to be what I am looking for, however, when I call it with
  the package name of the other app, it returns null (I get nothing from
  logCat either).  I can use the PackageManager and retrieve the info
  for that same package, so I am pretty sure I have the name correct and
  the app is installed.  Do you have any ideas about what might be
  wrong?

 Well no idea from just your paragraph description there. :)  This API
 certainly works -- it is used a lot, for things like inflating the UI of app
 widgets.

  I am using a sharedUserId, however, the two apps are unified.  In
  fact, I would much rather have just a SINGLE app.  However, I want the
  user to be able to install the app to the SD card, but it includes a
  AppWidget component (which is optionally used) which cannot reside on
  the SC card.  This seems to be forcing me to create two apps, may main
  app, and a separate app to handle the AppWidget.  If there is a better
  way to do this, I am all ears.

 Oh my.  Well personally I would really strongly discourage doing that.  I
 think you are going to end up with continual pain in app maintenance, not to
 mention support for your users dealing with multiple apps like this.

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

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

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


[android-developers] Re: Sharing files between apps

2011-01-16 Thread John Gaby
 What is GetPackageContext in your code?  Is that just a typo and should be
 getPackageContext?

Well, now don't I feel sheepish!  It was indeed a typo, and the ever
so helpful editor created a GetPackageContext for me and returned
null.  Sorry about wasting your time.

As for your other suggestion about using a broadcast to get the data,
that does seem like a good idea.  In fact, the widget itself uses a
broadcast intent when the user click on it to get the next set of data
to display.  I assume that I could send that broadcast to my main app
just as easily as it does to the Widget app.

Thanks for the help and suggestions.


On Jan 16, 5:57 pm, Dianne Hackborn hack...@android.com wrote:
 On Sun, Jan 16, 2011 at 5:19 PM, John Gaby jg...@gabysoft.com wrote:
  The following is the routine that I wrote to test the function.  The
  call to manager.getPackageInfo works, but the call to
  GetPackageContents returns null.

 What is GetPackageContext in your code?  Is that just a typo and should be
 getPackageContext?

  I actually tend to agree, but I really hate to force the user to
  install the app to internal memory (there is a fair amount of
  content).  The feedback I have gotten so far from the users that I
  have asked is that they would rather see a separate app than loose the
  ability to install on the SD card.  Is there ANY other way to deal
  with this?

 Well for transferring data between apps, I will say the same thing I already
 have: I would very much recommend using a receiver, service, or content
 provider.  Don't use shared user IDs.  Your widget could just for example
 send a broadcast to your app when it needs to populate data.  As a bonus,
 your main app could be the one in charge of the data and send a broadcast to
 the widget app when it has changed to give it the new data.  I think you'll
 find this a much cleaner solution than trying to directly access data files.

 At any rate, offering your users a small add-on app that they can optionally
 download to provide a widget is probably not too bad I guess.  Heck you
 could turn it into an advantage and make it paid so it is an additional
 feature they can purchase for your app. ;)

 But I do think you should architect it so that the interaction between these
 pieces is through app components, not data.  It will result in a much
 cleaner and more maintainable design.

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

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

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


[android-developers] App Widget disappears on reboot

2011-01-15 Thread John Gaby
I have an App Widget which I place on my home screen.  It seems to
work fine, but when I reboot the phone, it is not only gone from the
home page, but is missing from the App Widget list, so I cannot add it
again.  Does anyone have any idea what might be going on here?

Thanks.

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


[android-developers] Re: App Widget disappears on reboot

2011-01-15 Thread John Gaby
Actually, after playing with it a bit, I have determined that the
problem lies with installing the app on the SD card.  Apparently the
card is not mounted in time during a reboot.  I presume that it is
simply a bad idea to have a Widget that runs from the SC card, because
the user can unmount it at any time.

My Widget is part of a larger app, which I would still like to install
on the SD card.  I don't suppose that there is any way to install a
second APK file for the Widget on the phone, is there?

Thanks.


On Jan 15, 5:15 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Sat, Jan 15, 2011 at 8:11 PM, John Gaby jg...@gabysoft.com wrote:
  I have an App Widget which I place on my home screen.  It seems to
  work fine, but when I reboot the phone, it is not only gone from the
  home page, but is missing from the App Widget list, so I cannot add it
  again.  Does anyone have any idea what might be going on here?

 Is your package mentioned anywhere in LogCat after the reboot?

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

 Android App Developer Books:http://commonsware.com/books

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


[android-developers] Re: App Widget disappears on reboot

2011-01-15 Thread John Gaby
 You have to admit, that's not a reasonable expectation for the user
 having to download a seperate app.  It's an invitation to 1-stars (and
 understandably so) if the user cannot find the widget.

Yes, that is what I was thinking as well (I was asking if there was an
automatic way to install a second APK, I did realize that the user
could manually install one).  If I put up a message when the app is
first installed telling them that they can install the Widget app, and
providing a link to the Market, do you think that I will get a lot of
flack.  Note that use of the Widget is an optional feature, and there
may be many who simply will not use it at all.  Considering that many
phones don't have a lot of internal storage, I really don't want to
force the user to install the whole app on the phone just to get a
Widget that he may not really want anyway.

On Jan 15, 7:02 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
   So, it's a
  bit of a pain for all involved, but it would allow you to have the
  main APK installable to the SD card.

 You have to admit, that's not a reasonable expectation for the user
 having to download a seperate app.  It's an invitation to 1-stars (and
 understandably so) if the user cannot find the widget.

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


[android-developers] Variable size App Widget

2011-01-15 Thread John Gaby
Is there a way to allow the user to choose the size of the App Widget
when he places it on his Home screen?  I tried creating 2
receiver ... /receiver sections in the manifest for 2 different
sizes, but only the first shows up.

Thanks

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


[android-developers] Re: Screen rotation with App Widgets loses onClick connection

2011-01-14 Thread John Gaby
 There is no onUpdate on configuration changes. The home screen recreates
 your widget, then takes the most recent RemoteViews and applies it to the
 widget.


I figured that it was recreating the Widget on rotation.  The problem
is, I don't seem to be getting any messages to that effect, and have
no way (that I can see) of re-establishing the connection.  How can I
determine that a rotate has happened and set up a new onClick
connection?

Thanks

On Jan 14, 1:28 am, Kostya Vasilyev kmans...@gmail.com wrote:
 Each and every update you push to the wigdget with RemoteViews has to have
 complete widget state, including all images, text, and pending intents.

 There is no onUpdate on configuration changes. The home screen recreates
 your widget, then takes the most recent RemoteViews and applies it to the
 widget.

 If your codes tries to update the widget incrementally, piece-by-piece, with
 one RemoteViews specifying the intent, and another, repeated, update setting
 some changing information, then you end up with the most recent RemoteViews
 only having your changing text, but no PendingIntent.

 This is very much unlike how Activities work, where the entire view
 hierarchy is kept in memory for as long as the activity is on the screen
 (and maybe longer).

 -- Kostya

 2011/1/14 Anbu anbu.ezhi...@gmail.com

  It is because, the widget becomes unresponsive when the display mode
  is changed from portrait to landscape. I had the same issue and I what
  I had done is for every RemoteView update I had send all the
  pendingintent to make it work

  On Jan 14, 4:26 pm, John Gaby jg...@gabysoft.com wrote:
   I have an App Widget on the Home screen which works fine until the
   screen is auto-rotated.  At that point, the onClick connection (set up
   via a call to setOnClickPendingIntent) is lost.  The only way I seem
   to be able to get it back is to delete the Widget from the Home screen
   and then add it back.  Is there some kind of message that tells me
   that the screen has rotated that I need to respond to (and reestablish
   the connection)?

   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.comandroid-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


[android-developers] Re: Android phone for development

2011-01-14 Thread John Gaby
I am using a Motorola Droid and an HTC Hero (both purchased used
through ebay), and find them to both work well.  The phone does not
need to be rooted or unlocked, and no phone service is required,
unless your app make use of phone services.  Also if you want to be
able to test on a lot of different devices, there is a service which
allows you to connect to phones remotely.  It has it's problems, but
have found it somewhat useful (although it is a bit pricey).

http://www.deviceanywhere.com/index.aspx


On Jan 11, 8:52 am, Nabin Shrestha shrestha.nabi...@gmail.com wrote:
 Hi all,

 I am newbe in Android application development. I have been using SDK
 emulator with Eclipse IDE. Now I am thinking of getting Adroid phone for
 testing my applications. I am not sure what kind of phone is good for
 development purpose. Which phone or developement system you guys recommend?
 I appreciate any information.  Thanks.

 Regards,

 Nabin Shrestha

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


[android-developers] Re: Screen rotation with App Widgets loses onClick connection

2011-01-14 Thread John Gaby
Got it, thanks!

On Jan 14, 8:27 am, Kostya Vasilyev kmans...@gmail.com wrote:
 [see below]

 2011/1/14 John Gaby jg...@gabysoft.com

   There is no onUpdate on configuration changes. The home screen recreates
   your widget, then takes the most recent RemoteViews and applies it to the
   widget.

  I figured that it was recreating the Widget on rotation.  The problem
  is, I don't seem to be getting any messages to that effect, and have
  no way (that I can see) of re-establishing the connection.  How can I
  determine that a rotate has happened and set up a new onClick
  connection?

 Like I said, you don't (determine or respond to an orientation change).

 What you do, is make sure that every time your code pushes a RemoteViews
 object into the home application for your widget, it's complete in all
 respects:

 - Has image resource ids;
 - Has text stings;
 - Has pending intents.

 Don't do incremental widget updates, like you would do with a regular
 activity - don't set the intents first, then the images, then the text
 reflecting current information.

 The home app runs as a separate process, and its state can get out-of-step
 with your widget receiver. When it does, the only thing it has for
 re-creating your widget is your most recent RemoteViews object. If it's
 complete, and has all the parts, everything will work just fine. If it only
 has the most recent text or image change, the earlier updates which had the
 intents will be lost.

 http://kmansoft.wordpress.com/2010/05/23/widgets-and-orientation-chan...

 -- Kostya

  Thanks

  On Jan 14, 1:28 am, Kostya Vasilyev kmans...@gmail.com wrote:
   Each and every update you push to the wigdget with RemoteViews has to
  have
   complete widget state, including all images, text, and pending intents.

   There is no onUpdate on configuration changes. The home screen recreates
   your widget, then takes the most recent RemoteViews and applies it to the
   widget.

   If your codes tries to update the widget incrementally, piece-by-piece,
  with
   one RemoteViews specifying the intent, and another, repeated, update
  setting
   some changing information, then you end up with the most recent
  RemoteViews
   only having your changing text, but no PendingIntent.

   This is very much unlike how Activities work, where the entire view
   hierarchy is kept in memory for as long as the activity is on the screen
   (and maybe longer).

   -- Kostya

   2011/1/14 Anbu anbu.ezhi...@gmail.com

It is because, the widget becomes unresponsive when the display mode
is changed from portrait to landscape. I had the same issue and I what
I had done is for every RemoteView update I had send all the
pendingintent to make it work

On Jan 14, 4:26 pm, John Gaby jg...@gabysoft.com wrote:
 I have an App Widget on the Home screen which works fine until the
 screen is auto-rotated.  At that point, the onClick connection (set
  up
 via a call to setOnClickPendingIntent) is lost.  The only way I seem
 to be able to get it back is to delete the Widget from the Home
  screen
 and then add it back.  Is there some kind of message that tells me
 that the screen has rotated that I need to respond to (and
  reestablish
 the connection)?

 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.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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.comandroid-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


[android-developers] Screen rotation with App Widgets loses onClick connection

2011-01-13 Thread John Gaby
I have an App Widget on the Home screen which works fine until the
screen is auto-rotated.  At that point, the onClick connection (set up
via a call to setOnClickPendingIntent) is lost.  The only way I seem
to be able to get it back is to delete the Widget from the Home screen
and then add it back.  Is there some kind of message that tells me
that the screen has rotated that I need to respond to (and reestablish
the connection)?

Thanks

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


[android-developers] Re: App Widget

2011-01-11 Thread John Gaby
 AppWidgetManager manager = AppWidgetManager.getInstance(context);


That is exactly what I needed, thanks much!

On Jan 11, 12:21 am, Kostya Vasilyev kmans...@gmail.com wrote:
 11.01.2011 5:14, John Gaby пишет:

  I tried adding a class
  member variable, 'm_appWidgetManager', which I set during the onUpdate
  call.  However when I get the onReceive call, this value is null.
 Right.
     Is
  this because the onReceive is called with a different instance of my
  class, and if so, why is that?

 Broadcast receivers are only guaranteed to stay around long enough for
 their onReceive to complete. They can be destroyed after that, and a new
 instance will be created if needed later.

 This is what you are seeing - one instance processes onUpdate, then gets
 destroyed, and then a new one is created for the next onReceive.

  If I chang m_appWidgetManager to be
  static, and it all seems to work, but this does not seem like the
  correct solution.

 AppWidgetManager manager = AppWidgetManager.getInstance(context);

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.com

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


[android-developers] Re: App Widget

2011-01-11 Thread John Gaby
 Broadcast receivers are only guaranteed to stay around long enough for
 their onReceive to complete. They can be destroyed after that, and a new
 instance will be created if needed later.


Given that it creates a new instance of my AppWidgeProvider class for
each call, is there a way to have persistent data associated with my
widget?  That is how can I store data that will still be present on
the next call (other than writing it to disk)?

Thanks

On Jan 11, 12:21 am, Kostya Vasilyev kmans...@gmail.com wrote:
 11.01.2011 5:14, John Gaby пишет:

  I tried adding a class
  member variable, 'm_appWidgetManager', which I set during the onUpdate
  call.  However when I get the onReceive call, this value is null.
 Right.
     Is
  this because the onReceive is called with a different instance of my
  class, and if so, why is that?

 Broadcast receivers are only guaranteed to stay around long enough for
 their onReceive to complete. They can be destroyed after that, and a new
 instance will be created if needed later.

 This is what you are seeing - one instance processes onUpdate, then gets
 destroyed, and then a new one is created for the next onReceive.

  If I chang m_appWidgetManager to be
  static, and it all seems to work, but this does not seem like the
  correct solution.

 AppWidgetManager manager = AppWidgetManager.getInstance(context);

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.com

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


[android-developers] Debugging App Widgets

2011-01-11 Thread John Gaby
I am trying to debug an App Widget and I find that if I set a
breakpoint in the onReceive message, that I can only leave it stopped
in the debugger for 30 seconds or so, before my process is killed.  If
I look in logcat, I see line about a 'Timeout of broadcast
BroadcastRecord...' and then my process is killed.  Is this because
the Home page is waiting for a response and gives up after 30
seconds?  Is there a way to increase or eliminate this timeout so I
can trace through my code?

Thanks

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


[android-developers] Re: JNI working

2011-01-11 Thread John Gaby
I believe that there are devices (e.g. some tablets) out there that
use MIPS processors rather than ARM.  Correct me if I am wrong, but I
do not believe that code compiled for an ARM device will work on a
MIPS device.

On Jan 11, 11:35 am, Kumar Bibek coomar@gmail.com wrote:
 Yes, It will work on all devices...

 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

 On Wed, Jan 12, 2011 at 1:03 AM, Richard Sámela feromak...@gmail.comwrote:

  Hi,
  I would like to know something about JNI. How it works in android?
  does it work on all devices? does it work on tablest with android?
  I want to use toolkit in C++ programing language.

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


[android-developers] App Widget

2011-01-10 Thread John Gaby
I am trying to create an App Widget for the Home screen which displays
a line of text. When the user clicks on the Widget, I want the text to
change.  I have pieced together the following which seems to work,
however I am concerned about how I am providing access to the
AppWidgetManager in the onReceive call.  I need the AppWidgetManager
there because I wish to change the text.  I tried adding a class
member variable, 'm_appWidgetManager', which I set during the onUpdate
call.  However when I get the onReceive call, this value is null.  Is
this because the onReceive is called with a different instance of my
class, and if so, why is that?  If I chang m_appWidgetManager to be
static, and it all seems to work, but this does not seem like the
correct solution.

Can anyone tell me how to do the properly?

Thanks.

package com.gabysoft.appwidgettest;

import android.app.PendingIntent;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.RemoteViews;

public class HelloWidget extends AppWidgetProvider
{
public static String ACTION_WIDGET_RECEIVER =
ActionReceiverWidget;

static AppWidgetManager m_appWidgetManager;

@Override
public void onUpdate(Context context, AppWidgetManager
appWidgetManager, int[] appWidgetIds)
{
m_appWidgetManager= appWidgetManager;

Log.d(GabySoft, HelloWidget:onUpdate: m_appWidgetManager =
 + m_appWidgetManager);

RemoteViews remoteViews = new
RemoteViews(context.getPackageName(), R.layout.main);

Intent active = new Intent(context, HelloWidget.class);
active.setAction(ACTION_WIDGET_RECEIVER);

PendingIntent pendingIntent =
PendingIntent.getBroadcast(context, 0, active, 0);

remoteViews.setOnClickPendingIntent(R.id.widget_textview,
pendingIntent);

appWidgetManager.updateAppWidget(appWidgetIds, remoteViews);
}

@Override
public void onReceive(Context context, Intent intent)
{
Log.d(GabySoft, HelloWidget:onReceive: manager =  +
m_appWidgetManager);

if (intent.getAction().equals(ACTION_WIDGET_RECEIVER))
{
RemoteViews remoteViews = new
RemoteViews(context.getPackageName(), R.layout.main);
ComponentName thisWidget = new ComponentName(context,
HelloWidget.class);

remoteViews.setTextViewText(R.id.widget_textview, Some
other text);
m_appWidgetManager.updateAppWidget(thisWidget,
remoteViews);
}

super.onReceive(context, intent);
}
}

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


[android-developers] Re: First attempt at LVL Licensing

2011-01-09 Thread John Gaby
It has been my experience that LVL CANNOT be fully tested before
publishing.  Like you, I found that an unpublished app returns
inconsistent results.  If I set the response to denied, for example,
on some phones I got the correct result, and on others I did not.
After I published the app, it did seem to work correctly, but of
course I could only see the results on the phones I had access to.
You just have to take your best shot and hope for the best.

On Jan 9, 5:24 am, Neilz neilhorn...@gmail.com wrote:
 The app is new, and is a saved draft.

 I've just discovered a thread buried deep in this forum where a Google
 rep states that the testing only works with fully published apps (not
 drafts)... and that they would update the documentation to reflect
 this. That post was made in August, and the docs never were updated,
 so that's one irritation that caused me a lot of wasted time.

 Stranger still, I've given a copy of the app to another person to
 test, and we're both getting different responses back. I get the
 allowed response, he gets an unauthorized response. It all seems
 rather odd and considering we're supposed to be going live tomorrow,
 rather worrying.

 Thanks for the link, I'll have a read.

 On Jan 9, 12:59 pm, MarcoAndroid marco...@gmail.com wrote:

  Is it an existing app published before? Then make sure you have
  pressed Save. Also watch the version nr you are using. Some more
  pitfalls etc you can find 
  here:http://ttlnews.blogspot.com/2010/11/my-experience-with-android-market...

  On 8 jan, 23:55, Neilz neilhorn...@gmail.com wrote:

   More info.

   I've now put my app up onto the market account, but haven't clicked
   'Publish'. Now, the license check just returns 'LICENSING RESULT :
   Allow the user access' every time. I have even set the test response
   to say 'NOT_LICENSED' but I still get the above response.

   Anyone have any experience with this?

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


[android-developers] Re: App Add-on

2011-01-08 Thread John Gaby
Thanks for the input.  Your solution would be nice IF Google would
implement it.  They could also implement an in-app purchase mechanism
like Apple's, which works quite well.  However, I wouldn't hold your
breath waiting for either of those to happen.

As for having a content provider keep track, there is no way to match
purchases from the Market to user's devices.  That means that the user
would have to run the add-on app so that it could communicate with the
server.  This has the same problem that I am facing now, but also adds
the requirement that the user have internet connectivity to run his
app.

On Jan 8, 1:29 am, Brill Pappin br...@pappin.ca wrote:
 First, let me point you at this 
 RFE:http://www.google.com/support/forum/p/Android+Market/thread?fid=2d690...

 I've noticed the LVL library has (and talks about) using a double
 license check.
 You could actually use this kind of pattern to add license levels to
 your app in the way your talking about doing. The consumers act of
 buying and installing would flag a feature in your db.

 I've also been considering another approach where your main app would
 look up features in a content provider. This has the advantage that if
 the enabling app was uninstalled, you would no longer be able to
 access the new features. Also, your users would not get duplicate
 icons in their launcher if you don't provide a main activity.

 - Brill Pappin

 On Jan 7, 1:55 pm, John Gaby jg...@gabysoft.com wrote:

  I have a game for which I would like to be able to sell add-on packs.
  I would prefer that there was some in-game way to make these
  purchases, but, alas, there does not appear to be any such mechanism.
  I am considering the idea of creating separate add-on apps which, when
  run, would add features to the game.  I believe that I have seen this
  done by others.  My question is, how do people deal with the refund
  process.  I mean, the user will be able to purchase the add-on, run
  it, and then request a refund, which would result in them getting it
  for free.  Has anyone else had experience with this model?

  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] App Add-on

2011-01-07 Thread John Gaby
I have a game for which I would like to be able to sell add-on packs.
I would prefer that there was some in-game way to make these
purchases, but, alas, there does not appear to be any such mechanism.
I am considering the idea of creating separate add-on apps which, when
run, would add features to the game.  I believe that I have seen this
done by others.  My question is, how do people deal with the refund
process.  I mean, the user will be able to purchase the add-on, run
it, and then request a refund, which would result in them getting it
for free.  Has anyone else had experience with this model?

Thanks

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


[android-developers] Re: App Add-on

2011-01-07 Thread John Gaby
Yes, I would check for the existence of the add-on, however, it is
likely that the user would like to get rid of it at some point so it
does not clutter his desktop.  It would be nice to allow for that.  I
have thought that I could check for its existence only for 24 hours,
and then not check any more, but I would need to explain to the user
that he need to leave the add-on installed for at least 24 hours.
This seems quite messy to me.  I was hoping that someone who has tried
this could give me some feedback on their experience.

Thanks

On Jan 7, 10:59 am, TreKing treking...@gmail.com wrote:
 On Fri, Jan 7, 2011 at 12:55 PM, John Gaby jg...@gabysoft.com wrote:
  I mean, the user will be able to purchase the add-on, run it, and then
  request a refund, which would result in them getting it for free.  Has
  anyone else had experience with this model?

 I have not, but presumably your main app would check for the existence of
 the add-on pack before running, or otherwise depend on it being installed,
 such that refunding (and uninstalling) would revert the added functionality.

 -
 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


[android-developers] Re: App Add-on

2011-01-07 Thread John Gaby
Thanks for the reply. So, it is possible to setup the intent so the
app does not appear on the desktop?  If so, how does the user run it
for the first time (to install the add-on)?   I am fairly new to
Android development and not that experienced with setting up intents,
so any help in that direction would be most appreciated.

Thanks.

On Jan 7, 11:16 am, TreKing treking...@gmail.com wrote:
 On Fri, Jan 7, 2011 at 1:06 PM, John Gaby jg...@gabysoft.com wrote:
  Yes, I would check for the existence of the add-on, however, it is likely
  that the user would like to get rid of it at some point so it does not
  clutter his desktop.  It would be nice to allow for that.

 Just use the right intent filters so your add-ons don't show up in the
 launcher. You'll probably want it so it does open though (from the Market)
 so you can explain to the dumber user how it works in a dedicated Help
 activity.

 -
 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


[android-developers] Re: App Add-on

2011-01-07 Thread John Gaby
Thanks for the links, they were most helpful.  I worry, however, that
if I remove it from the Launcher that the user may not understand why
it is not there, and may not be able to figure out how to launch it.
I don't suppose that there is any way to remove it from the launcher
after it has been run?

Has anyone used this model before?  If so can you tell me what kind of
problems with users you encountered?

Thanks.

On Jan 7, 11:48 am, TreKing treking...@gmail.com wrote:
 On Fri, Jan 7, 2011 at 1:42 PM, John Gaby jg...@gabysoft.com wrote:
  So, it is possible to setup the intent so the app does not appear on the
  desktop?

 Let's clarify - on Android there's the HomeScreen (which more closely
 resembles a desktop) and a Launcher, where the apps are stored. The user
 controls the appearance of apps on the HomeScreen. Your manifest controls
 the appearance of icons in the Launcher.

 You would omit 
 this:http://developer.android.com/reference/android/content/Intent.html#CA...
 and include 
 this:http://developer.android.com/reference/android/content/Intent.html#CA...
 so the user can launch it from the Android Market (or, I would assume, other
 app-launching apps)

  If so, how does the user run it for the first time (to install the add-on)?

 Include the above category and they can open it from the Market, after
 installing.

 -
 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


[android-developers] Re: App Add-on

2011-01-07 Thread John Gaby
 Honestly though, you're already heading down a user-experience nightmare
 path with this concept of add-on - seems like a simple concept but a lot of
 users simply won't get it. The ones that do will probably understand why
 it's missing. Good luck.

I know.  I really wish that Google had an in-app purchase mechanism
like Apple (or would allow the use of 3rd party in-app purchasing like
PayPal).  Maybe I need to rethink this whole concept.

Thanks much for your help!

On Jan 7, 12:51 pm, TreKing treking...@gmail.com wrote:
 On Fri, Jan 7, 2011 at 2:46 PM, John Gaby jg...@gabysoft.com wrote:
  I don't suppose that there is any way to remove it from the launcher after
  it has been run?

 Don't think so. But if it's launch-able from the Market, you can display an
 Activity that explains this from there. If the user can't find it in the
 launcher, that's probably where they'd check next, if for no other reason
 than to leave you a stupid comment. At that point, the can see the Open
 option from the Market.

 Honestly though, you're already heading down a user-experience nightmare
 path with this concept of add-on - seems like a simple concept but a lot of
 users simply won't get it. The ones that do will probably understand why
 it's missing. Good luck.

 -
 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


[android-developers] Re: App Add-on

2011-01-07 Thread John Gaby
Thanks for the link, it really cleared things up (*NOT*).  It was an
interesting read, however.  His situation is very similar to mine.  I
would like to sell 'virtual content' from within the game.  The way
Google is making me do it is absurd.

On Jan 7, 1:35 pm, TreKing treking...@gmail.com wrote:
 On Fri, Jan 7, 2011 at 3:22 PM, John Gaby jg...@gabysoft.com wrote:
  I know.  I really wish that Google had an in-app purchase mechanism like
  Apple (or would allow the use of 3rd party in-app purchasing like PayPal).
   Maybe I need to rethink this whole concept.

 Take a look at this 
 thread:http://www.google.com/support/forum/p/Android+Market/thread?tid=3c472...

 http://www.google.com/support/forum/p/Android+Market/thread?tid=3c472...Should
 be an interesting read if nothing else.

 -
 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


[android-developers] Re: App Add-on

2011-01-07 Thread John Gaby
Actually, there are a number of ways that I could provide and in-app
purchase mechanism, but I am TRYING not to violate Google's TOS.  They
are making it really hard, though.

On Jan 7, 2:30 pm, Tommy droi...@gmail.com wrote:
 Have you considered some kind of webportal with the use of paypal and using
 the webview control? Then using an external SQL server to manage your
 subscription for the add ons?

 -Original Message-
 From: android-developers@googlegroups.com

 [mailto:android-develop...@googlegroups.com] On Behalf Of John Gaby
 Sent: Friday, January 07, 2011 5:04 PM
 To: Android Developers
 Subject: [android-developers] Re: App Add-on

 Thanks for the link, it really cleared things up (*NOT*).  It was an
 interesting read, however.  His situation is very similar to mine.  I would
 like to sell 'virtual content' from within the game.  The way Google is
 making me do it is absurd.

 On Jan 7, 1:35 pm, TreKing treking...@gmail.com wrote:
  On Fri, Jan 7, 2011 at 3:22 PM, John Gaby jg...@gabysoft.com wrote:
   I know.  I really wish that Google had an in-app purchase mechanism
   like Apple (or would allow the use of 3rd party in-app purchasing like
 PayPal).
    Maybe I need to rethink this whole concept.

  Take a look at this
 thread:http://www.google.com/support/forum/p/Android+Market/thread?tid=3c472
 ...

  http://www.google.com/support/forum/p/Android+Market/thread?tid=3c472
  ...Should be an interesting read if nothing else.

  --
  --- 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 
 athttp://groups.google.com/group/android-developers?hl=en

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


[android-developers] Protecting files on non-rooted phones

2011-01-07 Thread John Gaby
I find that, when using a actual device that is not rooted, that I
cannot see the contents folders created by my application.  However,
if I know the exact name and path of a file, I CAN pull or push it
using ADB.  Is there a way to prevent external access to application
files (on a non-rooted phone, of course).

Thanks

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


[android-developers] Re: Protecting files on non-rooted phones

2011-01-07 Thread John Gaby
I must be setting the files as world readable then.

I didn't know that if the app was debuggable that you could change the
shell to run as an app uid.  Can you tell me what version of Android
that works for, and how I do that?

Thanks.

On Jan 7, 4:25 pm, Dianne Hackborn hack...@android.com wrote:
 On a user build, adb can not access any application files, with these
 exceptions:

 - If the app has declared itself debuggable, recent versions of android will
 allow the shell user to change to run as that app uid and thus access its
 files.
 - If you create files that are explicitly marked as world readable or
 writeable, then the shell will be able to read/write those files as
 indicated.



 On Fri, Jan 7, 2011 at 3:41 PM, John Gaby jg...@gabysoft.com wrote:
  I find that, when using a actual device that is not rooted, that I
  cannot see the contents folders created by my application.  However,
  if I know the exact name and path of a file, I CAN pull or push it
  using ADB.  Is there a way to prevent external access to application
  files (on a non-rooted phone, of course).

  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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

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


[android-developers] Re: Protecting files on non-rooted phones

2011-01-07 Thread John Gaby
Thanks for the tip.  For the record, it works on 2.2.  There have been
a number of times that I have wanted to be able to see the files for
my app, and I am glad to find that there is a way.

Thanks again.

On Jan 7, 6:55 pm, Dianne Hackborn hack...@android.com wrote:
 Unfortunately I don't recall exactly when it went in.  Maybe 2.3?  It is the
 run-as command.



 On Fri, Jan 7, 2011 at 5:42 PM, John Gaby jg...@gabysoft.com wrote:
  I must be setting the files as world readable then.

  I didn't know that if the app was debuggable that you could change the
  shell to run as an app uid.  Can you tell me what version of Android
  that works for, and how I do that?

  Thanks.

  On Jan 7, 4:25 pm, Dianne Hackborn hack...@android.com wrote:
   On a user build, adb can not access any application files, with these
   exceptions:

   - If the app has declared itself debuggable, recent versions of android
  will
   allow the shell user to change to run as that app uid and thus access its
   files.
   - If you create files that are explicitly marked as world readable or
   writeable, then the shell will be able to read/write those files as
   indicated.

   On Fri, Jan 7, 2011 at 3:41 PM, John Gaby jg...@gabysoft.com wrote:
I find that, when using a actual device that is not rooted, that I
cannot see the contents folders created by my application.  However,
if I know the exact name and path of a file, I CAN pull or push it
using ADB.  Is there a way to prevent external access to application
files (on a non-rooted phone, of course).

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.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com

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

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

   Note: please don't send private questions to me, as I don't have time to
   provide private support, and so won't reply to such e-mails.  All such
   questions should be posted on public forums, where I and others can see
  and
   answer them.

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

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

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

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


[android-developers] Re: LVL: possible to check license for a different app?

2011-01-06 Thread John Gaby
Interesting idea, but I do not believe that the Market will let you
publish a free app which asks for CHECK_LICENSE permissions, so I
don't think that your free app will not be allowed to use LVL.


On Jan 6, 7:41 am, Brill Pappin br...@pappin.ca wrote:
 No, you don't remove LVL so its still used to check the market.

 BTW - I'm not sure I completely agree with Zsolt on the modification.
 Fine to modify the library a little, but a non security/encryption expert is
 likely to make easy holes in such a library, particularly messing with
 the algorithms.
 The fact is that a determined cracker is going to get at your app no matter
 what you do.

 No, the idea is simply to use the LVL in the normal way, but communicate
 with the paid version in another way.
 Changes to LVL won't break it ether.

 - Brill Pappin

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


[android-developers] Re: app2sd - not working

2011-01-05 Thread John Gaby
I believe that installing on the SD card is supported only for 2.2
devices (or higher).  Your program will install on earlier versions,
but it will not install to the SD card.

On Jan 5, 6:12 am, André pha...@hotmail.com wrote:
 So what could be the problem if I have minsdkversion 4 and put
 targetversion 8

 On Jan 5, 12:59 pm, Marcin Orlowski webnet.andr...@gmail.com wrote:



  Yes it would filter your app out. android:installLocation does not
  need target sdk to be 8
  or higher. It's safe to have it in Manifest and still target earlier sdk as
  earlier android version will simply ignore it.

 So what could be the problem then since it doesn't work, if you have
 any suggestions?

 YuviDroid Jan 5, 12:58 pm

 I was talking about targetSdkVersion, not minSdkVersion.
 AThe entry in the manifest should look like this: uses-sdk
 android:minSdkVersion=4 android:targetSdkVersion=8 /
 Btw on your test phone can you install your app on sdcard?

 I have a 1.6 device, waiting for a new one right now. But it works
 fine in the emulator!

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


[android-developers] Re: Reusing BitmapDrawable objects

2011-01-03 Thread John Gaby
Thanks.

On Jan 2, 10:59 pm, Doug beafd...@gmail.com wrote:
 Look into bitmap mutations?

 http://developer.android.com/resources/articles/drawable-mutations.html

 On Dec 31 2010, 11:22 pm, John Gaby jg...@gabysoft.com wrote:

  I have custom skinned buttons.  I set the bitmaps for the button
  backgrounds using the addState method of the StateListDrawable class
  and pass in a BitmapDrawable which is loaded from a file on the SD
  card.  Now I am having out of memory issues, so I thought that I would
  try and cache the BitmapDrawable and reuse them for all the buttons on
  a page, rather than creating a new one for each button.  However, when
  I do this, the buttons don't display correctly.  For example if I have
  two buttons of different sizes, the background is drawn at the same
  size for both, rather than have each scale.  Also, if one button on
  the page is hidden, then the backgrounds for some of the other (still
  visible) buttons disappear.  This does not happen if I create separate
  BitmapDrawable objects for each of the buttons.

  My question is, am I supposed to be able to reuse these objects in
  this manner?  If not, how can I keep from duplicating the memory
  required to skin each button on a page?

  Thanks.

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


[android-developers] Re: Memory Leak in 1.6

2011-01-02 Thread John Gaby
Thanks for the response.  I have worked out a work-around which fixes
the problem.  Instead of setting the view group via
setContentView(vg), I am now setting a FrameLayout as the content
view, and then setting the view group as the child of the
FrameLayout.  In addition, it was necessary to not remove the old view
when setting a new view, but rather hide it.  Then when subsequent
views are set, the oldest view is removed.  It seems that the problem
stems from removing a view while processing a message from a child
control in that view.  If I don't do that, then the view is properly
recycled.  Again note that this seems to be a problem only for 1.6
(and possibly earlier).  It seems to work properly with 2.0 and above.


On Jan 2, 8:32 am, Prateek Jain mrprateekj...@gmail.com wrote:
 Hi John,

 If you can post the logs would help understand the reason of the
 memory leak. Also, a small sample of code will be helpful.

 Cheers,
 Prateek

 On Jan 1, 12:32 am, John Gaby jg...@gabysoft.com wrote:

  I seem to have a memory leak when running under version 1.6 of the
  OS.  I have a custom view group which contains some controls and I set
  it to be the current view via a call to setContentView(vg).  If I then
  create a second view group and set it as the active view via
  setContentView(newVg), the first view group is never freed (even when
  I force a garbage collection).

  Note that this works fine for versions 2.0 and above, so it is
  possible that 1.6 has some kind of bug.  If so, does anyone know of a
  workaround?  I can post a simple example of this problem if it would
  help.

  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] Memory Leak in 1.6

2010-12-31 Thread John Gaby
I seem to have a memory leak when running under version 1.6 of the
OS.  I have a custom view group which contains some controls and I set
it to be the current view via a call to setContentView(vg).  If I then
create a second view group and set it as the active view via
setContentView(newVg), the first view group is never freed (even when
I force a garbage collection).

Note that this works fine for versions 2.0 and above, so it is
possible that 1.6 has some kind of bug.  If so, does anyone know of a
workaround?  I can post a simple example of this problem if it would
help.

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] Reusing BitmapDrawable objects

2010-12-31 Thread John Gaby
I have custom skinned buttons.  I set the bitmaps for the button
backgrounds using the addState method of the StateListDrawable class
and pass in a BitmapDrawable which is loaded from a file on the SD
card.  Now I am having out of memory issues, so I thought that I would
try and cache the BitmapDrawable and reuse them for all the buttons on
a page, rather than creating a new one for each button.  However, when
I do this, the buttons don't display correctly.  For example if I have
two buttons of different sizes, the background is drawn at the same
size for both, rather than have each scale.  Also, if one button on
the page is hidden, then the backgrounds for some of the other (still
visible) buttons disappear.  This does not happen if I create separate
BitmapDrawable objects for each of the buttons.

My question is, am I supposed to be able to reuse these objects in
this manner?  If not, how can I keep from duplicating the memory
required to skin each button on a page?

Thanks.

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


[android-developers] Re: Unique Phone ID

2010-12-23 Thread John Gaby
You could use ANDROID_ID, but be warned that I have found devices that
return null for this value.

http://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID

John



On Dec 23, 10:21 am, Tommy droi...@gmail.com wrote:
 Hey evereyone,

 I was wondering if there is a way to get a unique ID for the users
 phone. I imagine the IME and Serial Numbers are unique to each phone
 right? Is there a way I can request the IME number or the serial
 number or is there another number I can request that is unique to each
 phone? This is used to help secure login to an app.

 Thanks,

 Tommy

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


[android-developers] Horizontal Vertical Scroll View

2010-12-22 Thread John Gaby
I need to be able to have a view which scrolls both horizontally and
vertically (e.g. like a browser view).  I have seen several posts
where people have put a horizontal scroll view inside a vertical
scroll view.  I have tried to do that, but I only get vertical
scrolling.  The following is the code I am using:

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

ScrollView sv = new ScrollView(this);
HorizontalScrollView hsv = new HorizontalScrollView(this);
ImageView iv = new ImageView(this);

int id = getResources().getIdentifier(getPackageName() +
:drawable/level1, null, null);

if (id != 0)
{
iv.setImageResource(id);
}

hsv.addView(iv, new ViewGroup.LayoutParams(1000, 1000));
sv.addView(hsv, new ViewGroup.LayoutParams(1000, 1000));

setContentView(sv);
}
}

Note that if I create just a HorzontalScrollView or just a ScrollView,
they both work independently.  When I combine them, I only get a
vertical scroll.  Does anyone have an Idea about what is wrong here?

Thanks

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


[android-developers] Re: Horizontal Vertical Scroll View

2010-12-22 Thread John Gaby
That is disappointing. From the other posts, it sure seemed like
people had gotten it to work.

I had actually found some code which modified the ScrollView code to
do bidirectional scrolls, but it did not compile, and I was hoping
that it would not be necessary to try and figure out why.  This seems
like something that a lot of people might need.  Why is it not
supported directly?  What does the browser use (it allows you to
scroll in both directions)?

Thanks.

On Dec 22, 5:52 pm, Dianne Hackborn hack...@android.com wrote:
 You can't put a horizontal scroll view in a vertical scroll view.  You
 probably just want to take the implementation of scroll view and modify it
 to suit your needs.



 On Wed, Dec 22, 2010 at 3:21 PM, John Gaby jg...@gabysoft.com wrote:
  I need to be able to have a view which scrolls both horizontally and
  vertically (e.g. like a browser view).  I have seen several posts
  where people have put a horizontal scroll view inside a vertical
  scroll view.  I have tried to do that, but I only get vertical
  scrolling.  The following is the code I am using:

  public class ScrollTest extends Activity {
     /** Called when the activity is first created. */
    �...@override
     public void onCreate(Bundle savedInstanceState)
     {
         super.onCreate(savedInstanceState);

         ScrollView sv = new ScrollView(this);
         HorizontalScrollView hsv = new HorizontalScrollView(this);
         ImageView iv = new ImageView(this);

         int id = getResources().getIdentifier(getPackageName() +
  :drawable/level1, null, null);

         if (id != 0)
         {
             iv.setImageResource(id);
         }

         hsv.addView(iv, new ViewGroup.LayoutParams(1000, 1000));
         sv.addView(hsv, new ViewGroup.LayoutParams(1000, 1000));

         setContentView(sv);
     }
  }

  Note that if I create just a HorzontalScrollView or just a ScrollView,
  they both work independently.  When I combine them, I only get a
  vertical scroll.  Does anyone have an Idea about what is wrong here?

  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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

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


[android-developers] Handling multi-byte Unicode strings in native code

2010-12-03 Thread John Gaby
How do I detect a lead byte within Unicode string from native code.  I
have used 'isleadbyte' in the past, but that function does not seem to
be present in the NDK.

Thanks.

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


[android-developers] Re: Handling multi-byte Unicode strings in native code

2010-12-03 Thread John Gaby
Drat, posted to the wrong group.  Sorry.

On Dec 3, 7:48 am, John Gaby jg...@gabysoft.com wrote:
 How do I detect a lead byte within Unicode string from native code.  I
 have used 'isleadbyte' in the past, but that function does not seem to
 be present in the NDK.

 Thanks.

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


[android-developers] Re: Memory Leak with a ListView revisited

2010-11-24 Thread John Gaby
In my particular case, I discovered that the leak ONLY happens when I
am debugging the application.  So my conclusion was that my issue, at
least, had to do with some sort of issue with the debugger.

On Nov 23, 2:15 pm, TZ zale.ty...@gmail.com wrote:
 I too am finding a memory leak with the listview but no one has been
 able to tell me if I am doing anything wrong.

 I made a post on stackoverflow about it with sample code (dead simple
 example of a listview leaking there is a link to the whole project as
 a zip on the post as well).

 http://stackoverflow.com/questions/4218359/my-simple-listview-app-is-...

 If anyone could point out what im doing so terribly wrong with my code
 it would be much appreciated.

 TZ

 On Oct 22, 5:41 am, John Gaby jg...@gabysoft.com wrote:

  First, let me say that this is just a very simple sample application
  to illustrate the problem.  My real application is far more complex,
  but exhibits this same behavior.

  What I need to be able to do is to be able to destroy a given page and
  then re-create it later.  There are several reasons for this, but one
  of the main ones is that I want to free up the memory of a page which
  is no longer being actively used.  Then when the user loads that page
  again, I simply re-create it.  In Java, of course, there is really no
  way (that I know of) to free objects, you simply stop referring to
  them and the the garbage collector magically disposes of them at it's
  leisure.   The problem is that it is simply NOT doing that for my
  GListView objects.

  I realize that this application doesn't represent something that you
  might actually do, but the fact is that if you take this program and
  run it, the GListView objects are NEVER freed, causing a memoryleak.
  This is what I am trying to address.  If I can understand why this is
  happening in this simple case, I might be able to figure out how to
  fix it in my actual program.

  Thanks.

  On Oct 22, 1:26 am, Doug beafd...@gmail.com wrote:

   On Oct 21, 9:29 pm, John Gaby jg...@gabysoft.com wrote:

There cannot be this kind ofleakin general can there?

   No, there cannot.

   You strategy looks foreign to me.  Can you explain in english what
   you're trying to do and the strategy you're using to implement it?
   Why are you calling your CreateLayout twice in onCreate?  And even
   worse, why are you calling it at all in an your onClick handler?

   Doug

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


[android-developers] Re: Android market free app unchanged for the last 4 days

2010-11-22 Thread John Gaby
My paid apps are updating, but not my free apps.

On Nov 22, 5:21 am, Marcin Orlowski webnet.andr...@gmail.com wrote:
 On 22 November 2010 12:05, Nacho Pintos nacho.pin...@gmail.com wrote:

  Same here, both paid and Free, since last Thursday

 Mine updates

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 get a web link to my newly published app

2010-11-16 Thread John Gaby
I have just published my application and would to be able to provide a
link on my website that will show my application?

Also, if they browse to my website on their phone, is there some kind
of link I can add that the user can click on that will take them to
the market to download my app?

Thanks.

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


[android-developers] Re: Can I get a web link to my newly published app

2010-11-16 Thread John Gaby
Well, for the iPhone, you can have a link that takes you to a web page
which shows the same information you see when you look up your app in
iTunes or on the phone itself (i.e. the description, screen shots,
price, ratings, etc).  I take it, by your response, that there is no
such equivalent for Android.  Pity.

On Nov 16, 12:45 pm, TreKing treking...@gmail.com wrote:
 On Tue, Nov 16, 2010 at 2:30 PM, John Gaby jg...@gabysoft.com wrote:
  I have just published my application and would to be able to provide a link
  on my website that will show my application?

 Show your application where?

   Also, if they browse to my website on their phone, is there some kind of
  link I can add that the user can click on that will take them to the market
  to download my app?

 See the bottom 
 ofhttp://developer.android.com/guide/publishing/publishing.html. I *think* it
 should just work if you put one of those as links and someone clicks it on
 their phone.

 -
 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


[android-developers] Re: Android Market Licensing Problem

2010-11-16 Thread John Gaby
In case anyone is interested, I have published my app and it now
reports NOT_LICENSED properly.  Still, it seems like all someone has
to do to steal the app is to get the .apk file, change the Package
name, and upload it to Google and not publish.  At that point, anyone
with a valid Google account will be able to use the modified version,
no reverse engineering required.  This does not seem like a very
secure system to me.

On Nov 14, 11:03 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
 Well, for me, if I test the app on my dev phone where my primary
 account (or even the secondary account) are NOT purchasers, I do get
 NOT_LICENSED when setting the market response to Normal.  So at least
 that's working, but my app is published, while yours isn't.

 Of course, I am using a non-standard client implementation of LVL
 where practically nothing from the original code is recognizable.

 On Nov 15, 12:08 pm,JohnGabyjg...@gabysoft.com wrote:

  Well, as I said, with my uploaded, but unpublished app, if I use a
  phone that has ANY valid gmail connected to it, it always returns that
  it is Licensed (I have tried this on about 10 or so different phones,
  with version 1.6 through 2.2).  I am hoping that once I publish it
  that this will change, but I have no way of knowing for sure.  This
  whole LVL thing may have been an exercise in futility.

  On Nov 14, 4:28 pm, Zsolt Vasvari zvasv...@gmail.com wrote:

   I also think there is a problem.

   I released my app with LVL.  I haven't gotten any reports of false
   negatives, but, contrary to my expectation, I still haven't had a
   pirate later repurchase my app.  I define a pirate as somebody who
   requests a refund within 20 minutes of purchase.  That's about 10% of
   my purchases, which, in a week amounts to about 15 people.

   Now, I know the majority people pirating wouldn't pay for it in the
   first place, but certainly some percentage would.  But I had not one
   person do that.  While there is no emperical evidence, the most likely
   explantion I could come up wuth is that LVL returns allowed even if
   not licensed.  I use the extras fields returned by Google, so it's
   also possible that the liicense is still valid after a week, no idea.

   On Nov 15, 6:21 am, bagelboy greg.do...@gmail.com wrote:

You can't, basically. All you can do is publish and hope their system
works. My answer to this problem was to not use the response extras
and to create a system that can deal with an incorrect response here
and there.

On Nov 14, 4:00 pm,JohnGabyjg...@gabysoft.com wrote:

 Actually, that thought has occurred to me (I have already read that
 thread), but really, how am I supposed to be able to test my app
 before I publish it if that is the case?

 On Nov 14, 3:29 am, bagelboy greg.do...@gmail.com wrote:

  Perhaps the responses aren't correct because your app is not
  published.

  this thread may provide some 
  insight:http://groups.google.com/group/android-developers/browse_thread/threa...

  On Nov 14, 3:31 am,JohnGabyjg...@gabysoft.com wrote:

   I have added some logging code and found that the raw response 
   from
   theLicenseService (i.e. the call back to verifyLicense in
   LicenseChecker.java) has a responseCode of '0', which means
   'licensed'.  This is simply not correct.  This phone does NOT 
   have a
   valid account which would generate such a response.  Can someone
   please explain why this is happening.  Does thisLicenseService
   simply not work correctly on a large number of phones?  Does 
   using the
   service have any value at all?

   Thanks.

   On Nov 13, 3:31 am, bagelboy greg.do...@gmail.com wrote:

I recently did my ownLVLimplementation and I can tell you that
tracing these issues down is a real pain. First you need to put 
loads
of logging into theLVLcode to find out what the actual response 
is,
otherwise you have no visibility, then you have to put logging 
into
all the code between the response and the allow/dontallow 
callbacks.

Basically what I found was the stock code was unworkable in 
many ways.
I quickly came to the conclusion that I needed to modify it into
something that worked for me. There's a few reasons behind why 
you
should abandon the stock code:
- if you use the stock implementation then crackers will find 
it very
easy to circumvent
- as you have found it is very hard to debug. You have to spend 
so
much time figuring out how it works you may as well roll your 
own
instead.
- who's to say whether the google responses are what you want? 
How
many retries do you want before it sends a dontAllow back? 
Maybe you
want to treat the error responses as a retry. Do you want 
 

[android-developers] Cannot get ANDROID_ID on 1.6 systems

2010-11-15 Thread John Gaby
I am using the following to obtain the ANDROID_ID for the device:

Settings.Secure.getString(getContentResolver(),
Settings.Secure.ANDROID_ID);

Unfortunately this is returning null on 1.6 system (emulator and
actual devices).

I have also tried using

Settings.Secure.ANDROID_ID;

which is deprecated, but that does not work either.

Does anyone know how to get a unique device id for version 1.6?

Thanks.

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


[android-developers] Re: Cannot get ANDROID_ID on 1.6 systems

2010-11-15 Thread John Gaby
I just double checked it on a Motorola Devour running 1.6 and it is
definitely returning a null.  I will see if I can find another 1.6
device and check to see if it is just this particular one.  Given that
this call CAN return null, is there some other way to get a unique id
for the device?

Thanks.

On Nov 15, 4:06 pm, Mark Murphy mmur...@commonsware.com wrote:
 That should work on devices. It returned null on the emulator until
 2.2 (or maybe 2.1, not sure when they made that cutover). But I have
 definitely gotten it to work on 1.6 devices, though I haven't tried in
 quite some time.



 On Mon, Nov 15, 2010 at 6:52 PM, John Gaby jg...@gabysoft.com wrote:
  I am using the following to obtain the ANDROID_ID for the device:

  Settings.Secure.getString(getContentResolver(),
  Settings.Secure.ANDROID_ID);

  Unfortunately this is returning null on 1.6 system (emulator and
  actual devices).

  I have also tried using

  Settings.Secure.ANDROID_ID;

  which is deprecated, but that does not work either.

  Does anyone know how to get a unique device id for version 1.6?

  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

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

 Warescription: Three Android Books, Plus Updates, One Low Price!

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


[android-developers] Re: Cannot get ANDROID_ID on 1.6 systems

2010-11-15 Thread John Gaby
Thanks for the info, but, as I stated at the beginning of this thread,
that is exactly what I am using now, and I can tell you it does NOT
work on some devices.

On Nov 15, 4:59 pm, Brad Gies rbg...@gmail.com wrote:
 Settings.System.getString(getContentResolver(), Settings.System.ANDROID_ID);

 Sincerely,

 Brad Gies
 ---
 Bistro Bot - Bistro Blurbhttp://bgies.com           
 http://nocrappyapps.comhttp://bistroblurb.com     
 http://forcethetruth.comhttp://ihottonight.com
 ---
 Everything in moderation, including abstinence (paraphrased)

 Every person is born with a brain... Those who use it well are the successful 
 happy ones - Brad Gies

 Adversity can make or break you... It's your choice... Choose wisely - Brad 
 Gies

 Never doubt that a small group of thoughtful, committed people can
 change the world. Indeed. It is the only thing that ever has - Margaret Mead

 On 15/11/2010 4:17 PM, John Gaby wrote:

  I just double checked it on a Motorola Devour running 1.6 and it is
  definitely returning a null.  I will see if I can find another 1.6
  device and check to see if it is just this particular one.  Given that
  this call CAN return null, is there some other way to get a unique id
  for the device?

  Thanks.

  On Nov 15, 4:06 pm, Mark Murphymmur...@commonsware.com  wrote:
  That should work on devices. It returned null on the emulator until
  2.2 (or maybe 2.1, not sure when they made that cutover). But I have
  definitely gotten it to work on 1.6 devices, though I haven't tried in
  quite some time.

  On Mon, Nov 15, 2010 at 6:52 PM, John Gabyjg...@gabysoft.com  wrote:
  I am using the following to obtain the ANDROID_ID for the device:
  Settings.Secure.getString(getContentResolver(),
  Settings.Secure.ANDROID_ID);
  Unfortunately this is returning null on 1.6 system (emulator and
  actual devices).
  I have also tried using
  Settings.Secure.ANDROID_ID;
  which is deprecated, but that does not work either.
  Does anyone know how to get a unique device id for version 1.6?
  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
  --
  Mark Murphy (a Commons 
  Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

  Warescription: Three Android Books, Plus Updates, One Low Price!

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


[android-developers] Re: Cannot get ANDROID_ID on 1.6 systems

2010-11-15 Thread John Gaby
Ok, I tried it out on an HTC Tatoo also running 1.6, and it returns a
value, so it does happen on only some devices.  However, I really need
a unique id that will work on every device.  Do you have any
suggestions about what I could use in the case where the ANDROID_ID is
null?

Thanks.

On Nov 15, 4:17 pm, John Gaby jg...@gabysoft.com wrote:
 I just double checked it on a Motorola Devour running 1.6 and it is
 definitely returning a null.  I will see if I can find another 1.6
 device and check to see if it is just this particular one.  Given that
 this call CAN return null, is there some other way to get a unique id
 for the device?

 Thanks.

 On Nov 15, 4:06 pm, Mark Murphy mmur...@commonsware.com wrote:

  That should work on devices. It returned null on the emulator until
  2.2 (or maybe 2.1, not sure when they made that cutover). But I have
  definitely gotten it to work on 1.6 devices, though I haven't tried in
  quite some time.

  On Mon, Nov 15, 2010 at 6:52 PM, John Gaby jg...@gabysoft.com wrote:
   I am using the following to obtain the ANDROID_ID for the device:

   Settings.Secure.getString(getContentResolver(),
   Settings.Secure.ANDROID_ID);

   Unfortunately this is returning null on 1.6 system (emulator and
   actual devices).

   I have also tried using

   Settings.Secure.ANDROID_ID;

   which is deprecated, but that does not work either.

   Does anyone know how to get a unique device id for version 1.6?

   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

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

  Warescription: Three Android Books, Plus Updates, One Low Price!

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


[android-developers] Re: Cannot get ANDROID_ID on 1.6 systems

2010-11-15 Thread John Gaby
Thanks, I will give those a try.


On Nov 15, 4:24 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Mon, Nov 15, 2010 at 7:17 PM, John Gaby jg...@gabysoft.com wrote:
  I just double checked it on a Motorola Devour running 1.6 and it is
  definitely returning a null.  I will see if I can find another 1.6
  device and check to see if it is just this particular one.  Given that
  this call CAN return null, is there some other way to get a unique id
  for the device?

 There are a few. They all suck for one reason or another, as I recall.
 This has been discussed probably 20 times on this list in the past 20
 months. Please search the archives for more details. Here are two off
 the top of my head:

 -- IMEI from TelephonyManager and getDeviceId()
 -- MAC address from WifiManager and getConnectionInfo()

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

 Warescription: Three Android Books, Plus Updates, One Low Price!

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


[android-developers] Re: Cannot get ANDROID_ID on 1.6 systems

2010-11-15 Thread John Gaby
Yes he did, and I appreciated his help.  I had posted this message
before his came through, so I was not asking again.

Thank you all for your help.

On Nov 15, 7:11 pm, String sterling.ud...@googlemail.com wrote:
 On Nov 16, 12:24 am, John Gaby jg...@gabysoft.com wrote:

  Do you have any
  suggestions about what I could use in the case where the ANDROID_ID is
  null?

 Didn't Mark give you 2 suggestions (IMEI and MAC), along with a third
 meta-suggestion (search this group)?

 String

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


[android-developers] Re: Android Market Licensing Problem

2010-11-14 Thread John Gaby
Actually, that thought has occurred to me (I have already read that
thread), but really, how am I supposed to be able to test my app
before I publish it if that is the case?


On Nov 14, 3:29 am, bagelboy greg.do...@gmail.com wrote:
 Perhaps the responses aren't correct because your app is not
 published.

 this thread may provide some 
 insight:http://groups.google.com/group/android-developers/browse_thread/threa...

 On Nov 14, 3:31 am,JohnGabyjg...@gabysoft.com wrote:

  I have added some logging code and found that the raw response from
  theLicenseService (i.e. the call back to verifyLicense in
  LicenseChecker.java) has a responseCode of '0', which means
  'licensed'.  This is simply not correct.  This phone does NOT have a
  valid account which would generate such a response.  Can someone
  please explain why this is happening.  Does thisLicenseService
  simply not work correctly on a large number of phones?  Does using the
  service have any value at all?

  Thanks.

  On Nov 13, 3:31 am, bagelboy greg.do...@gmail.com wrote:

   I recently did my own LVL implementation and I can tell you that
   tracing these issues down is a real pain. First you need to put loads
   of logging into the LVL code to find out what the actual response is,
   otherwise you have no visibility, then you have to put logging into
   all the code between the response and the allow/dontallow callbacks.

   Basically what I found was the stock code was unworkable in many ways.
   I quickly came to the conclusion that I needed to modify it into
   something that worked for me. There's a few reasons behind why you
   should abandon the stock code:
   - if you use the stock implementation then crackers will find it very
   easy to circumvent
   - as you have found it is very hard to debug. You have to spend so
   much time figuring out how it works you may as well roll your own
   instead.
   - who's to say whether the google responses are what you want? How
   many retries do you want before it sends a dontAllow back? Maybe you
   want to treat the error responses as a retry. Do you want google to
   specify that or yourself? Do you want them to specify the time between
   checks? It's better to take control of this process so you know
   exactly what is going on and you can manage the user experience.

   In the system I came up with in the end all I use is the response and
   none of the extras. What I do with the response is all custom, that
   way I can use the market test responses in development without
   issues.

   -BB

   On Nov 13, 4:40 am,JohnGabyjg...@gabysoft.com wrote:

I am using pretty much the default Android Market Licensing in my
application, but find that it is not working correctly on most of the
devices that I have tested.  I have uploaded my app to the Market but
not published it.  If install it on the emulator which does not have
any Google accounts, then I receive a 'dontAllow' from the check,
which is correct.

If I install it on a Motorola Droid phone (which I have in my
possession) that has my Market Google account associated with it, then
it will return 'allow' or 'don't allow' depending on how I set the
test market. I have also installed it on an HTC Incredible phone, and
it seems to work there as well.

However, I have tested 4 other phones (HTC Hero, HTC Brovo Desire, HTC
Droid Eris and HTC Nexus One), and on each of these phones, I get an
'allow' call from thelicensecheck, even though there is no
authorizing account on the phone.  Can someone tell me what is going
on here?

Thanks.

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


[android-developers] Re: Android Market Licensing Problem

2010-11-14 Thread John Gaby
I have been able to reproduce this problem on my development phone.
If I reset my phone so that there are no accounts at all, then I
receive a 'deny' response.  If I log into my phone with my developer
id, then I can control the response via the Google Developer Console.
However, if I reset my phone and then log in with any random, non-
developer account, then I seem to always get an 'allow' response.
Someone please tell me that this is NOT going to happen once I publish
my app.

Thanks.

On Nov 14, 8:00 am, John Gaby jg...@gabysoft.com wrote:
 Actually, that thought has occurred to me (I have already read that
 thread), but really, how am I supposed to be able to test my app
 before I publish it if that is the case?

 On Nov 14, 3:29 am, bagelboy greg.do...@gmail.com wrote:

  Perhaps the responses aren't correct because your app is not
  published.

  this thread may provide some 
  insight:http://groups.google.com/group/android-developers/browse_thread/threa...

  On Nov 14, 3:31 am,JohnGabyjg...@gabysoft.com wrote:

   I have added some logging code and found that the raw response from
   theLicenseService (i.e. the call back to verifyLicense in
   LicenseChecker.java) has a responseCode of '0', which means
   'licensed'.  This is simply not correct.  This phone does NOT have a
   valid account which would generate such a response.  Can someone
   please explain why this is happening.  Does thisLicenseService
   simply not work correctly on a large number of phones?  Does using the
   service have any value at all?

   Thanks.

   On Nov 13, 3:31 am, bagelboy greg.do...@gmail.com wrote:

I recently did my own LVL implementation and I can tell you that
tracing these issues down is a real pain. First you need to put loads
of logging into the LVL code to find out what the actual response is,
otherwise you have no visibility, then you have to put logging into
all the code between the response and the allow/dontallow callbacks.

Basically what I found was the stock code was unworkable in many ways.
I quickly came to the conclusion that I needed to modify it into
something that worked for me. There's a few reasons behind why you
should abandon the stock code:
- if you use the stock implementation then crackers will find it very
easy to circumvent
- as you have found it is very hard to debug. You have to spend so
much time figuring out how it works you may as well roll your own
instead.
- who's to say whether the google responses are what you want? How
many retries do you want before it sends a dontAllow back? Maybe you
want to treat the error responses as a retry. Do you want google to
specify that or yourself? Do you want them to specify the time between
checks? It's better to take control of this process so you know
exactly what is going on and you can manage the user experience.

In the system I came up with in the end all I use is the response and
none of the extras. What I do with the response is all custom, that
way I can use the market test responses in development without
issues.

-BB

On Nov 13, 4:40 am,JohnGabyjg...@gabysoft.com wrote:

 I am using pretty much the default Android Market Licensing in my
 application, but find that it is not working correctly on most of the
 devices that I have tested.  I have uploaded my app to the Market but
 not published it.  If install it on the emulator which does not have
 any Google accounts, then I receive a 'dontAllow' from the check,
 which is correct.

 If I install it on a Motorola Droid phone (which I have in my
 possession) that has my Market Google account associated with it, then
 it will return 'allow' or 'don't allow' depending on how I set the
 test market. I have also installed it on an HTC Incredible phone, and
 it seems to work there as well.

 However, I have tested 4 other phones (HTC Hero, HTC Brovo Desire, HTC
 Droid Eris and HTC Nexus One), and on each of these phones, I get an
 'allow' call from thelicensecheck, even though there is no
 authorizing account on the phone.  Can someone tell me what is going
 on here?

 Thanks.

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


[android-developers] Re: Android Market Licensing Problem

2010-11-14 Thread John Gaby
Well, as I said, with my uploaded, but unpublished app, if I use a
phone that has ANY valid gmail connected to it, it always returns that
it is Licensed (I have tried this on about 10 or so different phones,
with version 1.6 through 2.2).  I am hoping that once I publish it
that this will change, but I have no way of knowing for sure.  This
whole LVL thing may have been an exercise in futility.

On Nov 14, 4:28 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
 I also think there is a problem.

 I released my app with LVL.  I haven't gotten any reports of false
 negatives, but, contrary to my expectation, I still haven't had a
 pirate later repurchase my app.  I define a pirate as somebody who
 requests a refund within 20 minutes of purchase.  That's about 10% of
 my purchases, which, in a week amounts to about 15 people.

 Now, I know the majority people pirating wouldn't pay for it in the
 first place, but certainly some percentage would.  But I had not one
 person do that.  While there is no emperical evidence, the most likely
 explantion I could come up wuth is that LVL returns allowed even if
 not licensed.  I use the extras fields returned by Google, so it's
 also possible that the liicense is still valid after a week, no idea.

 On Nov 15, 6:21 am, bagelboy greg.do...@gmail.com wrote:

  You can't, basically. All you can do is publish and hope their system
  works. My answer to this problem was to not use the response extras
  and to create a system that can deal with an incorrect response here
  and there.

  On Nov 14, 4:00 pm,JohnGabyjg...@gabysoft.com wrote:

   Actually, that thought has occurred to me (I have already read that
   thread), but really, how am I supposed to be able to test my app
   before I publish it if that is the case?

   On Nov 14, 3:29 am, bagelboy greg.do...@gmail.com wrote:

Perhaps the responses aren't correct because your app is not
published.

this thread may provide some 
insight:http://groups.google.com/group/android-developers/browse_thread/threa...

On Nov 14, 3:31 am,JohnGabyjg...@gabysoft.com wrote:

 I have added some logging code and found that the raw response from
 theLicenseService (i.e. the call back to verifyLicense in
 LicenseChecker.java) has a responseCode of '0', which means
 'licensed'.  This is simply not correct.  This phone does NOT have a
 valid account which would generate such a response.  Can someone
 please explain why this is happening.  Does thisLicenseService
 simply not work correctly on a large number of phones?  Does using the
 service have any value at all?

 Thanks.

 On Nov 13, 3:31 am, bagelboy greg.do...@gmail.com wrote:

  I recently did my ownLVLimplementation and I can tell you that
  tracing these issues down is a real pain. First you need to put 
  loads
  of logging into theLVLcode to find out what the actual response is,
  otherwise you have no visibility, then you have to put logging into
  all the code between the response and the allow/dontallow callbacks.

  Basically what I found was the stock code was unworkable in many 
  ways.
  I quickly came to the conclusion that I needed to modify it into
  something that worked for me. There's a few reasons behind why you
  should abandon the stock code:
  - if you use the stock implementation then crackers will find it 
  very
  easy to circumvent
  - as you have found it is very hard to debug. You have to spend so
  much time figuring out how it works you may as well roll your own
  instead.
  - who's to say whether the google responses are what you want? How
  many retries do you want before it sends a dontAllow back? Maybe you
  want to treat the error responses as a retry. Do you want google to
  specify that or yourself? Do you want them to specify the time 
  between
  checks? It's better to take control of this process so you know
  exactly what is going on and you can manage the user experience.

  In the system I came up with in the end all I use is the response 
  and
  none of the extras. What I do with the response is all custom, that
  way I can use the market test responses in development without
  issues.

  -BB

  On Nov 13, 4:40 am,JohnGabyjg...@gabysoft.com wrote:

   I am using pretty much the default Android Market Licensing in my
   application, but find that it is not working correctly on most of 
   the
   devices that I have tested.  I have uploaded my app to the Market 
   but
   not published it.  If install it on the emulator which does not 
   have
   any Google accounts, then I receive a 'dontAllow' from the check,
   which is correct.

   If I install it on a Motorola Droid phone (which I have in my
   possession) that has my Market Google account associated with it, 
   then
   it will return 'allow' or 'don't allow' 

[android-developers] Re: Android Market Licensing Problem

2010-11-13 Thread John Gaby
I have added some logging code and found that the raw response from
the License Service (i.e. the call back to verifyLicense in
LicenseChecker.java) has a responseCode of '0', which means
'licensed'.  This is simply not correct.  This phone does NOT have a
valid account which would generate such a response.  Can someone
please explain why this is happening.  Does this License Service
simply not work correctly on a large number of phones?  Does using the
service have any value at all?

Thanks.

On Nov 13, 3:31 am, bagelboy greg.do...@gmail.com wrote:
 I recently did my own LVL implementation and I can tell you that
 tracing these issues down is a real pain. First you need to put loads
 of logging into the LVL code to find out what the actual response is,
 otherwise you have no visibility, then you have to put logging into
 all the code between the response and the allow/dontallow callbacks.

 Basically what I found was the stock code was unworkable in many ways.
 I quickly came to the conclusion that I needed to modify it into
 something that worked for me. There's a few reasons behind why you
 should abandon the stock code:
 - if you use the stock implementation then crackers will find it very
 easy to circumvent
 - as you have found it is very hard to debug. You have to spend so
 much time figuring out how it works you may as well roll your own
 instead.
 - who's to say whether the google responses are what you want? How
 many retries do you want before it sends a dontAllow back? Maybe you
 want to treat the error responses as a retry. Do you want google to
 specify that or yourself? Do you want them to specify the time between
 checks? It's better to take control of this process so you know
 exactly what is going on and you can manage the user experience.

 In the system I came up with in the end all I use is the response and
 none of the extras. What I do with the response is all custom, that
 way I can use the market test responses in development without
 issues.

 -BB

 On Nov 13, 4:40 am, John Gaby jg...@gabysoft.com wrote:

  I am using pretty much the default Android Market Licensing in my
  application, but find that it is not working correctly on most of the
  devices that I have tested.  I have uploaded my app to the Market but
  not published it.  If install it on the emulator which does not have
  any Google accounts, then I receive a 'dontAllow' from the check,
  which is correct.

  If I install it on a Motorola Droid phone (which I have in my
  possession) that has my Market Google account associated with it, then
  it will return 'allow' or 'don't allow' depending on how I set the
  test market. I have also installed it on an HTC Incredible phone, and
  it seems to work there as well.

  However, I have tested 4 other phones (HTC Hero, HTC Brovo Desire, HTC
  Droid Eris and HTC Nexus One), and on each of these phones, I get an
  'allow' call from the license check, even though there is no
  authorizing account on the phone.  Can someone tell me what is going
  on here?

  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] Why might the soft keyboard not pop up?

2010-11-12 Thread John Gaby
I have an EditText control that does not pop up the soft keyboard when
the user touches it.  The thing is, that I have a number of other
EditText controls elsewhere in my application that all work fine, and
I cannot see anything really different about this one.  The code is a
bit complex to post here, but I was wondering if anyone knows of any
reasons why the soft keyboard would not appear in some cases.

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


  1   2   >