[android-developers] Re: Developer fee payment canceled after 2.5 years

2013-01-16 Thread MarcoAndroid

And also fixed for me!  Got the feeling that the Play support requests just 
don't arrive (again didn't get an email as it said I should receive for 
further instructions). 
After using the second link from David within a day I got  a reply from the 
Checkout support request saying they forwarded it to the appropriate team. 
The next day I had a mail from Play support saying my order from 2009 was 
not charged and recently cancelled. And it also said my account currently 
seems to be active. And if I still got problems accessing it I should 
contact them.
Logged in right after that and indeed the red message on top (THE PAYMENT 
FOR THE REGISTRATION FEE HAS FAILED.) is gone and I can update my apps 
again! Everything seems functional again.

Guess that somebody fixed something, but also here no more info than what 
was in the email replay... 

Thanks support for fixing this and David for suggesting the second link!




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Developer fee payment canceled after 2.5 years

2013-01-12 Thread MarcoAndroid
Hey that's fast, so you got an answer before I did, while I sent it 
wednesday, that's before you did right? Hmmm

Which support page did you use to send the ticket?

And yes I'm also worried if I just pay that maybe my apps will be gone 
 Though it sounds from your experience that it is going to be fine..



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Developer fee payment canceled after 2.5 years

2013-01-12 Thread MarcoAndroid
Ahh you might  be on to something here!  Because I also did sent a report 
using the same link as your first link.
And indeed I got this message on the page too saying you need to check your 
email.   I closed it and checked my email but nothing. Thought: well maybe 
it said you'll get an answer via email instead of check your email for 
further steps.   So decided to wait for a reply

So it might be you got a reply on your third request though you said 
also the reply was from the Google Play team. So it could be from one 
of your first 2 requests.. well I'll try a 2nd one too and also using 
your 2nd link.

Thanks for sharing!






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

[android-developers] Re: Developer fee payment canceled after 2.5 years

2013-01-11 Thread MarcoAndroid
Hi David,

Same problem here since wednesday!
I signed up even in 2009, so even longer ago. I also checked the status 
of my checkout order of 2009 and there it says it the order was canceld 
with as reason: You did not accept the terms of service

So my reason is different than yours.

I doubt that in 2009 I was able to pass the registration without accepting 
the terms of service!  But indeed it seems to be cancelled in 2009 Did 
not check my bank statements yet.

Today I logged in again and check the status of this order from 2009 for 
this actual post, and now it suddenly asked me to accept Terms of 
Service... Definitely this was not there last wednesday. Stange

I also sent a support ticket, but nothing  heard yet... 

Regards,
Marco

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

[android-developers] Re: Write Hello World run - great. Change string and can't see result

2012-01-09 Thread MarcoAndroid
Quite often it happens that Eclipse doesn't see a change you made in
strings.xml. It doesn't regenerate the appropriate stuff, so you still
see your previous string value.
If that happens, just do a Project -- Clean for your project, that
should fix it.

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


[android-developers] Re: Memory Usage and Garbage Collection issues on 1.6 and 2.1

2011-09-13 Thread MarcoAndroid
To better understand/how to analyse memory usage, you probably want to
check:
http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html
http://ttlnews.blogspot.com/2010/01/attacking-memory-problems-on-android.html
http://stackoverflow.com/questions/2298208/how-to-discover-memory-usage-of-my-application-in-android/


On 9 sep, 06:43, hooked82 djdav...@gmail.com wrote:
 I'm checking my app for Memory Leaks/Usage and came across something
 weird that I've only seen so far in Android 1.6 and 2.1. After
 clicking around in the app a bit and I run adb shell dumpsys meminfo
 for my application, I see the following:

 DUMP OF SERVICE meminfo:
 Applications Memory Usage (kB):
 Uptime: 34639912 Realtime: 153524709

 ** MEMINFO in pid 5778 [com.app.myapp] **
                         native    dalvik     other   total
             size:    14336     4679      N/A    19015
        allocated:  13971     4139      N/A    18110
             free:        280       540      N/A       820
            (Pss):     2986     4181    13491    20658
   (shared dirty):    972     3948      620       5540
     (priv dirty):     2876     3224    10976    17076

  Objects
                  Views:      545          ViewRoots:        4
        AppContexts:       32             Activities:       31
                 Assets:        2    AssetManagers:        2
        Local Binders:       43     Proxy Binders:       79
   Death Recipients:        2
 OpenSSL Sockets:        1

  SQL
                 heap:       91               dbFiles:        0
        numPagers:        4   inactivePageKB:        0
     activePageKB:        0

  Asset Allocations
     zip:/data/app/com.app.myapp.apk:/resources.arsc: 119K

 The memory dump was after clicking around in the app, going from
 Activity to Activity and that is all.  This isn't reproduce-able in
 2.2+ and it seems that I'm either missing something simple, or there's
 something about pre 2.2 versions of Android that I'm just not aware
 of.  What could be the cause of this?

 The app will eventually crash with an OutOfMemoryError once the
 objects pile up.  Thanks!

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


[android-developers] Re: Bluetooth signalling between phones?

2011-09-08 Thread MarcoAndroid
Well you can *detect* without near each other. But if you're trying to
connect, then you have to pair and the user has to agree.
Would be a security risk I guess, if you were able to connect to
devices w/o people knowing/acknowledging.

On 7 sep, 23:27, Droid rod...@gmail.com wrote:
 I want to make a bluetooth app that detects the same app in another
 phone when near eachother.
 Is this possible without pre-pairing the phones?

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


[android-developers] Re: Black screen after switching to another app

2011-09-07 Thread MarcoAndroid
Are you sure you know which code gets executed? I'd add breakpoints/
logging statements to see what's happening... At least a logstatement
on all onStart(), onResume() onXYZ() methods entry points. Maybe then
you get a better idea on what's going on.

On 6 sep, 18:58, MobileVisuals eyv...@astralvisuals.com wrote:
 Thanks, I added this code to the app, but the problem remains. I don't
 know if I should use suspend and resume on the GUI thread, because the
 documentation says that it could cause deadlocks.Do you know if there
 is some more that I can do to solve this issue?

 protected void onPause() {

                 super.onPause();

                 if (!menu2d)
                         glSurfaceView.onPause();
                 else
                         mLunarView.getThread().suspend();

         }
 protected void onResume() {
                 super.onResume();
                 if (!menu2d)
                         glSurfaceView.onResume();
                 else
                         mLunarView.getThread().resume();

         }

 On Sep 6, 2:43 pm, Daniel Drozdzewski daniel.drozdzew...@gmail.com
 wrote:







  On 6 September 2011 13:32, MobileVisuals eyv...@astralvisuals.com wrote:

   My app has a SurfaceView and a GLSurfaceView.  I can switch back and
   forth between these. The SurfaceView is the application GUI.

   I test switching to another app. I can then switch back to the
   GLSurfaceView in my app. I then try to switch back to the
   GLSurfaceView,where the application GUI is. Here is where the problem
   occurs. A black screen is shown instead of the GUI.

   The app still works, because the application menu is shown when the
   menu button is pressed. But nothing is drawn on the screen, it is only
   black. I have tried almost everything to fix this, I have checked that
   the thread is running and that no instance of any object (like the
   SurfaceHolder) is null. What could be the reason for this black screen?

  Do you call GLSurfaceView.resume() from Activity.resume() ?

  By the same token you should be calling GLSurfaceView.pause() in the
  right moment of your activity lifecycle.

  HTH

  --
  Daniel Drozdzewski

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


[android-developers] Re: Ratings on market are gone

2011-08-01 Thread MarcoAndroid
Should be fixed it seems.

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


[android-developers] Re: Music - Youtube application

2011-07-08 Thread MarcoAndroid
Did you read this? 
http://android-developers.blogspot.com/2010/06/allowing-applications-to-play-nicer.html

Also probably useful is presentation
http://www.google.com/events/io/2011/sessions/android-protips-advanced-topics-for-expert-android-app-developers.html
Look around 43:20, it's about playback buttons etc.

HTH.


On 6 jul, 13:42, Shrinivas Sahukar shrinivas.sahu...@gmail.com
wrote:
 Hi all,

 consider this scenario--

 start music app -- music is playing -- home button pressed -- music
 playing in background,
 Now while playing music in background
 start youtube app, start a video

 here audio from music app as well as youtube video both are playing
 simultaneously.

 should I have do changes in youtube app or this is something dealt with the
 multimedia frameworks/audio flinger ??

 Please guide me in this.

 Regards,
 Shrini

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


[android-developers] Re: Recommendations on Screenshot formats?

2011-06-28 Thread MarcoAndroid
Yeah I used to do this too, using DDMS, no problems with weird
cropping.
With my recent new app I uploaded Galaxy S2 screenshots 480x800,
showing the cropping problem.
Maybe that's the difference: DDMS vs real phone...

On 28 jun, 01:14, rich friedel rich.frie...@gmail.com wrote:
 I just take screenshots from my device using DDMS, save them and upload them
 without editing. It saves them as png files. Quality isn't the absolute best
 but it works well enough for me.

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


[android-developers] Re: Screenshots that are uploaded to the marketplace are cropped.

2011-06-28 Thread MarcoAndroid
In case you haven't seen this thread yet:
http://groups.google.com/group/android-developers/browse_thread/thread/9fa04470b4b61beb/ff1d27cd8e77d0be

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


[android-developers] Re: Recommendations on Screenshot formats?

2011-06-28 Thread MarcoAndroid
Yup it's now a day later, images are looking fine now on my N1 in the
market. So 320x480 seems the way to go.

On 27 jun, 21:12, MarcoAndroid marco...@gmail.com wrote:
 Actually, just noticed that my screenshots of uploaded 480x800 format
 look in my phone'smarketexactly the same as the previews in the dev
 console, cropped with left say 20pixels cut off. Seems you can use
 that as a real indication on how they will look like...

 BTW just uploaded a 320x480 and indeed in the preview it now is fully
 shown, no cropping. Let's see what themarketshows now on my phone
 (N1). Nothing yet, waiting for the update of the images to appear...

 On 27 jun, 20:33, MarcoAndroid marco...@gmail.com wrote:







  Reading this 
  onehttp://groups.google.com/group/android-developers/browse_thread/threa...
  it seems 320x480 is the size to go for, forget the others...

  On 21 jun, 17:07, Santiago Lema jacques.l...@gmail.com wrote:

   Hello,

    I just published my first Android port (from my iOS app) and I am
   really puzzled as to how I should handle screenshots?

   Letting aside that the jpeg quality is awful and the inability to
   provide localized screenshots, I'll ask just one simple question.

   - What is the recommended size to upload screenshots so they look nice
   on all devices?

   I uploaded 800x480 PNG 24 bits screenshots, hoping a higher quality
   source would yield decent results but I was sorely disappointed. Not
   only the jpeg quality setting is awful but the androidmarketseems 
   tocropmy screenshots to a 1.5 ratio (like 320x480) at what seems to be
   random positions?

   If I upload screenshots in several formats will themarketuse the
   appropriate ones for each phone ? Or will it scale each one miserably
   just like it does for the ones I uploaded and display them in their
   full ugliness on all devices ?

   PS: If anyone cares, I have just written a long rant about issues when
   publishing to the AndroidMarketissues which details thescreenshot
   issues too:http://www.smallte.ch/blog-read_en_15001.html

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


[android-developers] Re: Recommendations on Screenshot formats?

2011-06-27 Thread MarcoAndroid
Reading this one 
http://groups.google.com/group/android-developers/browse_thread/thread/abdf0b36427cccd0/f96ec5adddfa88da
it seems 320x480 is the size to go for, forget the others...

On 21 jun, 17:07, Santiago Lema jacques.l...@gmail.com wrote:
 Hello,

  I just published my first Android port (from my iOS app) and I am
 really puzzled as to how I should handle screenshots?

 Letting aside that the jpeg quality is awful and the inability to
 provide localized screenshots, I'll ask just one simple question.

 - What is the recommended size to upload screenshots so they look nice
 on all devices?

 I uploaded 800x480 PNG 24 bits screenshots, hoping a higher quality
 source would yield decent results but I was sorely disappointed. Not
 only the jpeg quality setting is awful but the androidmarketseems tocropmy 
 screenshots to a 1.5 ratio (like 320x480) at what seems to be
 random positions?

 If I upload screenshots in several formats will themarketuse the
 appropriate ones for each phone ? Or will it scale each one miserably
 just like it does for the ones I uploaded and display them in their
 full ugliness on all devices ?

 PS: If anyone cares, I have just written a long rant about issues when
 publishing to the AndroidMarketissues which details the screenshot
 issues too:http://www.smallte.ch/blog-read_en_15001.html

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


[android-developers] Re: Recommendations on Screenshot formats?

2011-06-27 Thread MarcoAndroid
Actually, just noticed that my screenshots of uploaded 480x800 format
look in my phone's market exactly the same as the previews in the dev
console, cropped with left say 20pixels cut off. Seems you can use
that as a real indication on how they will look like...

BTW just uploaded a 320x480 and indeed in the preview it now is fully
shown, no cropping. Let's see what the market shows now on my phone
(N1). Nothing yet, waiting for the update of the images to appear...


On 27 jun, 20:33, MarcoAndroid marco...@gmail.com wrote:
 Reading this 
 onehttp://groups.google.com/group/android-developers/browse_thread/threa...
 it seems 320x480 is the size to go for, forget the others...

 On 21 jun, 17:07, Santiago Lema jacques.l...@gmail.com wrote:







  Hello,

   I just published my first Android port (from my iOS app) and I am
  really puzzled as to how I should handle screenshots?

  Letting aside that the jpeg quality is awful and the inability to
  provide localized screenshots, I'll ask just one simple question.

  - What is the recommended size to upload screenshots so they look nice
  on all devices?

  I uploaded 800x480 PNG 24 bits screenshots, hoping a higher quality
  source would yield decent results but I was sorely disappointed. Not
  only the jpeg quality setting is awful but the androidmarketseems tocropmy 
  screenshots to a 1.5 ratio (like 320x480) at what seems to be
  random positions?

  If I upload screenshots in several formats will themarketuse the
  appropriate ones for each phone ? Or will it scale each one miserably
  just like it does for the ones I uploaded and display them in their
  full ugliness on all devices ?

  PS: If anyone cares, I have just written a long rant about issues when
  publishing to the AndroidMarketissues which details the screenshot
  issues too:http://www.smallte.ch/blog-read_en_15001.html

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


[android-developers] Re: Connect via Bluetooth without Permission

2011-06-23 Thread MarcoAndroid
I think the user always will have to first accept the Pairing. After
that, you can connect send w/o user interference, even the next time
you connect an earlier paired device.

On 21 jun, 03:12, Shaurin shauringh...@gmail.com wrote:
 I have to connect two devices via Bluetooth in such a way that the
 sending device sends a string (for example,'Hello world') to the
 device found in Device Discovery. It should be noted that this should
 not ask for the second device to accept the connection request. The
 string should automatically be sent to the found device.

 Please help me in this.

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


[android-developers] Re: Application not found in android market

