Re: [android-developers] Re: SDK 11 is the slowest yet

2011-02-23 Thread Stephen Jungels
The Honeycomb emulator is faster on my dev system than the preview
was, but it is highly sensitive to the emulated hardware.  I am using
1024 megabytes of emulated RAM and a 256 meg vm heap size and I still
see out of memory errors when the launcher tries to load wallpaper.

The AVD refuses to go above 1.5G or so of emulated RAM.

I can't comment on Eclipse pegging the CPU, it is about the same as before.

On Wed, Feb 23, 2011 at 6:54 AM, Reuben Scratton
 wrote:
> I suspect Honeycomb emulator's performance is being crippled by every last
> pixel now having to go through a pure software OpenGL pipeline. That will
> have far more stages than the old 2D renderer had.
> If you ever ran an OpenGL ES app on older emulators, you'd see similar
> slowness... there is far more computation involved per pixel.
> As for building and deploying, I am having a lot of trouble with the new
> tools too... Win32 Eclipse Galileo here. Still investigating.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: Eclipse Helios and SVN problem

2011-02-23 Thread Stephen Jungels
Either that, or separate repositories.

The alternative would be to create a more monolithic project with its
project root one level up, so it includes both folders in question.
That seems klunky.

On Wed, Feb 23, 2011 at 6:05 AM, Indicator Veritatis  wrote:
> So then how would both the existing project, and the library project
> be placed under version control? As separate "project roots" in the
> repository?
>
> On Feb 22, 1:04 pm, Stephen Jungels  wrote:
>> Probably the right solution would be to import the src folder
>> separately into a library project, and add a reference to the library
>> project to your existing project.  This would mirror what the designer
>> was doing in the preferred style of Eclipse + Android.
>>
>> On Thu, Feb 17, 2011 at 1:50 PM, decades-softw...@freenet.de
>>
>>
>>
>>
>>
>>
>>
>>  wrote:
>> > Hi,
>> > I'm a newbie with Eclipse and Android. I have a legacy project from an
>> > SVN repository which I could import and use under Eclipse Helios. Also
>> > changes inside and outside Eclipse are synchronized fine with the SVN.
>>
>> > Now the problem: The project structure consists of a root directory,
>> > referring to a src path, which exists outside the root (i.e. on the
>> > same level as the root of the project is). I guess this has been
>> > arranged by the designer, because the src part has been referenced
>> > from different java projects for different platforms. I think this is
>> > not such a bad idea.
>>
>> > However: Whatever I do I can't make Eclipse and SVN synchronize
>> > changes on files located in this "outer" directory. What do I have to
>> > do in order to make both aware of the outer parts, w/o being forced to
>> > change the file/dir structure completely?
>>
>> > Kind regards
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] What name would get more attention

2011-02-22 Thread Stephen Jungels
If you personally like the physics theme, it can work, but a game
needs to be more character based, for example "Genius Bike," featuring
an absent-minded professor who is sucked into a wormhole while riding
his little bike to the Institute for Advanced Studies one morning...


On Mon, Feb 21, 2011 at 9:22 PM, brian purgert  wrote:
> My game is called space bike and i put it out for a day and good good
> reviews but i took it down because of low active installs, i had a friend
> play it and realized it was to hard for the average user, so i fixed it up
> and added alot of things to make is easyer.
>
> In my game you control gravity and make your way through physics mazes, it
> doesent actually look like space. More of like a tron grid. You have a bike
> like mx moto but its alot more interactive.
>
> So basically my question is should i name my bike game;space bike which it
> is currently or physics bike, or something else, i want people to see the
> name and try is out of course
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Eclipse Helios and SVN problem

2011-02-22 Thread Stephen Jungels
Probably the right solution would be to import the src folder
separately into a library project, and add a reference to the library
project to your existing project.  This would mirror what the designer
was doing in the preferred style of Eclipse + Android.



On Thu, Feb 17, 2011 at 1:50 PM, decades-softw...@freenet.de
 wrote:
> Hi,
> I'm a newbie with Eclipse and Android. I have a legacy project from an
> SVN repository which I could import and use under Eclipse Helios. Also
> changes inside and outside Eclipse are synchronized fine with the SVN.
>
> Now the problem: The project structure consists of a root directory,
> referring to a src path, which exists outside the root (i.e. on the
> same level as the root of the project is). I guess this has been
> arranged by the designer, because the src part has been referenced
> from different java projects for different platforms. I think this is
> not such a bad idea.
>
> However: Whatever I do I can't make Eclipse and SVN synchronize
> changes on files located in this "outer" directory. What do I have to
> do in order to make both aware of the outer parts, w/o being forced to
> change the file/dir structure completely?
>
> Kind regards
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: Will no longer support Android 1.5

2011-01-17 Thread Stephen Jungels
My stats are from Google Analytics. If you use it and explain what you
are doing in your terms of service or license agreement, you are
likely to get at least a few comments from users who think you are
spying on them, but in some cases it is worth it because you have a
better picture of how your app is being used.

SJ

On Mon, Jan 17, 2011 at 10:37 AM, Brill Pappin  wrote:
> Thats fine, but doesn't give you any stats on your own app, which is
> very important for maintaining customer loyalty.
>
> We intend to make the company a truste name (not just the apps) in the
> market with quality product, so we really want to know what *our*
> users are doing.
>
> - Brill Pappin
>
> On Jan 17, 10:19 am, Laks  wrote:
>> Is this what you are looking for?
>>
>> http://developer.android.com/resources/dashboard/platform-versions.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

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

2011-01-17 Thread Stephen Jungels
I've been tempted to drop 1.5, partly because it tends to be installed
on low-end devices where people will not have a very good experience
of my app, but recently my percentage of 1.5 users has gone up instead
of down on some apps.

There's a big difference between dropping (loyal) 1.5 users and never
having them in the first place, so for new apps my default assumption
is I will target 1.6+ or even 2.1+.

SJ

On Mon, Jan 17, 2011 at 8:52 AM, TreKing  wrote:
> On Mon, Jan 17, 2011 at 7:07 AM, String 
> wrote:
>>
>> For my own apps, I don't have a problem supporting 1.5, and I figure that
>> an extra 5% is nothing to sneeze at. But then, I've yet to run into anything
>> that was really problematic for me to support on 1.5. Some of the resource
>> handling is kind of annoying, but not really a big deal.
>> If I had some core feature that I just couldn't make backward-compatible,
>> then yes, I'd drop 1.5 too. But probably not until then, or until the
>> install percentage drops a few more points.
>
> This. (Thanks for writing my post for me :-) )
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Can't find Activity error

