Re: [android-developers] Forum very "slow"

2012-11-05 Thread Jonas Petersson

On 2012-11-05 20:49, Mark Murphy wrote:

On Mon, Nov 5, 2012 at 2:11 PM, lbendlin  wrote:

Love the russian text.  You may not want to rely on Google Translate that
much, unless you were aiming for chuckles.


Well, the announcement tomorrow is calling for better translations of
that text. Alas, I do not speak Russian.


For the record: The Swedish version is not particularly good either - 
basically the sort of correct words in random order. My translation 
would be something like:


"Här kan du ställa och svara på frågor om applikationsutveckling på Android"

However, even that doesn't quite flow naturally IMHO. Rephrasing it 
radically might be better.


Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: The package name of your apk is the same as the package name of another developer's application. Choose a new package name.

2012-10-09 Thread Jonas Petersson

On 2012-10-09 21:08, Mark Murphy wrote:

Reputedly, there is some process by which you can get the Play Store
folk to transfer an app between accounts, though I am not seeing a
mention of how to do that in the Play Store docs.
[...]

> On Tue, Oct 9, 2012 at 3:03 PM, John Merlino 
>> wrote:

the play store supposedly transfered the app between the accounts but when I
log into my account it still says "No applications uploaded"


Incidentally, I'm familiar with this procedure and the request to 
transfer the app MUST come from BOTH the involved developers' accounts 
for the Play admins to take action. (Presumably two very similar emails 
with just different sender, submitted around the same time.)


I'd suspect a working day or two for it to actually be moved is normal. 
So far I've only prepared for this, not actually done it.


Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] How can I put different resources for different dpi on ICS with the same sw800dp smallest width?

2012-09-12 Thread Jonas Petersson

Hi,

Sorry to bump in late to this discussion, but I've noticed something 
related to this that you may want to be aware of:


One of our customers insist that we use only EXACTLY the graphic 
elements that their design, but for some reason we got the latest images 
in GIF format rather than PNG. (I believe the excuse was that this 
particular image was a couple of bytes smaller in GIF.)


Interestingly, it appears that the automatic rescaling of missing DPI 
versions seems NOT to work for the GIF images, which was in our case 
version noticable in xhdpi, presumably this would also affect tvdpi.


In my case I just converted the GIF to PNG and things were fine so I 
didn't dig any deeper, but it would be nice to have this confirm.


Best / Jonas

On 2012-09-07 21:50, Mark Murphy wrote:

On Fri, Sep 7, 2012 at 3:47 PM, Leo  wrote:

I can't drop sw800dp qualifier - I have separate images for different
resolutions so I need this qualifier.
Currently I have the following directories:
drawable-sw600dp-mdpi = for tablets with 600x1024 and so on
drawable-sw600dp-tvdpi = for Nexus 7 and similar
drawable-sw800dp-mdpi = for 1280x800 tablets
drawable-sw800dp-hdpi = for Full HD tablets


You can dump -tvdpi. Even Google doesn't use that too often, allowing
the OS to scale the images from one of the other density buckets.



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


[android-developers] Emulator hardware keyboard mapping table?

2012-07-15 Thread Jonas Petersson

Hi all,

Now that the emulator seemingly supports using the computer's physical 
keyboard in a more generic way, I have experimented a bit to try to get 
it to fully work. Specifically, I'd like to enter the åäöÅÄÖ characters 
without having to longpress A or O to get the popup menu and some 
fiddling seems to indicate that this should be possible: Under "Physical 
keyboard" int he emulator I can select "Swedish - Android keybard" which 
for some reason has the title "qwerty2" - it indicates that pressing 
Ctrl-Space should toggle between those that I've enabled, that doesn't 
work, but is no big deal really.


However, it seems that the mapping table is broken since when I press 
"<" I get ";" and shifted "," gives me "ö" while "'" gives me "ä". 
Interestingly, if I switch my keyboard mapping of my laptop to be 
standard English US, the emulator will indeed generate the correct 
Swedish keys! (Well, not quite 100%, but all the important ones anyway)


This is OK as a workaround, but I'd say it is on the inconvenient side. 
Is there any way I can create a correct mapping table? The emulator 
-keyset help file was the closest thing I could come up with, but it 
seems to work on a different level. I'm happy to experiment and provide 
whatever I find out back to the sources as long as I can get a pointer 
to where I should start...


BTW: I'm on Linux (Ubuntu) in case that makes any difference.

Many thanks in advance / Jonas

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

2012-05-08 Thread Jonas Petersson

Hi Simon,

On 2012-05-08 15:43, Simon Giddings wrote:

I am researching the writing of a "simple" music notation program which
will permit simple actions such as

  * Display
  * Transposition
  * Annotation
  * etc

My first hurdle is how to display the music.


Cool, I've written a fairly simple music notation app called "Zap's abc" 
a few years back. You may already know that the abc notation has been 
around for a pretty long time so in fact, my exceedingly simple approach 
is actually to just provide a simple text editor and then bounce that 
text to my own server where it is transformed to either PDF or Midi 
which is displayed/played on the phone with the standard apps.


Perhaps not ideal for people who need it offline, but pretty simple once 
you get the hang of abc (the original target audience was folk music so 
it is pretty straight forward for simple stuff, but with a bit of effort 
you can create symphonies if you like).


This may not be what you need, but I though you might want to try it.
https://play.google.com/store/apps/details?id=se.petersson.abc

Good luck / Jonas

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

2012-04-29 Thread Jonas Petersson

On 2012-04-28 17:51, Mai Al-Ammar wrote:

I install the new program every time but it still the old file.


This my be related to what I have noted:
Apparently there is some kind of "optimization" going on when deploying 
iteratively from Eclipse - adding files will work as expected, but 
removing will just "not add" the file, but may still keep it around - 
presumably the APK zip file is just UPDATED with new stuff and hence 
removed files may hang around until the next project cleanup.


Note: I've not really dug into this, just deduced that something like 
this will occasionally cause confusion - I examined the APK file once 
just after a major refactoring and found a mix of old and new files.


Best / Jonas



On Sat, Apr 28, 2012 at 5:55 PM, Mark Murphy mailto:mmur...@commonsware.com>> wrote:

On Sat, Apr 28, 2012 at 10:49 AM, Mai Al-Ammar
mailto:mai.alam...@gmail.com>> wrote:
 > I did not delete it at run time, I delete the file before I
compile the
 > project and replace it with other file. but the program still
play the old
 > one

Then you did not install the modified app on the device.


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


[android-developers] Subtle String() bug seems likely

2012-02-28 Thread Jonas Petersson

Dear Experts,

It appears that we've found what I suspect is some kind of optimization 
in Android that actually turns into a pretty nasty memory leak (BTW this 
is under 2.2 since that is the project target):


Short version:
The docs for JSONTokener claims:
http://developer.android.com/reference/org/json/JSONTokener.html
"The returned string shares its backing character array with this 
tokener's input string. If a reference to the returned string may be 
held indefinitely, you should use new String(result) to copy it first to 
avoid memory leaks.", BUT:


String original = hugeJsonObject.optString("name");
String dup = new String(original); // Still keeps reference!

Long version:
For reason beyond our control, we are forced to fetch *HUGE* amounts of 
JSON data to extract what we actually need and we noted that the memory 
ran out pretty quickly, due to the fact that the few data we actually 
extract still keep the whole original JSON string around as that is 
where the token was stored. Hence, we first tried the above code which 
appeared to be a simple fix.


HOWEVER, using the Memory Analyser we could easily see that there was 
STILL a reference around to the original huge string!


Workaround: // Verbose for clarity
byte[] tmp = original.getBytes();
String dup = new String(tmp);

This correctly removes the reference. Presumably this problem applies to 
many more cases that are less obvious, but for our particular case the 
leak was so huge that it just couldn't be written off as general java 
leaks.


I hope this helps someone else!

Best / Jonas

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

2011-10-23 Thread Jonas Petersson

On 2011-10-23 07:53, John Coryat wrote:

GPS doesn't require an internet connection but it does require receiving
a very weak signal from a number of GPS satellites. That usually means a
view of the sky.


Although I agree that it doesn't REQUIRE an internet connection, I must 
say that all my phones are a LOT quicker at getting a fix when there is 
an internet connection. This is very noticeable when I use it for 
navigation abroad (turned of extortionate roaming). I typically have no 
problem getting a GPS fix indoors at work (3rd floor, but not top) when 
I have an internet connection.


See Assisted GPS: http://en.wikipedia.org/wiki/Assisted_GPS

Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: SDK 4, if I select WXGA resolution, emulator doesn't start.

2011-10-20 Thread Jonas Petersson

For the record: Adding this to my ICS.avd/config.ini solved my problem:

hw.webcam.count = 0

Best / Jonas

On 2011-10-20 08:57, Jonas Petersson wrote:

Hi all,

On 2011-10-19 19:43, sblantipodi wrote:

is there someone else who have this problem and is not using a
snapshot?
personally I was be able to start in WXGA resolution only the first
time.


I have not had time to properly experiment with this, but I've created a
few ICS images with and without snapshots and neither of them will boot
successfully. The GUI shows up, but quickly disappears again and if I
run the same manually from the prompt with the -verbose flag the trace
ends with:

-8<
goldfish_fb_get_pixel_format:167: display surface,pixel format:
bits/pixel: 16
bytes/pixel: 2
depth: 16
red: bits=5 mask=0xf800 shift=11 max=0x1f
green: bits=6 mask=0x7e0 shift=5 max=0x3f
blue: bits=5 mask=0x1f shift=0 max=0x1f
alpha: bits=0 mask=0x0 shift=0 max=0x0
Segmentation fault
-8<

I'm running this on Ubuntu 11.04, BTW. I intend to look more into this
during the weekend when I have more spare time.

Hope this helps someone.

Best / Jonas


On Oct 19, 6:57 pm, sblantipodi wrote:

I didn't created a snapshot even, so no I'm not using a snapshot.

On Oct 19, 6:44 pm, Xavier Ducrohet wrote:








Are you running snapshots?



There is an issue reloading snapshots created by older versions of the
emulator. Unfortunately, the symptoms look like the emulator doesn't
boot.



Delete the snapshots and recreate them for now. We are going to fix
the emulator to make incompatible snapshot format problem more obvious
to the user.



On Wed, Oct 19, 2011 at 8:52 AM, sblantipodi



 wrote:

Am I the only one experiencing this problem?
The only way to launch a simulator is using another resolution or a
manual 720x1280, why?



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



--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.http://developer.android.com|http://tools.android.com



Please do not send me questions directly. 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


Re: [android-developers] Re: SDK 4, if I select WXGA resolution, emulator doesn't start.

2011-10-19 Thread Jonas Petersson

Hi all,

On 2011-10-19 19:43, sblantipodi wrote:

is there someone else who have this problem and is not using a
snapshot?
personally I was be able to start in WXGA resolution only the first
time.


I have not had time to properly experiment with this, but I've created a 
few ICS images with and without snapshots and neither of them will boot 
successfully. The GUI shows up, but quickly disappears again and if I 
run the same manually from the prompt with the -verbose flag the trace 
ends with:


-8<
goldfish_fb_get_pixel_format:167: display surface,pixel format:
  bits/pixel:  16
  bytes/pixel: 2
  depth:   16
  red: bits=5 mask=0xf800 shift=11 max=0x1f
  green:   bits=6 mask=0x7e0 shift=5 max=0x3f
  blue:bits=5 mask=0x1f shift=0 max=0x1f
  alpha:   bits=0 mask=0x0 shift=0 max=0x0
Segmentation fault
-8<

I'm running this on Ubuntu 11.04, BTW. I intend to look more into this 
during the weekend when I have more spare time.


Hope this helps someone.

Best / Jonas


On Oct 19, 6:57 pm, sblantipodi  wrote:

I didn't created a snapshot even, so no I'm not using a snapshot.

On Oct 19, 6:44 pm, Xavier Ducrohet  wrote:








Are you running snapshots?



There is an issue reloading snapshots created by older versions of the
emulator. Unfortunately, the symptoms look like the emulator doesn't
boot.



Delete the snapshots and recreate them for now. We are going to fix
the emulator to make incompatible snapshot format problem more obvious
to the user.



On Wed, Oct 19, 2011 at 8:52 AM, sblantipodi



  wrote:

Am I the only one experiencing this problem?
The only way to launch a simulator is using another resolution or a
manual 720x1280, why?



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



--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.http://developer.android.com|http://tools.android.com



Please do not send me questions directly. 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


Re: [android-developers] Handling gestures in AppWidget

2011-10-18 Thread Jonas Petersson

On 2011-10-18 19:51, Kostya Vasilyev wrote:

Not with stock Android, but it depends on the launcher.


I've also looked into this as several users of my "Zap's Gestures" 
launcher app have requested this features and I can confirm this. The 
responses I've had (including from Google's own coders) all indicate 
that there are no near future plans to handle anything but up/down 
flipping in widgets - anything going left/right is reserved for moving 
between the desktops.


Certainly, you can do various tricks with a homebrew launcher (just like 
some vendors do), but strictly speaking that would not be a true widget, 
but some kind of unsupported hybrid.


Best / Jonas


16.10.2011 17:03, Daniel Chivilikhin пишет:

Is there a way to handle gesture events in my AppWidget? I've been
browsing the Web for a while now, and the only answer I found is "No,
you cannot". However, I hardly beleive it to be true, because I've
personally seen AppWidgets on my colleague's phone that respond to
gestures.


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

2011-08-03 Thread Jonas Petersson

My few cents:

I'm not saying Zsolt is wrong, but from my experience of (somewhat 
optimistically) moving raw SQLite databases produced by various versions 
of my Inventory app between various devices from 1.6 to 3.2 I've not 
encountered any problems at all, nor have any of my 25000+ users 
reported anything. Hence, I would say that if there is an 
incompatibility issue here, then it will only manifest in certain 
situations and it would appear that I've been lucky enough to avoid 
them. Both I and some of my users have also successfully altered these 
databases using the tools available on the SQLite site and then used 
them again on the phone/tablet. So there MAY certainly be issues, but 
apparently it is possible to avoid them too without even trying.


YMMV / Jonas

PS. My database format has changed over time, but in a backwards 
compatible way which is detected and handled as suggested in the docs.


On 2011-08-03 18:35, Dianne Hackborn wrote:

Ignoring SQLite, I would never expect to be able to go back to an older
version of *anything* and have it read the same data files created by a
newer version.

If your application were writing its own data files, do you think it
would robustly be able to read ones written by a newer application in an
older version of it?

In terms of SQLite specifically, I also wouldn't consider this a
document storage mechanism.  It is a database, and good for that kind of
stuff, but if you have data you want to transport across different
devices I really think it should be in a robustly designed document format.

On Wed, Aug 3, 2011 at 6:08 AM, Zsolt Vasvari mailto:zvasv...@gmail.com>> wrote:

Well, that's a absolutely not true.  I have had at least 10 users with
this problem. One guy actually wrote to me today who tried going back
to Froyo from Gingerbread and couldn't open his database.   I also
created a database in a cyogenmod emulator session and the database
shows up as "corrupt " when trying to open it from a normal Android
command line SQLite session.  It's easy enough for you to try if you
don't believe me.

On Aug 3, 7:01 pm, Mark Murphy mailto:mmur...@commonsware.com>> wrote:
 > On Wed, Aug 3, 2011 at 6:53 AM, Mark Murphy
mailto:mmur...@commonsware.com>> wrote:
 > > On Wed, Aug 3, 2011 at 2:53 AM, Zsolt Vasvari
mailto:zvasv...@gmail.com>> wrote:
 > >> For example, if the user moves to a phone with an older version of
 > >> Android, I can support that older version of the platform just
fine,
 > >> but the user is Sh*t-out-of-Luck trying to move their database
over
 > >> and they cannot open their newer SQLite database on an older
version
 > >> of SQLite.
 >
 > > Got any examples? AFAIK, the SQLite file format has not changed
in some years.
 >
 > http://www.sqlite.org/formatchng.html
 >
 > According to the SQLite folks, there hasn't been an on-disk file
 > format change since 2006.
 >
 > --
 > 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




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


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: How to make an alarm live even when the application which set it is killed?

2011-07-31 Thread Jonas Petersson

On 2011-07-31 15:27, Mark Murphy wrote:

On Sun, Jul 31, 2011 at 9:19 AM, Ali Chousein  wrote:

Thank you for the information Mark, that's very helpful. Apparently
simulation the OS behavior is not straightforward in this case.


Other than waiting for the OS to do its thing.


In my experience, starting the web browser and surfing to a major news 
site's ordinary page will cut down the waiting time drastically... - at 
least for phones with limited memory.


Best / Jonas

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

2011-05-31 Thread Jonas Petersson

On 2011-05-31 18:30, Chris Stratton wrote:
> [...]

 > But since this is not a rooted device, I can not access my data/data/
 > com.acme/databases to open my db file.

Write a backup feature in your app that copies the (closed) database
to external storage, then download from there.

Or, develop on an emulator.

Or, write unit test cases using JUnit and the instrumentation framework

Or set the mode of the database file to world readable... just don't
ship that way like a certain internet phone app did.


Or open the database straight from the SD card where you can do whatever 
you like while you develop. (This is actually how my Inventory app does 
the "merge" feature from the SD database to the "closed" database.)


Best / Jonas

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

2011-05-30 Thread Jonas Petersson

On 2011-05-31 02:52, Doug wrote:

On May 30, 1:24 am, Raghav Sood  wrote:

I am currently using a PC running Ubuntu 11.04. Money is not a problem so I
think I'll get a Macbook Pro and dual boot OS X and Ubuntu 11.04 on it.


How are you going to dual boot with Linux on a MacBook?  Boot Camp
only supports Windows products.


Um, I've been running various kinds of Linux on my company provided 
MacBookPros for 5+ years without problems. Theoretically, I guess I'm 
"dual booting" (as I kept a small OSX partition just in case), but in 
reality I don't boot that partition. Remember: pretty much anything that 
boots x86 Windows will also work with Linux. These days it isn't even 
particularly tricky to install - in fact, I consider the way the 
multi-touch pad works in Linux better than how it is used in OSX (YMMV).


The MBP hardware is pretty good in my experience, the only iffy part is 
the BCM wifi.



If you want to run any kind of Linux on a MacBook, then you'll need to
get a product such as VMWare or Parallels to run some Linux in a VM
hosted within OS X.


Nope. You certainly can if you like, though.


I've been doing all my Android dev on OS X for two years and haven't
needed Linux for anything, even NDK work.  And I have never had to
find and and install device drivers like my peers using Windows.  One
major exception is with Samsung Galaxy S products -- if you want to
install a new firmware on those devices, you need Windows to run
Samsung's crappy Kies software.


Oh, I have a vbox with Windows on my MacBookPro (currently running 
Ubuntu 11.04) for the odd Windows-only stuff I need to do. Upgraded my 
Milestone that way for instance. So of the three OSes, OSX is actually 
used the least.


Don't get me wrong, these days I could get used to OSX if I had to (I 
selected Linux when OSX still didn't exist), but for various reasons I 
still prefer Linux (comparing uptime with my colleagues - identical 
hardware - I have better uptimes) and Linux is also the target platform 
of my day job.


Best / Jonas

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

2011-05-30 Thread Jonas Petersson

On 2011-05-30 15:16, DanH wrote:

SOAP has high-level functions that JSON doesn't (over and above the
simple protocol level differences).  Not really necessary for simple
database queries and the like, but useful for more sophisticated
stuff.  (Disclaimer -- I've never actually used SOAP -- it's always
been too complex for my uses.)

Certainly when faced with the simple choice between JSON and XML, JSON
is the right choice 9 times out of 10.


Well, I've used SOAP in several projects (as in "I've been given a SOAP 
service someone else has built and had to conform to it") and I'm sure 
there ARE real life cases where SOAP is the correct tool for the job, 
but I have yet to find one. My personal estimate is that JSON is the 
right choice almost 10 times out of 10 (at least when it comes to stuff 
that you are likely to want to implement on a phone). Data overhead is 
important to most users both when it comes to cost and time so that 
pretty much disqualifies SOAP IMHO.


Best / Jonas

PS. My biggest gripe is that SOAP services often base64 encode 
everything twice. Sure it is "binary safe", but you can easily add that 
to your tailored JSON data too. YMMV.


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

2011-05-30 Thread Jonas Petersson

On 2011-05-30 14:13, Kostya Vasilyev wrote:

I rememeber reading that this list is moderated for new users and it
takes a few days to be able to post (if that's the case, it's a good
question why there is stil spam here).


If you keep an eye on the sending date of messages (and the flow) it is 
quite easy to tell that new users' messages are often piled up for a few 
days and then some kind of moderator let them the whole pile through 
(presumably after weeding the worst stuff out).


I suspect that once you are approved you stay approved until manually 
blocked. Hence, the spammers (for example some semi-random head hunters) 
may be let through with an innocent message and then turn evil.


Not ideal, but...

Just my guesses / Jonas



2011/5/30 Mark Murphy mailto:mmur...@commonsware.com>>

On Mon, May 30, 2011 at 7:29 AM, Spooky mailto:spooky1...@gmail.com>> wrote:
 > You mean you CAN send post by sending e-mail to the list?

Yes. This message is coming via Gmail, for example.

 > When I
 > tried that (my first post), it was rejected, saying the list didn't
 > accept
 > posts via e-mail, or something to that effect

It is possible that the email interface is only available to those who
have gotten past the moderation queue or something.

It is issues like this why I steer people to StackOverflow.

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

Android Training in Oslo: http://bit.ly/fjBo24

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

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

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


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


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


Re: [android-developers] Re: JSON OR SOAP ?

2011-05-30 Thread Jonas Petersson

On 2011-05-30 09:47, Zsolt Vasvari wrote:

JSON is not a replacement for SOAP.  JSON is more of a replacement for
XML.


Agreed as such, but I'd still say that for MOST cases I've seen, JSON 
will do what you need. SOAP is the opposite of "lean" in my experience, 
so if you have the choice if selecting JSON or SOAP, go for JSON.


My few cents / Jonas


On May 30, 11:15 am, Migazan  wrote:

What better way to consume web services on android JSON or SOAP?


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

2011-05-29 Thread Jonas Petersson

Hi again Kahn,

On 2011-05-29 16:24, khanh_qhi™ wrote:

What Andoird APIs level does Bluetooth support?


You'll need at least 2.0 for SDK BT support (with a fair amount of 
effort you MAY be able to enable it in 1.x, but for that you are in the 
wrong group).



I cannot enable Bluetooth, could someone instruct me to enable this?


At the bottom of the page I sent earlier is a link to a demo app:
http://developer.android.com/resources/samples/BluetoothChat/index.html

Good luck / Jonas


On Sun, May 29, 2011 at 5:32 PM, Jonas Petersson mailto:jonas.peters...@xms.se>> wrote:
[...]
Tried this?
http://developer.android.com/guide/topics/wireless/bluetooth.html

Best / Jonas


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

2011-05-29 Thread Jonas Petersson

Hi Khan,

On 2011-05-29 12:22, khanh_qhi™ wrote:

I'm creating an simple chatter appllication on Android via Bluetooth.
I use *mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();*
but,*mBluetoothAdapter = null, *so I don't know how to eable
*BluetoothAdapter*?



Tried this?
http://developer.android.com/guide/topics/wireless/bluetooth.html

Best / Jonas

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

2011-04-13 Thread Jonas Petersson

On 2011-04-13 13:12, Károly Holczhauser wrote:

  Is there any chance to restart the hole device from code ?!


Try this:

new AlertDialog.Builder(this)
.setMessage("Dear user, could you please restart?")
.show();

Anything else would be a bad idea even if it was possible.

Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Amazon Appmarket is now open!

2011-03-25 Thread Jonas Petersson

On 2011-03-25 15:43, Brill Pappin wrote:

... and a single point for cracking.

I should not have rebuild for every market!


Exactly my sentiment. I don't mind having a bit of code that determines 
currentMarket() at runtime and execute slightly different code, but I 
don't want to build it differently.


Best / Jonas


On 2011-03-24, at 5:05 PM, TreKing wrote:

On Wed, Mar 23, 2011 at 8:33 PM, Brill Pappin mailto:bpap...@sixgreen.com>> wrote:

Once again, you need to be able to tell which market you installed
from in order to adjust your links to the correct market.


All that takes is a single compile-time flag.

-
TreKing  - Chicago
transit tracking app for Android-powered devices


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

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

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


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


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


Re: [android-developers] PHP Support or not

2011-03-23 Thread Jonas Petersson

Not that I've tried it, but you may want to check this out:

http://www.phpforandroid.net/

/ Jonas

On 2011-03-23 20:01, Chris Stewart wrote:

Android runs native code written in the Java language.  If you want to
build web-based apps for Android (and all mobile in that case), I would
focus on building web apps that run on web servers which can be consumed
by the phones and other mobile devices.  You can't run PHP code natively
in Android.

--
Chris Stewart
http://chriswstewart.com



On Wed, Mar 23, 2011 at 2:56 PM, rishabh agrawal
mailto:android.rish...@gmail.com>> wrote:

In the android O.S,I want develope web bassed apps.i am a beginner in
this field.so plz suggest me PHP is give me help when i create web
based apps.

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

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

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


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


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


Re: [android-developers] Re: Amazon Appmarket is now open!

2011-03-22 Thread Jonas Petersson

On 2011-03-22 14:42, niko20 wrote:

Well crap, my apps' description is entirely missing for some reason.
Well that's the Amazon experience I've been having all along with this
thing...really feels half assed pretty much always...


Well, one of my apps was refused since I had a reference to Barcode 
Scanner (ZXing) on standard Market in it - they promised me a way to 
dynamically find out a suitable reference to Market/AmazonAppStore, btu 
that was a month ago and I've not heard a been since then.


Can't say I'm too bothered about this delay, but I'm not exactly 
impressed...


Best / Jonas

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

2011-03-17 Thread Jonas Petersson

On 2011-03-17 10:46, Albert wrote:

Have anyone seen the peak of 17th February?? That might have been done
to balance out the drop of the 1st December?


Well I have a fair sized "bump" (about 15%) on 17-19th of Feb for my app 
that is popular in the US (65% users), but  on my more Sweden specific 
app (83% .se users) it is well within the normal ripples. On a third app 
with 55% US users there is a somewhat unusual increase (~7%) on the 
17th, but in that case it didn't drop back down.


So, it may be that it is US-related or just random.

Hope this helps / Jonas

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

2011-03-17 Thread Jonas Petersson

On 2011-03-17 01:46, Zsolt Vasvari wrote:

I don't know.  Does a lower power phone means<  Android 2.1??  I don't
think so as I don't believe that the hardware requirements have really
changed much from 1.5 to even 2.3.


Theoretically: Not really
In reality: Yes - at least where I live.

Sure, the Hero like got 2.x in the end, Magic and G1 didn't. The X10 
series got 2.x in the end (but everyone expected them to have it from 
the start). However, at the moment it exceedingly unlikely that you will 
get a new phone with 1.x - unless you are fooled into it.