2011-06-23 Thread MarcoAndroid
IIRC, in the developer console, when you view the details of your app,
at the bottom you can see how many and which devices your app is
compatible for. Dunno how complete and up-to-date that list is, but
you could use that to see if your settings are as expected.


On 22 jun, 13:13, Sudeep Jha sudeep.neti...@gmail.com wrote:
 Hi All,

 I have one application in android market.
 You can search it on android market in devices like Samsung galaxy S ,
 Samsung-Google Nexus S but cannot search the same on Sony Ericsson xperia
 ,HTC Wildfire and Samsung galaxy  Fit.

 Android OS version doesn't seem to be a problem.

 The only issue that I can see is different screen sizes support.

 Why the application is not searchable on Android Market on few devices but
 on others ?

 Quick Help is needed from you guys.

 Thanks and Regards,
 Sudeep

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


[android-developers] Re: Two issues saving heap dumps...

2011-05-25 Thread MarcoAndroid
Strange that you get the heapdump opened in a textfile when you
generate it from Eclipse. Did you actually install the MAT plugin?
It's not in the standard Android SDK-with-Eclipse setup.

Note that the hprof file always appears in the same dir, just with a
different timestamp. So you can get it like this:

adb pull /data/misc/heap-dump-tm1264948174-pid210.hprof
myheapdump.hprof

The exact file name you can find in the logcat output, search for
something like:
hprof: dumping heap strings to /data/misc/heap-dump-tm1264948174-
pid210.hprof.

HTH.


On 24 mei, 22:10, Rich aguynamedr...@gmail.com wrote:
 I was watching the Google I/O video on Memory Management, and the presenter
 said that if you open a heap dump in MAT that you obtained from DDMS you
 have to convert it with the hprof tool with a -conv flag. He invoked this at
 the command line, so I attempted to do the same.  I am on Windows, and I get
 an error that the command does not exist.  Is this command not part of the
 Android, Eclipse or MAT tools?  Since there was no mention of any additional
 install required, I expected to find this in the eclipse or mat directories
 as a .bat file or something to that effect.

 I know that I can generate it from within Eclipse, but then I have to go
 hunting through my AppData for the temp file generated.  When I generate the
 heap dump in Eclipse, the dump is saved to a temp file which is opened as
 plain text in the editor.  I'm unable to save this because I get an error
 that some characters cannot be mapped using Cp1252 char encoding.  I
 read that the way to set another default encoding (UTF-8, for example) that
 would allow me to save it is to go to File - Properties.  The problem is
 that when I attempt to do that, I get another error dialog saying that there
 are no property pages for .hprof.

 I am able to navigate into my temp directory and pull out the hprof file and
 open in MAT, but that's a bit of a pain.  Anyone have any recommendations on
 either or both issues?

 Thanks!
 Rich

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


[android-developers] Re: icons: getting conflicting information

2011-05-23 Thread MarcoAndroid
Here's the most recent official platform versions distribution:
http://developer.android.com/resources/dashboard/platform-versions.html
1.5 + 1.6 = 5.3% so not that much anymore these days. If your app is
quite basic (not using any fancy 1.6+ SDK functionality), you might as
well still support 1.5 and higher, because it should not cost you much
in time  effort (that is: build for 1.5, Android takes care of
scaling etc).
As the first replier says, you can suffice with only images in the
'drawable' dir in that case, Android will scale for you. But you
images might get blurry at a certain point device size. In that case
you indeed can put higher resolution images in the HDPI folder. Of
course you know about this page that explains a lot:
http://developer.android.com/guide/practices/screens_support.html

Re: the icons: I guess you can find them in the Android source code.
And yes it is still recommended practice to get a copy of them into
your app, in case they might get removed in some new Android version.

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


[android-developers] Re: Devs with paid apps -- check your enabled countries

2011-05-20 Thread MarcoAndroid
Thanks for the tip! Had indeed some of the new countries with no
amount filled in, so probably those countries didn't see my app.

On 19 mei, 08:49, Zsolt Vasvari zvasv...@gmail.com wrote:
 The Android Market team moved some countries from the first list to
 the overflow list.  But, since there appears to be no actual testing
 done by them, when the countries were moved they now appear as not
 being available to see your app.

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


[android-developers] Re: Is it possible to print available Intents installed on phone?

2011-05-19 Thread MarcoAndroid
Not programmatically but you can look here for published intents for
apps: http://www.openintents.org/en/intentstable
Maybe the app you refer to is in the list. Else, you could maybe ask
the app builder to add their Intents to that site?


On 19 mei, 01:56, Eric e...@alum.mit.edu wrote:
 I installed an app today that I would like to call out to from my app,
 if it turns out the app I installed has a public intent published.  Is
 there a way for me to determine this information, either
 programmatically or through a facility on the system?   I fooled
 around a bit with PackageManager, but it only seems to report on
 system-level intents, not installed applications.

 In general, I think it would be useful to know all of the public
 Intents installed on a phone, and the data-structure those Intents
 expect.  I see there's an 'openintents' website, but I'm wondering if
 it's possible to check a given phone for available intents?

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


[android-developers] Re: When exactly do you need to handle DeadObjectException with services?

2011-05-02 Thread MarcoAndroid
Ah, just assumed those exceptions were unchecked, didn't even check
for that :)

The fact I didn't come across them then is because I'm not creating
(nor needing) my own AIDL because I'm using a 'same-process' service.

Thanks!

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


[android-developers] When exactly do you need to handle DeadObjectException with services?

2011-04-30 Thread MarcoAndroid
Hi there,

In the Additional Notes section here:
http://www.devdiv.com/android/docs/guide/topics/fundamentals/bound-services.html#Binding
it says: You should always trap DeadObjectException exceptions, which
are thrown when the connection has broken. This is the only exception
thrown by remote methods.

1) Does that mean that for all calls of the client to the service's
methods you need to try/catch the DeadObjectException? Even
getService() in onServiceConnected() can throw it?

2) If my service only uses a local binder (LocalBinder in the example
from the above link), so it is private to my own application and runs
in the same process as the client, can I then still get
DeadObjectException? I wonder because I see with this type of binding
that the service does *not* appear in the services overview of a
device or emulator, which makes sense to me because it is tightly
connected to the activity that bound to it. That to me means you (nor
the Android runtime) can end the service on its own, so never a chance
on DeadObjectException... True?

Thanks!
Marco


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


[android-developers] Re: Eclipse/ADT not rebuilding correctly

2011-04-15 Thread MarcoAndroid
My auto-refresh option under Preferences  General  Workspace 
Refresh automatically wasn't on, turned it on (though instructions
don't say you have to AFAICT). Didn't have any change-detection
problems for about a day. But today had a change-detection problem
again, this time had added new layout files, new Activity, changed
some existing classes. Just got a NullPointerException in the LogCat
on some line in an extended TextView, but none of the new layouts is
using that textview. Checked that in R.java the newly created layouts
do exist.
The first activity+view that the app uses at startup don't even use
that extended TextView!

The exact exception:
04-15 12:20:45.943: ERROR/AndroidRuntime(1018):
java.lang.NullPointerException
removed extended TextView stacktrace lines)
04-15 12:20:45.943: ERROR/AndroidRuntime(1018): at
android.view.View.measure(View.java:7964)
04-15 12:20:45.943: ERROR/AndroidRuntime(1018): at
android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3023)
04-15 12:20:45.943: ERROR/AndroidRuntime(1018): at
android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:
888)
04-15 12:20:45.943: ERROR/AndroidRuntime(1018): at
android.widget.LinearLayout.measureVertical(LinearLayout.java:350)
04-15 12:20:45.943: ERROR/AndroidRuntime(1018): at
android.widget.LinearLayout.onMeasure(LinearLayout.java:278)
04-15 12:20:45.943: ERROR/AndroidRuntime(1018): at
android.view.View.measure(View.java:7964)
04-15 12:20:45.943: ERROR/AndroidRuntime(1018): at
android.widget.ScrollView.measureChildWithMargins(ScrollView.java:893)
04-15 12:20:45.943: ERROR/AndroidRuntime(1018): at
android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
... more deleted

No errors in the Eclipse workspace log (in my_path/
workspace/.metadata/.log).

Did a refresh on the source tree, ran as Android app. Same exception
again; logical, the console says there was no need to reinstall. Then
did a Project  Clean  Clean selected projects below.

App runs starts fine now.

So something seems to be unable to keep track of certain XML changes
in certain cases... I can't consistently reproduce. Just tried to do
the same things again (new xml, activity that uses that one) but app
starts up fine.


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


[android-developers] Re: Backward compatibility when compiling.

2011-04-15 Thread MarcoAndroid
Since you want to use a new attribute that requires SDK level 8 or
higher, you will need to build against that SDK, older ones will give
a compile (invalid tag) error.

Then to make sure your app also still runs fine on 1.6 you need to
deploy it on a device with a level 4 SDK, or if not available, create
a 1.6 AVD and run it on that one.
The 1.6 runtime is just skipping the new attribute. I've read that
this is the behaviour recently for the xlargeScreens attribute, but
can't find it anymore :(

Should you be using Android Java API features that were introduced
after 1.6, then you need to make sure your code gracefully handles it
when those features are not present. See for a good explanation on how
to do this: 
http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html

HTH.

On 15 apr, 11:57, sblantipodi perini.dav...@dpsoftware.org wrote:
  Don't fix it until is broken.

 Ok, this is common but what is the real answer? :)
 I would like to add this attribute to my manifest:
 android:installLocation=preferExternal
 but this requires SDK Level 8 to build the source.

 Isn't safe to compile using Level 8 SDK only for this attribute and
 than
 run my apps on Level 4?

  Obfuscation is not SDK dependant.

 I mean that from SDK 2.3 proguard has been integrated into the into
 the SDK, this could be really useful for a
 netbeans user like me.

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


[android-developers] Re: Eclipse/ADT not rebuilding correctly

2011-04-13 Thread MarcoAndroid
I've seen this too recently since I started using android-sdk_r10-
windows on Windows XP 32b.
Started with a fresh install last week, brandnew laptop. I've got it
about 10 times a day.

- Eclipse (adt/sdk) sometimes doesn't detect a change in a layout XML
file. When the main activity is restarted I get a weird exception,
usually nullptr because some findViewById() returns null though that
view-component is exactly the same as before the change! I did add
some *other* view component in the xml though. I have to do a clean of
the project to get it fixed.
- Also had already one  time that the app showed completely incorrect
messages from myapp.R.string.*; it was just picking the wrong ids!
Again a project clean made it (eclipse/adt/sdk?) show the correct
string texts.

Basically it is not always correctly detecting changed files.

Note that this is not happening on my older Ganymede installed sdk r6
(up to 2.2) on XP 64b, never noticed it before.

PS: no problems with cleaning the project, gen is always generated
correctly again

On 13 apr, 09:39, Jake Basile jakerbas...@gmail.com wrote:
 I started noticing this problem about two weeks ago, but it's hard to nail

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


[android-developers] Re: Eclipse/ADT not rebuilding correctly

2011-04-13 Thread MarcoAndroid
Note that everything still works fine on the old installation using
Ganymede :)

The fresh new installation is using Eclipse Helios (3.6). Don't
remember from top of my head whether I picket Classic or Java or
JEE

Will try to remember to check the workspace log on the next time it
happens. Will check auto-refresh setting too. Should it be on?


On 13 apr, 22:09, Xavier Ducrohet x...@android.com wrote:
 You mention Ganymede which is Eclipse 3.4 which is not supported
 anymore. you need to move to 3.5+
 It could impact the build, can you look at the workspace log to see if
 a strange exception happened?

 Also, is your workspace on auto-refresh?









 On Wed, Apr 13, 2011 at 12:44 PM, MarcoAndroid marco...@gmail.com wrote:
  I've seen this too recently since I started using android-sdk_r10-
  windows on Windows XP 32b.
  Started with a fresh install last week, brandnew laptop. I've got it
  about 10 times a day.

  - Eclipse (adt/sdk) sometimes doesn't detect a change in a layout XML
  file. When the main activity is restarted I get a weird exception,
  usually nullptr because some findViewById() returns null though that
  view-component is exactly the same as before the change! I did add
  some *other* view component in the xml though. I have to do a clean of
  the project to get it fixed.
  - Also had already one  time that the app showed completely incorrect
  messages from myapp.R.string.*; it was just picking the wrong ids!
  Again a project clean made it (eclipse/adt/sdk?) show the correct
  string texts.

  Basically it is not always correctly detecting changed files.

  Note that this is not happening on my older Ganymede installed sdk r6
  (up to 2.2) on XP 64b, never noticed it before.

  PS: no problems with cleaning the project, gen is always generated
  correctly again

  On 13 apr, 09:39, Jake Basile jakerbas...@gmail.com wrote:
  I started noticing this problem about two weeks ago, but it's hard to nail

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


[android-developers] How to configure Manifest and Eclipse for lowest minSdkVersion possible

2011-04-10 Thread MarcoAndroid
Hello there,

Searched this forum, read of course 
http://developer.android.com/guide/practices/screens_support.html
but couldn't figure out how to do the following:

I've got an app which runs on 1.6 and higher:

uses-sdk
  android:minSdkVersion=4
  android:targetSdkVersion=7
/

I'd like this app to be visible to all possible screen sizes from
normal and larger.
So I've set supports-screens to:

supports-screens
  android:smallScreens=false
  android:normalScreens=true
  android:largeScreens=true
  android:anyDensity=false
/

So I'd want to add: android:xlargeScreens=true for extra large
screens.
But reading the screens_support.html it says that this is only
available since 2.3, so can't add it, and indeed Eclipse XML verifier
complains, and its default value will thus be false because in uses-
sdk I don't have 9 or higher.
My conclusion: my app won't show up in the Market for any devices with
an xlarge screen. Or will it show up for those, but will the app show
on those in postage stamp format (black borders)?

Is there a way to configure such that my 1.6 app is seen in the Market
by xlarge devices and thus runs fullscreen on an xlarge screen?
And what should I set my Eclipse project build target to? Only if I
set it to 9 (2.3) the compile error goes away. But then I might
accidentally use new features that were introduced after 1.6 and I
don't want that. Or does Android handle the XML backwards incompatible
xlargeScreens tag for me?
Is the only solution for this to set it to 9, and regularly change it
back to 4 to see if I haven't used any features from above 1.6?

Regards,
Marco

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


[android-developers] Re: How to configure Manifest and Eclipse for lowest minSdkVersion possible

2011-04-10 Thread MarcoAndroid
Yeah know about the reflection solutions.
But can't find anywhere a clear explanation on what happens with XML
tags you use that are available in newer SDK versions (as set in your
targetSDKVersion), but not in your minSdkVersion... Are they just
skipped by the older versions?

On 10 apr, 13:23, lbendlin l...@bendlin.us wrote:
 The best solution is to set it to 9 and then test your app on a 1.6 device
 (or a 1.6 emulator if you must). You can also use reflection for any new
 features that would throw 1.6 into a wobbly.

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


[android-developers] Re: When to set android:anyDensity to what value?

2011-04-10 Thread MarcoAndroid
So I should set it to true even when my app doesn't include resources
to accommodate any screen density (suppose I'm lazy so I don't create
any size- or density specific resources)?