2011-01-13 Thread Stephen Jungels
On Wed, Jan 12, 2011 at 8:37 PM, John Lussmyer  wrote:
> Should they?
> And which ones are you talking about?
>

I was talking about the name elements of your service and activity
definitions. A technique much like this works in my own code and the
only thing that jumps out as different about your manifest file is the
lack of fully-qualified class names.

(Referring to this page, under the heading "Declaring class names":)
http://developer.android.com/guide/topics/manifest/manifest-intro.html

SJ

> On Wed, Jan 12, 2011 at 5:22 PM, Stephen Jungels  wrote:
>>
>> Unless your android:name elements are fully qualified, they should
>> begin with a period, should they not?
>>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Can't find Activity error

2011-01-12 Thread Stephen Jungels
Unless your android:name elements are fully qualified, they should
begin with a period, should they not?

On Wed, Jan 12, 2011 at 8:05 PM, John Lussmyer  wrote:
> Didn't help.
>
> On Wed, Jan 12, 2011 at 4:59 PM, Mark Murphy 
> wrote:
>>
>> I'd get rid of the setPackage() 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

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

2011-01-11 Thread Stephen Jungels
On Tue, Jan 11, 2011 at 2:31 PM, Anm  wrote:
>
> When memory profiling my app, I've noticed that multiple instances of
> the same local service class are getting instantiated.  This is not my
> expectation from my interpretation of the APIs and service example
> code in the SDKs.
>
> My app is designed such that the service represents a data layer,
> handling all databases, networking, and some potential background
> operations when the Activity is not in the foreground.  The Activity
> is responsible for starting the service by calling bindService(..)
> during onResume(..).
>   context.bindService( new Intent( context,  MyService.class),
> service_connection, Context.BIND_AUTO_CREATE );

It's not shown explicitly in the examples, but I have had better
results binding to my service in the activity's onCreate method.

>
> To allow the memory allocations of the UI/Activity while the Service
> continues (for a limited amount of time), the Activity call
> unBindService(..):
>   context.unbindService( service_connection );

Never tried anything like this.

> To be clear, the Service does not call selfStop() right away.  Instead
> it notes the time of the last unbind and effectively sets a timer.
> This part of the code is working just fine.

My reading of the docs suggests that a service started by binding to
it will shut itself down right after it's last bound activity unbinds.
If you want the manual stop self to be required, you should start the
service explicitly before binding to it.

> Now, when I go in and out of the application, I find I'm binding to a
> new instance every time I resume the activity.  I assumed I would bind
> to the same Service object each time as long the Service did not stop
> itself or the process was shutdown for memory reasons.  However, my
> logs and the memory profiler do not show this to be the case.
>
> How can I guarantee my process only has one instance of my Service
> class instanciated, and that the Activity will rebind to existing
> Service upon Resume?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: WebView image source

2011-01-10 Thread Stephen Jungels
Well then it sounds more like an HTML problem.  Maybe write out the
dynamic HTML and take a look at it in a text editor or a desktop
browser?

SJ

On Mon, Jan 10, 2011 at 3:52 PM, Neilz  wrote:
> Well the reason I'm looking for a way around this is:
>
> The WebView loads the textual content, then a second or so later the
> image loads from the given URL. But when the image loads into the
> WebView, it screws up the text that is already on display. For some
> reason it makes it all garbled and unreadable. So I'm trying to think
> of a way to have the image ready before the WebView loads.
>
> On Jan 10, 8:42 pm, Stephen Jungels  wrote:
>> If the image is cached in a format that is understood by the browser
>> (ie JPEG, PNG), you should be able to create a content provider that
>> will feed the image to the browser via a custom scheme.
>>
>> On the other hand this could end up wasting a lot of memory so is
>> there a need to cache the image, rather than letting the WebView
>> handle that?
>>
>> SJ
>>
>> On Mon, Jan 10, 2011 at 2:59 PM, Neilz  wrote:
>> > Perhaps I need to save the Bitmap somewhere on the device prior to
>> > calling my img src in the webview?
>>
>> > I wouldn't want to use the SD card though, it would need to be
>> > internal to the app... and how would I refer to it from the src tag?
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: WebView image source

2011-01-10 Thread Stephen Jungels
If the image is cached in a format that is understood by the browser
(ie JPEG, PNG), you should be able to create a content provider that
will feed the image to the browser via a custom scheme.

On the other hand this could end up wasting a lot of memory so is
there a need to cache the image, rather than letting the WebView
handle that?

SJ

On Mon, Jan 10, 2011 at 2:59 PM, Neilz  wrote:
> Perhaps I need to save the Bitmap somewhere on the device prior to
> calling my img src in the webview?
>
> I wouldn't want to use the SD card though, it would need to be
> internal to the app... and how would I refer to it from the src tag?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Samsung Galaxy Player

2011-01-03 Thread Stephen Jungels
Apparently:
http://android-developers.blogspot.com/2010/10/five-steps-to-future-hardware-happiness.html

There are also (or will be) the Wifi-only Galaxy Tab, and Google TV.


On Sun, Jan 2, 2011 at 8:47 PM, Zsolt Vasvari  wrote:
> Before, the official position was that all apps on the Market could
> assume that there will be phone capabilities on the user's device.
>
> Is this assumption officially out the window with the availability of
> the Android Market on the Samsung Galaxy Player?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: Who or What is AppBrain?

2010-12-20 Thread Stephen Jungels
Don't get *too* happy.

When AppBrain reports (for example) your install base in Italy, what
it is really reporting is a combination of your install base in Italy,
and AppBrain's install base in Italy. AppBrain is itself an Android
App, and the detailed stats it reports pretty much have to be
collected from the sample of your users who are also AppBrain users.

If you really need to know these things, you will get more accurate
results by installing your own analytics solution like Fleury or
Google Analytics.

--SJ

