[android-developers] Re: New Android Market Client Update

2010-12-14 Thread tobias429
 Unless your app is Smart
 phones for Complete Morons in 3 easy words, then chances are you
 don't want that person anyway as someone you'd have to support. It
 would cost you more than they paid for the app.

First time I see a developer stating that certain customers are below
his dignity level to support. But then again Kurt Cobain also didn't
like how many uncool people listened to his music... In general,
given the average prices on Apps on the market, any support question
that you get will cause you an amount of work that - if multiplied by
a sensible hourly rate - will exceed the profit from that specific
user by far.

I also don't see a problem in selling a game that you can finish in an
hour. Hey, you shell out more dollars per hour for almost any other
sort of entertainment. What's your cost for a movie ticket? You also
can't go back to the box office afterwards asking for a refund because
you did not like the film. Imagine what it would do to Hollywood if
you could.

Most paid apps come with a free demo version. For those apps, who
needs a refund option at all?

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

2010-12-09 Thread tobias429
There is a new feature in Android 2.3 which lets you specify whether
your app supports extra large screens. Quote from the 2.3 release
notes:

Extra Large Screens
The platform now supports extra large screen sizes, such as those that
might be found on tablet devices. Developers can indicate that their
applications are designed to support extra large screen sizes by
adding a supports screens ... android:xlargeScreens=true element
to their manifest files. Applications can use a new resource
qualifier, xlarge, to tag resources that are specific to extra large
screens. For details on how to support extra large and other screen
sizes, see Supporting Multiple Screens.

The system handles the image scaling for you if you place your
graphics files in the respective folders (e.g. drawable-hdpi). I don't
think that the system scales your graphics to a different size on a
854 screen than on a 800 screen (anyone knows this for sure -- please
shout). Personally I'm handling the scaling myself in my code via
BitmapFactory.createScaledImage. With that you can be sure your App
scales to any screen size, also on non Google supported hardware.

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


[android-developers] Re: Android 2.3 not handling orientation change properly - screen is not redrawn

2010-12-06 Thread tobias429
I'm having exactly the same issue in my App. Worked fine in all other
Android versions before. It also seems to be for the change from
landscape to portrait only. The other way around works fine.

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


[android-developers] Re: android:layout_alignParentBottom=true on code

2010-10-28 Thread tobias429
You can do this via the LayoutParams. E.g. like below:

RelativeLayout relativeLayout = new RelativeLayout(this);
RelativeLayout.LayoutParams relativeParams = new
RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT);
relativeParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);

TextView myView = new View(this);
relativeLayout.addView(myView, relativeParams);

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

2010-07-27 Thread tobias429
Had a similar issue. I think the problem is not that the callback
method is not called, but rather that when a surfaceView gets
destroyed and a new one created, also a new handler is created.

See here for a solution to this that worked for me:
http://groups.google.com/group/android-developers/browse_thread/thread/3514e1890ed958e2/8874eff5e487553a?hl=enlnk=gstq=tobias429#8874eff5e487553a

On Jul 26, 3:30 pm, ameya dandekar ameya...@gmail.com wrote:
 Hi,
    I am currently working on the app in which my media player class is
 singleton, and i want to play the video files. I use surfaceView for the
 video display part. But the problem i m facing is when i change the
 orientation , the previous playback disappears (if was playing) and the new
 surface view is  getting created ..but  the callback method surface created
 is not getting called in which i want to take further action. Where am i
 going wrong ?

 Regards,
 Ameya

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

2010-07-08 Thread tobias429
Create your own class e.g. MyView and let it inherit the class View.
Override the onDraw method of this class.

public class MyView extends View {

@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);

//Your own code to paint a circle here
}

Add an instance of MyView as a view to your linear Layout. This allows
you to draw whatever you want in the MyView view in your Layout, and
still use the standard handling for buttons.

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