I'm wondering this because taken from:
http://developer.android.com/guide/topics/manifest/supports-screens-element.html
it says that if you set anyDensity to true it means the application
includes resources to accommodate any screen density.

But I'm not including any of these explicitly,  so what happens then
scaling wise when anyDensity=true?



On 5 apr, 23:09, Dianne Hackborn hack...@android.com wrote:
 Always set it to true...  or better, just make android:targetSdkVersion =
 4.  Having it false is only for compatibility with old apps that were
 written before there was a concept of density in the APIs.  Using this
 compatibility mode can cause some undesirable artifacts such as text metrics
 being slightly inconsistent with actual rendering.









 On Tue, Apr 5, 2011 at 1:42 PM, MarcoAndroid marco...@gmail.com wrote:
  Hello there,

  I've read
 http://developer.android.com/guide/practices/screens_support.html
  and

 http://groups.google.com/group/android-developers/browse_thread/threa...
  and

 http://groups.google.com/group/android-developers/browse_frm/thread/5...
  and more related sources.

  Still, what and when to set android:anyDensity to I find hard to
  figure out.

  So, are these conclusions correct:

  1- android:anyDensity has been introduced really only for older apps
  (1.6 level 4 or lower) because those were most likely built with
  hardcoded density-dependent values like 'px'? And apps with level
  before 4 even don't understand density dependent resource directories
  like res/drawable-hdpi?
  By setting android:anyDensity=false, Android tries to scale those
  resources that use px values and in 'res/drawable' to match the
  device's real screen density.
  From level 5 onwards it is a well-known best-practice to always use dp
  and sp and density dependend resource directories, so usually apps
  take care themselves of being independent using those. And thus
  normally for those apps android:anyDensity=true is sufficient (no
  auto-density-scaling).

  2- If android:anyDensity=false are these density dependend resource
  directories plainly ignored as mentioned in this thread?

 http://groups.google.com/group/android-developers/browse_frm/thread/5...
  But: how does the android:anyDensity=true or false relate to
  resources that you might have put in res/drawable-mdpi and res/
  drawable-hdpi etc? Does that setting then only have effect for those
  density resources you didn't specify in any configuration specific
  density-directory, and how?

  3- And what if I'm lazy and for any app I make I don't want to create
  density specific resources (like images), so only have the 'res/
  drawable' dir, but do use dp and sp everywhere... What should
  android:anyDensity be set to then? My guess is false so Android will
  alwyas scale my resources from 'drawable'...

  Regards,
  Marco

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


[android-developers] Re: When to set android:anyDensity to what value?

2011-04-10 Thread MarcoAndroid

In short: am I always safe with anyDensity=true as long as I use dp
and sp as I read in Table 2 here: 
http://developer.android.com/guide/practices/screens_support.html:
'That is, as long as your application uses density-independent units
(dp) for screen layout sizes, then it will perform properly on
different densities when this attribute is set to true'?
Even for a 1.5 app?

Or are there more rules like *having* to provide resources to
accomodate any screen density (as it says here:
http://developer.android.com/guide/topics/manifest/supports-screens-element.html:
setting anyDensity to true means the application includes resources
to accommodate any screen density?)

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

2011-04-05 Thread MarcoAndroid
Hello there,

I've read http://developer.android.com/guide/practices/screens_support.html
and
http://groups.google.com/group/android-developers/browse_thread/thread/ed305e5d08f11202/6b8feb7a05d9ef6b
and
http://groups.google.com/group/android-developers/browse_frm/thread/518ee3894af29650
and more related sources.

Still, what and when to set android:anyDensity to I find hard to
figure out.

So, are these conclusions correct:

1- android:anyDensity has been introduced really only for older apps
(1.6 level 4 or lower) because those were most likely built with
hardcoded density-dependent values like 'px'? And apps with level
before 4 even don't understand density dependent resource directories
like res/drawable-hdpi?
By setting android:anyDensity=false, Android tries to scale those
resources that use px values and in 'res/drawable' to match the
device's real screen density.
From level 5 onwards it is a well-known best-practice to always use dp
and sp and density dependend resource directories, so usually apps
take care themselves of being independent using those. And thus
normally for those apps android:anyDensity=true is sufficient (no
auto-density-scaling).

2- If android:anyDensity=false are these density dependend resource
directories plainly ignored as mentioned in this thread?
http://groups.google.com/group/android-developers/browse_frm/thread/518ee3894af29650
But: how does the android:anyDensity=true or false relate to
resources that you might have put in res/drawable-mdpi and res/
drawable-hdpi etc? Does that setting then only have effect for those
density resources you didn't specify in any configuration specific
density-directory, and how?

3- And what if I'm lazy and for any app I make I don't want to create
density specific resources (like images), so only have the 'res/
drawable' dir, but do use dp and sp everywhere... What should
android:anyDensity be set to then? My guess is false so Android will
alwyas scale my resources from 'drawable'...

Regards,
Marco

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


[android-developers] Re: Min SDK problem

2011-02-08 Thread MarcoAndroid
Assuming you're a 100% sure that those people did download from the
official market (and not one of the others out there), you might want
to check if you put the minSDK XML tag at the correct spot. Read
somewhere in this group that somebody put it in the wrong place in the
manifest... If that's true the validation apparently allows it but it
won't get recognized by the market.

On Feb 8, 6:59 am, alienmanfc6 alienman...@gmail.com wrote:
 It seams like since the last update of my app the market is letting
 people with a OS version less than what i set to try an download the
 update. I have the min SDK set to 4 for 1.6 but lots of people are
 emailing me with 1.5 saying they tryed to download and it failed. Any
 idea whats wrong. I double checked the min sdk set in the app and its
 right so i know what happened. Thanks for any info.

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


[android-developers] Re: LVL behavior on client side license validity check for free apps

2011-02-04 Thread MarcoAndroid
@rojorshi: here's the link you were looking for I think. Seems you
should be fine for free apps. Just search for the word 'free' in this
link: http://developer.android.com/guide/publishing/licensing.html
It looks like you won't be able to upload a free version with the LVL
permission in it... if your app is already available as free.

But it also says it returns LICENSED for free apps in table A-2. So
what situation would this be then?


On Feb 3, 6:01 am, rajorshi groups.rajor...@gmail.com wrote:
 I had developed a game intending to publish it as a paid application
 using the Android LVL with the default ServerManagedPolicy licensing
 policy. Now, the powers that be have decided that we have to publish
 it as a free app. For some reason I do not want to remove/disable the
 license checks. My question is: how does the licensing service handle
 free apps? Will checks always fail or always pass? Is there any way I
 can make the license service accept any installation of my free app as
 licensed?

 I found the following on free apps in the official documentation, but,
 it doesn't help me much.

 Only paid applications published through Market can use the service.
 [...] Licensing is currently for paid apps only, since free apps are
 considered licensed for all users.

 I would have assumed that checks will fail, but, I remember reading
 somewhere that for free apps the licensing server will return a very
 large validity timestamp (long.MAX) ensuring that the license is
 always valid for free apps. Unfortunately, I have lost the link to
 that source.

 Note:
 1. The problem is not as crazy as it sounds. It's just that I am not
 able to explain my use case further without giving away some
 proprietary information.
 2. I had posted the same question on StackOverflow but did not get any
 response. Hence, posting it here.

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


[android-developers] Re: How to Launch Tab activity by using Intent

2011-01-18 Thread MarcoAndroid
The IO Schedule app from google from last year might be a good place
to get you started. There they use activities to fill each tab.
http://code.google.com/p/iosched/


On Jan 18, 2:41 am, Anzi anji...@gmail.com wrote:
 Hi,
 My application is having Tab activity with activity One and Two
 with a background service.

 I want to launch my Tab activity with a respective tab, when ever i
 got a data from my service.

 For example, I got a event with some data, to display in Activity
 Two.

 If i send an intent to launch activity Two from my service, Activity
 Two is displaying as a foreground activity but with missing tabs.

 Can any one help me to show activity Two as a part of my Tab
 activity ?

 Regards,
 Anzi

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


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

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

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

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

 Anyone have any experience with this?

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


[android-developers] Re: app security

2010-12-31 Thread MarcoAndroid
Yes Houston we have got a problem :)

Strings are in general very easy to extract from binaries, even from C/
C++ programs via the strings *nix command for example. You don't
need to decompile anything!

What you could do is manually obfuscate your strings some more:
- split the key-string in multiple strings, concatenate only where you
need them (or at a totally unrelated place)
- store the key-string encoded in your code (e.g Base64), decode it
only when you need them (or at a totally unrelated place)

Of course not super-strong protection but might protect you from the
basic script-kiddie.

On Dec 30, 10:20 pm, jacek jacek.ambroz...@gmail.com wrote:
 Apps that integrate with various web services and APIs, such as
 Twitter,
 need to use service provisioned API keys and shared secrets
 which are Java Strings.

 Such Strings should be retrievable by anyone who decompiles an .apk
 (I must try this myself against my own apk)

 In the next step the malicious developer will be able to impersonate
 the decompiled app...

 Am I missing something, or do we have a problem?

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


[android-developers] Re: sqlite returned: error code = 1, msg = table customer has no column named totalpurchase

2010-11-16 Thread MarcoAndroid
The only way to be sure that the table and its colums are as you think
they should be is to connect to the sqlite database on your emulator/
device and check the schema that's there. So:

adb -s emulator_device_id shell
sqlite3 /data/data/your_package/databases/app_name.db
.schema tablename


On 16 nov, 09:38, Rahul Garg rahul.lnm...@gmail.com wrote:
 Hi guys,

 I am facing problem with my database while inserting values that it is
 showing that it has no column named totalpurchase. While I clearly
 declared it in my table and the other columns are not showing this
 problem. can you suggest what is wrong with this.

 --
 Rahul

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


[android-developers] Re: Using ServerManagedPolicy

2010-11-13 Thread MarcoAndroid
They are set by Google Market server. And they're not set when you
test with your developer account on the emulator.

On 28 okt, 04:42, John Gaby jg...@gabysoft.com wrote:
 I am reading the documentation for the ServerManagedPolicy of the
 AndroidMarketlicensingservice, and it refers to several Server
 Response Extras that are sent as part of the license response (e.g.
 the License validity timestamp, Grace period timestamp, etc).  Are
 these values settable be my on the server side, or are they set
 automatically by the GoogleMarket?

 Thanks.

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


[android-developers] Re: Android Market Licensing Service

2010-11-13 Thread MarcoAndroid
Here's some experiences/lessons learned, maybe useful:
http://ttlnews.blogspot.com/2010/11/my-experience-with-android-market.html

On 21 sep, 13:24, gcstang gcst...@gmail.com wrote:
 I figured, not a problem I just had to ask.

 Thank you anyways

 On Sep 20, 2:38 am, String sterling.ud...@googlemail.com wrote:







  On Sep 18, 6:46 pm, gcstang gcst...@gmail.com wrote:

   Are there any examples of how you implemented it that you're willing
   to share?

  Probably not, I'm afraid. Sorry.

  The LVL blog post may seem overwhelming to a beginner, but
  unfortunately, it's the level of detail you need.  And it does have
  code samples, including instructions on where in your own code to put
  the interface points.

  As for the modifications I made, I'm ABSOLUTELY not going to post more
  details about them. Not only would that give pirates a leg up on
  cracking my own apps, the whole point is that every dev needs to make
  their OWN modifications, so that every app will need to be cracked
  individually.

  String

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


[android-developers] Re: What are some good Automated Unit And System Test Tools for Android?

2010-11-03 Thread MarcoAndroid
This tool could be useful (integrates with Maven so should integrate
with Hudson): http://code.google.com/p/robotium/
I still have it on my list as to look into :)


On 3 nov, 07:20, Greg Giacovelli miyamo...@gmail.com wrote:
 So I give in. I approached this problem as an oh hey that's not too
 bad, I can write a bunch of unit tests, and I have been keeping my
 suite green. However as things get more involved continuous
 integration and testing is a great great thing to have. And then I saw
 oh Android has emma integration as well awesome ... and then that's
 where it get's iffy.

 So I setup Hudson and have it call the coverage target of the ant
 build.xml that the android executable in the sdk can generate. And
 then it hits me.

 adb -s emulator shell am instrument -w ...

 will never return a result code that is not 0 ... because adb
 technically exited cleanly and usually will regardless of how the
 shell command that executed did.

 So again I say, Oh that's not too bad, I can just wrap adb with a
 parser that parses output for errors and return a non 0 resultcode to
 fail my build if a test fails. Problem is then I also want to see what
 tests fail. I know eclipse is doing something smarter so I dig deeper
 and find the extra switches you can pass am instrument including the -
 r flag.

 adb -s emulator shell am instrument -r -w ...

 Now this is starting to get complicated as the output gets more
 complex and this originally thought simple task is getting more
 intense. As this SDK is maturing more I have to think, someone has
 endured this pain and made a kickass way to automate and report on
 these sdk tools and output. Like something complete with performance
 test tracking, code coverage reporting etc. These outputs all exit in
 the SDK but they just have to be adapted to the tools used outside. I
 have to think after a year or two this adapter(s) has to have been
 written. However I have only been able to find blackbox testing
 frameworks and not anything along the lines of regression test suite
 automation of the whitebox sort.

 Any suggestions welcome.

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


[android-developers] Re: LVL and Google Apps accounts

2010-10-25 Thread MarcoAndroid
Yeah I've seen this too. But only in a certain combination:

- You already have an existing version of the app published. The new
app you're testing has  a newer version number
- Your LVL code work from the emulator on which you are logged in with
your developer account
- But you always get NOT_MARKET_MANAGED or similar on a real phone
(like the N1) when testing the LVL with a google non-developer test
account
- The market developer console return status has been set to LICENSED
of course

My guess is that that combi is not (correctly) supported by the market
in combination with market console, because it seems not to be able to
detect the difference between the currently pubished app checking with
LVL for being licensed, and your newer test version by that same user.
It seems the published app check takes precedence over the console
setting for test-accounts.

Did you try the same with your developer account on the N1? (I didn't
because I don't want to mess up my phone which I'm worried might
happen :)
If my reasoning is correct, that probably will validate fine.

As soon as you publish your new version, the validation should be
working fine (it did for me). But of course (just like me) you do want
to try it out before publishing it...
My conclusion: I think it's currently not possible with test accounts
if you've published an app before and now wanting to test a newer
version of that app with a test account...

Hope this makes sense, and it's all concluded from trial and error
from my side.



On 24 okt, 19:25, Open ldonel...@gmail.com wrote:
 Ping.

 Anyone else with this problem?

 On Oct 20, 2:04 pm, Open ldonel...@gmail.com wrote:



  The primary account on my N1 is a Google Apps account.

  I added code to one of my apps to support the LVL.  Now I am trying to
  test it on my N1.

  Since the address associated with my market publisher acct is an
  @gmail address and not my Google Apps account the license check fails
  every time.

  I tried adding my Google Apps account to the list of test accounts
  in my profile.  It continues to fail.

  Has anyone else encountered this?  Has anyone been successful using a
  Google Apps account as a test account?

  Thanks-

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