On Mon, Dec 20, 2010 at 2:35 PM, Brill Pappin  wrote:
> I gotta' say, that I'm happy I read this thread!
>
> I've claimed my apps, and I can now get a lot of data that I was
> missing from the Market... for instance I can now see that 60% of my
> users are on Android 2.2 and that the next largest install base after
> English is Italian (I never would have guessed).
>
> This is important information for what I'm working on!
>
> - Brill Pappin
>
> On Dec 20, 2:50 am, Mark Murphy  wrote:
>> On Sun, Dec 19, 2010 at 5:14 PM, String  
>> wrote:
>> > AppBrain is somebody's vision of what the Market should be, and it's not a
>> > bad one. The basic app information (name, description, etc) is "pirated"
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Application unavailable in Android Market

2010-12-10 Thread Stephen Jungels
Your apps are visible in the US market on my Droid X (Android 2.2)
test device.  They're not visible on my Galaxy S (2.1) test device.
One thing to look at is the copy protection setting in the developer
console.

--SJ

On Fri, Dec 10, 2010 at 9:27 PM, Pedro Duque  wrote:
> Thank you TreKing,
>
> Of course I'm limiting the test to >=Eclair version. I tried it on a Galaxy
> Tab and other Samsung Galaxy S... but maybe it's a problem in Portuguese
> Android Market.
>
> I'm trying to get more tests locally.
>
> Thanks again,
> Pedro Duque
>
> On 10 December 2010 18:42, TreKing  wrote:
>>
>> On Fri, Dec 10, 2010 at 12:35 PM, Pedro Duque  wrote:
>>>
>>> Shouldn't it be available on all Android Markets?
>>
>> No. Not all phones support Live Wallpapers.
>>
>>>
>>> Is there anything we should do to make it available worldwide?
>>
>> See the section on Market filters in the documentation. But that still
>> won't prevent it not showing on phones that don't support it.
>>
>>>
>>> Can you search for it in your market just to see if you can find this
>>> apps?
>>
>> I see it - US Nexus One, 2.2.1
>>
>> -
>> TreKing - Chicago transit tracking app for Android-powered devices
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: Detecting Task Resume

2010-11-21 Thread Stephen Jungels
The link you provided goes to a design document.  The technical
information you need is here:
http://developer.android.com/guide/topics/fundamentals.html

SJ

On Sun, Nov 21, 2010 at 7:32 PM, Doug  wrote:
> I don't think there aren't events to capture for task foregrounding
> and backgrounding.  An individual activity can of course know when it
> is being paused and stopped, but under normal circumstances the
> activity doesn't always know why.
>
> What is it that you need to do differently if the task gets
> backgrounded then comes back?
>
> Doug
>
> On Nov 19, 7:32 am, Some Coder  wrote:
>> Hi,
>>
>> I'm trying to write some initialization code for my app which
>> differentiates between the cases when it it launched from scratch and
>> when it it is resumed (i.e. the user launches the app, hits the home
>> button, starts another task, then at some later time navigates back to
>> my app).  From the doc:
>>
>> http://developer.android.com/guide/practices/ui_guidelines/activity_t...
>>
>> It looks like what I want to do is to detect when the "Task" for my
>> application is resumed.
>>
>> What is the cleanest way to do this?  Is there an API for monitoring
>> Task state?
>>
>> Any info would be much appreciated.
>>
>> -D
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: What Intent for Browser without URL

2010-11-19 Thread Stephen Jungels
Have you tried using a standard intent to open the browser with the
URL "about:blank" ?

Maybe not exactly what you want, but simple and likely to work everywhere.

On Fri, Nov 19, 2010 at 5:51 PM, jotobjects  wrote:
> Thanks -
>
> I don't have a URL to launch and I don't want to land on the google
> web search page.  The behavior I want is what happens when the user
> launches the browser from the Home screen.
>
> So maybe I should doing a PackageManager.queryIntentActivityOptions
> for an Intent with CATEGORY_LAUNCHER and URI scheme "http".  and then
> use the ResolveInfo to start the Activity.  Does that sound right?
>
>                String packageName = resolveInfo.activityInfo.packageName;
>                String activityName = resolveInfo.activityInfo.name;
>                Intent intent = new Intent();
>                intent.setComponent( new ComponentName( packageName,
> activityName ) );
>
>
>
> There are a couple of more followup questions inline below -
>
> On Nov 18, 5:46 pm, Dianne Hackborn  wrote:
>> That Intent is okay, though there is no need for BROWSABLE.  (As per the
>> documentation, BROWSABLE means that the Intent came from an untrusted source
>> so you want to restrict who will handle it to those that say they will
>> protect themselves from such things.)
>
> That surprises me because I interpreted the javdoc for Intent to say
> that if you include a Category you must include ALL the categories
> listed for that Intent. So if BROWSABLE is a category you would have
> to include it - is that right?
>
>>
>> I'm not sure what you mean by "empty URI" -- it says "empty string", which
>> would just be a Uri created from an empty string.
>
> The referenced documentation about WEB_SEARCH caused me to try this
> intent -
>
> new Intent(Intent.ACTION_WEB_SEARCH, Uri.parse(""));
>
> but that results in this error -
>
> android.content.ActivityNotFoundException: No Activity found to handle
> Intent { act=android.intent.action.WEB_SEARCH dat= }
>
> So I'm not sure what the documentation means here.  What should I be
> doing?
>
>
>>
>>
>>
>> On Thu, Nov 18, 2010 at 5:05 PM, jotobjects  wrote:
>> > Thanks - I was afraid of that (although it is not quite blind luck).
>>
>> > The user's home page would be an obvious target, but there doesn't
>> > seem to be a non blind luck way to find the home web page.  The
>> > browser seems to bring up the last page visited which is OK since that
>> > will be customary behavior for the user.
>>
>> > I also tried this, which works but lands the user on thewww.google.com
>> > web page with  "http" in the input window.  Is this a valid Intent?
>>
>> > Intent webIntent = new Intent(Intent.ACTION_VIEW,Uri.fromParts("http",
>> > "", null));
>> > webIntent.addCategory(Intent.CATEGORY_DEFAULT);
>> > webIntent.addCategory(Intent.CATEGORY_BROWSABLE);
>>
>> > Also I do not understand this documentation for how to bring up the
>> > web browser  -
>>
>> >          http://developer.android.com/guide/appendix/g-app-intents.html
>>
>> > The WEB_SEARCH action mentioned there with an "empty" URI sounds like
>> > what I want, but I can't figure out how to create an "empty URI" that
>> > works.
>>
>> > On Nov 18, 2:52 pm, Dianne Hackborn  wrote:
>> > > That is a bogus Intent; it is just blind luck that it happens to only run
>> > > into the browser as something that happens to match it, and you can't
>> > count
>> > > on that doing what you want anywhere else.
>>
>> > > I don't believe there is a generic action to start "the browser;" you are
>> > > supposed to start it by asking it to view a URI.
>>
>> > > On Thu, Nov 18, 2010 at 2:39 PM, jotobjects 
>> > wrote:
>> > > > I want to invoke the internet browser app without giving it a URL to
>> > > > open.  I have tried a couple of things.  What seems to work is this -
>>
>> > > >   Intent webIntent = new Intent(Intent.ACTION_MAIN);
>> > > >   webIntent.addCategory(Intent.CATEGORY_LAUNCHER);
>> > > >   webIntent.addCategory(Intent.CATEGORY_DEFAULT);
>> > > >   webIntent.addCategory(Intent.CATEGORY_BROWSABLE);
>> > > >   context.startActivity(webIntent);
>>
>> > > > Is there another or better Intent to use?  Is it good practice to use
>> > > > the Launcher Intent for an app in this way?
>>
>> > > > --
>> > > > You received this message because you are subscribed to the Google
>> > > > Groups "Android Developers" group.
>> > > > To post to this group, send email to
>> > android-developers@googlegroups.com
>> > > > To unsubscribe from this group, 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