2010-07-07 Thread tobias429
1. Publish a paid app on the market, you get 70% of the revenue,
Google (or the OHA) gets 30%
2. Only serious alternative to generate revenue: publish a free app
and put advertising on. The percentage of the advertising revenue that
you get is typically at the advertising-company's discretion. Biggest
player on the market is: Google

Comparing the speed at which Google approaches introducing AdSense for
Mobile to the speed at which they are going in adding new payment
options or eligible to sell countries to the Market, I would believe
that option 2 is simply to lucrative to Google as to entice them to
put a lot of energy in making option 1 more attractive.

I personally don't expect any action from Google that would promote
distribution of paid Apps any time soon. I still hope to be proven
wrong.

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

2010-06-30 Thread tobias429
It's as per the error message that you get. When you create a view in
one thread (like e.g. within your main activity), you can not change
this view from another thread. There are various ways how to work
around this.

One is as follows:
In your thread, create a sub-class:

public class ChangeView implements java.lang.Runnable {
public void run() {
//Do whatever changes to the view need to be done
}
}

Create an instance of this class in your thread. Whenever you need the
code in the class to be executed, post it towards your main view via
view.post().

On Jun 30, 10:43 am, choi devmc...@gmail.com wrote:
 I found it there is prablem when i changed it in another thread. it
 always said me. how to changed it without error message.

 06-30 08:35:03.102: ERROR/AndroidRuntime(627): android.view.ViewRoot
 $CalledFromWrongThreadException: Only the original thread that created
 a view hierarchy can touch its views.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Admob ads linking to scam sites, possible additional app-security problems

2010-06-19 Thread tobias429
If you've spotted a fraudulent advertiser on AdMob, please report it
to them. They have their own support forum.

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

2010-05-29 Thread tobias429
Hi Mun,

No answer to this yet. What I found however is that it's not that the
SurfaceView does not get created again. Android in fact creates a new
one, however it looks like at the same time also a new holder is
created. As my code however holds a link to the then outdated holder,
it is not notified of the creation.

As a workaround, in my main thread, whenever lockCanvas returns null,
I try to get the surfaceHolder again. This is working fine on an app
that's installed on several thousand phones now across Android 1.5,
1.6 and 2.1

Relevant code of the main thread is below:

if (!gotSurface) {
try {
sleep(100);
}
catch (Exception e){ }
}

if (gotSurface) [do your game action];

Canvas c = null;
try {
c = surfaceHolder.lockCanvas(null);
if (c==null) {

//Canvas could not be locked, try to get a new
surface holder
surfaceHolder=mySurfaceView.getHolder();
}
else {
synchronized (surfaceHolder) {
gotSurface=true;
[Do your draw operation onto Canvas c];
}
}
 }
finally {
if (c != null) {
surfaceHolder.unlockCanvasAndPost(c);
}
}

I'm taking care to only execute this code once I can be reasonably
sure that my application is in the state where the surfaceView should
be visible. I put in the sleep(100) part as I noticed that if I try to
get the surfaceHolder in shorter intervals this blocks the application
after a while.

Hope this works for you as well.

Best regards,

Tobias

