Re: [android-developers] Re: google analytics and active installs on market way off

2011-01-30 Thread Anders Aagaard
It's a free app, so they are free to copy to wherever they want.

But a jump from 30k downloads in market to 120k users seem extreme to me. To
the level where something's gotta be wrong somewhere. Or is this normal?

Best regards
Anders
On Sun, Jan 30, 2011 at 3:33 PM, Hari Edo  wrote:

>
> Congrats on having such a popular app.
>
> Sounds like your child has grown up and left home, moved off to other
> markets
> without asking your permission.  Some people would say it's stealing,
> piracy,
> and must be stopped at all costs.  Some people would say that the more
> people
> see it, the more people will buy it, so those underground copies are
> just a
> form of advertising.
>
> I just wish the market and the analytics would update more often than
> 24
> hours.
>
> On Jan 30, 9:05 am, neuron  wrote:
> > Hi
> >
> > I got an application that onhttp://market.android.com/publish/showsaround
> > 20k active installs / 30k total installs. However, google analytics for
> the
> > app (that's not really doing anything weird. It's just using the normal
> api,
> > collecting fairly standard data). Is showing 100k+ unique visitors since
> > launch (around 37k so far this month).
> >
> > What should I trust?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Weeks of coding can save you hours of planning.
- http://code.google.com/p/aagaande/

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

2011-01-27 Thread Anders Aagaard
I'm actually seeing the handler code show up in my profiler. And I'm passing
a lot of small data many times. As the code was initially built for parsing
while loading from the network with xml. And not the download then parse
json code.

In terms of synchronization issues, I use an interface between those pieces
of code anyway. So that shouldn't be a problem.

On Wed, Jan 26, 2011 at 10:24 PM, Pepijn Van Eeckhoudt <
pep...@vaneeckhoudt.net> wrote:

> I tend to prefer the handler approach over synchronized methods just
> because it's less easy to shoot yourself in the foot if only a single thread
> touches your data structures.
>
> Performance wise there shouldn't be any fundamental difference between the
> handler approach and the synchronized method approach since it's all within
> the same process. No data copies are occuring in either case. The one thing
> you might notice is a little bit of additional latency when using the
> handler as this posts a runnable to the end of an event queue.
>
> Pepijn
>
> Op 26 Jan 2011 om 21:28 heeft Anders Aagaard  het
> volgende geschreven:
>
> Thank you! I wasn't sure what was the cleanest way of doing it. And I'm
> very familiar with threading, just not how java does it (and the
> synchronized isn't something I'm familiar with from other platforms).
>
> I'll try to push some of the sorting/filtering into the threads as well, to
> reduce amount of time I spend in the main thread.
>
> On Wed, Jan 26, 2011 at 8:09 PM, Hari Edo < 
> hari@gmail.com> wrote:
>
>>
>> If you're sure that all users of the data are within the same process
>> (the
>> same app), then using Java synchronized is the best way to go.
>> However,
>> you will need to be very careful to understand your semaphore
>> dependencies,
>> or deadlock will occur.  "Not responding" is almost as bad as "Data
>> corrupted" due to bad inter-thread communication.
>>
>> The use of Bundles and/or ContentProviders are to enable inter-process
>> data
>> passing, and to avoid some of the danger of errant deadlock
>> situations.
>>
>> On Jan 26, 10:37 am, neuron  wrote:
>> > Hi
>> >
>> > I've got an app that spawns of a seperate thread. Parses JSON data into
>> a
>> > structure. And passes it back to the main thread through a handler. Each
>> > part of data is sent through the handler individually. That worked
>> fairly
>> > well with my previous XML parser, as XML parses data while it downloads.
>> But
>> > JSON doesn't (atleast I haven't found a way to get that working). In
>> either
>> > way the JSON data is much smaller and much faster to parse.
>> >
>> > I've recently added a feature that requires me to load several sources
>> of
>> > json in parallel, parse in the background, and pass all the data back
>> again
>> > using a Handler. This is a bit slower than I was hoping.
>> >
>> > Would it be faster (and possible) for me to do this:
>> > BackgroundThread extends Thread {
>> > onCreate (Parent) {
>> > this.parent = parent;
>> > }
>> > onData {
>> > parent.addParsedData(x);
>> > }
>> >
>> > }
>> >
>> > Parent extends ListActivity {
>> > ListAdapter list;
>> > onCreate {
>> >setListAdapter(list);
>> >new BackgroundThread(this);
>> > }
>> > public synchronized addParsedData(data) {
>> > list.add(data)
>> > }
>> >
>> > }
>> >
>> > I'm thinking this won't be thread safe, as ListAdapter is in the parent
>> > thread. Am I right?
>> > Should I instead inside the listadapter (which puts data in an array)
>> have
>> > synchronized access to it's items?
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to
>> android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>>  
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>>  <http://groups.google.com/group/android-developers?hl=en>
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
> Weeks of coding can save you hours of planning.
> - <http://code.google.com/p/aagaande/>http://code.google.com/p/aagaande/
&