Re: [android-developers] add a linear layout on click of button

2010-11-12 Thread Stephen Jungels
findViewById requires that you have already inflated the xml view
(with setContentView, for example).

To load a view defined in xml dynamically you want to use a layout
inflater of some kind:
http://developer.android.com/reference/android/view/LayoutInflater.html

Or you could also just change the visibility state of the view that
turns on / off.

On Fri, Nov 12, 2010 at 5:11 AM, RKJ (Android developer)
 wrote:
> Hi all,
>
> I want to add a full layout on click of button, i did in below way...
>
> I want when i press the R.id.phone_more_botton button, then entire
>  will added, if i click again again add then entire layout.
>
>
>
>
> addContact.java code
>
> if(view.getId()==R.id.phone_more_botton)
>                {
>                        LinearLayout addContactPhone;
>
> addContactPhone=(LinearLayout)findViewById(R.id.add_contact_phone);  //
> line 62
>                        LinearLayout
> ll=(LinearLayout)findViewById(R.id.add_contact_phone1);
>                        addContactPhone.addView(ll);
>
>                }
>
>
> xml code---
>
> --
> -- some other Linear layout...
>                                                                   
> android:id="@+id/phone_more_botton"
>                                                        
> android:layout_width="20dip"
>                                                        
> android:layout_height="30dip"
>                                                        
> android:clickable="true"
>                                                        
> android:onClick="moreButtonHandler"
>                                                        
> android:background="@drawable/ic_btn_round_plus"/>
> --
> --
>
>                                         android:orientation="horizontal"
>                                        android:layout_width="wrap_content"
>                                        android:layout_height="wrap_content" >
>
>                                                                                   
> android:id="@+id/add_contact_phone_home"
>                                                
> android:layout_width="wrap_content"
>                                                
> android:layout_height="wrap_content"
>                                                android:text="Home"/>
>
>                                         android:id="@+id/edit_text_phone"
>                                    
> xmlns:android="http://schemas.android.com/apk/res/android";
>                                    android:layout_width="match_parent"
>                                    android:layout_height="wrap_content"
>                                    android:phoneNumber="true"
>                                    android:gravity="right"
>                                    android:hint="Phone"/>
>
>                           
>
> error i'm getting
> 11-12 15:39:10.491: WARN/dalvikvm(1274): threadid=1: thread exiting
> with uncaught exception (group=0x4001d800)
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274): FATAL EXCEPTION: main
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274):
> java.lang.IllegalStateException: Could not execute method of the
> activity
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274):     at
> android.view.View$1.onClick(View.java:2072)
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274):     at
> android.view.View.performClick(View.java:2408)
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274):     at
> android.view.View$PerformClick.run(View.java:8816)
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274):     at
> android.os.Handler.handleCallback(Handler.java:587)
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274):     at
> android.os.Handler.dispatchMessage(Handler.java:92)
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274):     at
> android.os.Looper.loop(Looper.java:123)
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274):     at
> android.app.ActivityThread.main(ActivityThread.java:4627)
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274):     at
> java.lang.reflect.Method.invokeNative(Native Method)
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274):     at
> java.lang.reflect.Method.invoke(Method.java:521)
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274):     at
> com.android.internal.os.ZygoteInit
> $MethodAndArgsCaller.run(ZygoteInit.java:868)
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274):     at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274):     at
> dalvik.system.NativeStart.main(Native Method)
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274): Caused by:
> java.lang.reflect.InvocationTargetException
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274):     at
> com.sybase.mo.mail.AddContacts.moreButtonHandler(AddContacts.java:62)
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274):     at
> java.lang.reflect.Method.invokeNative(Native Method)
> 11-12 15:39:10.501: ERROR/AndroidRuntime(1274):     at
> java.lang.reflect.Method.invoke(Method.java:521)
> 11-12 15:39:1

Re: [android-developers] ListView.invalidateViews() not working

2010-11-11 Thread Stephen Jungels
For a ListActivity, try onContentChanged().

On Thu, Nov 11, 2010 at 3:33 PM, Kumar Bibek  wrote:
> Try notifyDatasetChanged(). This should be called whenever the backing data
> us changed
>
> On 12-Nov-2010 2:01 AM, "jotobjects"  wrote:
>
> I have an ListActivity with a BaseAdapter where the contents have
> changed (example - the rows are reordered).  I have tried
> invalidate(),  invalidateViews(), and notifyDataSetInvalidated(). So
> far no luck...
>
> The ListView does not repaint.  getView() in the Adapter is not
> called.
>
> There are some similar posts but I did not see an answer.  Have tried
> with and without the runOnUiLoop() call.
>
> Does anyone see what I should do differently?
>
> public class MyListActivity extends ListActivity
> {
>    public void onCreate(Bundle icicle)
>    {
>        setListAdapter(new MyAdapter());
>    }
>
>    MyListener registryListener = new  MyListener registryListener ()
>    {
>       �...@override
>        public void onChange(String eventName)
>        {
>           . . . . do some work . . .
>           runOnUiThread(new Runnable () {
>                public void run ()
> { getListView().invalidateViews(); }
>            });
>        }
>    };
>
>    class MyAdapter extends BaseAdapter
>    {
>        public View getView(. . .)
>        {
>        }
>    }
> }
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: CameraPreview example distorted with samsung galaxy s