[android-developers] Re: The seek bar of Mediacontroller is not been updating according to de audio player

2010-10-14 Thread MarcoAndroid
I asked this and a bunch of other questions/strange behaviour I found
a little while ago here:
http://groups.google.com/group/android-developers/browse_thread/thread/bd94a4a77e125a0e/f65ad7372ca8dee2

My workaround for your questions might be under quesion 4). Maybe that
helps.

On 11 okt, 03:56, MJ Moron mjmo...@gmail.com wrote:
 Hello,
 The seek bar of Mediacontroller is not been updating according to de
 audio player. Only when the trackball is shifted, or the play/pause
 button is clicked,  the seek bar  tracks the audio player.
 Could anybody give me any clue?

 Thanks in advance

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


[android-developers] Re: LVL licensing and versioning question

2010-10-01 Thread MarcoAndroid
Yes I know, but that's not what I'm having problems with. I see in my
scenario (see first post) that I get back NOT_MARKET_MANAGED. And that
translates in my app to 'not licensed' of course, because that's also
returned for an app not in the market. But I expected LICENSED_OLD_KEY
back based upon the LVL documentation. Since the scenario doesn't
return that, will the scenario return LICENSED_OLD_KEY when the app is
published, or will it also in that case return NOT_MARKET_MANAGED and
thus all user with an older copy are forced to upgrade? If so, I need
to tell my users that an upgrade should fix a 'not licensed' message
if they did pay for it before... Totally not user-friendly of course!

Hmm, might have found the answer regarding to how the default
ServerManagedPolicy has implemented it when LICENSED_OLD_KEY is
returned (though that does *not* answer my question yet why I don't
get LICENSED_OLD_KEY back in my scenario with an unpublished but saved
app):

public boolean allowAccess() {
long ts = System.currentTimeMillis();
if (mLastResponse == LicenseResponse.LICENSED) {
// Check if the LICENSED response occurred within the
validity timeout.
if (ts = mValidityTimestamp) {
// Cached LICENSED response is still valid.
return true;
}
} else if (mLastResponse == LicenseResponse.RETRY 
   ts  mLastResponseTime + MILLIS_PER_MINUTE) {
// Only allow access if we are within the retry period or
we haven't used up our
// max retries.
return (ts = mRetryUntil || mRetryCount = mMaxRetries);
}
return false;
}

Suprised it isn't handling LICENSED_OLD_KEY separately... since it
says here 
http://developer.android.com/guide/publishing/licensing.html#server-response-codes
By default, the LicenseValidator class in the LVL provides all of the
necessary handling of these response codes for you.
But that should say I think: ... the LicenseValidator only allows
access if the result is LICENSED or within the retry period.

In the table below that text it it says kindof that the default
LicenseValidator is not allowing access (notice the word Optionally):

Optionally allow access according to Policy constraints.
Can indicate that the key pair used by the installed application
version is invalid or compromised. The application can allow access if
needed or inform the user that an upgrade is available and limit
further use until upgrade.

But that's getting nasty code-wise: in LicenseCheckerCallback I only
have allow, dontAllow and errorCode. I don't have access to the
detailed response there, right? So how to make distinction there, that
is, check that LICENSED_OLD_KEY is returned? Might have to extend
LicenseCheckerCallback with an oldKey() method or similar...






On 28 sep, 22:47, Bret Foreman bret.fore...@gmail.com wrote:
 My understanding is that you test for a valid server response in your
 code. So if you're not testing in the old code, it will run fine.

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


[android-developers] Re: LVL licensing and versioning question

2010-10-01 Thread MarcoAndroid
My bad, LICENSED_OLD_KEY *will* pass as long as you don't have any
device restrictions setup, see this code (and I just tested it):

case LICENSED:
case LICENSED_OLD_KEY:
LicenseResponse limiterResponse =
mDeviceLimiter.isDeviceAllowed(userId);
handleResponse(limiterResponse, data);
break;

isDeviceAllowed for the default NullDeviceLimiter returns
Policy.LicenseResponse.LICENSED.

On 1 okt, 11:13, MarcoAndroid marco...@gmail.com wrote:
 Yes I know, but that's not what I'm having problems with. I see in my
 scenario (see first post) that I get back NOT_MARKET_MANAGED. And that
 translates in my app to 'not licensed' of course, because that's also
 returned for an app not in the market. But I expected LICENSED_OLD_KEY
 back based upon the LVL documentation. Since the scenario doesn't
 return that, will the scenario return LICENSED_OLD_KEY when the app is
 published, or will it also in that case return NOT_MARKET_MANAGED and
 thus all user with an older copy are forced to upgrade? If so, I need
 to tell my users that an upgrade should fix a 'not licensed' message
 if they did pay for it before... Totally not user-friendly of course!

 Hmm, might have found the answer regarding to how the default
 ServerManagedPolicy has implemented it when LICENSED_OLD_KEY is
 returned (though that does *not* answer my question yet why I don't
 get LICENSED_OLD_KEY back in my scenario with an unpublished but saved
 app):

     public boolean allowAccess() {
         long ts = System.currentTimeMillis();
         if (mLastResponse == LicenseResponse.LICENSED) {
             // Check if the LICENSED response occurred within the
 validity timeout.
             if (ts = mValidityTimestamp) {
                 // Cached LICENSED response is still valid.
                 return true;
             }
         } else if (mLastResponse == LicenseResponse.RETRY 
                    ts  mLastResponseTime + MILLIS_PER_MINUTE) {
             // Only allow access if we are within the retry period or
 we haven't used up our
             // max retries.
             return (ts = mRetryUntil || mRetryCount = mMaxRetries);
         }
         return false;
     }

 Suprised it isn't handling LICENSED_OLD_KEY separately... since it
 says 
 herehttp://developer.android.com/guide/publishing/licensing.html#server-r...
 By default, the LicenseValidator class in the LVL provides all of the
 necessary handling of these response codes for you.
 But that should say I think: ... the LicenseValidator only allows
 access if the result is LICENSED or within the retry period.

 In the table below that text it it says kindof that the default
 LicenseValidator is not allowing access (notice the word Optionally):

 Optionally allow access according to Policy constraints.
 Can indicate that the key pair used by the installed application
 version is invalid or compromised. The application can allow access if
 needed or inform the user that an upgrade is available and limit
 further use until upgrade.

 But that's getting nasty code-wise: in LicenseCheckerCallback I only
 have allow, dontAllow and errorCode. I don't have access to the
 detailed response there, right? So how to make distinction there, that
 is, check that LICENSED_OLD_KEY is returned? Might have to extend
 LicenseCheckerCallback with an oldKey() method or similar...

 On 28 sep, 22:47, Bret Foreman bret.fore...@gmail.com wrote:



  My understanding is that you test for a valid server response in your
  code. So if you're not testing in the old code, it will run fine.

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


[android-developers] Re: Extremely weird Null Pointer exception. Please help.

2010-09-29 Thread MarcoAndroid

First of all, pressing Back to exit the game doesn't necessarily mean
you game really exits. Android keeps Activities around and will only
really destroy it if it needs to.

Secondly: nowhere in your app you are setting mLunarThread to null? If
you are, then potentially that's causing it. Yes this is an open door
but just in case :) If you're not doing that anywhere, then it means
the onSharedPreferenceChanged code gets executed before mLunarThread
is set. To figure out what's going on, I suggest my third tip:

Thirdly: add lots more debug statements. Add it when entering
onSharedPreferenceChanged() and all the if/else parts, so you can
clearly see when it's called. Then also put a debug statement in
(almost) all Activity lifecycle methods: onCreate(), onStart(),
onResume() etc. Also put a log statement right before *any* access to
mLunarThread showing its value. If you're using a PreferenceActivity,
also put in debug statements in its onCreate() and get/set methods.
That way you can follow much better what's going on and see when
mLunarThread changes. Potentially you can set a dynamic breakpoint to
via the debugger, I haven't tried that for regular expressions.

Tip: you might want to use a PreferenceActivity instead for clearer
separation. Or is this not possible in the way your game is setup?


On 29 sep, 09:59, Kakyoin lgmc...@gmail.com wrote:
 To point out the problem:

 How did mLunarThread object suddenly become null  at line 352 of
 GameActivity.java ??

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


[android-developers] Re: LVL -- where to specify params for Server policies?

2010-09-29 Thread MarcoAndroid
Are you talking about VT, GT, GR?

Those you can't set in the Market/dev-console yourself. When you're
running in test mode they are not filled, so you see in the logcat
that they get set to some default value e.g 1 minute MILLIS_PER_MINUTE
for mValidityTimestamp in ServerManagedPolicy.setValidityTimestamp().
When published you'll get real more useful values (apparently).

I guess you can change the logic in setValidityTimestamp to not obey
the VT, GT, GR you get back, but why would you if they are sensible
values (are they?)?


On 28 sep, 20:23, DulcetTone dulcett...@gmail.com wrote:
 I do not see within the LVL documentation and example app who/what/
 where you specify the frequency with which license checks must be
 performed.

 I would expect that we could just new up a ServerManagedPolicy and set
 these parameters on it.

 Are we intended to modify the actual file ServerManagedPolicy.java
 (rather than subclass it) to overwrite the private final statics
 therein?

 I see that some of this comes via extras on the Intent... but that
 seems to imply to me that the Market console will have a place from
 where I specify these parameters, as it is the source of these extras
 (I'd guess?)

 Confused...

 tone

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


[android-developers] Re: LVL licensing and versioning question

2010-09-28 Thread MarcoAndroid
Anybody figured this out?

In short: if you use the LVL, and you upgrade your app to a new
version, will users with the old version still be granted access (seen
as LICENSED or LICENSED_OLD_KEY) to the app w/o the need for
upgrading?  And, can this be tested before publishing for test-
accounts?

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


[android-developers] Re: LVL returns LICENSED with anonymous accounts...

2010-09-24 Thread MarcoAndroid
Update: I uploaded and saved my exported signed app via the dev-
console but did not publish it.
With my test account on N1 I am now able to get returned from LVL what
I set in the dev console. So I'm not always getting LICENSED back, but
what I set the test response to, so it is configurable, so that's
great :)

On 22 sep, 14:43, MarcoAndroid marco...@gmail.com wrote:
 I do see this behaviour too (though dev account on emulator and test
 account on N1). My next thing to try would be uploading my app (but
 not publishing it) to see if that then gives back what I set in the
 dev console... Though from previous answers I probably get back
 LICENSED which as you say is not very handy for real device testing...

 On 27 aug, 11:21, Mark Carter mjc1...@googlemail.com wrote:



  Can anyone else confirm this please?

  On Aug 20, 11:27 am, Mark Carter mjc1...@googlemail.com wrote:

   This is not what I'm seeing.

   I'm writing a new app which has never been published or in draft.

   I have two devices. One (N1, running 2.2), I'm logged into my main
   Google account (which has the Developer account). The other (Hero
   running 2.1-update1) is a test account I use (no developer account).

   When I use the N1, I always get the response specifed in my Dev
   Console settings.
   When I use the Hero, I always get ERROR_NOT_MARKET_MANAGED.

   It appears the logic goes something like this for non-Market
   (published or draft) apps:

   Check the user has a Dev account.
   If so, use the response set there.
   If not, return ERROR_NOT_MARKET_MANAGED.

   Notice, its the setting for the user, not the dev (because theMarket
   does not know who the dev is), that is used.

   Anyone confirm this?

   On Aug 7, 1:26 am, Trevor Johns tjo...@google.com wrote:

If an app is not published AND not draft, then you'll get
ERROR_NOT_MARKET_MANAGED.

If an app is in draft (never published), then we sendLICENSEDfor all
requests for that app.

If an app is published (or has been published then unpublished), then
the response
is driven by the dev console settings for the developer/testers, and 
purely
by purchase history for everyone else.

--
Trevor Johns
Google Developer Programs, Androidhttp://developer.android.com

On Thu, Aug 5, 2010 at 4:18 AM, Mark Carter mjc1...@googlemail.com 
wrote:
 So to confirm. If an app is not published (nor draft) then the 
 response is
 dictated by the user's (i.e. the user running the app, not the one who
 developed the app) setting in the Dev Console. If the user does not 
 have a
 Dev account (like many beta testers) then the response will be like 
 Respond
 normally?

 If the app is published (or draft) then the response is driven 
 primarily by
 the dev's console settings and secondarily by theMarketlicense server
 (storing who has paid for what).

  I think the first part could catch a lot of people out...

 On 5 August 2010 11:03, Trevor Johns tjo...@google.com wrote:

 If the app isn't in AndroidMarket, the license server will return
 ERROR_NOT_MARKET_MANAGED. LicenseValidator considers that to be a 
 fatal
 error due to programmer error, and should invoke the 
 applicationError()
 callback method.

 My understanding from the server team is that uploading a draft 
 version is
 supposed to be sufficient to avoid getting ERROR_NOT_MARKET_MANAGED. 
 (In the
 case of existing applications, you'll also need to increment your 
 version
 code.)

 The other way you'll avoid this is precisely as Mark mentioned. If we
 don't find the application, we check to see if the current user has a
 developer account, and will send a test response (if one is set) 
 using the
 user's RSA keypair.

 --
 Trevor Johns

 On Wed, Aug 4, 2010 at 12:30 AM, Kirky rob.kirkbr...@gmail.com 
 wrote:

 Trevor,

 Can you clarify what the licensing server returns if the App is not 
 in
 the AndroidMarket? In my experience (and it seems other people) it 
 is
 returningLICENSED. This does not seem sensible to me.

 Thanks

 Rob

 On Aug 4, 3:23 am, Trevor Johns tjo...@google.com wrote:

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

[android-developers] LVL licensing and versioning question

2010-09-24 Thread MarcoAndroid
Hello,

Using the licensing technique described here
http://developer.android.com/guide/publishing/licensing.html
I'm trying to test what happens when:
- I would upgrade my LVL protected app to a new version
- Some user hasn't upgraded yet
Will the user with the old version still be able to continue? Will the
licensing server return LICENSED_OLD_KEY as I expect it to, and thus
allow access?