Hence, most 1.x devices are likely to be hand-me-downs, old users who 
don't really care or new users who don't have a clue. None of these are 
high on my list of power-app-shoppers (doubt most of them will figure 
out how to register to buy even), so it will be free or nothing.


YMMV / Jonas

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

2011-03-16 Thread Jonas Petersson

On 2011-03-16 23:45, Zsolt Vasvari wrote:

I also have 2 versions, a free and a paid version.

The free version is showing that 1.5 + 1.6 = 7.4% vs. 2.4% for the
paid version.  While I am no statistician, I believe this cannot be
right.


Well, examining the stats for my own apps, I see a fair correlation that 
the people willing to pay for apps are those who have the more expensive 
phones which in turn means that they typically run 2.2+.


I guess it boils down to: people with more money spend more. Simple?

I don't know about sales stats anywhere but around here (Sweden) there 
are about 60 Android models available, and sorting those by popularity 
(very simple in my Prisjakt/PriceSpy app) you find that none of the top 
half runs 1.x - in fact only seven in the top half runs 2.1 - everything 
else is 2.2+.


My free apps have around 7% 1.x (the older apps somewhat more, newer 
somewhat less). Obviously, living in Sweden means it was not really 
possible to buy OR sell apps until about 6 months ago, so this affects 
my stats.


My take on this: I think it makes fair sense.

Best / Jonas

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

2011-03-15 Thread Jonas Petersson

On 2011-03-15 14:52, Zsolt Vasvari wrote:

In fact, I'm pretty sure the statistics page install count has *NO*
relation to whether it was actually downloaded from Market - just that
it was installed on that particular phone during some kind of update
request.


Really?  My understanding was that if it wasn't installed from the
Market, you cannot update it from there either.


I have not verified recently, but a while back (say a year or so) I 
experienced that when my app was installed manually it would not 
AUTOMATICALLY update from Market, but as long as it was signed with the 
same key you could still manually request an update (this was a free app 
- perhaps there are other restrictions on paid apps) and from then on 
the automatic update would work.


I'm pretty sure this applies to the pre-installed GoogleMaps and GMail 
apps too.


Obviously, I have no idea how the stats were collected, but since the 
1.0 stats *ARE* there I'll have to assume it is true and that someone 
forcefully has connected it to Market - after all we are talking 
"pirate"-class users here so an "improved" firmware is reasonably likely.


Best / Jonas

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

2011-03-15 Thread Jonas Petersson

Hi all,

On 2011-03-15 13:48, TreKing wrote:

[]
Seriously. The graphs says one install count, the total on the main page
says another.


Well, I had a brief look at this and I suspect you should think of this 
similar to how you review the Android version statistics.


My interpretation is that the install count on the front page is a sum 
from the day you published the app whereas the install count on the 
Statistics page only apply to the shown time period.


In fact, I'm pretty sure the statistics page install count has *NO* 
relation to whether it was actually downloaded from Market - just that 
it was installed on that particular phone during some kind of update 
request.


The reason I've deduced this is that a particular app of mine has is 
installed on 3 devices running Android 1.0 and I'm 100% sure I've never 
had minSDK set that low since. So those users must have "pirated" is and 
installed it sideways. It is a free app so I'm not really particularly 
bothered about this, but I consider it a hint on how these statistics 
were collected.


Assuming these stats show what I think they do, they are actually quite 
useful IMHO - for example it gives a fair hint of the languages used for 
my apps in specific countries.


Being able to drill down in for instance device or OS stats per country 
would be very useful too.


My few EUR-cents / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] 3.0 dialog with WebView inside FrameLayout doesn't resize

2011-02-23 Thread Jonas Petersson

For the record,

I just filed a report of this including a simple demonstration app in 
apk as well as tgz format:

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

Just run in the 3.0 emulator and something pre-3.0 to see the difference.

Best / Jonas

2011-02-23 22:57, Jonas Petersson skrev:

Hi all (in particular 3.0 devs),

I just noticed an inconvenience under HoneyComb, and thought I'd share
it with you for thoughts.

I may have been pushing the limits but in the past I've successfully got
the following to work as expected on all platforms from 1.5 and up:

// Trimmed code for readability
final ImageView throbber = new ImageView(context); // Spinning arrows;
final FrameLayout fl = new FrameLayout(context);
final WebView i = new WebView(context);
final Dialog d = new Dialog(context);
d.requestWindowFeature(Window.FEATURE_NO_TITLE);
fl.addView(throbber);
fl.addView(i);
i.setViewClient(/* bringChildToFrontOnPageFinished */);
i.loadUrl(someUrlToAFairlyBigPage);
d.setContentView(fl);

And then I return this dialog from onCreateDialog();

Overall, it technically still works, but the difference is that
previously when the WebView is broughtToFront, the dialog would size up
as needed (typically to fill the screen), but now it still stays the
same height as the throbber. Scrolling is then hard to say the least.

Now, there are some semi-obvious workarounds to make this work
reasonably (like having a bigger throbber or forcefully use
setLayoutParams() on throbber/webview), but my question is whether this
change was an intentional limitation of the redesign (seems somewhat
unlikely), or an easily fixed bug? Or perhaps I was really just
exceedingly lucky to get this to work before - but it seemed like a neat
effect and it works as expected if I use AlertDialog.Builder() instead,
but I really don't want the title to waste screen space.

Advice very welcome. I can create a minimal example app if you like.

Best / Jonas

PS. While the WebView in the dialog is open, the emulator seems to run
at full throttle for some obscure reason - however, this happens in
1.x/2.x too so that seems unlikely to be related to the issue.



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


[android-developers] 3.0 dialog with WebView inside FrameLayout doesn't resize

2011-02-23 Thread Jonas Petersson

Hi all (in particular 3.0 devs),

I just noticed an inconvenience under HoneyComb, and thought I'd share 
it with you for thoughts.


I may have been pushing the limits but in the past I've successfully got 
the following to work as expected on all platforms from 1.5 and up:


// Trimmed code for readability
final ImageView throbber = new ImageView(context); // Spinning arrows;
final FrameLayout fl = new FrameLayout(context);
final WebView i = new WebView(context);
final Dialog d = new Dialog(context);
d.requestWindowFeature(Window.FEATURE_NO_TITLE);
fl.addView(throbber);
fl.addView(i);
i.setViewClient(/* bringChildToFrontOnPageFinished */);
i.loadUrl(someUrlToAFairlyBigPage);
d.setContentView(fl);

And then I return this dialog from onCreateDialog();

Overall, it technically still works, but the difference is that 
previously when the WebView is broughtToFront, the dialog would size up 
as needed (typically to fill the screen), but now it still stays the 
same height as the throbber. Scrolling is then hard to say the least.


Now, there are some semi-obvious workarounds to make this work 
reasonably (like having a bigger throbber or forcefully use 
setLayoutParams() on throbber/webview), but my question is whether this 
change was an intentional limitation of the redesign (seems somewhat 
unlikely), or an easily fixed bug? Or perhaps I was really just 
exceedingly lucky to get this to work before - but it seemed like a neat 
effect and it works as expected if I use AlertDialog.Builder() instead, 
but I really don't want the title to waste screen space.


Advice very welcome. I can create a minimal example app if you like.

Best / Jonas

PS. While the WebView in the dialog is open, the emulator seems to run 
at full throttle for some obscure reason - however, this happens in 
1.x/2.x too so that seems unlikely to be related to the issue.


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

2011-02-22 Thread Jonas Petersson

2011-02-22 14:51, Mark Murphy skrev:

I had forgotten about that, sorry. However, have you tried that with
BACK, particularly since 2.0?


Um, isn't onCancelListener() what you are after. Works fine for me.
http://developer.android.com/intl/zh-CN/reference/android/app/AlertDialog.Builder.html#setOnCancelListener(android.content.DialogInterface.OnCancelListener)

See also setCancelable().

Best / Jonas


On Tue, Feb 22, 2011 at 8:32 AM, Kostya Vasilyev  wrote:

22.02.2011 15:58, Mark Murphy пишет:



  so does that mean that I cannot use the builder -


Correct.



AlertDialog.Builder has had setOnKeyListener since API level 1:

http://developer.android.com/reference/android/app/AlertDialog.Builder.html#setOnKeyListener(android.content.DialogInterface.OnKeyListener)


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

2011-02-16 Thread Jonas Petersson

2011-02-16 15:20, Kostya Vasilyev skrev:

16.02.2011 16:53, Mattias Svala пишет:

[...]
Which would suggest that I need to sublclass Preference in order to
create a contact picking preference.


I'd implement a self-contained Preference subclass, but maybe that's
just me.


100% agree. If you go the RingtonePreference route I suggested earlier 
it should hardly be more than 50 lines of code or so with all but ~10 
being the typical "super"-calls. As I recall it there is a nice 
onPrepareRingtonePickerIntent() method which you just fiddle to become a 
ContactPicker instead.


Best / Jonas

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

2011-02-16 Thread Jonas Petersson

2011-02-16 09:43, Mattias Svala skrev:

On Wednesday, February 16, 2011 2:18:35 AM UTC+1, TreKing wrote:
On Mon, Feb 14, 2011 at 2:50 AM, Mattias Svala 
wrote:
I'm looking for a way to select a contact from the phones list
of contacts in a PreferenceActivity. What is the best way to
approach this?
"Best" is always arguable. One way is to launch a "contact chooser"
activity on clicking the specified preference with
startActivityForResult, then handling the result in onActivityResult
in the PreferenceActivity itself.
OK. I think that is the way to go too. I have made some attempts at
implementing this but has so far not found a way to set the actual
preference value when I get hold of the picked contact. Preference does
not have a setValue method. How did you envision this to be done?


This may seem odd, but try to subclass RingtonePreference as it contains 
a lot the structure you need.


Good luck / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] capturing Home key event at application level

2011-02-15 Thread Jonas Petersson

2011-02-15 12:58, Kostya Vasilyev skrev:

15.02.2011 14:41, Jonas Petersson пишет:

Well, I have not double checked for a while now, but the onLowMemory()
method of my service was certainly called now and then (even though my
service wasn't doing anything at all at the time) last I traced it.
Does this qualify?


It does qualify, but to a point:

http://developer.android.com/reference/android/content/ComponentCallbacks.html#onLowMemory()

This is called when the overall system is running low on memory, and
would like actively running process to try to tighten their belt.
While the exact point at which this will be called is not defined,
generally it will happen around the time all background process have
been killed, that is before reaching the point of killing processes
hosting service and foreground UI that we would like to avoid killing.


Note that it says "actively running process", "all background process
have been killed", and "before reaching the point of killing processes
hosting service and foreground UI" - which I'm reading to mean that this
applies to foreground-class processes.

The original question was, are *background* process heaps ever GC'd and
shrunk?

Was your service bound to a visible activity, previously called
startForeground, or running locally within a foreground process?


This was a while ago (1.1/1.5 IIRC) so there was no startForeground, but 
I'm pretty sure I used setForeground(true) to be less likely to get 
killed. It was completely invisible as all it did was the classic: look 
for unknown incoming phone numbers an look them up from web service 
(plus store in the phonebook). The gui was just a Toast. (Yes, I'm aware 
that there are ways to do this without a service - this was just 
something I did to play around with the system.)


Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] capturing Home key event at application level

2011-02-15 Thread Jonas Petersson

2011-02-15 12:21, Kostya Vasilyev skrev:

[...]
Perhaps this (garbage collection on background applications) actually
does happen but just isn't documented, then freeing memory before going
into the background is a useful thing.