2010-11-08 Thread Stephen Jungels
Sorry, no.

On Mon, Nov 8, 2010 at 6:52 PM, ping  wrote:
> Do you know a sample app where this is easily shown?
>
>
> On Nov 8, 11:33 pm, Stephen Jungels  wrote:
>> The camera preview example is very simple.  Real camera apps letterbox
>> the preview because widescreen phones don't have the same aspect ratio
>> as standard photographic sizes.
>>
>>
>>
>>
>>
>>
>>
>> On Mon, Nov 8, 2010 at 4:20 PM, ping  wrote:
>> > Hey,
>> > Today i tried the sample code to get the camera preview working
>> > (http://developer.android.com/resources/samples/ApiDemos/src/com/
>> > example/android/apis/graphics/CameraPreview.html)
>> > But the image looks distorted when i start the applictaion on my
>> > galaxy s.
>>
>> > does anyone have the same 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
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] CameraPreview example distorted with samsung galaxy s

2010-11-08 Thread Stephen Jungels
The camera preview example is very simple.  Real camera apps letterbox
the preview because widescreen phones don't have the same aspect ratio
as standard photographic sizes.

On Mon, Nov 8, 2010 at 4:20 PM, ping  wrote:
> Hey,
> Today i tried the sample code to get the camera preview working
> (http://developer.android.com/resources/samples/ApiDemos/src/com/
> example/android/apis/graphics/CameraPreview.html)
> But the image looks distorted when i start the applictaion on my
> galaxy s.
>
> does anyone have the same 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

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

2010-11-08 Thread Stephen Jungels
Following up on my own post, the test I ran was not thorough enough,
and the following rules are the ones actually required to make WebView
callbacks work properly:

--
-keep public class com.trans_code.android.JavascriptCallback
-keep public class * implements com.trans_code.android.JavascriptCallback
-keepclassmembers class * implements com.trans_code.android.JavascriptCallback {
;
}
--