Re: [android-developers] Re: performance when passing background data to ui thread

2011-01-26 Thread Anders Aagaard
Thank you! I wasn't sure what was the cleanest way of doing it. And I'm very
familiar with threading, just not how java does it (and the synchronized
isn't something I'm familiar with from other platforms).

I'll try to push some of the sorting/filtering into the threads as well, to
reduce amount of time I spend in the main thread.

On Wed, Jan 26, 2011 at 8:09 PM, Hari Edo  wrote:

>
> If you're sure that all users of the data are within the same process
> (the
> same app), then using Java synchronized is the best way to go.
> However,
> you will need to be very careful to understand your semaphore
> dependencies,
> or deadlock will occur.  "Not responding" is almost as bad as "Data
> corrupted" due to bad inter-thread communication.
>
> The use of Bundles and/or ContentProviders are to enable inter-process
> data
> passing, and to avoid some of the danger of errant deadlock
> situations.
>
> On Jan 26, 10:37 am, neuron  wrote:
> > Hi
> >
> > I've got an app that spawns of a seperate thread. Parses JSON data into a
> > structure. And passes it back to the main thread through a handler. Each
> > part of data is sent through the handler individually. That worked fairly
> > well with my previous XML parser, as XML parses data while it downloads.
> But
> > JSON doesn't (atleast I haven't found a way to get that working). In
> either
> > way the JSON data is much smaller and much faster to parse.
> >
> > I've recently added a feature that requires me to load several sources of
> > json in parallel, parse in the background, and pass all the data back
> again
> > using a Handler. This is a bit slower than I was hoping.
> >
> > Would it be faster (and possible) for me to do this:
> > BackgroundThread extends Thread {
> > onCreate (Parent) {
> > this.parent = parent;
> > }
> > onData {
> > parent.addParsedData(x);
> > }
> >
> > }
> >
> > Parent extends ListActivity {
> > ListAdapter list;
> > onCreate {
> >setListAdapter(list);
> >new BackgroundThread(this);
> > }
> > public synchronized addParsedData(data) {
> > list.add(data)
> > }
> >
> > }
> >
> > I'm thinking this won't be thread safe, as ListAdapter is in the parent
> > thread. Am I right?
> > Should I instead inside the listadapter (which puts data in an array)
> have
> > synchronized access to it's items?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Weeks of coding can save you hours of planning.
- http://code.google.com/p/aagaande/

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

2011-01-18 Thread Anders Aagaard
Hm

No I don't run adb as root, nor should I need to. But I'll try that the next
time it happens, not too happy about running it as root though. And it does
work after while, which it shouldn't if it was a permission issue.

Best regards
Anders
On Tue, Jan 18, 2011 at 4:57 AM, Indicator Veritatis wrote:

> H-m-m-m. That is a little weird. I too am running on Linux, but Fedora
> 12 instead of Ubuntu. And the only time I have not been able to solve
> similar problems with "adb kill-server;adb start-server", it was
> because the wrong device was selected in the Device Window in Eclipse.
> So check that.
>
> Also, it never made sense to me that it should make a difference, but
> I have noticed that  "adb kill-server;adb start-server" works better
> when executed from a shell that is in superuser. So did you use sudo
> w/ it?
>
> On Jan 16, 10:01 am, Anders Aagaard  wrote:
> > I just left this running, and after about 2 minutes it works!
> >
> > However, it'd be awsome to not have to wait for minutes every time I
> start
> > ddms.
> >
> > On Sun, Jan 16, 2011 at 6:58 PM, neuron  wrote:
> > > adb works, I use it a lot. adb devices shows the device (a nexus one),
> > > shell/pull/push everything seems to work.
> >
> > > eclipse screws up, often.
> > > ddms shows no devices connected, and in console I only get a few gtk
> window
> > > warnings.
> > > Half the time when I start eclipse it keeps a neverending process
> running
> > > so i can't build anything. ddms shows no devices connected (and when I
> shut
> > > it down it doesn't quit properly, i have to ctrl+c it).
> >
> > > How can I debug this? (adb kill-server; adb start-server does not help)
> >
> > > This is on linux, ubuntu 10.10, kernel 2.6.37.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> 
> >
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > Weeks of coding can save you hours of planning.
> > -http://code.google.com/p/aagaande/
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Weeks of coding can save you hours of planning.
- http://code.google.com/p/aagaande/

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

2011-01-16 Thread Anders Aagaard
I just left this running, and after about 2 minutes it works!

However, it'd be awsome to not have to wait for minutes every time I start
ddms.

On Sun, Jan 16, 2011 at 6:58 PM, neuron  wrote:

> adb works, I use it a lot. adb devices shows the device (a nexus one),
> shell/pull/push everything seems to work.
>
> eclipse screws up, often.
> ddms shows no devices connected, and in console I only get a few gtk window
> warnings.
> Half the time when I start eclipse it keeps a neverending process running
> so i can't build anything. ddms shows no devices connected (and when I shut
> it down it doesn't quit properly, i have to ctrl+c it).
>
> How can I debug this? (adb kill-server; adb start-server does not help)
>
> This is on linux, ubuntu 10.10, kernel 2.6.37.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Weeks of coding can save you hours of planning.
- http://code.google.com/p/aagaande/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 for split app (eg free/pro versions using 95% the same code)

2010-03-13 Thread Anders Aagaard
Personally I'd use a version control system with branches to do this.
And keep it in one project.

Doing it with branches you could easily merge changes that go in both
versions, and just do a refresh in eclipse when doing development on
the other version.

On Mar 11, 10:51 pm, "Matt (preinvent)"  wrote:
> I have a free app out there and am going to write a pro version with
> some extra functionality that I'll charge for.
>
> The plan is to use the same code for both apps, although I need
> different Eclipse projects to use different manfiest files.  The
> obvious way is to have all my code in a shared library which the free
> and pro projects reference.
>
> Is there a recommended way of doing 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] Race condition using handler + thread.

2010-03-12 Thread Anders Aagaard
Hi

I have an application that starts a background thread to load data. It
uses Handler to pass data back to the main thread. Now this works
perfectly most of the time, but not when I switch orientation.

What I found was this behavior:
- onCreate : Start main view, with background load thread
- Switch android direction
- onStop : Kill background loading thread, does thread.interrupt +
thread.join.
- onCreate
- Data queue'd in the handler is still being pushed through from the
previous data load.
This produces a bit of a race condition for me. I can shutdown the
thread cleanly, but the data that's in the handler, between the thread
and the main view isn't always cleared.


This would be solvable with something like:
thread.interrupt();
thread.join();
handler.clear();
Before returning to the onStop function, but there's no .clear to just
empty a handler out.

How can I clear a Handler of all messages?  I use this for posting:
handler.post(new Runnable() {
@Override
public void run() {
handler.onData(sendData);
}
});

So doing a .removecallback (which requires me to store runnables)
isn't real practical.

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

2010-03-03 Thread Anders Aagaard
I tried registering and got a blank page, who do we talk to about
that? How do we know that the registration has gone through? Is there
a confirmation page or something like that?