Well, I have not double checked for a while now, but the onLowMemory() 
method of my service was certainly called now and then (even though my 
service wasn't doing anything at all at the time) last I traced it. Does 
this qualify?


Best / Jonas

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

2011-01-23 Thread Jonas Petersson

On 01/24/2011 08:31 AM, Zsolt Vasvari wrote:

On Jan 23, 10:46 pm, Kostya Vasilyev  wrote:

Getting a little futher OT - I sometimes get comments from users of custom
firmware, in fact, at this point, issues are typically caused by
Frankenstein-like firmware (kernel from here, apps from there, WiFi and
radio drivers extracted from standard firmware, well, you get the idea).


I can attest to this also.  I had a user with an alpha Cyanogen
firmware that even crashed when creating the private database folder
(whichi is done by SQLite).  I spent hours debugging his stuff and
then finally he updated his FW and it started working.  So now every
time I get a weird problem like that, my first question is if they are
using a custom ROM.


Been there too. Camera not returning images, Barcode scanner going nuts, 
etc. When I see something wierd I typically ask then to download my 
help-page - the http headers will often (but not always) hint when you 
have the "Frankenstein" syndrome.


I've also seen what appears to be developer boards being used with my 
Market-only apps - obviously "stolen" (but then again, they are free 
soo...). Those beasts are mighty weird it seems. IP addresses in 
Russia/Asia BTW.


Best / Jonas

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

2011-01-23 Thread Jonas Petersson

On 01/23/2011 03:08 PM, kernelpanic wrote:

thanks - I found several other sites that disagree with the
manufacturer's site and state 320x480 as well.

The app was tested and works fine (according to a few other users) on
a Samsung Transform which is 320x455, so not sure why the claim that
it doesn't work.

The person never bothered to contact me directly or ask for a refund,
so it may just be someone that wanted pay so they could vote 1 star,
who knows.


Getting somewhat OT here, but I wouldn't be surprised if it is in fact 
someone with a competing product that will flat out spread lies. I've 
seen such things in the past: someone kept updating a comment (about 
once a week) which claimed that my (free) phone number lookup app had 
deleted everything in his phonebook - which is technically absurd since 
the only write operation performed is an "add" and even if it was true, 
why would he then keep the app installed for several months to update 
that comment? Also, it's not like it is hard to send me an email so that 
I could look into that claim if it had any truth at all in it.


I'm afraid it's a dog-eat-dog world out there for some people - very 
sad. Having any way at all to respond to Market comments would be 
excellent...


Best / Jonas

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

2011-01-16 Thread Jonas Petersson

On 01/16/2011 12:21 PM, Zsolt Vasvari wrote:

I agree.  A "smart" user wouldn't complain in the first place about
not having the "Move to SD card" option for a 1MB app.


Opinion: It would be nice if the "Move to SD card"-function could detect 
that the application requests for instance BOOT_COMPLETED or has a 
widget etc and inform the user that those functions will no longer work 
as expected if the move is completed. This assumes that the application 
isn't installed on the SD by default and that the user understands the 
warning so I'm not really holding my breath for it.


I guess the best you can do as a developer is to detect that the app is 
running from SD and inform the user about the drawbacks on the next 
start. Hardly ideal, but better than nothing. At least the explanation 
can then be very specific as opposed to what a generic function would 
have to state.


As with many apps, it is not obvious that the automatic startup or 
widget function is a critical function of the application, it may just 
be a nice frill that is seldom used (I know my self that I really only 
ever use ONE widget and that one has no other function than being a 
widget - it shows the next few calendar items).


My few cents / Jonas


On Jan 16, 6:12 pm, Marcin Orlowski  wrote:

On 16 January 2011 07:49, Dianne Hackborn  wrote:


Sorry, you can point them to that documentation if you want.  This is a
pretty fundamental aspect of the behavior of the SD card.


Are you kidding? I'd say that forseeing such user behaviour is pretty
fundamental when you design anything. It'd not hurt too add a warning
popup telling user to confirm "move to sd card" and ack s/he
understand the risk of certain features of the app (which can easlily
be told in most cases based on app's Manifest) simply just won't work.
Assuming users are by default smart not stupid is stupid, not smart.




--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: column '_id' does not exist

2010-12-03 Thread Jonas Petersson

On 12/03/2010 09:04 AM, pramod.deore wrote:

When I tried this as

> [...]

Cursor c = sampleDB.rawQuery("SELECT RoomID as _id FROM 
"
+ROOM_TABLE_NAME, null);

> [...]

   new String[] {"RoomID"},

> [...]

java.lang.IllegalArgumentException: column 'RoomID' does not exist


Yes, that is to be expected, you have just "renamed" the RoomID column 
to "_id" so obviously you must also access it that way (or ALSO select 
it under the original name, but that would be confusing IMHO).


    / Jonas


On Dec 3, 12:51 pm, "Jonas Petersson"  wrote:

Um, you might try something like "select RoomID as _id ..."

 Best / Jonas

On 12/03/2010 08:40 AM, Kumar Bibek wrote:


You cannot in this case. This is a mandatory requirement.



"pramod.deore"wrote:



Hi Bibek, Thanks for reply. But my table RoomTable have only three
columns, RoomID, RoomName, and RoomSuffix. It doesn't have  _id field.
Then how to use Cursor Adapter here.



On Dec 3, 11:55 am, Kumar Bibekwrote:

Cursor Adapters require the table to have a _id field. Else, you would get
this exception.
Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.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


Re: [android-developers] Re: column '_id' does not exist

2010-12-02 Thread Jonas Petersson

Um, you might try something like "select RoomID as _id ..."

Best / Jonas

On 12/03/2010 08:40 AM, Kumar Bibek wrote:

You cannot in this case. This is a mandatory requirement.

"pramod.deore"  wrote:


Hi Bibek, Thanks for reply. But my table RoomTable have only three
columns, RoomID, RoomName, and RoomSuffix. It doesn't have  _id field.
Then how to use Cursor Adapter here.

On Dec 3, 11:55 am, Kumar Bibek  wrote:

Cursor Adapters require the table to have a _id field. Else, you would get
this exception.
Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.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


Re: [android-developers] Re: Market expanding to technically non-compliant devices?

2010-12-01 Thread Jonas Petersson
I'll have to stand in Dianne's side in this case. As some of you may 
have noted a while back I took the time to ensure one of my apps was 
"Google TV ready" as in fully working without a touch screen. For 
everything except the map it took a whole of two lines of code per 
Activity and in the map (where I'd say either the docs are wrong or 
there is some kind of bug/limitation) it took more like 10. These 
changes did not call for separate APKs, in fact even the standard phones 
(in particular those with a hw keyboard and/or trackball) benefit from 
the changes. So to be critical to myself, I should really have looked 
into this earlier - long before Google TV was even considered. Perhaps 
this is the real issue here: many apps are already taking too many short 
cuts, but it doesn't show up much until now when things like the touch 
screen may go away?


Does Angry Birds work without touch? I'm pretty sure it COULD.

My few cents / Jonas

On 12/02/2010 01:26 AM, Dianne Hackborn wrote:

Um.  People.  Google TV does not have Market on it.  This didn't happen
by accident.  The platform isn't yet ready to give apps and their users
a good experience on such devices.  You know, a deliberate decision to
not cause unreasonable pain for developers.  As has been the case at
pretty much every point the range of compatible devices for Market has
been expanded.

It is a little premature to start freaking out about Google TV and
making up stories (OMG we'll need to maintain multiple .apks!) about how
horrible things are.
[...]


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Google Add-On Maps for 1.5 and higher

2010-11-27 Thread Jonas Petersson

Hi Dianne,

I'm not really sure why you brought this up again almost a year after I 
asked, but I guess it confirms that this will hardly be in 2.3 (eagerly 
waiting...), but I'll still keep hoping for something along these lines 
at some later stage.


The recent browser security hole sort of hints that this would be a good 
idea for experienced/paranoid users - I don't really see why the browser 
needs read access to my SD card (unless it is for caching which probably 
could be safely wrapped to a sandbox in some way)


Just my few eurocents / Jonas


On 11/27/2010 02:22 AM, Dianne Hackborn wrote:

No, no android:optional on .  Semantically that is
totally different than what am talking about here, which means to still
allow being installed even if the device doesn't support the library (or
feature since you can do the same ).

On Tue, Jan 19, 2010 at 1:43 AM, Jonas Petersson mailto:jonas.peters...@xms.se>> wrote:

Hi Dianne,


Dianne Hackborn wrote:

As of 2.0 I believe there is an additional attribute on
uses-library that lets you specify that it is optional.


This sounds like a really good step. However, I failed to find it
mentioned in the docs (maybe I'm just looking in the wrong place).

When this works, could we expect it to also work for
uses-permission, as outlined over a year ago? That would be a really
good thing too, IMHO.

Best / Jonas

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




--
Dianne Hackborn
Android framework engineer
hack...@android.com <mailto: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


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

2010-11-24 Thread Jonas Petersson

Hi Pants,

On 11/24/2010 09:16 PM, Mr Pants wrote:

It seems that some changes have been introduced for the Market Console
to paginate if there are>  8 apps. This however appears to be broken
as page 2 only ever has 1 app, and page 3+ is always empty.

Anyone else having the same problem?


I'd say you should consider yourself lucky: when I login to my console I 
get stuck in the "LOADING" spinner... :-(


No big deal really as I updated what I needed today a few hours back, 
but hardly what I expected.


Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Anyone seeing mysterious application crashes lately?

2010-11-22 Thread Jonas Petersson

Hi Kostya,

On 11/22/2010 09:00 PM, Kostya Vasilyev wrote:

I've am seeing some pretty mysterious crash reports in the Market
Console lately.
[...]
I am wondering if anyone else is seeing strange errors like these, and
whether they can be caused by devices that have really low-quality
firmware, either custom, or on devices that were not verified by Google.


I've not seen your particular ones, but I certainly see odd stuff - like 
6 months old versions of my free apps crashing on 1.0 firmware 
(seemingly G1) as well as on seemingly lab boards. Some of these apps 
are very much tailored for use ONLY in Sweden, but they still seem to 
originate from Spain, Russia, China and the like...


My best guess is that there is a fair amount of people who just randomly 
rip apps from the Market and use them to "monkey test" their 
hardware/firmware with.


Initially I was curious, I've given up to try to make sense of it. 
Sometimes their extreme test cases are actually somewhat useful - I've 
caught a few odd states (the last one was the system be unable to select 
an image - seems unlikely, but...)


My few eurocents / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Adapting for GoogleTV: Trackball/D-pad selection with onTap() in MapView strangeness - working example?

2010-11-21 Thread Jonas Petersson

For the record:

The onTrackballEvent() route turned messy so the workaround I've decided 
to use for now is instead mapView.setOnKeyListener() to trigger on 
KEYCODE_DPAD_CENTER and explicitly loop over the items calling hitText() 
until I get a hit.


Seems rather ugly to me, but at least it gives the result I expected 
from onTap(). Advice on improvements appreciated.


Best / Jonas

On 11/20/2010 10:36 PM, Jonas Petersson wrote:

Dear experts,

I recently decided to try out making my app tentatively "GoogleTV ready"
by ensuring a user can do everything without ever entering Touch mode.

For most stuff it is pretty straight forward, but I'm scratching my head
at MapView/ItemizedOverlay: The docs appear to indicate that
onTap(index) should do the trick, but it seems not to work the way I
expect it to. "onTap ... This could be from a touchscreen tap on an
onscreen Item, or from a trackball click on a centered, selected Item..."

Working around it using onTrackballEvent() and perhaps an
onFocusChangeListener seems possible, but the documentation appears to
indicate that this should not be needed for simple cases, right?

I get the circle in the center and can move around with the
D-pad/trackball, but when trying to select, hitTest() is not called and
onTap(index) appears to be called with stale info.

Anyone got a working code snippet? (Mark's NooYawk sadly doesn't work
and googling came up with blanks apart from questions without answers)

Thanks in advance / Jonas



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


[android-developers] Adapting for GoogleTV: Trackball/D-pad selection with onTap() in MapView strangeness - working example?

2010-11-20 Thread Jonas Petersson

Dear experts,

I recently decided to try out making my app tentatively "GoogleTV ready" 
by ensuring a user can do everything without ever entering Touch mode.


For most stuff it is pretty straight forward, but I'm scratching my head 
at MapView/ItemizedOverlay: The docs appear to indicate that 
onTap(index) should do the trick, but it seems not to work the way I 
expect it to. "onTap ... This could be from a touchscreen tap on an 
onscreen Item, or from a trackball click on a centered, selected Item..."


Working around it using onTrackballEvent() and perhaps an 
onFocusChangeListener seems possible, but the documentation appears to 
indicate that this should not be needed for simple cases, right?


I get the circle in the center and can move around with the 
D-pad/trackball, but when trying to select, hitTest() is not called and 
onTap(index) appears to be called with stale info.


Anyone got a working code snippet? (Mark's NooYawk sadly doesn't work 
and googling came up with blanks apart from questions without answers)


Thanks in advance / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] how do i create a donate menu button

2010-10-31 Thread Jonas Petersson
An alternative to this is to do my trick: Just create your own donation 
app and link to it on Market - no need for any permission, just:


  startActivity(new Intent(Intent.ACTION_VIEW,
  Uri.parse("market://details?id=se.petersson.freebeer")));

Best / Jonas

On 10/30/2010 05:27 PM, Mark Murphy wrote:

+1
On Sat, Oct 30, 2010 at 11:26 AM, Kumar Bibek  wrote:

You need to have Internet permission.  Instead of using thewebview, you are
better off using the Bowser activity for this.

On Sat, Oct 30, 2010 at 11:23 PM, Raziel23x  wrote:


I am having trouble creating a donate menu button but I am having
trouble
[...]
  myweb.loadUrl("https://www.paypal.com/cgi-bin/webscr?cmd=_s-
xclick&hosted_button_id=A2L64XS44ZQ9S");


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

2010-10-10 Thread Jonas Petersson

On 10/10/2010 03:18 PM, Mark Murphy wrote:

On Sun, Oct 10, 2010 at 9:12 AM, ecforu  wrote:

Is there a way to get alert dialog results inline (like you can with most
dialogs)?


Some platforms offer dialogs that block code execution in situ, others
do not. Android does not.


I want to determine what to do next inwith a dialog, but I can't figure out
how to get the results back in the same method that I create the dialog from
thus allowing me to continue in my logic flow.


You don't.


I want to keep it all in the same method.


Sorry, but AFAIK that is not possible.


Well, I guess it is a matter of taste, but you CAN put all the logic in 
one method if you really want with something like this:



   // Up here is some logic that suddenly needs to ask something,
   // then:
   new AlertDialog.Builder(this).setTitle("Important!")
.setMessage("The question");
.setPositiveButton("Go ahead",
  new DialogInterface.OnClickListener() {
   public void onClick(DialogInterface arg0, int arg1) {
   // Do the verified stuff
   }
  })
.setNegativeButton("No way",
  new DialogInterface.OnClickListener() {
   public void onClick(DialogInterface arg0, int arg1) {
   // Do some alternative stuff
   }
}).show();

Maybe not exactly what you wanted and some may call it unreadable, but 
I'd still mark it "possible"...


YMMV / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Is anyone's active install % dropping like a rock lately?

2010-09-10 Thread Jonas Petersson

On 09/10/2010 09:51 PM, Peter Sinnott wrote:

[...]
In short, market place goes nuts and forgets the app is installed.
User has app but never gets updates and possibly is removed from
active installs.


Well, I've seen several more confusing things related to Market installs 
and upgrades in the last two months or so. On my own phones I've had 
several duplicated download going on, but most of the time it sorts 
itself once the download succeeds. On a few occasions upgrades (even of 
my own apps and Google Goggles/Maps) have kept failing for up to 24 
hours until finally succeeding - in some cases I've imagined that a 
reboot has helped, but that may have been coincidence.


Still, it *HAS* sorted itself after semi-reasonable time in my personaly 
experince, but a few days ago I had to help one of my users who had got 
stuck in upgrading for several days. After trying all the tricks I did 
myself, we finally resorted to wiping is account settings and 
re-registering with market (same account). This helped. (The next step 
would have been a full factory reset.)


This is somewhat alarming. The Market *SERVER* can't be bogged down with 
users already, can it? I'd suspect a buggy old Market app, but this 
particular user was running stock 2.2 on a HTC Desire, and I had my 
problems on stock NexusOne (2.2) and stock Milestone (2.1update1). 
That's rather up to date IMHO.


Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Is anyone's active install % dropping like a rock lately?

2010-09-09 Thread Jonas Petersson

On 09/10/2010 08:10 AM, metal mikey wrote:

My hypothesis is that since instructions came out as to how to setup
the emulator with Android Marketplace, spammers/weirdos have used tons
of gmail accounts
to download Apps then uninstall them with the intent of throwing stats
off.


I have not clue whether you are right about that, but one thing is for 
sure: I've seen several users in that last few weeks who somehow have 
managed to download the most recent version of one of my apps and 
somehow installed it in a device running 1.1 (presumably a G1). As I've 
set minimum SDK to 1.5 there must have bit of force involved.


I have used some calls that don't exist in 1.1 so therefore the app 
crashes with a VerifyError and thanks to Mads @ nullwire I get that 
stack trace. It had me confused for a while, but I guess you have to 
expect everything, really... The IP address of the last one seems to end 
up in Madrid (where my app is pretty useless anyway).


Just my few eurocents / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Is there a way to request permissions from a user as you need them?

2010-08-29 Thread Jonas Petersson

On 08/29/2010 09:27 PM, Dianne Hackborn wrote:

On Sun, Aug 29, 2010 at 6:25 AM, Jonas Petersson mailto:jonas.peters...@xms.se>> wrote:
On 08/29/2010 03:05 PM, Mark Murphy wrote:
[ Problems with permissions using Evernote as an example ]
http://code.google.com/p/android/issues/detail?id=6266

This comes up fairly regularly, and I am very opposed to it.  I honestly
see this as resulting in a worse situation for normal users.  If such a
facility is available, developers then have an excuse for not being
careful with their permissions -- "hey if the user doesn't like it, they
can turn them off."  So what this likely ends up doing is putting the
responsibility on the user to make the developer's app reasonable.  I
only see this as ended up a crummy situation for all of the non-geek
users.  (The geeky users of course love it because they can fiddle with
every app they install to tweak it to be just how they want the
permissions.  Bully for them, and that would be fine, but if it harms
the experience for everyone else it's not a desirable approach.)


I'd like to think of this in a similar way to the App2SD feature - it 
certainly isn't trivial and it has drawbacks, but the benefits are there 
to use for those who want it. Similar to App2SD flags it would be ideal 
to also be able to disable some features by default and only let 
advanced users turn them on. For a developer with limited resources 
(aren't we all?) a single application with such options is a LOT easier 
to maintain than to pollute the Market with several variations of the 
same app.



I can't spend much more time on this discussion, but it comes down to
this: security is hard, designing apps that are secure is hard, but it
is worth the effort.  Generally I see these requests as boiling down as
a way to avoid the hard issues.  From the start when we were designing
Android we wanted to deal with security head-on without falling on the
easy way out.  Ultimately this makes the platform much stronger.


Sorry to drag on, but my primary point is not security being hard (which 
indeed is very much true), but trying to satisfy many different use 
cases with limited resources and a minimum of Market pollution. I'd 
happily put a single APK on the Market and somehow make it possible for 
the user to select from what appears to be 3+ different versions of my 
app before even electing to download.


Specifically, my "Inventory" application *CAN* be used with ALL 
permissions turned off - it would be marginally better than using a 
piece of paper IMHO, but if all you are after is keeping track of WHEN a 
particular barcode was scanned certain users (probably few) would still 
be satisfied. As it currently uses 4 different (and fairly orthagonal) 
permissions, I might put 10+ versions of it on Market - that's not going 
to happen...


Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Is there a way to request permissions from a user as you need them?

2010-08-29 Thread Jonas Petersson

On 08/29/2010 09:14 PM, Dianne Hackborn wrote:

On Sun, Aug 29, 2010 at 6:46 AM, Jonas Petersson mailto:jonas.peters...@xms.se>> wrote:
I've been pondering this too for my apps, what I'd like to see is
something that just could call "pick contact" and the result would
be JUST the data related to that particular contact (for most cases,
the DISPLAY_NAME would be enough). Sort of like
Intent.ACTION_INSERT_OR_EDIT but in reverse.

Yes this is absolutely the kind of thing that we need and will be
introducing.  Most of the infrastructure is in place -- via
Intent.FLAG_GRANT_URI_READ_PERMISSION -- but I don't think the Contacts
app has implemented this yet.


Excellent!


I'd also like to see an API to which I can just hand over handling a
"badge" to. My app in itself has no need for all the user data as
long as I can just hand over a contact URI.

I'm not sure what you mean by this.  Could you explain?


Oh, sorry - let me clarify with an example: In one of my apps 
(Inventory), each item may have an owner. For 2.x, I obviously want to 
present the new cool QuickContact badge, I have stashed the contact URI 
(and hopefully DISPLAY_NAME - see above) from the selection (long ago), 
but ideally, my app shouldn't need access to summarize stuff in Contacts 
for this URI, just hand over the URI in question along with a suitable 
View and let the system access Contacts for what is needed. My point is 
that my app really doesn't need to read anything from Contacts, the 
badge is just for the user's convenience. I'm fairly sure this 
separation can be tricky to safely implement, but still...


Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Is there a way to request permissions from a user as you need them?

2010-08-29 Thread Jonas Petersson

On 08/29/2010 03:23 PM, Mark Carter wrote:

On 29 August 2010 15:05, Mark Murphy mailto:mmur...@commonsware.com>> wrote:
3. Move READ_CONTACTS into some sort of plug-in/add-on APK,
[...]

Maybe have some generic READ_CONTACTS app (as opposed to each dev making
their own). I'm not sure how this can be done without introducing some
huge security hole though...

> [...]

In my app, I already have phone numbers (from READ_SMS) and only
additionally want the names for those numbers. READ_CONTACTS gives me
far more than I need and therefore far more cause for concern for my users.


I've been pondering this too for my apps, what I'd like to see is 
something that just could call "pick contact" and the result would be 
JUST the data related to that particular contact (for most cases, the 
DISPLAY_NAME would be enough). Sort of like Intent.ACTION_INSERT_OR_EDIT 
but in reverse.


I'd also like to see an API to which I can just hand over handling a 
"badge" to. My app in itself has no need for all the user data as long 
as I can just hand over a contact URI.


And while I'm at it: last I checked, Intent.ACTION_INSERT_OR_EDIT didn't 
quite support all the (to me) obvious values for putExtras() - one of my 
apps would be reasonably happy without being able to write to Contacts 
as long as I could trust this intent to store all the provided data. 
(This was a while ago, might have been fixed for 2.2)


Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Is there a way to request permissions from a user as you need them?

2010-08-29 Thread Jonas Petersson


On 08/29/2010 03:05 PM, Mark Murphy wrote:

[ Problems with permissions using Evernote as an example ]
What I'd like to see is:

4. Evernote makes READ_CONTACTS optional. Users see that READ_CONTACTS
is optional, and those who are concerned about it can go toggle it
off. Evernote adds an if() statement somewhere in its code to detect
whether the optional permission was granted and uses that to determine
whether to enable/disable the button/menu choice/whatever that
requires READ_CONTACTS.


Hallelujah! I couldn't have said it better myself - in fact, I did say 
it quite some time age:

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

(I experience almost identical concerns from users of some of my apps - 
all of them being free and made in my spare time I'm not particularly 
interested in maintaining several variations of them with various 
amounts of permissions depending on user paranoia level.)


> [ Implementation ]

Thoughts?


You certainly have my vote. This is pretty much exactly what I've been 
wanting all along. If there is any way I can help, I'd be *VERY* happy 
to do so.


Best / Jonas

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

2010-08-20 Thread Jonas Petersson

On 08/20/2010 12:42 PM, Mark Murphy wrote:

There is nothing built into Android or offered by Google that meets
this description.


IMHO, this is highly dependent on interpretation.


On Fri, Aug 20, 2010 at 3:02 AM, noob_boy  wrote:

I am wondering if its possible to have Android to PC.

1 ) To send files from Android to PC


I'd say that email might fit this description.


2 ) To send remote commands to my PC.


A JSON call could fit this description (assuming "PC" has som connection 
to a public IP ).


True, this is most likely not what you were after, but still, this is 
very much available for you to toy with, and it certainly works.


Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Paid vs Free, My Early Experience

2010-08-19 Thread Jonas Petersson

On 08/19/2010 10:28 PM, Kostya Vasilyev wrote:

The limit is even more restrictive if you consider other languages.

Russian tends to need more words and characters than English, and that's
just how this language is, not because I am having difficulties with it :)

German or Scandinavian languages seem to need more, as well, although
this is just a guess.


Very much agreed. My experience (handled and done a fair bit of 
translation) us that: English < Swedish < German
Much of this is the huge number of words to choose from in English and 
the complexity of German. My somewhat limited knowledge if Russian seems 
to put it closer to German than Swedish (if you consider the size of 
UTF8 characters I'm pretty sure Russian wins by miles...)


Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Does all Android Devices support Map API

2010-08-08 Thread Jonas Petersson

On 08/09/2010 03:39 AM, Nithin wrote:

Are you saying this X3 was ever actually properly released? It is my
understanding that X3 (aka Rachael) was only every used internally and
by the time it was actually released it was called X10.


I am not sure about that. Anyway I have X3 as well as X10.


Right, so you have been given a pre-release - presumably quite som time 
ago? Around here (Sweden) the X10 has been out since around early April 
(with the mini and mini pro a month or so later), but I just found some 
references that the X10 is to be released in the US today.


A few of my friends have an X10 (I wasn't so interested due to it being 
1.6 and my most advanced app was even preinstalled on one of the Swedish 
operators, so it was already tested intensively by others) and as far as 
I know, they have had at least one OTA upgrade - the last one less than 
a month ago. 2.x is expected September/October.


Everyone is impressed with the camera, while the major complaint is that 
is only single touch (hardware limitation, 2.x will not help, confirmed 
by SonyEricsson). Hence, there are exceedingly few iPhone converts, but 
it still seems to sell very nicely, but HTC seems to have grabbed the 
biggest market share (Desire/Hero/Legend).


Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Does all Android Devices support Map API

2010-08-08 Thread Jonas Petersson

Hi again Nithin,

Sorry, for the somewhat late response

On 08/07/2010 07:36 AM, Nithin wrote:

Sony's first release (X3) have lot of bugs.

> [...]

So, X3 have lot of bugs and your application won't work properly in
X3. Maybe because of that your application is rejected. I am not sure
any other issue is there.


Are you saying this X3 was ever actually properly released? It is my 
understanding that X3 (aka Rachael) was only every used internally and 
by the time it was actually released it was called X10.


In any case you misunderstood: my application was NOT rejected at all. 
As I said, Sony Ericsson even used it for their own promotional video 
and I had several unofficial positive messages from people at 
SonyEricsson in Lund, happily using it around the time the YouTube video 
was put up.


No doubt you are right that some early builds were broken, but I've 
heard of no official X10 releases having problems installing my application.


Personally, I wouldn't worry about early non-released firmwares being 
incomplete - that's their purpose. Anyone STILL using them can hardly 
expect everything to work.


Best / Jonas


On Aug 5, 12:08 pm, "Jonas Petersson"  wrote:

On 08/05/2010 08:19 AM, Nithin wrote:

Sony Xperia first release don't have google Map API, now they updated
google Map API in X10


Could you clarify what you mean? My app "Prisjakt" uses the map API and
was demoed by internal Sony Ericsson people in this demo from Nov 19
last year:http://www.youtube.com/watch?v=e9l7eXhcnvM

This was long before the release of X10 which was their first Android
phone and it certainly worked already then (although the map usage isn't
shown in this video it certainly was in the application).


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

2010-08-06 Thread Jonas Petersson

On 08/06/2010 08:15 PM, samspade79 wrote:

On Fri, Aug 6, 2010 at 12:07 PM, samspade79  wrote:

Firstly, someone said a "real" developer cannot do more than a few apps.

Please quote whomever said this, I'm not seeing it in the thread.

You're right I must have been dreaming. I thought I saw someone say
that though.


[ /me carefully looks around and slowly raises hand... ]

You may be referring to my comment:
> How about just putting a limit on the number of new apps published
> for free in a month? Can you seriously write more than say 5 new
> meaningful apps in a month?

Note the lack of the word "real" but instead "free" and the "month" time 
limit.


The idea was that a really dedicated developer (or group/company) can 
certainly produce more than that, but then it could be assumed that 
he/she/they can also afford the extra fee (or polish the remaining for a 
few weeks). The average spammer would be strangled...


Best / Jonas

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

2010-08-06 Thread Jonas Petersson

On 08/06/2010 04:51 PM, TreKing wrote:

On Fri, Aug 6, 2010 at 9:25 AM, Alessandro Pellizzari mailto:a...@amiran.it>> wrote:
If I want to write a useful free or open source app without ads, I
am blocked by the cost.

Um ... you're already "blocked" by the cost ...
Follow along with me now: currently, you have to pay $25 to sign up as a
developer, yes?
So, currently, to write a useful free or open source app without ads
will cost you $25, correct?
So I suggested a $10 fee per app instead of this, and you want to submit
one app, yes?
My math is fuzzy, but I believe $10 < $25. (Please correct me if I'm wrong)


How about just putting a limit on the number of new apps published for 
free in a month? Can you seriously write more than say 5 new meaningful 
apps in a month? (Perhaps by having an average rating of 4+ [with 1000+ 
users] on an app would gain you another free app per month.)


If you want more you pay the $10/app.

I think this would harm exceedingly few developer while effectively 
blocking the spammers.


Just my EUR 0.02 / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Does all Android Devices support Map API

2010-08-05 Thread Jonas Petersson

Hi Nithin,

On 08/05/2010 08:19 AM, Nithin wrote:

Sony Xperia first release don't have google Map API, now they updated
google Map API in X10


Could you clarify what you mean? My app "Prisjakt" uses the map API and 
was demoed by internal Sony Ericsson people in this demo from Nov 19 
last year:

http://www.youtube.com/watch?v=e9l7eXhcnvM

This was long before the release of X10 which was their first Android 
phone and it certainly worked already then (although the map usage isn't 
shown in this video it certainly was in the application).


Best / Jonas

PS. There were issues with scanning more than one barcode for quite some 
time due to the use of a modified 1.6, but that's not releated.


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread Jonas Petersson

On 08/04/2010 05:00 PM, Kaj Bjurman wrote:

I think it was stated previously in this thread. The problem isn't
Eclipse. The problem is the Android plugin.


I would agree on that one, I use Eclipse for Flex and although there are 
other kinds of issues there, the Andorid plugins appears to be the culprit.



I'm using Eclipse more
than 8h per day at work, and I don't have any problems there (I'm not
doing any Android development at work). I can also use Eclipse at home
without any problems if I never switch to the design view, or edit
Android xml files.


This is what I did not experience. I could work full time in an Android 
project for a week with a fair bit of editing Android XML files (though 
minimally in the design view). This was on a MacBookPro with 4GB of ram, 
running Ubuntu 9.10 - note that for various reasons I was using the 
32bit version and hence needed the PAE kernel. I doubt the PAE makes a 
difference, but 32bit might?



Switching to design view or editing xml files means
that my Eclipse (tested several different versions) craches within one
hour. Often several times per hour, and it's always a related to a
memory problem, and it's due to leaking handles. Looks like it's
either directly related to editing, or generation of R.

(And I'm having a 64 bit machine with 8 GB of RAM)


Ouch! That *IS* bad. I can see why you get frustrated from that. I 
thought I had a bad time when I was only on 3GB for a while, but even 
then I'd be OK for at least 4 hours. Obviously our context differs. I'm 
using Galileo, btw. Seemed like an improvement over Ganymedes overall, 
but I doubt the plugin works differently.


Mad thought: On a 8GB system you could run a Vmware/VirtualBox 
installation with 4GB of what I outlined above to see if it works better 
(I do that trick for a mobile platform that doesn't fully support Ubuntu 
yet).


Your mileage varies! / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread Jonas Petersson
Ah, I think I can relate to that statement: for 95+% of the XML editing 
I referred to I used Eclipse itself, but like Kostya I stayed mostly in 
the XML view, only an occasional glance at the graphical layout since 
(at least for my cases) I decided the visual layout could not really be 
trusted. Showing it in the emulator was the only way to know that it 
actually worked as expected (yes, I had a rather picky spec to follow 
and in a few cases I actually pulled out emacs for significant 
restructuring, so I may have accidentally been lucky to manage for a week).


Best / Jonas

On 08/04/2010 11:55 AM, Kostya Vasilyev wrote:

This looks likely.

I can run Eclipse all day on a 4G Windows 64bit machine, but I edit my
layouts "by hand", without the visual editor.

>

04.08.2010 11:00, Mystique пишет:

I think there's some memory leak issue if editing XML files.
I realise if I only open .java it is ok.
So maybe a temp work around is to edit xml file with editor and open
only .java in eclipse?

On Aug 4, 10:17 am, Doug wrote:

The issue isn't what else is running on the computer. The issue is
that Eclipse gets into an unrecoverable state where it lags horribly
when switching between editors, at least on OSX. I can typically go 5
or 6 hours of steady use (more with intermittent use) until that state
kicks in for me (MacBook Pro, 4GB, 2.4GHz Core 2 Duo). Quitting other
apps at that point doesn't make any difference. The resource leak
explanation is the only one that makes sense given my observations,
which are daily since I do this to pay my mortgage.


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread Jonas Petersson

I may be kicking in open doors here, but have you tried this old stuff?

http://www.luisdelarosa.com/2005/04/03/how-to-get-better-memory-settings-for-eclipse-on-mac-os-x/

For me (Ubuntu - see previous post for details) this worked fairly OK on 
my old 4GB system:


eclipse -Xmx150m

This included a fair bit of XML editing on top of java. (I did lot of 
GUI stuff around that time.)


I can't say I love Eclipse (I'm an old emacs addict), but it's not too 
shabby once you got the memory handling under some control (on a fast 
machine) - known alternatives considered.


Good luck / Jonas

On 08/04/2010 04:17 AM, Doug wrote:

The issue isn't what else is running on the computer.  The issue is
that Eclipse gets into an unrecoverable state where it lags horribly
when switching between editors, at least on OSX.  I can typically go 5
or 6 hours of steady use (more with intermittent use) until that state
kicks in for me (MacBook Pro, 4GB, 2.4GHz Core 2 Duo).  Quitting other
apps at that point doesn't make any difference.  The resource leak
explanation is the only one that makes sense given my observations,
which are daily since I do this to pay my mortgage.



--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: My Eclipse 3.5 always lag and have to force close - why?

2010-08-03 Thread Jonas Petersson

I'll have to explicitly 100% agree with Bob here:

Until around mid May I was using the previous model MacBookPro with 4GB 
dual core (and Ubuntu) for my Android development and after a fair 
amount of tweaking I could barely run Eclipse for a week.


After switching to the new MacBookPro with 8GB and quad core, Eclipse is 
no longer a real issue. Sure an SSD would be nice, but no deal breaker 
(not enough to pay more for a smaller disk).


Good luck / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] how to detect if a phone is running HTC sense UI

2010-08-03 Thread Jonas Petersson

On 08/03/2010 06:31 PM, Dianne Hackborn wrote:

I would really like to know why people want to know they are running
with Sense UI.  Is it just for notifications?  Are there other things?

We really don't want apps to be dealing with this stuff.


Personally, I would very much like to agree.

However, speaking on behalf of my Swedish users it would seem that there 
is a significant portion (you may call them misinformed) that want my 
application to look like "the standard applications" which for a 
significant portion is Sense (Desire and Hero sell like mad around here).


My interpretation is that they are used to phones (say Nokia) where a 
globally selected theme is applied to just about everything but games. A 
number of users have very boldly stated that they withhold one star 
until this "bug is fixed".


As there (currently) is nothing like that, it is somewhat tempting to 
explicitly alter the UI for a few of the most common styles around. I've 
personally elected not to do that so far, but I can understand why some 
might.


Best / Jonas





--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Is there a way to remove some permissions of already compiled apps?

2010-08-02 Thread Jonas Petersson

Hi Martin,

On 08/02/2010 02:05 PM, Martin wrote:

There are so many apps in the market and I don't trust all of them. Is
there a way to remove some permissions of the already compiled apk?


I think the closest thing to what you are after is my enhancement 
request from about 6 months ago.

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

Sadly, it appears unlikely to be implemented in the near future (ref 
Dianne a while ago).


I certainly agree that it is a hard balance since as a developer you 
often want to make the use of the application as convenient as possible 
(in particular when you develop free apps that primarily solves your own 
personal problems), but some user categories may prefer to run it with 
less convenience and a higher paranoia level. Maintaining several 
versions of a free app is hardly ideal.


Just my EUR 0.02 / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Compiling and obfuscating by command line...

2010-07-30 Thread Jonas Petersson
Well, how about going native? (NDK) That should be somewhat more 
challenging than decompiling java.


Good luck / Jonas


On 07/30/2010 04:11 PM, sblantipodi wrote:

Ok, thanks for the suggestions, any other idea? :)

On Jul 30, 2:59 pm, DanH  wrote:

Just say no to obfuscation.

On Jul 30, 3:36 am, sblantipodi  wrote:


Since I'm going mad trying obfuscating my projects on Netbeans and
it's not reasonable
at the moment for me to switch to Eclipse I need a command line script
that let me
build and obfuscate my APK...



Is there some example script, or some tutorial that could help me in
this "intent"?
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


Re: [android-developers] Re: App Inventor to Market

2010-07-17 Thread Jonas Petersson

Kostya,

On 07/17/2010 11:36 AM, Kostya Vasilyev wrote:

Still think it would work well for games / social apps, but for
productivity apps it can actually be the opposite of what's intended.

Consider two productivity apps, one of which helps get the same work
done in half the time. Which one of them deserves a ratings boost?


Theoretically, this is indeed bad if you only measure on-screen time, 
but if we also assume that it is started once per "task" you have to do 
(and assume the number of task for a "productivity" type of app is 
endless) you will most likely compensate by launching it more times.


However, in reality I suspect you would be unable to not notice everyone 
else ranting and raving about a productivity app that is twice as fast 
as what you are using and hence you would switch anyway... ;-)


Still, we're talking mobile phones here (for now anyway), and I suspect 
there is time limit to how much you use it in a day (basically battery). 
You are unlikely to spend very much time producing Word documentsm 
Powerpoints and Excel sheets, right?


As for my own type of productivity (coming back to the subject of the 
thread?), I'd just launch ConnectBot as I settle on the beach next to 
the pub in the morning, login to my work computer and keep coding all 
day, right?


Cheers / Jonas

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

2010-07-17 Thread Jonas Petersson

On 07/17/2010 10:48 AM, Kostya Vasilyev wrote:

<>

Right, but how do you come up with alternative applications, given the
variety of apps?[...]


Yeah, it's hardly trivial, but hey, this is Google - if anyone can find 
relations in statistics, it's them...


Also, for Google (Ad-based income) time on screen should be a very 
important factor. Hmm, there's another interesting thought: with AdMob 
being part of Google it would be easy to include shown ads in the 
popularity equation too - hardly fair, though.



Like your idea for showing apps that haven't been used for a while. It's
like IRL - if you find something you haven't needed for a few years, you
can throw it away ;)