On May 27, 3:29 pm, Mun m...@orcadigital.com wrote:
 Hi,

 Did you manage to find an answer to this yet?

 I'm experiencing the same problem such that my surfaceview gets
 destroyed, (after calling setContentView to load another layout) but
 never gets created again!

 Thanks,

 Mun

 On May 9, 10:37 pm, tobias429 ecker...@gmx.de wrote:

  I've built an application that switches between two screens - a
  LinearLayout and a SurfaceView - via the application.setContentView()
  method.

  When switching between the two screens, the surface of the SurfaceView
  gets destroyed, and never created new again.

  Here is what I do:

  During my application, I switch between the two screens via calling
  setContentView() from my application.

  My SurfaceView starts a thread that renders the view, once the surface
  is created. This works fine the first time I'm doing this:
  1. Create the SurfaceView
  2. Get a handle of the surfaceHolder, and add my SurfaceView as a
  surfaceHolder callback
  3. Call setContentView(SurfaceViewScreen) from my app, to bring the
  SurfaceView screen to the front

  This now nicely calls onSurfaceCreated() in my SurfaceView.

  Based on a user action, I later call setContentView(Layout) to display
  my standard Layout again. This nicely calls the onSurfaceDestroyed()
  mehod of my SurfaceView.

  The problem is now, that if I change back again to the SurfaceView via
  calling application.setContentView(SurfaceView), the surface never
  gets re-created, i.e. neither does onSurfaceCreated() get called, nor
  does my view render correctly, as in the according thread
  surfaceHolder.getCanvas() returns null.

  What am I doing wrong?

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

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