On Sun, Nov 7, 2010 at 7:17 PM, Stephen Jungels  wrote:
> Thanks, I followed up on that idea by creating a placeholder
> interface; I am limiting this to the problem of WebView callbacks so I
> call it "JavascriptCallback".
>
> If I follow the convention of implementing this interface wherever
> appropriate, the following Proguard rules work:
>
> -
> -keep public class * implements com.trans_code.android.JavascriptCallback
> -keepclassmembers class * implements JavascriptCallback {
>    void on*(***)
> }
> -
>
> My Proguard knowledge is basic but this seems to be enough for the use
> cases I can think of, where a convention is assumed that callback
> methods will start with "on".
>
> I wonder if this placeholder interface or something similar should be
> in the framework as a general purpose tag for RPC-type callbacks to
> Java that should not be renamed by an obfuscator.
>
> --SJ
>
> On Sun, Nov 7, 2010 at 6:35 PM, Daniel Drozdzewski
>  wrote:
>> On Sun, Nov 7, 2010 at 10:41 PM, Stephen Jungels  wrote:
>>> I've recently started using the WebView Android / Javascript interface
>>> in my projects (and I think it's pretty cool; article here:
>>> http://developer.android.com/resources/articles/using-webviews.html).
>>>
>>> The problem is that when obfuscation is turned on, the callbacks from
>>> Javascript to my Android code no longer complete, because the language
>>> binding is unaware of the renaming performed by Proguard.
>>>
>>> I can fix this on a case-by case basis; for example in the very simple
>>> code I am using now, the following additional Proguard rules are
>>> enough:
>>>
>>> ---
>>> -keep public class com.trans_code.android.JsCallback
>>> -keepclassmembers class * {
>>>    public void doneClicked();
>>> }
>>> --
>>>
>>> However the second rule seems too broad, and both rules are unique to
>>> each project that uses the Javascript callback.
>>>
>>> Any guidance on how a better rule can be written that catches every
>>> use of Android - Javascript bindings, and nothing else?
>>>
>>> Thanks,
>>>
>>> SJ
>>>
>>
>> Stephen,
>>
>> I am not sure, whether you would be more selective with not
>> obfuscating some classes, but you could do the following:
>>
>> - define a placeholder interface called say NonObfuscateable (I know
>> it sounds dreadful, but you get the gist)
>> - make all classes that you want to keep implement this interface
>> - tell Proguard to keep the classes that implemented your interface
>>
>> Daniel
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>

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


Re: [android-developers] Android dev using the Samsung Galaxy S on OSX

2010-11-08 Thread Stephen Jungels
Does your Mac meet the System Requirements?
http://developer.android.com/sdk/requirements.html

If so, a standard Android device like the Galaxy S would be expected
to work (maybe you will have to sort out some device driver issues).

The Galaxy S itself is a great phone for development and testing.

--SJ

On Sun, Nov 7, 2010 at 3:05 PM, Shiraz  wrote:
> I've searched in various forums and sites but haven't found out
> whether it's possible to develop and test apps using the Samsung
> Galaxy S on Mac OSX with Eclipse?
>
> Please can you folks share your advice and experiences?
>
> Thanks,
> Shiraz Azizali
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Canvas INSIDE of a Layout???

2010-11-08 Thread Stephen Jungels
This would be an example of creating a custom component.  It's covered
very well in the docs:
http://developer.android.com/guide/topics/ui/custom-components.html

The requirement for timed updates can be filled by your activity
calling invalidate() on the custom view when needed.

--SJ

On Fri, Nov 5, 2010 at 11:33 PM, Ryan Detwiler  wrote:
> Hellooo.. I need to have a dynamically updateable canvas inside of a
> layout. I would prefer having some sort of method to draw to an
> imageview, which is displayed in red on the screenshot. It's intended
> to be a graph that updates every 5 times/second or so. Any ideas??
> I've been searching for hours and can't seem to find some sort of
> concrete example. they all make the entire screen a canvas, which
> doesn't allow for layouts. Please help, and thanks in advance! :)
>
> http://i220.photobucket.com/albums/dd15/memphetic/CanvasExample.png
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Proguard Breaks Javascript Interface

2010-11-07 Thread Stephen Jungels
Thanks, I followed up on that idea by creating a placeholder
interface; I am limiting this to the problem of WebView callbacks so I
call it "JavascriptCallback".

If I follow the convention of implementing this interface wherever
appropriate, the following Proguard rules work:

-
-keep public class * implements com.trans_code.android.JavascriptCallback
-keepclassmembers class * implements JavascriptCallback {
void on*(***)
}
-

My Proguard knowledge is basic but this seems to be enough for the use
cases I can think of, where a convention is assumed that callback
methods will start with "on".

I wonder if this placeholder interface or something similar should be
in the framework as a general purpose tag for RPC-type callbacks to
Java that should not be renamed by an obfuscator.

--SJ

On Sun, Nov 7, 2010 at 6:35 PM, Daniel Drozdzewski
 wrote:
> On Sun, Nov 7, 2010 at 10:41 PM, Stephen Jungels  wrote:
>> I've recently started using the WebView Android / Javascript interface
>> in my projects (and I think it's pretty cool; article here:
>> http://developer.android.com/resources/articles/using-webviews.html).
>>
>> The problem is that when obfuscation is turned on, the callbacks from
>> Javascript to my Android code no longer complete, because the language
>> binding is unaware of the renaming performed by Proguard.
>>
>> I can fix this on a case-by case basis; for example in the very simple
>> code I am using now, the following additional Proguard rules are
>> enough:
>>
>> ---
>> -keep public class com.trans_code.android.JsCallback
>> -keepclassmembers class * {
>>    public void doneClicked();
>> }
>> --
>>
>> However the second rule seems too broad, and both rules are unique to
>> each project that uses the Javascript callback.
>>
>> Any guidance on how a better rule can be written that catches every
>> use of Android - Javascript bindings, and nothing else?
>>
>> Thanks,
>>
>> SJ
>>
>
> Stephen,
>
> I am not sure, whether you would be more selective with not
> obfuscating some classes, but you could do the following:
>
> - define a placeholder interface called say NonObfuscateable (I know
> it sounds dreadful, but you get the gist)
> - make all classes that you want to keep implement this interface
> - tell Proguard to keep the classes that implemented your interface
>
> Daniel
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Proguard Breaks Javascript Interface

2010-11-07 Thread Stephen Jungels
I've recently started using the WebView Android / Javascript interface
in my projects (and I think it's pretty cool; article here:
http://developer.android.com/resources/articles/using-webviews.html).

The problem is that when obfuscation is turned on, the callbacks from
Javascript to my Android code no longer complete, because the language
binding is unaware of the renaming performed by Proguard.

I can fix this on a case-by case basis; for example in the very simple
code I am using now, the following additional Proguard rules are
enough:

---
-keep public class com.trans_code.android.JsCallback
-keepclassmembers class * {
public void doneClicked();
}
--

However the second rule seems too broad, and both rules are unique to
each project that uses the Javascript callback.

Any guidance on how a better rule can be written that catches every
use of Android - Javascript bindings, and nothing else?

Thanks,

SJ

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

2010-10-22 Thread Stephen Jungels
In addition to what was said above, if you study the
 directive carefully and set it properly in your
manifest, that will most likely clear things up.

On Fri, Oct 22, 2010 at 11:43 AM, TreKing  wrote:
> On Mon, Oct 18, 2010 at 3:35 PM, Wri  wrote:
>>
>> In the old project, I did not specify a target SDK (the manifest did not
>> contain something like: ).
>
> Be careful here ... "target SDK" is NOT the same as "minSDK". Was that a
> typo or are you not clear on this?
>
>>
>> The new project now uses  in the
>> manifest.
>
> So you're app is designed to work ONLY on 2.2 (SDK 8) or is that what your
> "target" (what you're testing on) is?
>
>>
>> Why is this happening? How can I load them without scaling while still
>> declaring the minimum SDK?
>
> This I don't know - I haven't had to deal with all this screen support stuff
> as the defaults work out fine for me for now, but I would double check you
> really want min SDK to 8 and read over this:
> http://developer.android.com/guide/practices/screens_support.html
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: Do you spend any time sending DMCA notices

2010-10-14 Thread Stephen Jungels
I think you may have misinterpreted that email.  I "claimed" my apps
on AppBrain and got something similar; it's just a verify that they
send to the registered email of the app developer, is it not?

Also, claiming your apps and paying for promotion are two separate
things.  Just claiming as I have done is free and you get access to
some useful stats.

I am not associated with AppBrain or necessarily endorsing them, but
my experience with the site was innocuous.

--SJ

On Thu, Oct 14, 2010 at 7:20 AM, Maps.Huge.Info (Maps API Guru)
 wrote:
> I sent one recently to Appbrain. They sent me an e-mail suggesting
> that someone was trying to "claim" my apps on their site. It seemed to
> me to be a spammy  attempt to get me to sign up on their site and pay
> them for app promotion. Here's the text: (redacted)
>
> **
> Hello USNaviguide LLC,
> @gmail.com requested to claim ownership of your apps on
> www.appbrain.com, the online Android app directory.
>
> Claiming your app gives access to the advanced AppBrain stats, and to
> AppBrain's free and paid promotion services. Please click this link to
> claim your developer account on AppBrain:
>
> http://www.appbrain.com/verify_dev?d=
> Please contact me if you have any questions.
>
> Best regards,
> Mathijs Vogelzang,
> AppBrain team
>
> **
>
> This unscrupulous marketing tactic prompted me to ask them to remove
> my apps from their site. When they wouldn't do that, I filed a DMCA
> notice which got them to do it.
>
> SInce then, I've noticed app comment spam like this:
>
> by Dylan (October 13, 2010)
> Great App! Search for more free apps at www..com
>
> The site is always a parked domain using Google AdSense for domains
> but the kicker is the primary result in the ads is always Appbrain.
> This leads me to believe that Appbrain is spamming comments to promote
> their questionable site. I've seen this app spam in one form or
> another on dozens of popular apps.
>
> As far as I know, there is no way to stop such unscrupulous marketing
> tactics nor is there a way to remove or block these appbrain spammers
> from continuing this spammy marketing campaign.
>
> -John Coryat
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Follow up for the active install count problem

2010-10-08 Thread Stephen Jungels
My count had dropped to the point where it looked like an abandoned
app (about 33% at the lowest, I think).  It started to stabilize and
then go up again, and after I did a release a few days ago it jumped
from 37% to 45%, so I think releasing an update will get things back
to normal more quickly than waiting it out.

--SJ

On Fri, Oct 8, 2010 at 12:13 PM, Fabrizio Giudici
 wrote:
>  Just received this from the Market support:
>
>
> We wanted to follow-up. By now, you should have noticed that the installs
> metrics for your applications have been restored. We identified the problem
> as occurring with application updates only, have made some changes recently
> that should resolve and prevent this problem. Please let us know if this
> error persists.
>
> If we can assist you further, please let us know.
>
>
>
> In my case, things have not changed at all. Downloads are increasing (1550)
> and active installs stabilized at 29% (the value before the drop was
> 44/45%). So, indeed active installs are increasing again - 29% is stable
> since three weeks - but the original percentage was not restored. Now, I
> don't know what to think... Maybe the problem is not solved, maybe in my
> specific case the active installs really dropped for a while (but it's
> curious that it only happened for a while...).
> BTW, I didn't release any new upgrade since then (I have a new one almost
> ready, but I'm beyond schedule because of personal problems) - and maybe the
> count would fix itself with new upgrades...
>
> What would you do now? Is there anybody else for which the problem was not
> solved?
>
> --
> Fabrizio Giudici - Java Architect, Project Manager
> Tidalwave s.a.s. - "We make Java work. Everywhere."
> java.net/blog/fabriziogiudici - www.tidalwave.it/people
> fabrizio.giud...@tidalwave.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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Anybody experiencing a boost in sales since opening up to other countries?

2010-10-08 Thread Stephen Jungels
I had a pretty good week but I'm not sure the new markets are the
reason why.  It would be a lot easier to tell if we had something like
Analytics for Google Checkout.

--SJ

On Fri, Oct 8, 2010 at 8:58 AM, String  wrote:
> On Oct 8, 7:20 am, Zsolt Vasvari  wrote:
>
>> Yes, this happened to me as well.  I think there must have been
>> something wrong with the market, as I haven't had a sale for about 10
>> hrs.
>
> You might want to see if your app is visible in the Market. My top app
> has suddenly vanished, from both my G1 and N1, for no readily apparent
> reason. I think the Market is going through one of its usual periods
> of instability.
>
> 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

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

2010-10-07 Thread Stephen Jungels
I have a slightly different take on this than the original poster.

Currently Google is treating apps like web pages, and using ranking
algorithms to highlight the successful apps.  The poor apps don't need
to be expelled because they are in the rankings basement where nobody
sees them.

The only place this breaks down is when you browse the new releases
and see a bunch of spammy apps that crowd out the real apps that
represent a significant amount of work.

Here I would like to see a change, but again it does not have to
involve moderating apps out.  Instead, the publishers who churn out
these spammy apps should be marked as "high volume publishers" and
lose the privilege of having their updates featured in the regular new
releases section; maybe there could be a single, separate section for
"high volume" new releases and anybody who really wants to look there
can do so.

The list of legitimate publishers who would be marked high volume by
some simple automated algorithm would be short and they could request
an exception.

That would solve the problem I am seeing without much work.

--SJ



On Thu, Oct 7, 2010 at 7:31 AM, William Ferguson
 wrote:
> But that's just down to how the Google/Apple marketing departments put
> the spin on it.
>
> If it was 15,000 apps that really deliver vs a horde of apps of
> dubious quality, then a good marketing department should be able to
> run hard with that.
> It could be pitched as an accelerated Darwinian environment.
> Only the *great* survive here.
>
> I can picture the images that would ship with it now.
> An army of variagated Android Apps on one side surrounded by the
> dismembered remains of the unfit, and on the other side a horde of
> insipid apps jammed shoulder to shoulder.
> "Go with the strength".
>
> Gee maybe I should have pursued marketting instead of development.
> Yep - I'm definitely coming down with a fever.
>
>
> On Oct 7, 7:30 pm, String  wrote:
>> Also, app markets have (unfortunately) become a numbers game in the
>> eyes of the public. It's important for Google to be able to say they
>> have 150,000 (or whatever) apps in the Market; clearing the dregs
>> would drop that number considerably, probably by an order of
>> magnitude. Although this would probably be a better situation, for
>> both devs and users, it's a net loss on the mindshare front. And
>> that's not unimportant to the decision makers.
>>
>> String
>>
>> On Oct 7, 3:33 am, Brad Gies  wrote:
>>
>> >   The market does this by default already
>>
>> > They only have roughly 22 categories, and there are 70,000 apps... which
>> > means roughly 3,000 apps per category, and they only show 800...
>>
>> > If your app is in the bottom half of your category... it's effectively
>> > not there :).
>>
>> > Not to say the Market works well at all but in this case it's
>> > filtering out the worst of the worst by default :).
>>
>> > But, as long as the Market is the only game in town, it's probably not
>> > possible for Google to filter it because they are effectively a monopoly
>> > and not allowing any app would be a PR nightmare. Apple doesn't really
>> > have the same problem because they are not even trying to claim any kind
>> > of openness.
>>
>> > Sincerely,
>>
>> > Brad Gies
>> > ---
>> > Bistro Bot - Bistro 
>> > Blurbhttp://bgies.comhttp://bistroblurb.comhttp://ihottonight.comhttp://fo...
>> > ---
>>
>> > Everything in moderation, including abstinence
>>
>> > Never doubt that a small group of thoughtful, committed people can
>> > change the world. Indeed. It is the only thing that ever has - Margaret 
>> > Mead
>>
>> > On 06/10/2010 1:08 PM, Kumar Bibek wrote:
>>
>> > > Agree, but before removing such an app, Google should atleast intimate
>> > > the dev the reason, else, it won't be fair for the developer. And for
>> > > this, someone will definitely have to checkout the app in person,
>> > > before taking it down.
>>
>> > > Also, if Google wishes to include such a condition in Terms and
>> > > Conditions, say for example, if you app has 2000 downloads with avg
>> > > rating of 1.5 stars, your app will be automatically removed, I am not
>> > > sure, if all the devs would like this.
>>
>> > > On Thu, Oct 7, 2010 at 1:33 AM, TreKing > > > > wrote:
>>
>> > >     On Wed, Oct 6, 2010 at 2:49 PM, Kumar Bibek > > >     > wrote:
>>
>> > >         Yep, but this might not be a fool proof method. Say, a
>> > >         competitor dev can easily go and mark a new entrant as spam,
>> > >         and leave negative comments. 15-20 such comments and spam
>> > >         flags would obviously be a disadvantage for the new app.
>>
>> > >     Of course, but in my mind it would take a considerable amount of
>> > >     "votes" to get one ejected - certainly more than 15-20, which
>> > >     still would require a

Re: [android-developers] File Pushing Problem on to the Emulator

2010-10-06 Thread Stephen Jungels
I have found that file push and pull work much better with the adb
command line tool than they do with DDMS.  Just use adb, than you can
wait patiently for the tools to be fixed.

--SJ

On Wed, Oct 6, 2010 at 4:11 AM, Goutham P N  wrote:
> Hi,
>
> In one of the application I need to push a file into the emulator. It
> is of 128Mb, While pushing the file in eclispe in DDMS Console first
> time it said "Wrong Command", Second time "Time Out", Third time "No
> Space left on device" like this for every attempt it is giving
> different errors.
>
> Can anyone help out in this.
>
> Thanks & Regards
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: Adding Rate this application capability

2010-10-06 Thread Stephen Jungels
Directing users to the details page so they can rate your app doesn't
seem questionable as long as you do it in a neutral way and there is
no implied reward for a positive rating.  There's also no guarantee
that it will increase the number of positive ratings more than it
increases the number of negative ratings ;(

I have had users contact me specifically to ask how to rate my app, so
I may slide this in where my feedback menu item currently resides.

-SJ


On Wed, Oct 6, 2010 at 10:00 AM, Brill Pappin  wrote:
> check the Market policy as you don't want to get your app removed.
>
> "Developers should not attempt to change the placement of any
> application in the Market by offering incentives to users to rate an
> application with higher or lower ratings; or by themselves rating an
> application multiple times."
>
> found at: http://www.android.com/market/terms/developer-content-policy.html
>
> It doesn't specifically say you can't direct them to the ratings
> though, only that you can't offer incentives... so maybe a grey area.
>
> - Brill Pappin
>
> On Oct 6, 7:54 am, TreKing  wrote:
>> On Wed, Oct 6, 2010 at 1:24 AM, Amit  wrote:
>> > I wan to know how this is achieved.
>>
>> http://developer.android.com/guide/publishing/publishing.html#marketi...
>>
>> --- 
>> --
>> TreKing  - Chicago
>> transit tracking app for Android-powered devices
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: Gifting paid market apps

2010-10-06 Thread Stephen Jungels
About 24 hours after a buyer has purchased the app, their payment will
have gone through and you can use the Checkout console to issue a full
or partial refund.  I have a separate system for distributing my app
to beta testers, but I have used this method in a few cases as well.

-SJ

On Wed, Oct 6, 2010 at 4:20 AM, Adam Hammer  wrote:
> Well, the Apks are just content providers, no activities or
> interactive services (other then the ContentResolver interfaces). So
> no place for a splash screen in them.
>
> I have a ContentProvider that supplies information about resources in
> the apk file that can be accessed, each package inherits this class
> and exposes a new authority with access to new resources.
>
> My first purchase turned into a return 4 hours later. I'm sure it's
> just a pirate and my stuff is already leaked to the real world.
> Luckily I didn't publish anything of great value to the market. I
> emailed the 1st purchaser a few hours after purchase to make sure
> everything went ok, and then again after the refund. No response to
> either email.
>
> I'm attempting to integrate market licensing to this, that way I can
> prevent cheap bastards from doing a purchase & return and keeping the
> item and then giving it away for free. With Market Licensing I can
> also put my friends on test accounts for the time being.
>
> I am thinking you might be able to let them put the purchase through
> and then give them a refund without deactivation, but I dunno yet
> because the one guy who bought it already got a refund.
>
>
> No
>
> On Oct 5, 9:09 pm, Chris Stratton  wrote:
>> Why don't you just put the giftee's name on a splash screen?  (and
>> maybe also somewhere else, not in plaintext)
>>
>> On Oct 5, 9:52 pm, Adam Hammer  wrote:
>>
>>
>>
>> > Is there a way to gift a paid app if you are the developer?
>>
>> > I want to gift VIA the android market. I don't want to give apk's in
>> > the wild, and I might want to use Market Authorization on the gifted
>> > apk's (although I suppose if I can just handle market authorization I
>> > can send the secure apk, I just don't want to mail insecure ones out).
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2010-09-27 Thread Stephen Jungels
The decode byte array call expects JPEG compressed data.  You should
be consistent about either using unpacked bytes, as in your save
operation, or packed bytes, as in your read operation.

--SJ

On Mon, Sep 27, 2010 at 6:38 AM, Jey  wrote:
> Hi all,
>
>       Am trying to store all images in my server, then i need to show
> based on requirements, i am able to store and restore bitmap bytes but
> i cant recreate the bitmap using stored bytes , pls find my code below
> and suggest me a solution if i doing wrong
>
>
> Converting Bitmap to Bytes
>
>                                        Drawable
> d=(Drawable)Packageinfo.myApplicationInfo.loadIcon(getPackageManager());
>                                        Bitmap bitmap = ((BitmapDrawable) 
> d).getBitmap();
>                                        int siz = bitmap.getHeight() * 
> bitmap.getWidth();
>                                        java.nio.ByteBuffer buffer = 
> java.nio.ByteBuffer.allocate(siz);
>                                        bitmap.copyPixelsToBuffer(buffer);
>                                        byte[] arr = buffer.array();
>                                        String bytedata = arr.toString();
>
> Recreating bitmap from Bytes
>
>                                ImageView icon = (ImageView) 
> v.findViewById(R.id.sampleimg);
>                                Bitmap b = 
> BitmapFactory.decodeByteArray(bytedata .getBytes(), 0,
> bytedata .getBytes.length);
>                                icon.setImageBitmap(b);
>
>
> Regards
> jp
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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