Good to agree ;-). Time to lobby for a new feature...

/ Jonas

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

2010-07-17 Thread Jonas Petersson

Privet Kostya,

On 07/17/2010 08:09 AM, Kostya Vasilyev wrote:

Time spent and number of launches are poor metrics for app quality.
Maybe it makes some sense for games.


Well, "quality" is not at all what I was after, "popularity" more so. 
There certainly are apps that automatically start a service at boot time 
and perform their splendid task that will not show up at all for the 
measurement I suggested.



But consider a car navigation app, or an Office document viewer - their
use time/count is dependent on factors that have nothing to do with how
much users like them.


When compared to alternative applications for the same task, those 
indicators should still be quite relevant. Launching nav A more often or 
using it for longer than than nav app B clearly indicates that which one 
I prefer even though I have both installed.


Part of the reason I brought it up is that I think it would be a good 
thing for the user to know about - a bit like the Battery stats, this 
would indicate whether an app is mostly just wasting storage space since 
I have not actually made any use of it for XXX days. The system could 
quite easily keep stats on this, but writing an app for it isn't that easy.


Best / Jonas

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

2010-07-16 Thread Jonas Petersson

On 07/16/2010 05:35 PM, String wrote:

On 16 July, 16:14, "Maps.Huge.Info (Maps API Guru)"
wrote:

(Pardon the continued hijack)

Likewise. ;^)

+1


 From my analysis, the key metric in market position is acceleration,
not total downloads, comments or anything else.


I respectfully disagree... if this were the case there wouldn't be
nearly so much stability at the top of every category. While I don't
deny that "acceleration" may be part of the equation, I doubt it's
key. My guess is that some metric like "downloads per week" is more
likely; this would account for both hot new arrivals and old-timers
with continuing popularity.


Since this is all speculation, perhaps there is an even simpler method: 
It is obvious that the phone reports back what is still installed now 
and then (presumably when it looks for updates). To also report back how 
many times that application has been (manually) launched and/or number 
of seconds on screen since last report wouldn't be particularly hard to 
implement (though it probably would trigger a bit of paranoia). I'm not 
saying it DOES, but such stats might be a reasonably fair indication of 
actual popularity.


Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Seems Android Market statistics go wrong again

2010-07-16 Thread Jonas Petersson

On 07/16/2010 11:06 PM, Maps.Huge.Info (Maps API Guru) wrote:

Our app "Radar Now!" dropped from 611,000 to 562,000 - quite a bit!
However, when compared to our own internal counts, they are much more
in line now. We count each individual registration of an Android ID as
one install, which should be the way Google does it. The discrepancy
is on the order of 20,000 between our numbers and the market, so that
makes a lot more sense. The differences most likely are those that
downloaded the app but have never run it. 20,000 out of nearly 600,000
is only 3%, I can accept that.


For the record, my (Sweden specific) app is about a magnitude below 
yours, but the dropped percentage is very similar and so is the 
difference to my own statistic figures. So basically, the current 
(adjusted) numbers make a lot of sense to me too.


Best / Jonas




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

2010-07-16 Thread Jonas Petersson

On 07/16/2010 04:42 PM, Cleverson wrote:

I'm  trying to develop an application that should not be visible to
the user. I mean an app that can't be visible at the Manage Apps
screen (Settings – Applications – Manage applications) and also whose
services couldn't either be visible at the Running Services screen
(Settings – Applications – Running services)

I know I'm trying to fight against Android’s nature of being open and
give control to the user. But I want, somehow, to cheat the system and
pretend the app does not run and even does not exist. Is that
possible?


I certainly hope it isn't possible, and if you succeed you can bet your 
farm on that the next update will plug that hole, right Dianne? ;-)


What you want to do SHOULD require a tailored firmware, IMHO.

Best / Jonas

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

2010-07-15 Thread Jonas Petersson

On 07/16/2010 01:31 AM, Maps.Huge.Info (Maps API Guru) wrote:

One thing that mitigates the occasional unhappy and misinformed user
is time. Once your app has been on the market for a while, those
comments won't affect your overall rating nor your position in the
popularity rankings. All you have to be is patient and keep working to
improve your app. Our app "Radar Now!" has nearly 5,000 ratings after
about a year. We still get the occasional "Sux uninstall" one star
rating but those are overwhelmed by the "Love it" and "Fantastic app"
five stars.


This is true as such, but it would be very interesting if you have 
statistics that would give a ratio to indicate a percentage how many of 
your happy daily users that have submitted a 3+ rating or a positive 
comment as opposed to those who run it once and leave a "sux"+single 
star. Then compare that to the ratio of positive/negative emails sent to 
you.


In theory the ratios should be similar, but I certainly don't see that.

Best / Jonas

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

2010-07-15 Thread Jonas Petersson

On 07/16/2010 12:25 AM, Wayne Wenthin wrote:

This is not entirely correct.   I have an app rated at 3.5 + stars and
there are tons of crapware above me because I have less downloads.
(and probably because I'm not ripping off disney either but that was in
another thread)


I would tend to agree on this. Judging from usage statistics on my own 
applications I see that those that are satisfied will often use my email 
address to contact me with positive feedback but forget to use the 
Market for rating while those who are unsatisfied (typically because 
they've misunderstood something) quickly put a single star and a 
negative comment before they disappear - leaving me with no way to help 
them or let them know when I've implemented the feature they asked for.


This scews the rating IMHO - in particular initially when the average is 
easily affected by a single vote.


My few EURcents / Jonas

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

2010-07-15 Thread Jonas Petersson

On 07/15/2010 10:40 AM, Kostya Vasilyev wrote:

Google groups doesn't send a posted message back to sender.
So you kind of have to go on faith :)


Um, for me - subscribed on a non-gmail address (although I still forward 
it there for good measure) - the mails I send to the list certainly come 
back. What you see is probably an optimization feature of Gmail ("seen 
it already"), or possibly some other special local handling within Google.


Best / Jonas


15.07.2010 12:30, hat...@gmail.com пишет:

how come I can never see my questions in any emails from this group?
is the group email filtered me or my gmail hate this group? --


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: How to startup one application programmatically from other application

2010-07-15 Thread Jonas Petersson

On 07/15/2010 10:24 AM, Jeruliu wrote:

I should made it more clear, i intent to let user specific the time to
fire the chosen app.
Which approach is better? notification or call intent from
AlarmManger?


In my humble opinion, a notification is usually better (incoming phone 
calls are an obvious exception) - if you are worried, perhaps you should 
make it an option?


A random application may cause significant strain on the system if run 
regularly (just watch the difference in battery consumption if you turn 
of the mail sync - and the guys writing that one certainly know the 
platform very well). I'd make sure the Alarms won't go off when the 
phone is sleeping and just make them notifications (probably cancelling 
unused previous ones in the process).


Perhaps you should reconsider the use case of your application? What's 
the problem your are trying so solve?


Good luck / Jonas


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] How to startup one application programmatically from other application

2010-07-15 Thread Jonas Petersson

On 07/15/2010 09:05 AM, Jeruliu wrote:

Say I have app A, in app A i want to set a schedule to startup the app
B and C at specific time?
Is it possible to do that? if yes how?


Are you sure your user will appreciate this? You can for instance use 
the AlarmManager and then just fire a suitable Intent, but the user 
might be in the middle of (say) enter a password or similar when you 
happen to pop up app B/C, so this app had better be as important as a 
phone call or similar. A better approach might be to use a notification.


Best / Jonas

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

2010-07-15 Thread Jonas Petersson

Hi jgostylo,

On 07/15/2010 07:01 AM, jgostylo wrote:

All of this and people have only sort of answered my question.  I
understand that the answer may just be "I don't really know what it
would do" and I understand that really isn't an answer people post on
the forum because it does not fill the information gap.  The accuracy
is a function of the number of satellites in view and other stuff.  I
get that.  But the question remains the same.  When it tells me my
location is hundreds of miles from where I actually am, will the call
to getAccuracy return hundreds of thousands of meters?


I don't know if what I've noted is of any help at all, but here we go 
anyway:


It is easy to get confused when mixing network(coarse) and gps(fine) 
providers if you just listen to both. For network I've seen it be 
radically off many times (presumably the operator has messed up IDs and 
positions), but at least it is usually quick to report SOMETHING. When 
it comes to gps I would say that the the blue circle shown on Google Map 
quite often would have to be twice as big for the first few samples 
(with pretty bad accuracy) to show the truth, but when it comes down to 
two digit meters it usually is quite good for me - even when I'm indoors 
(reasonably low buildings). Compared to the iPhone3GS that my colleagues 
use, it is significantly better actually. This might just be luck with 
my particular devices, though. So basically, to be on the safe side, I'd 
say double the number of meters you get from accuracy.


The other thing that you will need to consider is to have a "best 
before" timestamp on all positions. In some cases I've had a pretty good 
position from the GPS for a long time when for some reason it drops the 
signal and you need to go back to network until it comes back. If you 
are moving fast (say sitting on a train with iffy net coverage too) this 
can get pretty strange results if you trust your old data for too long. 
(Your currentLocationAccuracy variable may be trying to address this?)


Obviously, debugging this is hard and potentially expensive (even 
dangerous if you drive yourself!).


Disclaimer: I don't claim to be an expert on this, this above is just 
based on my own observations.


/ Jonas

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


[android-developers] Is it possible to make an alias resource for a whole translation?

2010-07-14 Thread Jonas Petersson

Dear clever Android coders,

I'm in the process of making one of my applications more localization 
aware, and basically I know how I *CAN* make it work, but it seems 
somewhat suboptimal. What I'm after is really to make an alias from one 
values-xxx/strings.xml to another values-yyy/strings.xml - doing this 
for drawables and layouts is no problem, but for "simple" values it 
doesn't work the same as far as I can tell. (Yes, I've googled these 
groups too, but didn't come up with anything useful.)


For my scenario I need to have a base language (values/strings.xml) that 
works for many places, but a handful of the others need to be the same 
(both actual languages and mccXXX depending on the device and the SIM 
etc) in several groups (per country basically). Obviously I can simply 
symlink (though it may confuse Eclipse) or even copy the files, but they 
are reasonably large (a few 100 strings each) so I'd prefer to store 
them only once in the APK if possible. To my understanding there is fair 
optimization going on at runtime, but I still suspect copied files will 
also eat memory at that stage compared to a true alias.


I suspect going for just mccXXX would work for 90+% of the users, but 
I'd really want to do better than that - especially since I consider 
mccXXX somewhat of a hack while waiting for "true local" phones to 
arrive to most smaller countries.


Advice appreciated / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 market hiding apps with bluetooth permissions from Android 1.5 and 1.6

2010-07-14 Thread Jonas Petersson

On 07/15/2010 12:37 AM, Dianne Hackborn wrote:

We are not having optional permissions any time soon.


Oh well, at least I know now what to tell those who keep nagging me 
about it.



And no, these are not the same thing, permissions are about security and
the other tags are about compatibility.


Very true, my point was to make life easier on developers (like me) who 
don't really want to create, release and maintain several variations of 
an app, just because some users are somewhat more paranoid than others. 
At a glance it doesn't seem like a huge effort at the system level 
compared to what it gives to both developers and users, but perhaps I'm 
wrong. I wouldn't mind contributing to it myself as long as I know it 
will not be immediately refused. However, it does include changes to the 
Market application, so I can't do that part.



And hey... "5 new stars in the last 24 hours..."  You've been telling
people to star this bug because you associated it with a completely
different issue that already has a solution.


Well, I tried (possibly failed) to be very clear on how it was 
different, but still addressing problems with permissions. I dare say 
this is far from trivial and the various settings are not really 
orthagonal (or even documented) which adds to the complexity.


Please note that I really love the platform as such, I'm just a tad 
impatient for solving the problems I keep banging my head against. This 
is where the ghost of "non-openness" starts to rattle some chains that 
I'd rather prefer not to hear too much about.



I might be kind-of dumb to make engineering decisions based on stars. :}


I'd be the first to hand you the non-dumb badge around here for sure and 
I certainly don't expect a few stars to make any significant difference. 
It could very well be that it is just me caring too much about my users 
(or about duplicating code), if no-one else thinks this is an issue. At 
least now I can honestly say I've done all I can to make it "right" 
according to my own beliefs.


After all, its not like I make any money on these apps, I'm just in it 
for fun, and possibly some fame and glory if I'm lucky.


Best / Jonas

PS. Part of the "problem" I experience is related to the fact that as a 
developer I have no way to get in touch with the (luckily few) people 
who write their complaints as comments to my app on Market. I really DO 
want to help them, but even if I release another app (with exactly what 
they ask for) the original complaint is still stuck on the first app and 
I can't even tell the user about the new adjusted app. Would you call 
that frustrating?


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 market hiding apps with bluetooth permissions from Android 1.5 and 1.6

2010-07-14 Thread Jonas Petersson

On 07/14/2010 09:41 PM, Dianne Hackborn wrote:

[...]   At any rate, the correct thing for an app developer to do
is explicitly state which features they care about, and you can there
use android:required="false" to tell Market not to filter your app based
on it.


Let's see, to summarize the manifest file we've got:

 that supports android:required="false"

 that supports android:option="true"
  (though currently not in the documentation AFAICT)

 that supports plenty of android:req*="false"

 that supports android:min/target/maxVersion="#"

so it would seem that my old issue 6266 on b.android.com suggesting a 
similar flag for




is pretty much in line, right? 5 new stars in just 24 hours is promising 
(assuming stars matter to someone).


Keep 'em coming / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 market hiding apps with bluetooth permissions from Android 1.5 and 1.6

2010-07-14 Thread Jonas Petersson


On 07/14/2010 10:54 AM, Joe wrote:

I can see why Google wouldn't want to complicate the permissions for a
user. I am not suggesting they let the user choose which permissions
to allow. An obvious issue with doing that is that users could "break"
your app by crippling the permissions, and then complain it doesn't
work and give you a bad rating on the market. That is really a
separate topic/argument.


I think you misunderstood what I asked for: what I'm after is that the 
DEVELOPER should have the ability to flag a particular permission as 
optional. Market can use this for filtering - in your case an optional 
BlueTooth permission would allow users with no bluetooth library 
(theoretically 1.x) to install the application. For a user who installs 
it on a device WITH bluetooth, the normal installation warning screen 
would allow that option to be deselected. The application will have to 
check whether it actually got the optional permission - if it doesn´t it 
deserves a bad rating.


Although this is not exactly your problem at the moment it certainly is 
closely related. IMHO.



Any way back to my issue:

Apps are (or were) filtered from the market based on screen size and
android version.

They were not filtered based on permissions.


I wouldn't place any bets on that one. I'm pretty sure that for instance 
the Barcode Scanner program is filtered out for devices that lack auto 
focus for instance. This may not exactly be permissions, but rather a 
device profile (I've noted that new/prerelease phones often see a lot 
less of the apps on Market), but exactly how it works may be something 
that we really shouldn't know too many details of since I would expect 
it to change (hopefully improve) over time.



It seems some confusion
has crept in. When i say in my app is android:minSdkVersion="3" - i
mean it :)

The bluetooth permissions have been around since the start, they are
nothing new.

This is obviously a mistake recently introduced on the Android
Market.

Anyone coding a bluetooth app should have made it backwards compatible
(as mine was) OR have set their minSdkVersion="5"


Well, the good old Bluetooth File Transfer app seems to work. I've not 
got a 1.6 device handy, but the one installed on my Milestone has target 
sdk set to 4 and it asks for BT admin plus create BT connections.



On Jul 14, 10:39 am, DonFrench  wrote:

Ok, I clicked the star and added my support.


Excellent! Anyone else?

Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 market hiding apps with bluetooth permissions from Android 1.5 and 1.6

2010-07-13 Thread Jonas Petersson