The scenario I used to test this:
- uploaded to market a signed version 1.0.0 (did not publish it) of my
app which has never been published nor uploaded before
- setup test account and let the test response be LICENSED
- on Nexus1 tested and verified that when using the apk (so the one in
project/bin), LICENSED is returned.
- increased versionCode and versionName to 1.0.1, signed and uploaded
that version to market (didn't publish)
- on N1 installed the new apk (again the newly compiled one from
project/bin). LVL returns NOT_MARKET_MANAGED so indicating that it's
not available in the market. But I expected LICENSED_OLD_KEY to be
returned.

Am I trying something that's not possible to test? From other posts
like this one: 
http://groups.google.com/group/android-developers/browse_thread/thread/b83cc702603b0ee3/74a2ed31e4c1
and this one: 
http://groups.google.com/group/android-developers/browse_thread/thread/1ff17c6bf409cba2/be147a98af3cd1fc
is suggested that the above scenario should work...

If this is not possible to test before publishing an app, did anybody
try this out in the field: will LICENSED_OLD_KEY be returned for older
versions that previously got LICENSED as an answer?

Any ideas?

Regards,
Marco

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


[android-developers] Re: LVL returns LICENSED with anonymous accounts...

2010-09-22 Thread MarcoAndroid
I do see this behaviour too (though dev account on emulator and test
account on N1). My next thing to try would be uploading my app (but
not publishing it) to see if that then gives back what I set in the
dev console... Though from previous answers I probably get back
LICENSED which as you say is not very handy for real device testing...


On 27 aug, 11:21, Mark Carter mjc1...@googlemail.com wrote:
 Can anyone else confirm this please?

 On Aug 20, 11:27 am, Mark Carter mjc1...@googlemail.com wrote:



  This is not what I'm seeing.

  I'm writing a new app which has never been published or in draft.

  I have two devices. One (N1, running 2.2), I'm logged into my main
  Google account (which has the Developer account). The other (Hero
  running 2.1-update1) is a test account I use (no developer account).

  When I use the N1, I always get the response specifed in my Dev
  Console settings.
  When I use the Hero, I always get ERROR_NOT_MARKET_MANAGED.

  It appears the logic goes something like this for non-Market
  (published or draft) apps:

  Check the user has a Dev account.
  If so, use the response set there.
  If not, return ERROR_NOT_MARKET_MANAGED.

  Notice, its the setting for the user, not the dev (because theMarket
  does not know who the dev is), that is used.

  Anyone confirm this?

  On Aug 7, 1:26 am, Trevor Johns tjo...@google.com wrote:

   If an app is not published AND not draft, then you'll get
   ERROR_NOT_MARKET_MANAGED.

   If an app is in draft (never published), then we sendLICENSEDfor all
   requests for that app.

   If an app is published (or has been published then unpublished), then
   the response
   is driven by the dev console settings for the developer/testers, and 
   purely
   by purchase history for everyone else.

   --
   Trevor Johns
   Google Developer Programs, Androidhttp://developer.android.com

   On Thu, Aug 5, 2010 at 4:18 AM, Mark Carter mjc1...@googlemail.com 
   wrote:
So to confirm. If an app is not published (nor draft) then the response 
is
dictated by the user's (i.e. the user running the app, not the one who
developed the app) setting in the Dev Console. If the user does not 
have a
Dev account (like many beta testers) then the response will be like 
Respond
normally?

If the app is published (or draft) then the response is driven 
primarily by
the dev's console settings and secondarily by theMarketlicense server
(storing who has paid for what).

 I think the first part could catch a lot of people out...

On 5 August 2010 11:03, Trevor Johns tjo...@google.com wrote:

If the app isn't in AndroidMarket, the license server will return
ERROR_NOT_MARKET_MANAGED. LicenseValidator considers that to be a fatal
error due to programmer error, and should invoke the applicationError()
callback method.

My understanding from the server team is that uploading a draft 
version is
supposed to be sufficient to avoid getting ERROR_NOT_MARKET_MANAGED. 
(In the
case of existing applications, you'll also need to increment your 
version
code.)

The other way you'll avoid this is precisely as Mark mentioned. If we
don't find the application, we check to see if the current user has a
developer account, and will send a test response (if one is set) using 
the
user's RSA keypair.

--
Trevor Johns

On Wed, Aug 4, 2010 at 12:30 AM, Kirky rob.kirkbr...@gmail.com wrote:

Trevor,

Can you clarify what the licensing server returns if the App is not in
the AndroidMarket? In my experience (and it seems other people) it is
returningLICENSED. This does not seem sensible to me.

Thanks

Rob

On Aug 4, 3:23 am, Trevor Johns tjo...@google.com wrote:

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

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

2010-09-22 Thread MarcoAndroid
My guess is that when the version of the app making thecheck  is lower
than the latest in the market, LICENSED_OLD_KEY is returned as per
http://developer.android.com/guide/publishing/licensing.html#server-response-codes

Is the version of the app making the check higher, then that should be
you testing a new version and you can overwrite via the dev console I
guess.

On 31 jul, 23:45, Brian avalo...@caerleon.us wrote:
 I've done some testing on this, myself, and it seems that it only
 returns theNOT_MARKET_MANAGEDerror for an app in the market if the
 version code (the integer form of the version number in the manifest)
 in the copy making the check is higher than the one currently in the
 market.  If the version code in the copy of the app making the check
 is less than or equal to the current one in the market, then the
 normal license valid/invalid response is given unless there's another
 error.

 That seems acceptable to me, even if it is a bit odd considering the
 docs imply that it indicates only a package name mismatch.

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


[android-developers] Re: Android Market Licensing Service

2010-09-18 Thread MarcoAndroid
Regarding obfuscation, I found this post pretty handy for some
pitfalls in that area: 
http://blog.uncommons.org/2010/09/13/android-lvl-obfuscation-pitfalls/


On 17 sep, 22:52, Bret Foreman bret.fore...@gmail.com wrote:
 Is anyone on this list using AMLS yet? Any comments, things to avoid,
 best practices? It sounds great in concept but I'd like to hear how
 it's working in practice.

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


[android-developers] Re: Developing for Galaxy tab(any tab resolution devices)

2010-09-18 Thread MarcoAndroid
Or be patient, as this official google blogpost says a custom AVD
should be coming from Samsung: 
http://android-developers.blogspot.com/2010/09/screen-geometry-fun.html


On 17 sep, 12:58, Rahul rahulvarma.kalidindi0...@gmail.com wrote:
 Hi,

 I want to how to develop and test apps for the Galaxy tab. I mean like
 the Android simulator, can we test the tab apps on a simulator? Is
 there a way to download simulator for the tab or should we tweak the
 existing simulator?

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


[android-developers] Re: any tool in android to find memory leak and code optimization

2010-09-13 Thread MarcoAndroid
I found DDMS not sufficiently detailed to find memory leaks, so I use
MAT.
For full step-by-step instructions on finding memory leaks and using
MAT, I suggest this post: 
http://ttlnews.blogspot.com/2010/01/attacking-memory-problems-on-android.html


On Sep 12, 10:09 pm, Sohan badaya sohan.bad...@gmail.com wrote:
 Hi All,

 I would like to know is there any tool in android to find memory leak
 and code optimization.

 Thanks,
 Sohan Badaya

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


[android-developers] Re: Emulator keeps slowing down after a couple of deployments/Run as Android Application in Eclipse

2010-07-18 Thread MarcoAndroid
Ok got an update on this one:

First I thought it might be my virusscanner (nod32) because I saw at
the same time quite often ekrn.exe also getting relatively high in CPU
usage (20-20%). Set .img files to be excluded from scans. But it might
just have been a regular background scan (and always been there), and
I only started to notice it because I was looking for a cause of the
slow  machine. I did install another antivirus (avast), which seemed
to do fix the slow emulator. But after 2 days: again slow emulator.

Then I found out the real reason: my laptop was getting too hot! After
I let it cool down (until the fan doesn't make much noise anymore and
the casing is a lot cooler), I noticed the emulator ran at the normal
speed again! By running less programs I was able to keep the
temperature low enough for longer periods. Would I start too many
programs, it would get too hot again after a while (fan made more and
more noise, casing getting hot), causing CPU usage to go up. Reason
for that is that the laptop starts to run slower when it gets too hot,
causing heavy programs quickly to take up a lot of CPU percentage
wise.
After making sure my fans were running fine via some software like
speedfan, it could only be the hardware. Turns out there was a lot of
dust blocking the side air-input of the fan (only visible after
unscrewing the fan). After removing that the laptop hasn't gotten that
hot anymore nor a slow emulator. So all is running fine again at
normal speed.

So this might have been specifically my setup, but maybe yours has the
same problem...

Hope this helps anybody.


On 2 jul, 13:11, Brad Gies rbg...@gmail.com wrote:
 I have the same issue... and I have even more memory than you have.. :(

 On 02/07/2010 9:50 AM, MarcoAndroid wrote:





  Oh and when it's slow and I check memory usage (via windows task
  manager), at most 2G is in use.

  On 2 jul, 15:32, Kostya Vasilyevkmans...@gmail.com  wrote:

  Marco,

  Do you have enough physical memory in your computer?

  -- Kostya

  02.07.2010 17:15, MarcoAndroid пишет:

  Small update: I even created a new 1.6 avd, but that starts up as slow
  as the old one.
  Then I finally did a reboot of my machine --    all ran fine again for a
  few hours. So apparently something was still running/hogging the
  emulator. As said, after a few hours slowness kicked in again.

  On 1 jul, 16:15, MarcoAndroidmarco...@gmail.com    wrote:

  Hello,

  More and more the Android emulator launched via Eclipse (via Run As
  Android Application) keeps slowing down, or the device is not found,
  or the user data image is in use by another emulator.

  I've searched and search the internets ;) but none of the solutions
  mentioned work (these are: delete pid file, setting ANDROID_SDK_HOME,
  making sure my avds are on local disk). Below I'll post a couple of my
  experiences trying to solve it. I couldn't solve it, but maybe
  somebody sees something familiair or it might help other people
  finding the problem.

  Below you see an example of suddenly the device not being found
  anymore.
  First there's a normal launch (09:54:13), then there's a second one
  (started 30 secs after the previous one)  that just fails. I waited
  quite a long time (no high CPU for the emulator), then 'device not
  found' after about 4mins. Notice it didn't get to starting the
  Activity (which it did for the first run). Also notice that the
  Success took 4mins to appear instead of 2 seconds for the first run.
  So it says device not found, but the emulator is running, I can see
  it, it's eating cpu.
  Why would it not find it anymore? Could something like this be caused
  by my network card being gone for a split second? Or my internet
  connection gone for a few seconds (doubt it, it's all local right?) I
  didn't notice it being away, but maybe it did under water.

  [2010-07-01 09:54:13 -
  MediaControllerCode]--
  [2010-07-01 09:54:13 - MediaControllerCode]Android Launch!
  [2010-07-01 09:54:13 - MediaControllerCode]adb is running normally.
  [2010-07-01 09:54:13 - MediaControllerCode]Performing
  com.test.code.MediaControllerCode activity launch
  [2010-07-01 09:54:13 - MediaControllerCode]Automatic Target Mode:
  using existing emulator 'emulator-5554' running compatible AVD
  'HVGAsdk1.6'
  [2010-07-01 09:54:13 - MediaControllerCode]Uploading
  MediaControllerCode.apk onto device 'emulator-5554'
  [2010-07-01 09:54:13 - MediaControllerCode]Installing
  MediaControllerCode.apk...
  [2010-07-01 09:54:15 - MediaControllerCode]Success!
  [2010-07-01 09:54:15 - MediaControllerCode]Starting activity
  com.test.code.MediaControllerCode on device
  [2010-07-01 09:54:17 - MediaControllerCode]ActivityManager: Starting:
  Intent { cmp=com.test.code/.MediaControllerCode }
  [2010-07-01 09:54:44 -
  MediaControllerCode]--
  [2010-07-01 09:54:44 - MediaControllerCode]Android Launch!
  [2010-07-01 09:54:44 - MediaControllerCode]adb

[android-developers] MediaController questions + problems + strange behaviour

2010-07-02 Thread MarcoAndroid
Hi,

I've been starting to use the MediaController in combination with the
MediaPlayer. Besides finding out some documented weird behaviour (like
if you create a MediaController from XML the show()/hide() don't do
anything but they do work if you create the controller via code), I
did find some undocumented (AFAICT) buggy? behaviour. Here it goes:

1) Why is the mediacontroller too wide by default, that is when all
buttons are showing (which is the case when you create it from XML)?
See screenshot here: 
http://www.4shared.com/photo/ogbrAo4H/mediacontroller_toowide_2010-0.html
The | and | are cut off!
Even on a real Nexus One it's too wide, only in landscape it fits
(easily; it doesn't get stretched full width either)
If I add paddingLeft and right to the wrapping LinearLayout, the left
 right of the mediacontroller are just cut off.
If I add paddingLeft and right to the MediaController xml, the left 
right of the mediacontroller are also just cut off.
If I change the width of the MediaController view in the XML to 200dip
it just gets cut off.
Apparently the controller is not made resolution independent using
dips etc? Or can I do something to make it fit? For now I take out the
 and , the user can seek with the slider too...

2) Why is it called a floating window (at least in its
implementation), I can't seem to be able to move it around. Floating
is meant here only as: it is on top of something?

3) It seems you really need to wait a bit before calling
controller.show() because otherwise something is not ready yet (I get
something like window null - Activity not started error). Is this
true? Is there a better way to do it than postDelayed as mentioned in
this post: 
http://stackoverflow.com/questions/1759862/how-can-i-get-an-android-mediacontroller-to-appear-from-layout-xml?

4) It seems getBufferPercentage() only gets called when you press a
button on the control? I do see the mediaplayer's onBufferingUpdate()
getting called in the example below, but getBufferPercentage only when
I touch a button on the MediaController:

  controller.setMediaPlayer(new MediaController.MediaPlayerControl() {
public int getBufferPercentage() {
  return bufferedPercentage;
}
public int getCurrentPosition() {
  return mediaPlayer.getCurrentPosition();
}
public int getDuration() {
  return mediaPlayer.getDuration();
}
public boolean isPlaying() {return mediaPlayer.isPlaying();}
public void pause() {
  mediaPlayer.pause();
}
public void seekTo(int pos) {}
  public void start() {
  mediaPlayer.start();
}
  });

Any ideas why it's not being called? My workaround for now is to do a
controller.show() call in mediaPlayer.onBufferingUpdate().

5) This I found out by experience and seems to me incorrect in the
docs here: 
http://developer.android.com/reference/android/widget/MediaController.html
I read the bottom 3 statements as: no prev/next buttons are shown if
setPrevNextListeners() is not being called.
But when creating the controller via XML they are shown disabled,
though I'm sure not having called setPrevNextListeners().

6) In 1.6 the slider knob is showing correctly at starting and ending
point, see screenshot for starting point (note that the stream as been
loaded, but whether it's loaded or not has no impact):
http://www.4shared.com/photo/FeK1kxXT/mediacontroller_slider_sdk16_s.html
But in 2.1 the slider know is slightly hidden under something on the
left and something  on the right, see screenshots:
http://www.4shared.com/photo/UH5jHyMd/mediacontroller_slider_sdk21_b.html
http://www.4shared.com/photo/8chC5_Q5/mediacontroller_slider_sdk21_b.html
Seems a bug to me. Or can I do something about this?
BTW: the correct position in 2.1 seems to be about 4secs into the
track, see this screenshot:
http://www.4shared.com/photo/fbM-PNJ1/mediacontroller_slider_sdk21_o.html

7): Why is the downloading of an mp3 from the internet (via a URL)
starting all over again when I drag the slider all the way to the left
(i.e 0)? Seems not necessary, and will make the user have to wait
again for the download.

8) In 1.6 it was fine to call controller.setEnabled(true) before
controller.setMediaPlayer(), but definitely in 2.1 it is not allowed
anymore, you get a NullpointerException. If you check the
MediaController source code, you'll see it's calling a mediaPlayer
method w/o checking for null.

Hope somebody can provide some input on these!

Regards,
Marco






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