[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-05-17 Thread tobias429
I got several reports from users that my application had lost the
preferences. This is more than a year ago when the G1 was most
prevalent... I switched to saving preferences in a file instead, and
complaints stopped. Check the following threads for similar reports:

http://groups.google.com/group/android-developers/browse_thread/thread/afdecee0355fb700/6b17e6db3a895935?hl=enlnk=gstq=lose+preferences#6b17e6db3a895935
http://groups.google.com/group/android-developers/browse_thread/thread/9803a767fce77703/ffb50141d419808c?hl=enlnk=gstq=lose+preferences#ffb50141d419808c
http://groups.google.com/group/android-developers/browse_thread/thread/16ecfa2dff93cd86/cb500d1efdb079e3?hl=enq=lose+preferenceslnk=ol;
http://groups.google.com/group/android-developers/browse_thread/thread/afdecee0355fb700/b8e7d93fdc15d637?hl=enlnk=gstq=preferences+field+users#b8e7d93fdc15d637

Haven't seen any explanation though whether this is a legitimate bug
in Android or wrong coding on the developers behalf. At any rate, I
couldn't get preferences to work, whereas storing the data in files
works perfect. If you have problems using preferences, I can only
recommend to go for files instead.

On May 17, 9:45 pm, luoster luos...@gmail.com wrote:
 I just got this on a G1, so its definitely not Droid exclusive...

 On Mar 30, 11:22 am, Matt (preinvent) m...@preinvent.com wrote:



  On Mar 24, 4:40 pm, Doug dougforp...@gmail.com wrote:

   This problem happened to one of my users just today - he has a Droid.
   I asked if anything weird had happened before the problem occurred
   (like the phone misbehaving).

   He said:

   The only random weird behavior I noticed before the problem was that
   my phone suddenly stopped ringing this morning for incoming calls - I
   checked the ringer volume and its up. I see a missed call in my
   Droid's phone log - and I get an email from YouMail - but it never
   rings. Just started happening this morning. There was no auto reboot
   (that I noticed) and it wasn't switched off until I noticed the issue
   and tried to resolve it myself with a reboot.

  OK, this is bizarre - I have experienced this in my Droid as well.  I
  don't know if any of my users have seen this, or if it's even related,
  but it's not an isolated incident.

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

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


[android-developers] SurfaceView Lifecycle - Switching between a Layout and a SurfaceView

2010-05-09 Thread tobias429
I've built an application that switches between two screens - a
LinearLayout and a SurfaceView - via the application.setContentView()
method.

When switching between the two screens, the surface of the SurfaceView
gets destroyed, and never created new again.

Here is what I do:

During my application, I switch between the two screens via calling
setContentView() from my application.

My SurfaceView starts a thread that renders the view, once the surface
is created. This works fine the first time I'm doing this:
1. Create the SurfaceView
2. Get a handle of the surfaceHolder, and add my SurfaceView as a
surfaceHolder callback
3. Call setContentView(SurfaceViewScreen) from my app, to bring the
SurfaceView screen to the front

This now nicely calls onSurfaceCreated() in my SurfaceView.

Based on a user action, I later call setContentView(Layout) to display
my standard Layout again. This nicely calls the onSurfaceDestroyed()
mehod of my SurfaceView.

The problem is now, that if I change back again to the SurfaceView via
calling application.setContentView(SurfaceView), the surface never
gets re-created, i.e. neither does onSurfaceCreated() get called, nor
does my view render correctly, as in the according thread
surfaceHolder.getCanvas() returns null.

What am I doing wrong?

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


[android-developers] Re: How to fix java.lang.IllegalThreadStateExeception: Thread already started.

2010-05-06 Thread tobias429
Run into the same issue. What I'm doing is to not stop the thread and
restart it, but kill and rebuild it. I.e. kill the thread via:

boolean retry = true;
while (retry) {
try {
myThread.join();
retry = false;
} catch (InterruptedException e) {
}
}

When you need it again, create a new one and start it. Obviously this
is the crude way to do it, but with anything else I run into the same
illegal state issue. Interested if anyone has a better approach.

On May 6, 9:10 am, MSChoi moon_...@hotmail.com wrote:
 I made an application which has a thread for a notification
 progressbar.

 First time I started the thread, it works fine.
 But Second time I tried to start the thread again, the application
 stop with the exception.

 How can I solve this problem?
 Please give me any clue.

 [==My thread code below==]
 private class ProgressThread extends Thread {
         Handler mHandler;
         final static int STATE_DONE = 0;
         final static int STATE_RUNNING = 1;
         int outIncreamentPercent;
         int mState;

         ProgressThread(Handler h) {
                 mHandler = h;
         }

         public void run() {
                 int i = 0;
                 setState(STATE_RUNNING);
                 while (mState == STATE_RUNNING) {

                         if (i  MAX_LOOP_COUNT) {
                                 setState(STATE_DONE);
                         } else {
                                 if (i % 100 == 0) {
                                         outIncreamentPercent = (int) 
 (((float) i / MAX_LOOP_COUNT) *
 100);
                                         
 rv.setProgressBar(R.id.customProgressBar,
 100,outIncreamentPercent, false);
                                         
 mNotificationManager.notify(NOTIFICATION_ID,notification);

                                         try {
                                                 Thread.sleep(100);
                                         } catch (InterruptedException e) {
                                                 // TODO Auto-generated catch 
 block
                                                 e.printStackTrace();
                                         }
                                 }
                         }
                         i = i + LOOP_INCREMENT;
                 }
                 super.run();
         } /* sets the current state for the thread, * used to stop the thread
 */
         public void setState(int state) {
                 mState = state;
         }

 }

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

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


[android-developers] Re: How to see all the applicat ions in the Google Market?

2010-04-29 Thread tobias429
Try those web-sites:

http://www.androlib.com
http://www.cyrket.com
http://www.androidpit.com
http://www.androidzoom.com

Anyone knows further sites?

On Apr 29, 8:30 am, Grant Jia jeasun...@gmail.com wrote:
 Hi, friends,

 The official web site just show the top applications both free and paid,
 where or how could I see all the applications in the market?
 Thanks.

 Best Regards,
 Grant

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

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


[android-developers] Re: How to obtain a google developer phone in germany?

2010-04-29 Thread tobias429
Chris,

You can develop on any Android phone. The Developer phones are only
specific in that they are guaranteed to come without a sim-lock and
can easily be rooted.

AFAIK the G1 developer phone can't be upgraded to any Android version
higher than 1.6. due to memory limitations, so if you want to
specifically test on a physical device that's on 2.1 getting a Nexus
One would be a good idea.

If you get a phone, you might want to check that the OS is Android
without any manufacturer specific add on like e.g. the HTC Sense user
interface. From what it looks like those phones are the last ones to
receive any OS upgrades, as the manufacturers need to adapt their
specific Android OS add-ons as part of the upgrade.

Apart from that you can of course develop using the different
emulators that come with the SDK. You'll need to do this anyhow for
testing, as it will be very difficult to get your hands on any type of
combination of Android OS, Screen Resolution and hardware features
that's out on the market.

Cheers,

Tobias

On Apr 28, 2:17 pm, chris ach...@gmail.com wrote:
 Hi,

 I plan to develop several apps for the android platform. I'm not yet
 entirely sure if I need a google developer phone or if it is
 sufficient to buy any android phone (e.g. HTC Desire, which is
 available in Germany) ?

 As far as I know there are three google developer phones available:
 G1
 G2
 Nexus One

 But only the Nexus One is deployed with Android 2.1. Do I really need
 to import a Nexus One via the United States to get a google developer
 phone which runs Android 2.1. Maybe I'm missing something?

 Any tips are appreciated.

 Thanks,
 Chris

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

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


[android-developers] Re: Deploy a build for a specific resolution

2010-04-27 Thread tobias429
Hi Viorel,

Filtering by OS is quite simple. You can specify in your application's
manifest the target, minimum or maximum OS version your application
needs, e.g.:

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

The market will show your app then only to phones that have the
required OS version.

On the resolution it's a bit more tricky. You can specify, also in the
manifest, what resolutions your phone supports, e.g.:

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

The market will list your app then only for phones that are able to
display the required size. The logic is however that the market will
list the application on any phone that has the required resolution or
better. I.e. if you specify that your application supports only
largeScreens (largeScreen=true, everything else=false), the market
will list it only on phones with a big screen.

However if you specify smallScreens=true, the market will display
your app to all phones with a small screen resolution or better,
regardless of whether you set normalScreens and largeScreens to false
or not.

Best regards,

Tobias

On Apr 26, 8:10 pm, Viorel galanvio...@gmail.com wrote:
 Hello,

 It is possible to deploy a build on Google Market  filter by  the
 resolution and handset?

 For example: I want to deploy a build that works only on the devices
 that have 480x800 and only OS 2.x

 Thanks,

 Viorel

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

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


[android-developers] Re: Game stutters when drawing outside screen

2010-04-27 Thread tobias429
Is the image that you are drawing exactly the same size as the screen
area that you are filling? I noticed in my games that resizing of
images is apparently an incredibly costly operation with Android.

As soon as I draw a bitmap and the OS has to adjust the size of it,
the game begins to stutter as the resize operation takes a lot of CPU
time, and what's worse, it seems to take a different amount of time
every frame. Don't know if you might be seeing the same effect.

On Apr 26, 10:26 am, Peter peteroerlem...@gmail.com wrote:
 Thanks for the suggestion.
 I probably shoud have mentioned this in my original post. Objects
 sometimes leave the screen, therefore they are party drawed outside
 the screen until they are removed. On 320x480 screens this isn't
 visible, but on bigger screens it is. Drawing the image every frame
 solves this problem.

 On Apr 26, 8:53 am, ko5tik kpriblo...@yahoo.com wrote:

  I would say that you do not need to redraw that image part
  every frame - nothing happens there,  and as there are no overlapping
  window on
  android there is no need to repair 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 
  athttp://groups.google.com/group/android-developers?hl=en

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

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


[android-developers] Re: Question for Admob users

2010-03-30 Thread tobias429
In Germany, Austria, Switzerland and France I also saw pretty much
exclusively geo-targeted ads in the local language. The click-through
rate with those seems to be much higher.

Does anyone know though if the access_coarse_location is really
required for this? After all you can get a users location out of the
IP address as well. Any experience in running global ads with and
without the permission?

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

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


[android-developers] Re: Being legally harassed, by a large iPhone developer

2010-03-25 Thread tobias429
Not a lawyer, but that's my understanding as well. Take all the
Connect 4 clones on the Market. I don't think anyone has a patent on
the game concept itself (according to Wikipedia it's been out since
the 17th century). However Hasbro has registered the title Connect 4
as a trademark in the US. This is why you see all games with this
title sooner or later disappearing from the market as Hasbro files
DMCA takedown notices to Google. See here for an example:
http://www.4feets.com/2009/12/dmca-notice-connect-4-online-now-four-online/

In this case, I believe it's ok to make a game with the same
mechanics. You just can't call it Connect 4. Or more specific, you
can't call it Connect 4 on the US market as from what I have seen
the trademark only applies there. I would imagine it's the same with
Ravensburger's patent on Memory. The thing is now of course, how to
you check for all countries where the Android Market is active, if
some company has actually trademarked your game title...

On the game mechanics, I remember there were cases in the past where
this was claimed to be an issue as well. Anyone remembers The Great
Giana Sisters on C64 and Amiga? The game had original graphics,
levels and sounds. The game-play however was basically a Super-Mario
clone. Nintendo didn't take this to well and tried to force the
publisher to take it off the market. Check this link for the full
story: http://classicgames.about.com/od/computergames/fr/greatgianasisters.htm

There is no mention in the article that this ever went to court, on
the contrary, it's indicated that the threat wouldn't have hold up in
a court. Still, it's always the question for an indie developer
whether you want to spend your spare time and life savings on fighting
it out.

On 24 Mrz., 08:35, ko5tik kpriblo...@yahoo.com wrote:
 On Mar 23, 5:53 pm, Hong lordh...@gmail.com wrote: So NO ONE in the world 
 can ever make a memory type of game EVER, except
  them?

 You can make it,  but you will have to avoid  word Memory  anywhere
 near your game.
 (as it is trademarked) - but it depends on legislation which is
 applicable to you.

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

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


[android-developers] Re: No stats? 0 total; 0 active installs while 5000 AdMob impressions??

2010-01-08 Thread tobias429
The update of the market stats appears to have been down for the last
two days. Mine have been updated again some hours ago. If you check
back on the market you might see yours to be updated now as well.

On 8 Jan., 09:13, greg1x gre...@yahoo.com wrote:
 Hi!

 I have uploaded a free AdMob supported app to the market two days ago.
 AdMob shows 5000 impressions (and revenue), while:

 Android.com:
 0 total; 0 active installs (0%)

 Android Market on the phone:
 50 downloads

 5000 Ad impressions (and revenue) for 50 downloads and 0 installs can
 not be true.
 I would really like to see my stats.

 Anyone else facing the same problem?

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

2010-01-07 Thread tobias429
Hi Andrea,

I also wanted to avoid compatibility mode. More for the reason of
being able to actually use the higher resolution rather than out of
performance concerns.

For one of my games I applied a routine to scale the images myself
upon start-up of the application just like you describe (I used Bitmap
drawables). As the system then does not need to resize the drawables
any longer upon drawing them on the screen, this has speed up the
performance of the game quite drastically.

Best regards,

Tobias

On Jan 7, 3:38 pm, Andrea andrea.pai...@gmail.com wrote:
 Hi Jason,

 On 7 Gen, 05:11, Jason Arora jaso...@gmail.com wrote:

  Are you drawing in a separate thread (like the LunarLander example)?
  If not and your game is real-time, I seriously recommend switching to
  that model.

 I don't use a SurfaceView (like LunarLander) but a normal view because
 in my tests I found it much more stable then the surfaceView. Keep in
 mind that android was 1.5. With 1.6/2.* things maybe changed, I have
 to test it. There are no threads in the game apart the one used for
 loading all the images before the game starts.



  Also, I don't believe you should be seeing a slow-down in
  compatibility mode... In my experience, it has worked pretty well.

 Trust me, with the code structure explained before the frame rate
 slows down, I tested it on the DROID device at last london android
 lab.

 Andrea

  On Jan 6, 11:56 am, Andrea andrea.pai...@gmail.com wrote:

   Hi Robert, thanks for the reply.
   Ok the images are loaded as Bitmaps (not drawable) and drawed on the
   onDraw(Canvas c) method of a view. Inside that method I invalidate()
   all the view. So the game runs as fast as it can. The game is using
   dirty rects technique to redraw only the portions of the screen that
   need to be changed. Here is the simply code structure:

   //on a view
   private void onDraw(Canvas c){

          //do staff

          invalidate();

   }

   if you need some other info, tell me it.

   a.p.

   Robert Green ha scritto:

What's your design like?  How are you drawing everything?  If you tell
me that, I can offer some suggestions.

On Jan 6, 9:02 am, Andrea andrea.pai...@gmail.com wrote:
 Hi
 I developed a game with the g1 in my mind. Now I want to support large
 screen sizes but I don't want to add in the apk different images for
 different screen sizes because now the apk is 3mb and when installed
 trought market it became 6mb (due to protection on). If i have to
 double the images to support new screens, the apk would be too heavy
 (about 13mb, i think) so I'm wondering to know if scaling images at
 runtime by myself (without compatibility mode) maybe the best way for
 supporting larger screens. Someone tried this solution? Compatbility
 mode does a great work in scaling images but it slows down drastically
 the framerate (i think because the scale operation is made every time
 an image is used/moved and not only once on the load of the image
 itself).

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

[android-developers] Re: Start and Stop music on application launch and stop

2010-01-05 Thread tobias429
Hi Hassan,

You can use the onPause() and onResume() functions for this. Just
override the original functions and place the code to start your sound
in onResume() and the code to stop your sound in onPause().

In case you have several activities that can be independently started
and stopped, I'd use a static class with a counter of how many
activities are active right now. Every time an activity executes
onResume(), increase the counter by one, every time onPause() is
called, decrease it by one. You can then stop your sounds in onPause()
in case the counter is set to zero. Ditto for onResume(), where you
only need to start your sound in case that static counter was zero
beforehand.

Haven't tried this though, just an idea.

Best regards,

Tobias

On Jan 5, 7:14 am, Hassan Imtiaz hassan.imt...@cprods.com wrote:
 Hi,
     In my application i have several activities and i want to start
 background music whenever my *Application* is launched and stop music
 whenever *Application* is paused or stopped.
     Any help?.

 Regards,
 Hassan Imtiaz

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

2010-01-05 Thread tobias429
Hi,

menu.add() returns the menu item that was created. You can create a
global variable, assign the returned menu to this global variable, and
then access this any time you like.

E.g.:

In your global variable definitions, add:
MenuItem startMenu;

in onCreateOptionsMenu() you add:

startMenu=menu.add(0, 1, 0, Start);

In you onOptionsItemSelected, you then just have to state:

startMenu.setTitle(Pause);

Cheers,

Tobias

On Jan 4, 1:19 pm, Sasikumar.S sasikumar.it1...@gmail.com wrote:
 Hi,

 I added 2 menus.

         menu.add(0, 1, 0, Start);
         menu.add(0, 2, 0, Stop);

 public boolean onOptionsItemSelected(MenuItem item)
     {
         switch (item.getItemId()) {
         case 1:
             if(item.getTitle().equals(Start))
             {
                 item.setTitle(Pause);
             }
             return true;
         case 2:

             return true;
         }
         return false;
     }

 when i click the stop menu, the start menu name should be changed.

 How to change that?...

 --
 Thanks  Regards
 Sasikumar.S

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

2009-08-25 Thread tobias429

Hi,

I went through exactly the same process after doing exactly what you
described you did: displaying ads on a web-page that gets opened in a
webview out of an Android application. See the post - is android and
adsense a valid business model for the full story. My adsense account
remains disabled to this date.

After this adsense experience, I switched to display ads from admob. I
found admob to be working very well. The team at admob is very
approachable and helpful. I can only highly recommend working with
them.

Best regards,

Tobias

On 14 Aug., 23:40, Photics m...@photics.com wrote:
 Hi Mark,

 This happened in March / April of 2009. I'm not sure if the mobile ads
 were ready yet. I'm thinking that I wouldn't be able to use them now.
 Should I apply for the beta if myAdSenseaccount has been closed?
 (I'm thinking that the answer is no.)

 I'm not sure mobile apps would work for my php/mysql based MMORPG, but
 it certainly would be awesome for some of my other project ideas. (See
 how this is frustrating?)

 I used the JavaScriptAdSensecode on my web pages and I used the
 Webview to display those pages on Android devices.

 At least, I'm happy with the response from the Android team! :-)

 I was contacted by someone from Google, who requested additional
 information. I replied and I am waiting for a response. Maybe this
 story will have a good ending.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Playing sounds multiple times using MediaPlayer

2008-11-02 Thread tobias429

Thanks for the tip! This actually does the trick. What I'm doing now
is a bit more complex. I've created a helper class that multiplies the
number of MediaPlayers used. So instead of using one MediaPlayer for
the bingSound, I use a new class, which internally creates an array of
MediaPlayers. bingSound is an instance of this helper class. If i call
bingSound.play(), the helper class initializes the first MediaPlayer
in the array and starts it.

When bingSound.play() is called again, the helper class takes the
second MediaPlayer in the array and so on. With this I can fire off
the same sound very quickly several times, without having to make sure
that the sound has finished before it can be played once more.

For all MediaPlayers created I set the onCompletionListener as you
suggested with the effect you described: the system does not fill up
with MediaPlayer remnants any more.

With this everything works fine now. All in all pretty complex though.

On 29 Okt., 09:27, blindfold [EMAIL PROTECTED] wrote:
 With option 2, did you try using a setOnCompletionListener() with a
 bingSound.stop() and bingSound.release()? This cleaning up ought to
 prevent your system from filling up with MediaPlayer remnants - unless
 of course you make so many calls to bingSound.start() per unit of time
 that the system has no chance (on average) to finish playing one
 bingSound before the next bingSound request already comes in. This
 approach works for me.

 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Playing sounds multiple times using MediaPlayer

2008-10-28 Thread tobias429

I am looking for a solution to play sounds multiple times in an
application. In the application, as soon as a user performs operation
A, the application shall respond with a *bing* sound. Performing
operation B shall produce a *bong*. That means during the application
life cycle, both sounds will potentially be played several dozen
times. I have tried three different ways to achieve this. None of them
seems to work:

For all options, I have added 2 wav files, one for *bing* and one for
*bong* in the application's Resource Package.

Option 1:
===
For both wav files, I am opening a MediaPlayer via e.g.
bingSound=MediaPlayer.create(context, resid). In the application,
whenever a sound shall be played, I call bingSound.start().

Result:
This works fine the first time. If I call bingSound.start() a second
time no sound plays, and I get an exception that I called start() on a
MediaPlayer instance in the wrong state.

Option 2:
===
Whenever the application shall play a sound, I create a new
MediaPlayer from scratch via e.g.
bingSound=MediaPlayer.create(context, resid); bingSound.start()

Result:
This works fine a number of times, until appearantly the maximum
number of MediaPlayers is reached, and the application simply halts.

Option 3:
===
I create a new MediaPlayer via MediaPlayer.create(context, resid). I
set looping to true. When the application shall play the sound, I call
bingSound.start(). When the sound shall stop, I call
bingSound.seekTo(0), followed by bingSound.pause().

Result:
This works fine for looping sounds. For the classical *bing* sound
that shall only be played once and does not loop, it is next to
impossible to time the calls in a way that the sound is only played
once.

Question
===
Is there any possible approach to play the same, non looping sound
several dozen times in an application?

Thanks for any help!

Tobias

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