On Mar 3, 1:46 am, Roman Nurik  wrote:
> Folks, the email is NOT a fake. We will look into the email issues.
>
> Roman Nurik
> Android Developer Relations, Google
>
> NOTE: please do not send me email directly about this.
>
> On Mar 2, 4:43 pm, Mark Anacker  wrote:
>
>
>
> > Well, if nothing else, Google should now be on the lookout for
> > potential fraudulent activity involving developer account and order
> > numbers.  Especially originating out of China :-)  Although it would
> > be nice to think that they would have someone in a Security role who
> > could jump on this sort of thing, and provide some official
> > information.  But their warehouses full of geniuses are probably much
> > too busy for such trivial matters... :-)

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

2009-07-21 Thread Anders Aagaard

Just realised I can't click on stations either if I have the gallery
visible :/

On Jul 20, 1:11 pm, Anders Aagaard  wrote:
> Hi
>
> I have an application using a ListView activity to display realtime
> station information.
>
> The layout is like this:
>
> 
>  after the next one>
>
> Now on simple station data where I do Gallery.setVisibility(View.GONE)
> registerForContextMenu works as expected, but as soon as the gallery
> is rendered I can not get the context menu up for that line at all.
>
> It'll still work for different routes, just not the route showing
> extra information.
>
> This is the main list:
>          xmlns:android="http://schemas.android.com/apk/res/android";
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>     android:orientation="vertical"
>         >
>
>                          android:id="@+id/line"
>                 android:layout_width="wrap_content"
>                 android:layout_height="wrap_content"
>                 android:textAppearance="?android:attr/textAppearanceMedium"
>                 android:layout_marginLeft="2dip"
>         android:layout_alignParentTop="true"
>         android:layout_alignParentLeft="true"
>                 />
>
>                          android:id="@+id/destination"
>                 android:layout_width="wrap_content"
>                 android:layout_height="wrap_content"
>                 android:textAppearance="?android:attr/textAppearanceMedium"
>
>                 android:layout_marginLeft="40dip"
>                 android:layout_alignBaseline="@id/line"
>                 android:layout_alignParentLeft="true"
>                 />
>
>                          android:id="@+id/time"
>                 android:layout_width="wrap_content"
>                 android:layout_height="wrap_content"
>                 android:textAppearance="?android:attr/textAppearanceMedium"
>
>                 android:layout_marginRight="6dip"
>                 android:layout_alignParentRight="true"
>                 />
>
>              android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:spacing="16dp"
>                 android:layout_below="@+id/line"
>     />
> 
>
> And this is the data I put in Gallery:
> http://schemas.android.com/apk/res/android";
>     android:id="@android:id/text1"
>     android:layout_width="wrap_content"
>     android:layout_height="wrap_content"
>     android:textAppearance="?android:attr/textAppearanceSmall"
>     android:textColor="#00"
> />
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] registerForContextMenu failes with Gallery in listview.

2009-07-20 Thread Anders Aagaard

Hi

I have an application using a ListView activity to display realtime
station information.

The layout is like this:




Now on simple station data where I do Gallery.setVisibility(View.GONE)
registerForContextMenu works as expected, but as soon as the gallery
is rendered I can not get the context menu up for that line at all.

It'll still work for different routes, just not the route showing
extra information.




This is the main list:
http://schemas.android.com/apk/res/android";
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>











And this is the data I put in Gallery:
http://schemas.android.com/apk/res/android";
android:id="@android:id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#00"
/>

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

2009-07-20 Thread Anders Aagaard

Hi

I have an application, where I need to change the language through a
settings menu.  Now this part works perfectly, but it doesn't change
the language for activities that have gone through onCreate.

I got a TabHost, and 2 tabs in it, from the tabs you can get to
settings.

Refreshing the TabHost isn't an issue, as it's fairly small, however
both the 2 tabs are quite large views, and having a function to
manually update all the strings seem unnecessarily difficult.  Is
there any way to force the activity to recreate itself and trigger a
new onCreate?

I tried having a static function in the tabhost that clears all tabs
and recreates them, this refreshes the tab titles, but not the content
in the tabs.

Anders Aagaard

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