[android-developers] Re: Emulator keeps slowing down after a couple of deployments/Run as Android Application in Eclipse

2010-07-02 Thread MarcoAndroid
Small update: I even created a new 1.6 avd, but that starts up as slow
as the old one.
Then I finally did a reboot of my machine -- all ran fine again for a
few hours. So apparently something was still running/hogging the
emulator. As said, after a few hours slowness kicked in again.

On 1 jul, 16:15, MarcoAndroid marco...@gmail.com wrote:
 Hello,

 More and more the Android emulator launched via Eclipse (via Run As
 Android Application) keeps slowing down, or the device is not found,
 or the user data image is in use by another emulator.

 I've searched and search the internets ;) but none of the solutions
 mentioned work (these are: delete pid file, setting ANDROID_SDK_HOME,
 making sure my avds are on local disk). Below I'll post a couple of my
 experiences trying to solve it. I couldn't solve it, but maybe
 somebody sees something familiair or it might help other people
 finding the problem.

 Below you see an example of suddenly the device not being found
 anymore.
 First there's a normal launch (09:54:13), then there's a second one
 (started 30 secs after the previous one)  that just fails. I waited
 quite a long time (no high CPU for the emulator), then 'device not
 found' after about 4mins. Notice it didn't get to starting the
 Activity (which it did for the first run). Also notice that the
 Success took 4mins to appear instead of 2 seconds for the first run.
 So it says device not found, but the emulator is running, I can see
 it, it's eating cpu.
 Why would it not find it anymore? Could something like this be caused
 by my network card being gone for a split second? Or my internet
 connection gone for a few seconds (doubt it, it's all local right?) I
 didn't notice it being away, but maybe it did under water.

 [2010-07-01 09:54:13 -
 MediaControllerCode]--
 [2010-07-01 09:54:13 - MediaControllerCode]Android Launch!
 [2010-07-01 09:54:13 - MediaControllerCode]adb is running normally.
 [2010-07-01 09:54:13 - MediaControllerCode]Performing
 com.test.code.MediaControllerCode activity launch
 [2010-07-01 09:54:13 - MediaControllerCode]Automatic Target Mode:
 using existing emulator 'emulator-5554' running compatible AVD
 'HVGAsdk1.6'
 [2010-07-01 09:54:13 - MediaControllerCode]Uploading
 MediaControllerCode.apk onto device 'emulator-5554'
 [2010-07-01 09:54:13 - MediaControllerCode]Installing
 MediaControllerCode.apk...
 [2010-07-01 09:54:15 - MediaControllerCode]Success!
 [2010-07-01 09:54:15 - MediaControllerCode]Starting activity
 com.test.code.MediaControllerCode on device
 [2010-07-01 09:54:17 - MediaControllerCode]ActivityManager: Starting:
 Intent { cmp=com.test.code/.MediaControllerCode }
 [2010-07-01 09:54:44 -
 MediaControllerCode]--
 [2010-07-01 09:54:44 - MediaControllerCode]Android Launch!
 [2010-07-01 09:54:44 - MediaControllerCode]adb is running normally.
 [2010-07-01 09:54:44 - MediaControllerCode]Performing
 com.test.code.MediaControllerCode activity launch
 [2010-07-01 09:54:44 - MediaControllerCode]Automatic Target Mode:
 using existing emulator 'emulator-5554' running compatible AVD
 'HVGAsdk1.6'
 [2010-07-01 09:54:44 - MediaControllerCode]Uploading
 MediaControllerCode.apk onto device 'emulator-5554'
 [2010-07-01 09:54:44 - MediaControllerCode]Installing
 MediaControllerCode.apk...
 [2010-07-01 09:58:32 - MediaControllerCode]Success!
 [2010-07-01 09:58:32 - MediaControllerCode]Failed to upload
 MediaControllerCode.apk on device 'emulator-5554'
 [2010-07-01 09:58:32 - MediaControllerCode]java.io.IOException: device
 (emulator-5554) request rejected: device not found
 [2010-07-01 09:58:32 - MediaControllerCode]Launch canceled!

 And when I try it again after the above device not found problem I
 get:

 [2010-07-01 10:01:26 -
 MediaControllerCode]--
 [2010-07-01 10:01:26 - MediaControllerCode]Android Launch!
 [2010-07-01 10:01:26 - MediaControllerCode]adb is running normally.
 [2010-07-01 10:01:26 - MediaControllerCode]Performing
 com.test.code.MediaControllerCode activity launch
 [2010-07-01 10:01:26 - MediaControllerCode]Automatic Target Mode:
 launching new emulator with compatible AVD 'HVGAsdk1.6'
 [2010-07-01 10:01:26 - MediaControllerCode]Launching a new emulator
 with Virtual Device 'HVGAsdk1.6'
 [2010-07-01 10:01:26 - Emulator]emulator: ERROR: the user data image
 is used by another emulator. aborting

 Totally weird, there's only one emulator.exe running (windows XP) and
 Eclipse, just like the first 2 runs.

 I know I can clear the locks, but that just restarts my emulator, so
 that's the same as exiting  starting it again.
 Starting the emulator outside Eclipse only works a few times, then it
 says again that the user data image is used by another emulator.

 I've tried Automatic target mode and specifying the correct avd image
 in the run configuration (for 1.6 and 2.1 avds). Didn't matter.

 I've also tried adding the -wipe-data flag at each start, but that
 doesn't change anything. Tip

[android-developers] Re: Emulator keeps slowing down after a couple of deployments/Run as Android Application in Eclipse

2010-07-02 Thread MarcoAndroid
I'd hope so, 4G RAM, over 400G disk left, dual core centrino.


On 2 jul, 15:32, Kostya Vasilyev kmans...@gmail.com wrote:
 Marco,

 Do you have enough physical memory in your computer?

 -- Kostya

 02.07.2010 17:15, MarcoAndroid пишет:





  Small update: I even created a new 1.6 avd, but that starts up as slow
  as the old one.
  Then I finally did a reboot of my machine --  all ran fine again for a
  few hours. So apparently something was still running/hogging the
  emulator. As said, after a few hours slowness kicked in again.

  On 1 jul, 16:15, MarcoAndroidmarco...@gmail.com  wrote:

  Hello,

  More and more the Android emulator launched via Eclipse (via Run As
  Android Application) keeps slowing down, or the device is not found,
  or the user data image is in use by another emulator.

  I've searched and search the internets ;) but none of the solutions
  mentioned work (these are: delete pid file, setting ANDROID_SDK_HOME,
  making sure my avds are on local disk). Below I'll post a couple of my
  experiences trying to solve it. I couldn't solve it, but maybe
  somebody sees something familiair or it might help other people
  finding the problem.

  Below you see an example of suddenly the device not being found
  anymore.
  First there's a normal launch (09:54:13), then there's a second one
  (started 30 secs after the previous one)  that just fails. I waited
  quite a long time (no high CPU for the emulator), then 'device not
  found' after about 4mins. Notice it didn't get to starting the
  Activity (which it did for the first run). Also notice that the
  Success took 4mins to appear instead of 2 seconds for the first run.
  So it says device not found, but the emulator is running, I can see
  it, it's eating cpu.
  Why would it not find it anymore? Could something like this be caused
  by my network card being gone for a split second? Or my internet
  connection gone for a few seconds (doubt it, it's all local right?) I
  didn't notice it being away, but maybe it did under water.

  [2010-07-01 09:54:13 -
  MediaControllerCode]--
  [2010-07-01 09:54:13 - MediaControllerCode]Android Launch!
  [2010-07-01 09:54:13 - MediaControllerCode]adb is running normally.
  [2010-07-01 09:54:13 - MediaControllerCode]Performing
  com.test.code.MediaControllerCode activity launch
  [2010-07-01 09:54:13 - MediaControllerCode]Automatic Target Mode:
  using existing emulator 'emulator-5554' running compatible AVD
  'HVGAsdk1.6'
  [2010-07-01 09:54:13 - MediaControllerCode]Uploading
  MediaControllerCode.apk onto device 'emulator-5554'
  [2010-07-01 09:54:13 - MediaControllerCode]Installing
  MediaControllerCode.apk...
  [2010-07-01 09:54:15 - MediaControllerCode]Success!
  [2010-07-01 09:54:15 - MediaControllerCode]Starting activity
  com.test.code.MediaControllerCode on device
  [2010-07-01 09:54:17 - MediaControllerCode]ActivityManager: Starting:
  Intent { cmp=com.test.code/.MediaControllerCode }
  [2010-07-01 09:54:44 -
  MediaControllerCode]--
  [2010-07-01 09:54:44 - MediaControllerCode]Android Launch!
  [2010-07-01 09:54:44 - MediaControllerCode]adb is running normally.
  [2010-07-01 09:54:44 - MediaControllerCode]Performing
  com.test.code.MediaControllerCode activity launch
  [2010-07-01 09:54:44 - MediaControllerCode]Automatic Target Mode:
  using existing emulator 'emulator-5554' running compatible AVD
  'HVGAsdk1.6'
  [2010-07-01 09:54:44 - MediaControllerCode]Uploading
  MediaControllerCode.apk onto device 'emulator-5554'
  [2010-07-01 09:54:44 - MediaControllerCode]Installing
  MediaControllerCode.apk...
  [2010-07-01 09:58:32 - MediaControllerCode]Success!
  [2010-07-01 09:58:32 - MediaControllerCode]Failed to upload
  MediaControllerCode.apk on device 'emulator-5554'
  [2010-07-01 09:58:32 - MediaControllerCode]java.io.IOException: device
  (emulator-5554) request rejected: device not found
  [2010-07-01 09:58:32 - MediaControllerCode]Launch canceled!

  And when I try it again after the above device not found problem I
  get:

  [2010-07-01 10:01:26 -
  MediaControllerCode]--
  [2010-07-01 10:01:26 - MediaControllerCode]Android Launch!
  [2010-07-01 10:01:26 - MediaControllerCode]adb is running normally.
  [2010-07-01 10:01:26 - MediaControllerCode]Performing
  com.test.code.MediaControllerCode activity launch
  [2010-07-01 10:01:26 - MediaControllerCode]Automatic Target Mode:
  launching new emulator with compatible AVD 'HVGAsdk1.6'
  [2010-07-01 10:01:26 - MediaControllerCode]Launching a new emulator
  with Virtual Device 'HVGAsdk1.6'
  [2010-07-01 10:01:26 - Emulator]emulator: ERROR: the user data image
  is used by another emulator. aborting

  Totally weird, there's only one emulator.exe running (windows XP) and
  Eclipse, just like the first 2 runs.

  I know I can clear the locks, but that just restarts my emulator, so
  that's the same as exiting  starting it again.
  Starting the emulator outside

[android-developers] Re: Emulator keeps slowing down after a couple of deployments/Run as Android Application in Eclipse

2010-07-02 Thread MarcoAndroid
Oh and when it's slow and I check memory usage (via windows task
manager), at most 2G is in use.

On 2 jul, 15:32, Kostya Vasilyev kmans...@gmail.com wrote:
 Marco,

 Do you have enough physical memory in your computer?

 -- Kostya

 02.07.2010 17:15, MarcoAndroid пишет:





  Small update: I even created a new 1.6 avd, but that starts up as slow
  as the old one.
  Then I finally did a reboot of my machine --  all ran fine again for a
  few hours. So apparently something was still running/hogging the
  emulator. As said, after a few hours slowness kicked in again.

  On 1 jul, 16:15, MarcoAndroidmarco...@gmail.com  wrote:

  Hello,

  More and more the Android emulator launched via Eclipse (via Run As
  Android Application) keeps slowing down, or the device is not found,
  or the user data image is in use by another emulator.

  I've searched and search the internets ;) but none of the solutions
  mentioned work (these are: delete pid file, setting ANDROID_SDK_HOME,
  making sure my avds are on local disk). Below I'll post a couple of my
  experiences trying to solve it. I couldn't solve it, but maybe
  somebody sees something familiair or it might help other people
  finding the problem.

  Below you see an example of suddenly the device not being found
  anymore.
  First there's a normal launch (09:54:13), then there's a second one
  (started 30 secs after the previous one)  that just fails. I waited
  quite a long time (no high CPU for the emulator), then 'device not
  found' after about 4mins. Notice it didn't get to starting the
  Activity (which it did for the first run). Also notice that the
  Success took 4mins to appear instead of 2 seconds for the first run.
  So it says device not found, but the emulator is running, I can see
  it, it's eating cpu.
  Why would it not find it anymore? Could something like this be caused
  by my network card being gone for a split second? Or my internet
  connection gone for a few seconds (doubt it, it's all local right?) I
  didn't notice it being away, but maybe it did under water.

  [2010-07-01 09:54:13 -
  MediaControllerCode]--
  [2010-07-01 09:54:13 - MediaControllerCode]Android Launch!
  [2010-07-01 09:54:13 - MediaControllerCode]adb is running normally.
  [2010-07-01 09:54:13 - MediaControllerCode]Performing
  com.test.code.MediaControllerCode activity launch
  [2010-07-01 09:54:13 - MediaControllerCode]Automatic Target Mode:
  using existing emulator 'emulator-5554' running compatible AVD
  'HVGAsdk1.6'
  [2010-07-01 09:54:13 - MediaControllerCode]Uploading
  MediaControllerCode.apk onto device 'emulator-5554'
  [2010-07-01 09:54:13 - MediaControllerCode]Installing
  MediaControllerCode.apk...
  [2010-07-01 09:54:15 - MediaControllerCode]Success!
  [2010-07-01 09:54:15 - MediaControllerCode]Starting activity
  com.test.code.MediaControllerCode on device
  [2010-07-01 09:54:17 - MediaControllerCode]ActivityManager: Starting:
  Intent { cmp=com.test.code/.MediaControllerCode }
  [2010-07-01 09:54:44 -
  MediaControllerCode]--
  [2010-07-01 09:54:44 - MediaControllerCode]Android Launch!
  [2010-07-01 09:54:44 - MediaControllerCode]adb is running normally.
  [2010-07-01 09:54:44 - MediaControllerCode]Performing
  com.test.code.MediaControllerCode activity launch
  [2010-07-01 09:54:44 - MediaControllerCode]Automatic Target Mode:
  using existing emulator 'emulator-5554' running compatible AVD
  'HVGAsdk1.6'
  [2010-07-01 09:54:44 - MediaControllerCode]Uploading
  MediaControllerCode.apk onto device 'emulator-5554'
  [2010-07-01 09:54:44 - MediaControllerCode]Installing
  MediaControllerCode.apk...
  [2010-07-01 09:58:32 - MediaControllerCode]Success!
  [2010-07-01 09:58:32 - MediaControllerCode]Failed to upload
  MediaControllerCode.apk on device 'emulator-5554'
  [2010-07-01 09:58:32 - MediaControllerCode]java.io.IOException: device
  (emulator-5554) request rejected: device not found
  [2010-07-01 09:58:32 - MediaControllerCode]Launch canceled!

  And when I try it again after the above device not found problem I
  get:

  [2010-07-01 10:01:26 -
  MediaControllerCode]--
  [2010-07-01 10:01:26 - MediaControllerCode]Android Launch!
  [2010-07-01 10:01:26 - MediaControllerCode]adb is running normally.
  [2010-07-01 10:01:26 - MediaControllerCode]Performing
  com.test.code.MediaControllerCode activity launch
  [2010-07-01 10:01:26 - MediaControllerCode]Automatic Target Mode:
  launching new emulator with compatible AVD 'HVGAsdk1.6'
  [2010-07-01 10:01:26 - MediaControllerCode]Launching a new emulator
  with Virtual Device 'HVGAsdk1.6'
  [2010-07-01 10:01:26 - Emulator]emulator: ERROR: the user data image
  is used by another emulator. aborting

  Totally weird, there's only one emulator.exe running (windows XP) and
  Eclipse, just like the first 2 runs.

  I know I can clear the locks, but that just restarts my emulator, so
  that's the same as exiting  starting it again

[android-developers] Emulator keeps slowing down after a couple of deployments/Run as Android Application in Eclipse

2010-07-01 Thread MarcoAndroid
Hello,

More and more the Android emulator launched via Eclipse (via Run As
Android Application) keeps slowing down, or the device is not found,
or the user data image is in use by another emulator.

I've searched and search the internets ;) but none of the solutions
mentioned work (these are: delete pid file, setting ANDROID_SDK_HOME,
making sure my avds are on local disk). Below I'll post a couple of my
experiences trying to solve it. I couldn't solve it, but maybe
somebody sees something familiair or it might help other people
finding the problem.

Below you see an example of suddenly the device not being found
anymore.
First there's a normal launch (09:54:13), then there's a second one
(started 30 secs after the previous one)  that just fails. I waited
quite a long time (no high CPU for the emulator), then 'device not
found' after about 4mins. Notice it didn't get to starting the
Activity (which it did for the first run). Also notice that the
Success took 4mins to appear instead of 2 seconds for the first run.
So it says device not found, but the emulator is running, I can see
it, it's eating cpu.
Why would it not find it anymore? Could something like this be caused
by my network card being gone for a split second? Or my internet
connection gone for a few seconds (doubt it, it's all local right?) I
didn't notice it being away, but maybe it did under water.

[2010-07-01 09:54:13 -
MediaControllerCode]--
[2010-07-01 09:54:13 - MediaControllerCode]Android Launch!
[2010-07-01 09:54:13 - MediaControllerCode]adb is running normally.
[2010-07-01 09:54:13 - MediaControllerCode]Performing
com.test.code.MediaControllerCode activity launch
[2010-07-01 09:54:13 - MediaControllerCode]Automatic Target Mode:
using existing emulator 'emulator-5554' running compatible AVD
'HVGAsdk1.6'
[2010-07-01 09:54:13 - MediaControllerCode]Uploading
MediaControllerCode.apk onto device 'emulator-5554'
[2010-07-01 09:54:13 - MediaControllerCode]Installing
MediaControllerCode.apk...
[2010-07-01 09:54:15 - MediaControllerCode]Success!
[2010-07-01 09:54:15 - MediaControllerCode]Starting activity
com.test.code.MediaControllerCode on device
[2010-07-01 09:54:17 - MediaControllerCode]ActivityManager: Starting:
Intent { cmp=com.test.code/.MediaControllerCode }
[2010-07-01 09:54:44 -
MediaControllerCode]--
[2010-07-01 09:54:44 - MediaControllerCode]Android Launch!
[2010-07-01 09:54:44 - MediaControllerCode]adb is running normally.
[2010-07-01 09:54:44 - MediaControllerCode]Performing
com.test.code.MediaControllerCode activity launch
[2010-07-01 09:54:44 - MediaControllerCode]Automatic Target Mode:
using existing emulator 'emulator-5554' running compatible AVD
'HVGAsdk1.6'
[2010-07-01 09:54:44 - MediaControllerCode]Uploading
MediaControllerCode.apk onto device 'emulator-5554'
[2010-07-01 09:54:44 - MediaControllerCode]Installing
MediaControllerCode.apk...
[2010-07-01 09:58:32 - MediaControllerCode]Success!
[2010-07-01 09:58:32 - MediaControllerCode]Failed to upload
MediaControllerCode.apk on device 'emulator-5554'
[2010-07-01 09:58:32 - MediaControllerCode]java.io.IOException: device
(emulator-5554) request rejected: device not found
[2010-07-01 09:58:32 - MediaControllerCode]Launch canceled!

And when I try it again after the above device not found problem I
get:

[2010-07-01 10:01:26 -
MediaControllerCode]--
[2010-07-01 10:01:26 - MediaControllerCode]Android Launch!
[2010-07-01 10:01:26 - MediaControllerCode]adb is running normally.
[2010-07-01 10:01:26 - MediaControllerCode]Performing
com.test.code.MediaControllerCode activity launch
[2010-07-01 10:01:26 - MediaControllerCode]Automatic Target Mode:
launching new emulator with compatible AVD 'HVGAsdk1.6'
[2010-07-01 10:01:26 - MediaControllerCode]Launching a new emulator
with Virtual Device 'HVGAsdk1.6'
[2010-07-01 10:01:26 - Emulator]emulator: ERROR: the user data image
is used by another emulator. aborting

Totally weird, there's only one emulator.exe running (windows XP) and
Eclipse, just like the first 2 runs.

I know I can clear the locks, but that just restarts my emulator, so
that's the same as exiting  starting it again.
Starting the emulator outside Eclipse only works a few times, then it
says again that the user data image is used by another emulator.

I've tried Automatic target mode and specifying the correct avd image
in the run configuration (for 1.6 and 2.1 avds). Didn't matter.

I've also tried adding the -wipe-data flag at each start, but that
doesn't change anything. Tip: an emulator *does* get slow when it gets
full (run 'adb shell df' to see if your emulator is filling up). Then
use the -wipe-data flag to clean up (note that user data gets wiped!)

Is the DDMS maybe locking the emulator in some way at certain times?
It definitely sometimes happens when I click the emulator in DDMS and
then try to relaunch (redeploy) the same app.

Also strange: when I launch another app (after exiting 

[android-developers] Re: Bitmaps and OutOfMemoryError: Best Practices needed

2010-06-16 Thread MarcoAndroid
1) 3-4M for one image is a lot since you have total of 16M for the
whole app! Dunno the answer to your question
2) 25*256K in bitmaps is already over 6,4M. Added to 1) makes already
over 10M! AFAIK you should only use .recycle() if you really don't
need them anymore. Unclear to me what really don't need means.
3) 32x32 pixels is about 204800 bytes if you count 4 bytes per pixel
4) These icons are probably not big right?