On 07/13/2010 09:05 PM, DonFrench wrote:
> > [Joe's app ]

So Bluetooth is not necessary to benefit from using your app but those
whose phones support it can reap the additional Bluetooth benefits
that you so thoughtfully added, is that it?.   Since your app is still
valuable even without Bluetooth functionality, people with pre-2.0
phones should not be prohibited from purchasing it, right?   Well, you
make a good point.


IMHO, the above case is very similar to the enhancement request I added 
almost 6 months ago:


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

Some permissions are non-critical for the application and it should be 
possible to flag them as such and then let the application find out 
whether it was given or not and adjust accordingly.


So far only 51 people seem to have agreed with me, so either I'm wrong 
or most people have not realized why this would be significant enhancement.


Best / Jonas

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

2010-07-04 Thread Jonas Petersson

Hi Kwan & Jake,

On 07/04/2010 04:36 PM, Kwan Cheng wrote:

You can't android only tracks two touch points a time

On Jul 3, 2010 1:10 PM, "ArcDroid" wrote:
Hi does anyone have good way to impliment multi touch for a piano,
thanks Jake


To my understanding, "Android" from 2.x and up as such may in itself 
support a fair number of touch points, but the actual phone 
implmentations currently (at best) support two - the X10 is claimed to 
only support one on the hardware level even if you get the 2.x update 
(soon-ish). I believe the G1 is single touch too, but then again there 
is no official 2.x for it. Anyone with a newly upgraded Hero that can 
confirm whether it works?


Best / Jonas

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

2010-06-21 Thread Jonas Petersson

On 06/21/2010 01:21 PM, Mark Murphy wrote:

2010/6/21 Vytautas Šaltenis:

Apparently, since Froyo it's possible to display app in clockwise
landscape
orientation (e.g. as demoed here: http://www.youtube.com/watch?v=R4YazuITS1o).

However, I can't find anything related in the SDK. How can I display
my app this way?


I imagine you just support landscape orientation in your app. After
all, the landscape version looks the same, no matter which landscape
side is up.


For the record: In postscript terminology, these are typically referred 
to as "landscape" and "seascape" respectively - somewhat silly perhaps, 
but sometimes a useful distinction.


Best / Jonas


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] nasty phone freeze bug in Android 2.1-update1 showing up in multiple cases on Nexus One and Droid

2010-05-07 Thread Jonas Petersson

Robert Green wrote:

I mentioned this earlier but no one seemed to know anything about
this. 

> [...]

W/SharedBufferStack(29487): waitForCondition(LockCondition) timed out
(identity=1310, status=0). CPU may be pegged. trying again.
[...]
I've also seen this happen once before to RenderScript, so perhaps it
is OpenGL-related?

I feel like there is a bug down there in the depths of Android


This sounds lot like what I've experienced and reported here:
http://code.google.com/p/android/issues/detail?id=6478

I just got 2.1-update1 on my Milestone this morning (UK model), so I've 
not seen it there yet, but considering fadden's comment#4 to the bug I 
wouldn't bet on it being fixed...


Speaking of bugs: Even the 2.1-update1 on Milestone refuses to add a 
Google account (Gmail or Apps) - Nexus One works fine though. Anyone 
else experience this? The error message is:


"Can't establish a reliable data connection to the server."
(even when entering complete garbage).

Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Problem with characters åäöÅÄÖ

2010-05-04 Thread Jonas Petersson

Hi again Jonas (?),

jw wrote:

Well, all I want to is to send the string forward in an xml string.
The flow is like this:

User fills in a couple of forms (EditText) and presses a button. The
values is added into an xml string and posted.

The thing is when I print the values in the Log cat, it looks weired.
And the the result on the receiving end is ??? (all едц becomes
question marks).

So what I want to do is simply send the values as utf-8 in the xml
string. That's it.

So I agree with you, I should keep it as UTF-8. But I'm not following
you on what I am able to do?


I'd just ensure the XML file is indeed UTF-8 encoded and ignore anything 
you may find odd in logcat - I'm not 100% sure logcat is UTF-8 safe and 
even if it is in itself, it still depends how you view it - I prefer 
running ./adb logcat in a fairly sized up window rather than what 
eclipse offers and therefore the logcat output will depend on how my 
xterm is setup. Basically, logcat is for trace output - don't worry 
about the encoding there as long as the end result is correct.


BTW: if you are concerned with the size of the data being sent between 
your phone to the server, I'd seriously recommend gzipped JSON over XML, 
but that's just me...


Best / Jonas (too)

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Problem with characters åäöÅÄÖ

2010-05-04 Thread Jonas Petersson

jw wrote:

Well, then how do I do that? I've been trying different approaches but
I can't seem to get the text as a string with äåö. Do you now how I
can do that? (I should add that this thing with encodings isn't my
specialty).


It all depends on what you intend to do with the string. In a perfect 
world you should just keep it in UTF-8 encoding for ever. There 
certainly are ways to turn them into ISO variations, but if the text 
contains the EURO sign, names of Greek people or similar it will break - 
and if you ever want to show it on your Android screen again will have 
to turn it back into UTF-8 again. So, my advice is to keep it as it is 
and adjust whatever other system you are using it with to cope with 
UTF-8. Sure, there will be a learning curve, but in the end you will 
have a more robust system.


Good luck / Jonas

PS. Prisjakt is UTF-8 all the way through even though there are no 
products I'm aware of that goes outside ISO8859-1.


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Problem with characters å äöÅÄÖ

2010-05-04 Thread Jonas Petersson

Jonas Petersson wrote:

jw wrote:

I'm developing an application for Swedish users, when the user is able
to input some string, sometimes containing "拍皱漩". But when I
run .getText().toString() on my EditText object,I get really strange
characters like "枚" and "盲".


That's just normal UTF-8 encoding examined as ISO8859-x. You need to 
consider encoding when you examine your results, but generally speaking 
UTF-8 is the way to go. Any old ISO mapping is bound to cause problems.


Heh, speaking of the devil... I certainly SENT that message with 
"charset=ISO-8859-1;" in the header, but when it came back from the list 
the header was helpfully replaced with "charset=GB2312".


Please, can we just kill ISO* once and for all? ;-)

(I certainly mean Xuan no harm, wrinkled or not!)

Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Problem with characters å äöÅÄÖ

2010-05-04 Thread Jonas Petersson

Hi jw,

jw wrote:

I'm developing an application for Swedish users, when the user is able
to input some string, sometimes containing "拍皱漩". But when I
run .getText().toString() on my EditText object,I get really strange
characters like "枚" and "盲".


That's just normal UTF-8 encoding examined as ISO8859-x. You need to 
consider encoding when you examine your results, but generally speaking 
UTF-8 is the way to go. Any old ISO mapping is bound to cause problems.


Good luck / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Device Seeding Program for Top Android Market Developers

2010-05-04 Thread Jonas Petersson

Trygve Aaberge wrote:
FedEx may not have any information. I called them on Friday, and they 
couldn't find a package, but I got it today. So don't get your hopes 
down if you call FedEx, and they don't see a package for you.


I absolutely agree. I called FedEx and gave them all information I could 
think of (including my delivery address, probable sender etc), but they 
couldn't find anything. A few hours later the driver of their local van 
called my mobile phone to report that I wasn't at home and asked how he 
could meet me - 20 minutes later I met him just outside my office (5 
minutes drive really, but I can hardly complain).


Keep your spirits high! / Jonas

PS. A big THANK YOU to all the Android Googlers!
PPS. Keep updating the map: 
http://maps.google.com/maps/ms?ie=UTF8&hl=en&oe=UTF8&msa=0&msid=109593402120975111968.0004855b7d8eefa5f649b


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: CPU pegged in AudioTrack triggers reboot

2010-04-27 Thread Jonas Petersson

ani wrote:

"obtainBuffer timed out (is the CPU pegged?)"
This happens because the audioflinger thread has not read the data
from the driver and did not signal the lock causing this logs to come.
This happens because your driver is having some bug not because of
android framework.


Well, the app isn't mine (wish it was, though), I'm just a (mostly) 
happy user/player - I've cc:d Nikolay.


The audioflinger thread trace may just be a symptom, but the fact still 
stands that on my 2.0.1 Milestone this happens at least once a week 
while playing Bebbled and IMHO, the Android framework should try very 
hard not to let an app cause a reboot, don't you agree? I would have 
expected an ANR dialog, but it just about never occurs (think I've seen 
it twice so far, during the short "slow" phase rather than the "hang" 
situation).


Note: I run vanilla 2.0.1, no root or anything or I wouldn't have 
mentioned this at all.


I know 2.1 is on its way out for Milestone, so with a bit of luck this 
will not happen after the upgrade.


Best / Jonas

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


[android-developers] CPU pegged in AudioTrack triggers reboot

2010-04-27 Thread Jonas Petersson

Dear experts - including Nikolay,

Last week Chander Pechetty mentioned bug 6478 in a different thread and 
as it seemed to cause the same issues I experience now and then, I've 
tried to capture the logs and today I succeeded.


The symptoms are that while playing Bebbled the phone somtimes slows 
down drastically, in the end goes unresponsive and may even reboot. The 
logs are at the time littered with "obtainBuffer timed out (is the CPU 
pegged?)" messages from AudioTrack.


Maybe Bebbled is misbehaving in some way, but it would be much 
preferable that the system could just kill it rather than reboot.


I've attached my log file to the existing bug in the hope that someone 
with more insight can figure out the root cause and better way of 
handling it.


Details here:
http://code.google.com/p/android/issues/detail?id=6478

Best / Jonas

Chander Pechetty wrote:

Interesting, I had filed an issue earlier with my G1 crashing
occasionally when playing bebbled; wonder if they are related ( to
cosmic rays :-)

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


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Random complete loss of database on Droid only

2010-04-21 Thread Jonas Petersson

(long)time(!C);  // ;-)

EboMike wrote:
> Several Droid users have reported that my app's entire database just
> destroys itself randomly after a few days or so. This seems to be
> specific to the Droid. I'm at a loss.

I have no real clue to offer, but I can say that my Milestone (which is 
pretty much the same as a Droid) has had no problems what so ever with 
your app. The initial 2.0 had plenty of other issues of which most were 
fixed in 2.0.1. Mine is UK registered so I've not got my 2.1 yet (should 
be any day now since I can see FR and ES users already have it).


My main remaining issue with the Milestone is that it will occasionally 
hang or reboot, typically either while playing Bebbled or just after 
I've used the debugger and unplugged (while the debugger was still 
active). I guess such a crash COULD break your database if it is being 
written to at the time.


Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Some users are not finding our app in Android Market

2010-04-07 Thread Jonas Petersson

Hi,

roundhill wrote:

Some users are reporting that they can't find our app (WordPress for
Android) in Android Market.  We have it enabled for all devices and
locations with copy protection turned off.  One user reported that he
is from Sweden (see comments at 
http://android.wordpress.org/2010/04/05/add-shared-text-and-images/).


Well, I'm in Sweden and I can see it just fine on my Milestone so it 
isn't a country issue. However, I've heard from some of my users of 
recent phones that they fail to see a fair number of apps - a Bravo user 
for instance couldn't see the 4 top programs in the Shopping category, 
including Barcode Scanner that my app helpfully tried to list for him to 
download. Surprising to say the least.


His screen shot didn't even have the top "feature" top item in the list 
- possibly because it refers to Barcode Scanner & CO. (Obviously, being 
in Sweden means that we can only access free apps.)


Best / Jonas

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

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


Re: [android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-27 Thread Jonas Petersson

Hi Tao,

Tao wrote:

Droid, Bloomington, IN.
[...]
If I plugin the usb cable and boot the phone without battery, it works
perfectly.
If I put the battery back in and the usb cable, the phone starts for
about 2 minutes(I can see the droid
logo and locking screen) and then reboot automatically.

Any droid users around know what's happening here?


No droid, but I have the EU equivalent Milestone. It had some USB issues 
under 2.0, but most of them were cured with 2.0.1 - which one did your 
Droid come with? The remaining issues I experience are:


1) Occasionally (say after about a week of use) the it will fail to 
recognize the USB cabel, and hence no charge indicator etc. Reboot 
helps. I *THINK* this only ever happens after I've been debugging and 
unplugged the cable while still having the debugger connected. Possibly 
a bad habit, but I never had a problem doing that on the G1.


2) It also seems that my extended USB cable will often glitch (the sound 
indication makes it very obvious) - since it isn't the original I guess 
I can't complain, but again I never had this problem with any of the 
cables I used with the G1.


Best / Jonas

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

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


Re: [android-developers] Re: Application Crashing OutOfMemory .Restructuring Help Needed

2010-03-23 Thread Jonas Petersson

Yahel wrote:

Hey Jonathan,


Um, "Jonas" is what I typically trigger to.


Your app seems successful and to work the way you want so I wouldn't
dare tell I can do best :D


My pleasure. The 4.6x average rating seems to have earned me a Nexus, so 
I guess it is doing OK.



If your users can try to call for 30 000 entries and generate a OOM
then you are not doing your job.
And since I'm mean and everything I'm going to the market right now to
download your app and asks for the 30 000 items and then post a "your
app sucks"/One star rating :D
I'm just kidding I wouldn't do that :D


It would take you a while. My testing indicates that I can get to about 
600 in a minute (fetching 20 items each time the user reaches the end of 
the list). I seriously doubt anyone can be bothered to spend enough time 
scrolling to reach the end of the 3+ list or OOM (whichever comes 
first). That would take you about an hour unless you are significantly 
quicker than I am. Note that I will catch the crash dump automatically 
so I WILL know if actually did it! ;-) Hence, I know that it has not 
happened yet (but the map has run out of memory a few times - AFAIK, 
there is nothing I can do about that).



No need for Flurry&CO - it is trivial to see in the web service log.


And so what is the result ? How many of your users scroll down the 500
item mark ?


Excluding myself? ;-) Exceedingly few. As the list is sorted in rank 
order by default most users find what they are looking for even in the 
very first batch. (Statistics guys would probably claim that this will 
skew the statistics so that the top ranked become even higher ranked, 
but I can't say I'm particlularly bothered about that.)



What is your app by the way ?


The app is Prisjakt: http://www.appbrain.com/app/se.petersson.prisjakt

There is a demo of it running on the X10 (created by Sony Ericsson 
themselves actually): http://www.youtube.com/watch?v=e9l7eXhcnvM


However, please note that the application data is only for products sold 
in Sweden, so therefore the actual interface is only in Swedish - the 
applications isn't very useful elsewhere.


Best / Jonas

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

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


  1   2   >