The allocation tracker didn't give enough details for me, so am using
the Eclipse Memory Analyzer Tool. Here's a pretty handy tutorial on
how to use it  detect memory leaks, maybe useful:
http://ttlnews.blogspot.com/2010/01/attacking-memory-problems-on-android.html

On 16 jun, 01:24, Nathan critter...@crittermap.com wrote:
 I'm running into OutOfMemoryErrors when allocating bitmaps. This is
 not something I can reproduce with emulators, and has been reported by
 a few beta testers with the HTC Incredible.

 I'm not sure I can solve this directly, and my best hope is to follow
 best practices for bitmaps and memory thereof. But looking for those
 best practices based on groups archives left me with more questions
 than answers. If anyone has a chapter about this in their book, I will
 buy the book.

 Here are the things I've mulled over so far:

 1. I have a bitmap for a drawing buffer. It is about 3-4 megabytes on
 some devices. This is the biggest bitmap I have, and without it, I
 wouldn't be able to much of anything useful in my app.  I am assuming
 that it would not be useful to use inPurgeable if this is a bitmap
 that is drawn into. Is this true?

 2. Next biggest in the hierarchy are some bitmaps that are about 22K
 bytes and 256K unpacked.  Since I believe about 25 of these might be
 used at one time, I have a cache with a size of 25.
 I am careful to use BitmapFactory.Options.InPurgeable, so I believe
 that could make them take only 22K each, but I don't see that as
 guaranteed. Maybe they are taking 256K each, which would put me in the
 danger zone.
 As they are cycled out of the cache, I call bitmap.recycle(). I think
 this a good practice. Is it?

 3. Next are some resources with icon size 32x32 pixels.  There are
 about 50 that could be used or reused. If I use code like this:

                                                 Drawable s =
 mCtx.getResources().getDrawable(R.drawable.symbol_icon);
 Where s is a local variable to rendering. Suppose I call this 37
 times.
 Am I to assume that Android will do something smart like create only
 one bitmap for this resource even if it is used 37 times?
 Or am I to assume that Android will do something stupid like create 37
 bitmaps and keep references in an obscure location that will prevent
 garbage collection?
 Do I need to get more access to these bitmaps and do something smart
 myself?

 4. Finally are some other icons used for menus and ImageButtons. Most
 are declared in layout files - so I don't touch the bitmaps directly.

 Can someone better informed than me comment on these assumptions? I'd
 like to make my memory usage more efficient, but don't want to spend
 time on things that will amount to shuffling chairs on the Titanic.

 And how do I best measure this usage? Interestingly enough, I've tried
 using the Allocation Tracker and it says I haven't allocated a single
 bitmap. In light of the above, I don't think that's right.

 Thanks in advance.

 Nathan

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


[android-developers] Re: Orange rectangle around links in WebView

2010-06-15 Thread MarcoAndroid
I've seen this too with Google ads, not with Admob ads. Many apps have
this problem/issue. You can easily try it: when you see a google ad
(has a 'g' on the side), move the tracker ball up or down to the ad
(depending on if the ad is on top or bottom of the screen).

My guess is that it gets the focus. My first try to fix it would be to
make the view not focusable: view.setFocusable(false).

Dunno re: the webview, might be the same.

On 13 jun, 03:19, oriharel ori.ha...@gmail.com wrote:
 Hi All,
 I have a web view that is loaded with an HTML that contains links (a
 ref).
 when I switch to another activity (say to another tab in a tab
 activity) and then switching back to it, the link is surrounded with
 an orange rectangle. also happens in the GoogleAdView which really
 makes it impossible to view.

 can someone explains this?

 thanks,
 Ori

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


[android-developers] Re: EditText lose focus when appears keyboard in ListView

2010-05-19 Thread MarcoAndroid
I had the same problem:
http://groups.google.com/group/android-developers/browse_thread/thread/4883b7021b1a7724/f120bf311c5b81af

I just tried to answer that thread but it isn't possible anymore it
seems. Therefore, below what I typed in as the answer:

-

What I think this solved it (was a while ago): indeed using
addHeaderView(v, null, false). As in:
http://developer.android.com/reference/android/widget/ListView.html#addHeaderView(android.view.View,
java.lang.Object, boolean)

For me 'v' is the searchbox (input boxes + search button) inflated in
the code and set as headerview.

Note the 3rd parameter, that is the one that did it (when I look at my
comments in the code).
I also call setListAdapter() after adding the header, as mentioned in
the docs.

Hope this helps.

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


[android-developers] Re: Help?

2010-02-24 Thread MarcoAndroid
The DDMS tool to analyze memory usage does not give that much
information.

Check this post, might help you figuring out what could be wrong:
http://ttlnews.blogspot.com/2010/01/attacking-memory-problems-on-android.html


On 23 feb, 01:56, Moto medicalsou...@gmail.com wrote:
 @abowman
 Thanks for the tip, I did read that before but it always helps to be
 reminded of those small pitfalls!

 @Bob
 Yes, this is my app and I'm using HTC G1. Android 1.6.  I was using
 DDMS to investigate and that's how I determined that the activity was
 slowly releasing memory.  I did find leaks and using that method I was
 able to tune my activity.  But still the case is fast rotations memory
 is not cleared fast enough.

 I started using the memory analyzer from eclipse but I find it hard to
 understand/analize the data :(
 Yes, it shows me a chart with possible leaks but nothing looks
 familiar maybe it's lower level Android API calls all I see?

 Well any further tips could help :) Still thinking somehow slow down
 the activity when memory not cleared fast enough...

 -Moto!

 On Feb 21, 10:31 pm, Bob Kerns r...@acm.org wrote:

  Was it actually your app that was getting the error?

  The Launcher suffered from this problem in 2.1 on a Nexus One if you
  had a lot of applications; it seems fixed in 2.1 Update 1.

  If it's your app, you can investigate this from the DDMS perspective.
  Select your app, hit the Update Heap button at the top, and then the
  Cause GC button, and you'll see usage by type of object on the right
  in the Heap window. Select a type, and you'll see a histogram of
  object sizes / counts.

  If you add the Memory Analyzer features (there are two, add them both;
  one provides the basics, and the other adds charts), to your Eclipse
  environment from the Ganymede update site, you can see a great deal
  more detail. Just click th Download HPROF File button. I won't even
  try to describe all the nice bits of analysis it can do.

  You may find you need to temporarily give your app
  WRITE_TO_EXTERNAL_STORAGE permission so that the .hprof file can be
  written to the sdcard. Once you've done this, you probably don't need
  it again, though I did have to re-add it for one session after I
  downloaded the Memory Analyzer.

  On Feb 21, 12:14 pm, Lance Nanek lna...@gmail.com wrote:

   You might want to try calling System.gc() manually somewhere in there,
   like in onCreate. It has worked for me in the past to avoid that
   exception when recreating heavy weight activities.

   It's kind of an ugly hack, though. The call is documented as not even
   guaranteed to do anything. Also, you aren't supposed to be able to run
   out of memory if there is garbage to be collected that would prevent
   it.

   A wild off the wall guess as to why it works in some cases could be
   that the manual GC call triggers some finalizers which free up some
   memory not directly under the garbage collector's control, resulting
   in more free memory than the system thought it could get from garbage
   collecting. Or it could just be a bug, like you said.

   Last time I asked someone about the issue, they said to make sure I
   was calling recycle on all my Bitmap instances when I was done with
   them and things like that. I already was in my case, and it sounds
   like you've eliminated that in your test, but that's another thing to
   check in similar situations.

   On Feb 21, 2:04 pm, Moto medicalsou...@gmail.com wrote:

I got this issue that after changing orientation about 7 times I get
the OutOfMemoryError. :(

What's wrong!?  I stripped my app to the point were it only does
setContentView(...) and still I can reproduce the issue.

I do use all custom graphics.  Now this tells me there is a leak and a
big one somewhere, but it seems not in my code! Where than!? a bug on
the OS?  Can a xml layout have leaks?

Please any help finding the issue would help!

Thanks,
-Moto!

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

2010-01-18 Thread MarcoAndroid
Hello,

Can anybody clarify what is and isn't supported in which version of
the SDK regarding the Google API add-on regarding Maps?

When I look here 
http://code.google.com/intl/nl-NL/android/add-ons/google-apis/reference/index.html
Maps is only available since level 4 (1.6).

But in the hello MapView it says it's available for 1.5 and higher:
http://dev.android.com/guide/tutorials/views/hello-mapview.html

Here 
http://groups.google.com/group/android-developers/browse_thread/thread/5a7a001909d7bd5b/e6f47fd5dc3e6518
people have been trying it on 1.5. Did they fail because it's just not
possible on 1.5?
And from reading this
http://groups.google.com/group/android-developers/browse_thread/thread/7ce1902505bba25a/f915dcb6d1ee6f19
it *seems* it might be possible, though there is a bug/issue with a
certain use case.
And looking here http://www.anddev.org/viewtopic.php?p=24902
it seems to be there in 1.5. But what are the differences then? Was it
included in pre 1.5 SDK, after that not anymore and only part of the
device if available?

And, what exactly happens re: an app that uses Maps (thus has uses-
library android:name=com.google.android.maps / in the Manifest)?
Will the app install but the Maps won't work (probably some exception
will occur when trying to use a MapView)?
Or will the app not be installable for any devices with SDK  1.6
(assuming 1.6 is the minimal level)?
Here 
http://code.google.com/intl/nl-NL/android/add-ons/google-apis/maps-overview.html#useslibrary
it says It also ensures that the Android system will not install your
application on a device unless the required library is available.
So I can't check in the code whether the class(es) can be loaded to
see if it's available?

If 1.5 and = 1.6 have *different* Maps implementations, how would you
build an app supporting that?

I also understood that you're not allowed to include maps.jar with
your app right?

Tip1: if you don't need to integrate maps in your app: I guess via an
Intent you can of course start Google Maps as an external app
Tip2: or try http://code.google.com/p/osmdroid/ I haven't tried it
(yet, depending on the answers here :).

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

[android-developers] Re: Google Add-On Maps for 1.5 and higher

2010-01-18 Thread MarcoAndroid
Ok thanks you both for clarifying!

But, one question remains a bit unanswered to me, esp. after reading
this part of Dianne's answer: a separate extension library that
Google supplies to vendors who want to include it.

So what happens if a user with a device of a vendor to which the lib
hasn't been supplied to, wants to install an app which has the uses-
library in the manifest?
Does this user not see the app in any store? Or can the user download,
but what happens then when a MapView is created/used (since the
extension is not there)?

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

[android-developers] Re: Google Add-On Maps for 1.5 and higher

2010-01-18 Thread MarcoAndroid
Ok thanks.

It would be great to be able to still provide the app to everybody
(both Google Market  outside), but just no maps functionality enabled
if Maps can't be found/isn't available.

Can't I do this as a workaround to make my app handle that case too?

1- remove the uses-library tag from the manifest (thus everybody can
install it)
2- try to load for example the MapView class via reflection or a
wrapper as mentioned here 
http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html
3- if not there, don't show maps functionality. If there, assume it's
available.

BTW, is the loading of libs specified via uses-library different from
the regular class/lib loading?


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

[android-developers] Re: Google Analytics

2010-01-01 Thread MarcoAndroid
Hi,

My guess is that you have to call tracker.start() for each Activity,
as it says this in the example: Then call its start() method, passing
the web property ID *and activity being tracked*.
But that's just a guess... So I've posted those questions in the maybe
more appropriate discussiongroup 
http://groups.google.com/group/google-analytics-api
Post: 
http://groups.google.com/group/google-analytics-data-export-api/browse_thread/thread/b3794b6455a1d399

tracker.stop() you have to call when your application is closing. So
onDestroy() in your last Activity or onTerminate() in your Application
i guess again. But that would mean each onCreate() tracker.start()
does not need to have a matching onDestroy() tracker.close() call?

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


[android-developers] Re: Is there a list of standard Intent specifications?

2009-11-16 Thread MarcoAndroid
Not official but definitely handy to see what's already out there: a
registry of Intents.
Includes Android's default Intents. Dunno if all are in the table.
http://www.openintents.org/en/intentstable


On 14 nov, 22:26, MrChaz mrchazmob...@googlemail.com wrote:
 I'm looking into getting my application to show up when the user tries
 to 'share' a picture via the Gallery application I can't, however,
 find any information about how exactly to go about this.

 I get that I need to declare an intent filter for the SHARE action,
 what I can't seem to find is how the Gallery wants to send out the
 selected image.

 http://android-developers.blogspot.com/2009/11/integrating-applicatio...
 documentation is key indeed.

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


[android-developers] ListView details indicator

2009-08-19 Thread MarcoAndroid

Hello all,

Anybody knows how to get the  sign in the listview? Like for
example is done in the gocart app (now shopsavvy), see screenshots
here: http://code.google.com/intl/nl/android/adc/adc_gallery/app.html?id=17
The idea of the  sign is to show the user there's more information
available (when clicking on the entry).

I know how to do it by making my own custom items in a ListView.
Is that how they probably did it? Thus with their own drawable on the
right?
I'm kindof hoping I don't need to do it this way, that there's already
something in existence for it :)

Is there a theme or something else that does it for you? Or at least
an existing drawable (I did not find it here
http://developer.android.com/reference/android/R.drawable.html)?

Regards,
Marco

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



[android-developers] Re: Have ListView and other widgets scroll as a whole

2009-08-14 Thread MarcoAndroid

Hey Wouter,

It did not work 100% for me, my inputboxes loose focus when the
virtual keyboard pops up. See my question + answer here:
http://groups.google.com/group/android-developers/browse_thread/thread/4883b7021b1a7724

For you it definitely could work, you have a different setup. It's
quite easy to try it out. The demo that comes with the adapter has 2
adapters  1 button added to the mergeadapter, so it could work.

Also maybe useful is this post: 
http://osdir.com/ml/AndroidBeginners/2009-02/msg00585.html
(couldn't find the original post anymore)

At the moment I'm now putting my inputboxes + searchbutton in the
ListView header. It also got some focus problems (sometimes the whole
header gets focus (becomes orange or green), tried to set focusable to
false but that didn't do it (yet).


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Computing height for ListView based upon items height

2009-08-12 Thread MarcoAndroid

Hello all,

So I've got a ListView setup in my xml with height 0dip (I don't know
the height yet).

Then I setup an adapter with my custom getView() implementation and
set is as the ListView's adapter.

I then get the layout params from the ListView via getLayoutParams()
into variable 'infoLayoutParams'.

If I then set the height of the ListView via infoLayoutParams to like
400 and do a requestLayout(), the ListView is shown. So far so good.

But the height 400 is just for testpurposes. I'd like to compute the
height, based upon the height of items in the ListView. Let's say I
want to set the height of the ListView to the height of the first 5
entries added up (so at least those 5 will  always be shown). Thus I
need to retrieve the height for each item; since they are of variable
height, I can't take some constant value.

So I tried getHeight() on the view -- returns 0.
Then I tried getting the adapter from the ListView and requesting its
views myself via getView() and doing a getHeight() on that view --
returns 0.
Is 0 being returned because none of the (item and list) views have
been layout-ed yet?

I searched on the forums for an answer but no luck ther either.

Thus the question is: is there a way to get the height of each item in
a ListView, while for the ListVIew the height has not been set yet?
(on one hand it makes sense you can't because the LV isn't layout-ed
yet. But that then implies you can never compute based upon the height
of the items right?)

Regards,
Marco





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



[android-developers] EditText in ListView loses focus after keyboard pops up

2009-08-04 Thread MarcoAndroid

Hi all,

I'm (still :) trying to have one page with on top two EditText
searchboxes and a searchbutton.
When the user then presses the searchbutton, the result should appear
below, and during scrolling everything should move up/down, just like
a regular google search result.

I've been given a good pointer by Mark Murphy in this post:
http://groups.google.com/group/android-developers/browse_thread/thread/e4179c4c9cc96c4c/45cd80758b3ef2df?lnk=gstq=listview#45cd80758b3ef2df
and managed to get pretty far. The MergeAdapter works great regarding
appending different adapters and views.

So now I've got one ListView using the MergeAdapter with on top an (in
code inflated) layout with the two EditTexts and the searchbutton.
Below that are just the MergeAdapter demo lists.
See 
http://groups.google.com/group/cw-android/browse_thread/thread/b3e8d42c594ee531
for a bit more detail on how I did it.

Then the strange stuff (strange to me that is :) occurs:
- After starting the app, the focus goes to the first entry in the
buildFirstList(). That's already a bit odd, I expected it to go either
the first EditText, or have focus on the whole layout that contains
those inputboxes + searchbutton.
- And then: when I click (or on a real phone tap) any of the two
EditTexts, the field gets focus for a splitsecond, then the keyboard
pops up and the focus on the selected EditText is gone! To be able to
enter text I have to select the EditText field again.

Now I've been doing some research, and it seems that focus on a
focusable element in a ListView is possibe  allowed.
See for example here where Romain Guy says it should work if the
element is focusable:
http://groups.google.nl/group/android-developers/browse_thread/thread/8cedf0199a958762

Though the ListView is not really meant for it:
http://groups.google.com/group/android-developers/browse_thread/thread/50f0fc185da8fe4d

It is maybe somehow related to this problem, where the tabs steal
focus:
http://groups.google.com/group/android-developers/browse_thread/thread/f3fdd1eb1726/0d28c51a6b9ffdfe?lnk=gstq=tab%2Bfocus#0d28c51a6b9ffdfe

So I haven't found the real solution yet (using the ListView headers,
as I tried in b) in my other post, has some other focus-issues, see
that post).
Anybody know what's going wrong here with the focus? Or, actually what
is going on with the focus, why it's behaving like this, maybe that
helps me getting to a solution?
Is there a workaround, where I can tell the runtime where to go after
the keyboard shows?
Is there some focusable setting I didn't do? I've played around with
them, none resolve the problem.

Regards,
Marco

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



[android-developers] Re: Have ListView and other widgets scroll as a whole

2009-07-26 Thread MarcoAndroid

@mark murphy

Awesome, just ran the demo of the MergeAdapter, looks like that's what
I've been looking for! The code that implements it looks relatively
simple; the fact I couldn't come up with it means I don't know all the
ins  outs yet of the Android platform :)

I'll now try to add it to my search app, the ultimate test to see if
it fits my needs.

Thanks already for sharing this! Also saw that there are more
utilities available through the cw-android group.

Regards,
Marco



On 24 jul, 19:20, Mark Murphy mmur...@commonsware.com wrote:
 MarcoAndroid wrote:
  So my question: has anybody implemented this in some way?

 Yes.

 You should be able to use my recently-released MergeAdapter:

 https://github.com/commonsguy/cwac-merge/tree

 You would hand the MergeAdapter your initial set of ordinary views, plus
 an empty Adapter of some form for your search results. When your search
 is complete, populate your formerly-empty adapter with the results, and
 they should show up.

 If that doesn't work, it's a scenario I need to support myself within
 the next couple of weeks, so we should be able to get it going for you
 one way or another.

 I'll be adding more documentation about it in the coming weeks, both in
 the README and in a blog post on AndroidGuys.

 Questions about it should go to the cw-android Google Group:

 http://groups.google.com/group/cw-android

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

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



[android-developers] Have ListView and other widgets scroll as a whole

2009-07-24 Thread MarcoAndroid

Hello all,

I'm trying to achieve the following with my Android search app:

- 2 input boxes where the user can enter criteria to search for
- 1 search button
- when the search button is clicked, a search is performed and on the
same page the matches are shown *below* the 2 input boxes and search
button.
- the results can be quite a few (say up to 50), which won't fit all
on the viewable part of the screen, so the user has to be able to
scroll down in the results.
- when the user scrolls down over the results, the 2 input boxes +
search button should of course also scroll up out of sight.

Basically the behaviour you get when you for example do a google
search on google.com. But, for clarity: I don't want to use the
WebView.

Note that there should be no scrollbar for the results only (that can
be done easily with a standard ListView), the all needs to scroll as a
whole.

The reason I want this behavior is that I don't want to direct the
user to a next screen with the search results; that would be so
annoying having to go back to the search screen all the time if you
want to enter another search criteria, like if you figured out you
made a typo.

Now I've read most posts about possible solutions, quite a few people
asked for this before, like:

http://groups.google.com/group/android-developers/browse_thread/thread/b7d2b7c275ac730f/803f40201920c6d9?lnk=gstq=scrollview+listviewpli=1
http://groups.google.com/group/android-developers/browse_thread/thread/3bfb013704d886fb/a556ab75f22c8dd1?lnk=gstq=scrollview+listview
http://groups.google.com/group/android-developers/browse_thread/thread/af85d0ccddfd10d7/b4d705341719382c?lnk=gstq=scrollview+listview
http://groups.google.com/group/android-developers/browse_thread/thread/77acd4e54120b777/00fe963ec94d78ad?lnk=gstq=scrollview+listview
http://groups.google.com/group/android-developers/browse_thread/thread/a05227c317c8ad8d/86e6f054fba30828?lnk=gstq=scrollview+listview
http://groups.google.com/group/android-developers/browse_thread/thread/fd0da00fe94ffed8/1d3bd9b81dd7d3e3?lnk=gstq=scrollview+listview

But I haven't been able to find the real solution for my requirements.
I've also not seen any apps yet that do implement anything like this,
though I haven't seen all apps.

This what I already tried on the emulator:

a) ListView inside a Scrollview. Thus:

Scrollview
EditText
EditText
Button
ListView
/ScrollView

The app looks like I want it; I calculate the total height of the
ListView items and set the ListView's height to that. This way there's
no scrollbar on the ListView itself, only the Scrollview's scrollbar
shows. And I can scroll down in the ListView entries using the down
key.
Problems: multiple posts mention to NOT do this, scrolling gets
confused. And indeed, although the result is exactly how I want it to
look, scrolling acts up: stepping through  the entries in the list
below what's visible, scrolling of the whole  (performed by the
ScrollView) stops until the last entry is reached!
So unless I maybe make my own custom ListView that doesn't perform any
scrolling (or whatever fixes this behaviour), this solution is a dead
end. Any tips would be most welcome.

b) Fixed listviewheader in a ListView (no ScrollView) containing the 2
boxes and searchbutton, more or less like
http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/
and in the API demo Views/Lists/8. photos. Thus:

LinearLayout
ListView
/LinearLayout

In the code I then set the header of the list to this separate view:
LinearLayout
EditText
EditText
Button
/LinearLayout

Problems: Firstly: the user has to scroll a lot more to see all
results because the header keeps occupying the top of the screen.
Secondly, with the emulator up-key I can't step (focus) onto the
Search button or input boxes anymore! If I turn on focusability for
the header, I can only step up onto the whole header, not the
separate fields. If I turn it off, nothing happens, I can only scroll
up to the top entry in the resultlist.
Thus this might work (though not completely matching my requirements),
but only if is it possible to make the inputboxes + searchbutton part
of the scrolling up focus sequence. Is this possible?

c) Inputboxes + search button separate from the ListView, having the
inputboxes + search button fixed on top, ListView below them,
scrollable (e.g. in a FrameLayout). Got this to work, but I don't want
the inputfields to be fixed, so just like  b) dismissed.


- Other solutions mentioned in posts but not tried yet:
1) use a LinearLayout per entry and attach an adapter to it, having
listeners on the adapter to reload the layout. Could this give me the
behaviour I want?
2) use tabs. Nope that's a completely different look and feel than
what I'm trying to achieve.
3) use ViewFlipper or one of its kin and create your own setup for
flipping between the list and the rest of the contents of the
ScrollView. Sounds interesting, but are there any examples of this or