[android-developers] Unable to instantiate activity - transferred from Vista to Mac now my projects won't build

2009-06-06 Thread madcoder

I transferred my development from Windows to Mac.  I have the latest
version of Eclipse, and the 1.5 r2 SDK.  I have successfully ran a
sample Hello world app to make sure it all fits together properly.

I then imported my library projects (called MyLib) that holds many
reusable classes of mine.  I also imported some projects that depend
on the MyLib package.

When I open my projects, Eclipse asks me if I want to open dependent
projects as well, and I select yes.  The MyLib project folder opens up
as it should.

When I look in my project properties - project references, the MyLib
folder is checked.

When I run my project, it outputs in the debugger (LogCat):

(in yellow)
dalvikvm failed resolving 'Lcom/mycompany/myapp/Splash; interface 22
'Lcom/mycompany/MyLib/MyClass$MyClassCallback;'

dalvikvm Link of class 'Lcom/mycompany/myapp/Splash;' failed

(where MyClass.MyClassCallback is a required interface to one of my
library classes)

(some other stuff...)

(in red)
java.lang.RunTimeException:unable to instantiate activity ComponentInfo
(com.mycompany.myapp/
com.mycompany.myapp.Splash):java.lang.ClassNotFoundException:com.mycompany.myapp.Splash
in loader dalvik...

Any ideas as to what I'm doing wrong?  Did I fail to link my library
somewhere else?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Help with dialog builder and resource problem please

2009-03-20 Thread madcoder

I'm trying to build an alert dialog with a builder.  The code is from
the svn here:

http://code.google.com/p/apps-for-android/source/browse/trunk/DivideAndConquer/src/com/google/android/divideandconquer/Eula.java?r=93

There is also a web site with description of how to use the code here:
http://androiddevstudio.com/tutorials/adding-eula-to-android-app/comment-page-1#comment-16

So far the class successfully runs this code:

...previous code
builder.setPositiveButton(com.mywebsite.MyLib.R.string.eula_accept,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which)
{
accept(preferences);
if (activity instanceof OnEulaAgreedTo) {
((OnEulaAgreedTo) activity).onEulaAgreedTo();
}
}
});

Then I try to run this code immediately after it:

builder.setNegativeButton(com.mywebsite.MyLib.R.string.eula_refuse,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which)
{
refuse(activity);
}
});

And then I get Force Close.  I've placed several log messages in my
code for debug and I'm fairly certain this is where it hangs up.

The DDMS indicates:

W  535  ResourceType  getEntry failing because entryIndex 3 is beyond
type entryCount 3
W  535  ResourceType  Failure getting entry for 0x7f040003 ( t=3 e=3 )
in package 0: 0x8001

I have commented out this single builder.setNegativeButton code and
the file runs with no force closure.  I'm also absolutely sure that
both string resources are in the strings.xml file.

You may notice my string designation:

com.mywebsite.MyLib.R.string.eula_accept

This is because I'm trying to access this eula from a reusable library
class.  This is where is gets a little weird.  The title in the dialog
displays this:

res/raw/button_click.ogg

And the accept button at the bottom of the dialog displays this text:

res/raw/instructions.ogg

Those files are both from the main project itself, in another package,
hence the use of long definitions for the string files.  Unfortunately
it still doesn't access those strings.

I would like to know how to do this correctly, so I can reuse this
library class.  And more importantly, so I can understand what I'm
doing wrong.

I'm using Eclipse and the latest SDK of Android.

Thanks in advance.



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



[android-developers] Re: How to achieve iPhone like transition effect between screens?

2009-03-20 Thread madcoder

Hopefully the final cupcake release will have smoother transitions
than presently available.

If not, I'll have to wait until the hardware can handle it.



On Mar 20, 6:31 pm, mobilekid mobilek...@googlemail.com wrote:
 You can work out your own solution with animations and playing with
 the visibility mode of the layout wrappers holding your views in the
 activities. But that proves to be quite expensive solution.

 I think with the current API this effect is natively supported with
 ListActivities, there are many well-known apps on the market using
 this effect.

 On Mar 20, 7:07 am, frizzo rg...@vbrad.com wrote:

  You've probably seen the effect on the iPhone when you go to the next
  screen, it flips the screen, making it appear, like you just flipped
  over a card and a new screen appeared.

  There is a demo of something similar in the APIDemos (Views/Animation/
  3D Transition), but the transitions are between elements of the same
  page.

  Is there a way to implement the flip effect between Activities (in the
  same process)?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Please enable SVG Support in the Android Webkit Browser

2009-03-20 Thread madcoder

I would love to SVG implemented at the graphics API level.  Any
possibility of it coming to Android in the future?


On Mar 20, 6:54 pm, Mark Murphy mmur...@commonsware.com wrote:
  it would be great to get scalable open Vectors in the browser.

 Fromhttp://webkit.org/projects/svg/index.html:

 At this time there is an experimental SVG implementation in WebKit

 I would encourage you to let the WebKit group know of your interest, as I
 suspect that, so long as SVG is described as experimental, the odds of
 it being integrated into Android are lower. Anything you can do to help
 WebKit out with its SVG implementation will eventually help Android adopt
 it.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] power manager and wake lock

2009-03-19 Thread madcoder

In the example here:

It shows:

PowerManager pm = (PowerManager) getSystemService
(Context.POWER_SERVICE);
 PowerManager.WakeLock wl = pm.newWakeLock
(PowerManager.SCREEN_DIM_WAKE_LOCK, My Tag);
 wl.acquire();
   ..screen will stay on during this section..
 wl.release();


Once the wake lock is received from the pm, can the reference to the
pm be set to null?  Is it needed any more?  Or is there some reason to
keep it?

It seems like the wl reference is the only one needed.




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

2009-03-12 Thread madcoder

Nice solution, thanks for sharing!


On Mar 12, 1:36 pm, benmccann benjamin.j.mcc...@gmail.com wrote:
 Finally got it figured 
 out:http://www.benmccann.com/dev-blog/android-audio-recording-tutorial/

 On Mar 9, 11:37 am, benmccann benjamin.j.mcc...@gmail.com wrote:

  I'm still feeling directionless when it comes to what
  MediaRecorder.setOutputFile(String path) is expecting.  Is it a
  relative path?  Is it a fully qualified path?  Must the directory we
  are recording in already exist, or will MediaRecorder create it for us
  if it does not exist?  What happens if we specify a file path which
  already exists - will it override the existing file or will it bomb
  out?

  On Mar 7, 10:30 pm, benmccann benjamin.j.mcc...@gmail.com wrote:

   jdl, I'd be happy to post my code, but I still don't have a working
   example.  I upgraded to the 1.1 SDK today in hopes that it fixed a bug
   and things would work for me, but it seems the media APIs are still
   hopelessly broken.  All I ever get is the meaningless message start
   failed.  It looks like perhaps the cause is a buffer overflow in the
   native code:

   03-07 21:19:42.059: DEBUG/AudioHardware(25): AudioStreamInGeneric::set
   (0xac50, 7, 1, 1, 8000)
   03-07 21:19:42.069: DEBUG/AudioHardware(25): AudioStreamInGeneric::read
   (0x40308020, 320) from fd 7
   03-07 21:19:42.078: DEBUG/AudioHardware(25): AudioStreamInGeneric::read
   (0x40308160, 320) from fd 7
   03-07 21:19:42.078: DEBUG/AudioHardware(25): AudioStreamInGeneric::read
   (0x403082a0, 320) from fd 7
   03-07 21:19:42.078: DEBUG/AudioHardware(25): AudioStreamInGeneric::read
   (0x403083e0, 320) from fd 7
   03-07 21:19:42.088: WARN/AudioFlinger(25): AudioRecordThread: buffer
   overflow
   03-07 21:19:42.098: DEBUG/AndroidRuntime(185): Shutting down VM
   03-07 21:19:42.098: WARN/dalvikvm(185): threadid=3: thread exiting
   with uncaught exception (group=0x4000fe68)
   03-07 21:19:42.098: ERROR/AndroidRuntime(185): Uncaught handler:
   thread main exiting due to uncaught exception
   03-07 21:19:42.128: DEBUG/AudioHardware(25): AudioStreamInGeneric::read
   (0x40308020, 320) from fd 7
   03-07 21:19:42.128: DEBUG/AudioHardware(25): AudioStreamInGeneric::read
   (0x40308160, 320) from fd 7
   03-07 21:19:42.128: ERROR/AndroidRuntime(185):
   java.lang.RuntimeException: start failed.
   03-07 21:19:42.128: ERROR/AndroidRuntime(185):     at
   android.media.MediaRecorder.start(Native Method)
   03-07 21:19:42.128: ERROR/AndroidRuntime(185):     at
   com.benmccann.android.hello.AudioRecorder.start(AudioRecorder.java:59)
   03-07 21:19:42.128: ERROR/AndroidRuntime(185):     at
   com.benmccann.android.hello.HelloAndroid$1.onClick(HelloAndroid.java:
   31)

   On Mar 6, 1:38 pm, benmccann benjamin.j.mcc...@gmail.com wrote:

Bugs already 
exist:http://code.google.com/p/android/issues/detail?id=450q=media%20docum..

On Mar 5, 9:23 pm, Dave Sparks davidspa...@android.com wrote:

 Log a bug athttp://b.android.com.

 On Mar 5, 2:17 pm, jdl j...@edufone.com wrote:

  Diane or Dave,

  How do we go about requesting that someone from the Android project
  update the Audio/Video 
  tutorial,http://developer.android.com/guide/topics/media/index.html,
  so that it works with the current version of the API?

  Thanks,
  AN

  On Feb 28, 2:45 pm, Dianne Hackborn hack...@android.com wrote:

   You use Context to get at your private data files:

  http://developer.android.com/guide/topics/data/data-storage.html

  http://developer.android.com/reference/android/content/Context.html#g...)

   On Thu, Feb 26, 2009 at 2:40 PM, benmccann 
   benjamin.j.mcc...@gmail.comwrote:

 each application has its own private data directory /
 data/app-private/app-package. I believe your working 
 directory is set
 to this directory by default

Cool.  So it sounds like I should just be able to use a 
relative path
from the current location then.  Unfortunately, I'm getting the
following exception (with no clues as to why start is failing):

02-26 14:34:55.132: ERROR/AndroidRuntime(164):
java.lang.RuntimeException: start failed.
02-26 14:34:55.132: ERROR/AndroidRuntime(164):     at
android.media.MediaRecorder.start(Native Method)

Here's my code:

   final MediaRecorder recorder = new MediaRecorder();
   recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
   
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
   recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
   recorder.setOutputFile(test.3gpp);
   recorder.prepare();
   recorder.start();

On Feb 26, 12:14 am, Dave Sparks davidspa...@android.com 
wrote:
 You can get the path to external storage (e.g. SD card) with
 Environment.getExternalStorageDirectory(). This is world 

[android-developers] Re: Merchant account signup down?

2009-03-12 Thread madcoder

Wait for it.  That's all.  I couldn't get my account verified, and had
to send emails to support for a few weeks to get it all straight, but
in the end, to Google's credit, they worked it all out.


On Mar 12, 10:02 am, jsdf jasons...@gmail.com wrote:
 Unfortunately, 24 hours later, it is still down.
 And, I check with a friend who works at Google, but he's in Adwords
 and is unable to do anything.  Even he said I'm at the mercy of
 support, while acknowledging that Google is terrible at support.

 Now what?  Suggestions?

 On Mar 11, 10:03 am, keith_hi...@yahoo.com keith_hi...@yahoo.com
 wrote:

  I am having the same issue. Been trying since yesterday to get this
  resolved. Google as of yet has not responded to my tech support
  request.

  On Mar 10, 9:16 pm,jsdfjasons...@gmail.com wrote:

   I am trying to sign up for a merchant account but it seems to be down:
   Sorry, we could not setup your merchant account.
   Please try again later.

   Can anyone else confirm this, or is it just my login?

   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: (OT) Is the combination of Android Market and Google Checkout a joke?

2009-03-05 Thread madcoder

...so we don't get this constant conflict-of-interest commentary on
how bad the Google system is...

I think is good to talk about the likes and dislikes of the Android
system.  This way, potential problems can be identified and corrected.

I also believe alternative application distribution methods should be
available to those who desire it.

So lets keep talking about the good and bad points about Google (this
thread is mainly about the bad points  :)



On Mar 4, 11:24 pm, John Lauricella jjlaurice...@hotmail.com wrote:
 Is it possible to start a new discussion group for folks who promote their 
 own products that compete with the Android Market, so we don't get this 
 constant conflict-of-interest commentary on how bad the Google system is...



  Date: Wed, 4 Mar 2009 13:38:49 +
  From: a...@funkyandroid.com
  To: android-developers@googlegroups.com
  Subject: [android-developers] Re: (OT) Is the combination of Android Market 
  and Google Checkout a joke?

  I'm getting more and more tempted to open up paid-for apps on
  AndAppStore where all payments go directly to the developers account so
  they can set the TCs.

  Would this be something people would be interested in?

  Al.

  Semprebon wrote:
   It would be nice if some other pricing models were available (for
   example, subscriptions), but I just don't see a no returns or even a
   no returns after 1 hour model being very popular with users. I may
   be wrong, but I don't think most people see these products as
   consumables in the same way you do.

   On Mar 2, 11:41 pm, madcoder paperga...@gmail.com wrote:

   I believe there should be demos and full apps in the market. It
   shouldn't be too hard to do. If the user downloads the lite version
   then buys the regular version, there should be a 1-2 hour refund
   window (in case it doesn't work as promised). This is much better
   than the 48 hours refund policy that allows people to have their cake
   and not pay for it too.

   I really wish Google would address this. They can look forward to a
   very lackluster market if they don't.

  --

  * Written an Android App? - List it athttp://andappstore.com/*

  ==
  Funky Android Limited is registered in England  Wales with the
  company number 6741909. The registered head office is Kemp House,
  152-160 City Road, London, EC1V 2NX, UK.

  The views expressed in this email are those of the author and not
  necessarily those of Funky Android Limited, it's associates, or it's
  subsidiaries.

 _
 Windows Live™ Groups: Create an online spot for your favorite groups to 
 meet.http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_032009
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: (OT) Is the combination of Android Market and Google Checkout a joke?

2009-03-02 Thread madcoder

I'm really not looking forward to making any real money on Android, at
least not for some time to come.

Once I finish my US Weekly within an hour, can I get a refund?

Exactly.  What about watching a movie that cost you $7.50?  Do you get
a refund every time after watching it?

What about going to a restaurant, eating a big meal, licking the
plate, then asking the manager for a refund?  Why?  Who knows, you
just want a refund (other)!

I believe there should be demos and full apps in the market.  It
shouldn't be too hard to do.  If the user downloads the lite version
then buys the regular version, there should be a 1-2 hour refund
window (in case it doesn't work as promised).  This is much better
than the 48 hours refund policy that allows people to have their cake
and not pay for it too.

I really wish Google would address this.  They can look forward to a
very lackluster market if they don't.

I was disappointed with Google as a whole when I determined the
problems with the market, but now I realize it's just too big of a
company.  It's like the federal government now.  One hand doesn't know
what the other one is doing.  And when one part tries to tell another
part of an existing problem, it gets filed in stack of paperwork (or
queues) waiting for it's turn to be addressed.

Like I said, I think it will be fixed, but in due time.

On Mar 2, 1:20 pm, Inderjeet Singh inder...@gmail.com wrote:
 I agree it would be great to have the user give more feedback on refunds: I
 guess it needs to be balanced with the ease of use, and I hope that
 appropriate folks in the Android team are looking at improving it. If you
 have concrete suggestions, you should consider posting them on this forum or
 file a bug.

 As a workaround, you can send an email to the customer through Google
 Checkout's Order Details page asking for an explanation. I know it is a lot
 of work if you have too many of them, but it is an option.

 Inder

 On Mon, Feb 23, 2009 at 4:14 PM, Stoyan Damov stoyan.da...@gmail.comwrote:



  Well, I don't think 3.4 applies to my case because my game does have a
  free version, which the user can try before he decides whether to buy
  or not.
  Now, *frankly* I wouldn't mind the 48 hour period *that* much if at
  least the user is asked for an explanation why he cancels his order.
  This Other reason for cancellation is one of the biggest WTFs in the
  Market application. You either provide the user w/ a textbox to
  explain, or you don't provide Other reason, or at *least* you don't
  display Reason: Other (describe below) in Google Checkout leaving us
  wondering whether the user has actually described something below or
  not (he could not because there's nothing below) :)

  Cheers

  On Tue, Feb 24, 2009 at 2:01 AM, inder inder...@gmail.com wrote:

   Hi Stoyan,

   You are right, your refund does seem to have happened after 24 hours.

   As I understand section 3.4 of
 http://www.android.com/us/developer-distribution-agreement.html
   The developers agree to allow refunds with-in 48 hours, and buyers
   have the option for the first 24 hours. May be you are running into a
   bit of grace period.

   Inder

   ---
   3.4 Special Refund Requirements. The Payment Processor’s standard
   terms and conditions regarding refunds will apply except the following
   terms apply to your distribution of Products on the Market.

   Products that can be previewed by the buyer (such as ringtones and
   wallpapers): No refund is required or allowed.
   Products that cannot be previewed by the buyer (such as applications):
   You authorize Google to give the buyer a full refund of the Product
   price if the buyer requests the refund within 48 hours after purchase.

   On Feb 23, 3:05 pm, Stoyan Damov stoyan.da...@gmail.com wrote:
   Now here's another NOT related to weekend sleeps:

   Feb 22     1:46 PM      Order received  You received a new order. Google
  has
   sent the customer an order confirmation email.
   Feb 23     2:48 PM      Order cancelled You cancelled this order.
   Reason: Other (describe below)
   Message sent to customer: Refund requested from phone.

   So you can see, the 24 hour period is a myth.

   I mean it - GOOD LUCK to all of us ;)

   Cheers,
   Stoyan

   On Tue, Feb 24, 2009 at 1:00 AM, Stoyan Damov stoyan.da...@gmail.com
  wrote:
Let's see:

Feb 22     8:12 AM      Order received  You received a new order.
  Google has
sent the customer an order confirmation email.

Feb 23     12:58 PM     Order cancelled You cancelled this order.
Reason: Other (describe below)  --- THIS IS MY FAVORITE,
there's nothing in the Market UI to prompt the user for more info
Message sent to customer: Refund requested from phone.

If I'm not mistaken, between 22 Feb 8:12 AM and 23 Feb 12:58 PM there
are  24 hours.

I have others, which were canceled after ~3 days (bought on 21st,
canceled on 23rd).

I think that's because during the weekend 

[android-developers] Re: Android presentation backgrounds

2009-02-26 Thread madcoder

If you're not releasing the presentation content, and just using it
for a private demonstration in your company, you might do this:

Google Image Search

google android wallpaper

Otherwise Google has some wallpapers (about three, I think) on their
website available for download.

http://code.google.com/android/goodies/index.html


On Feb 27, 12:37 am, Michael Brunton-Spall michael.brunton-
sp...@guardian.co.uk wrote:
 Hey there,

 I've just completed a week of work at my company, investigating
 android, and obviously spent time developing applications and playing
 with the API.
 However I know have to give a presentation about my findings (mostly
 good by the way), and I wanted some background pictures for my
 presentation that are android themed.  Surely someone here has had to
 do something like this and either has some lying around, or knows of a
 website that has some CC or freely licensed background pictures.

 Cheers

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



[android-developers] Re: When do I need a new Activity?

2009-02-26 Thread madcoder

I didn't like the 'activity' concept when I first started using
Android.  However, it's grown on me well.Activities themselves are
their own encapsulated parts of the application and makes debugging
much easier.  It is a pain at first to figure out how to destroy/
recreate activities, but after a little while, it's no problem.

The only time I really use more than one view in a single activity is
for a splash screen (thanks Mark), and loading screens.  I'm sure
there are many more uses, but that's how I've done my apps.


On Feb 26, 11:17 pm, Michal mic...@gmail.com wrote:
  Those are just a few of the design criteria that might lead you in the
  direction of multiple activities.

 Thanks a ton Mark, this is great feedback. I will continue exploring
 the single-activity approach until I run into issues.

 I owe ya!

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

2009-02-26 Thread madcoder

I believe your on to something here.

The Labyrinth Lite version doesn't ask for permission for vibrate,
only internet access and system tools - prevent sleep.  So where is
the vibration coming from?  Also, it seems the harder the ball hits,
the stronger the (mini-)vibration.

I would like to know what triggers this as well.

On Feb 26, 11:50 pm, Jason Van Anden jason.van.an...@gmail.com
wrote:
 Thank you for answering.  I took some of the griping personally about
 why don't people take the minute to find ... and/or choose the right
 forum.  In this situation I do not know the syntax so its hard to find
 the info.

 That being said ... something physical actually does occur.  Its the
 same thing that happens when you long click on a desktop icon to
 indicate its selected on the G1.  It reminds me of the old video game
 Q*bert.  I tried a short vibration but its definitely not the same.

 Feedback super appreciated.

 i++

 On Thu, Feb 26, 2009 at 11:44 AM, Stoyan Damov stoyan.da...@gmail.com wrote:

  I think it's simply a sound effect - perhaps the phone vibrates as
  well, can't remember - haven't played Labyrinth for a while.

  On Thu, Feb 26, 2009 at 4:53 PM, robotissues jason.van.an...@gmail.com 
  wrote:

  Can someone clue me in on the name of the intent that triggers the
  haptic feedback when the user selects icons on the desktop, or when in
  Labyrinth the ball hits the wall.  I thought it was vibrate ... but
  after playing with Labyrinth I am sure there is something else. In
  Labyrinth it feels as if the thump occurs relative to where the ball
  hits (but I am not sure if this is really the case or I am imagining
  it).

  I asked about this before and thought I had figured it out myself
  (thought it might be a short burst of vibrate) ... but apparently not.

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

2009-02-26 Thread madcoder

You could use a timer to incrementally increase the number.  I don't
know if there is a method for this already.  Shouldn't be too hard to
do.


On Feb 26, 4:06 pm, Manfred manfred.fettin...@gmail.com wrote:
 Hi!

 I want, that when the user clicks on a button, a textfield with a
 number will increase or decrease. But this should be work in a way,
 that the user leaves the finger on the button and the number increases
 automatically. Therefore he doesn´t have to click lot of times.

 I have not found any method to override that could implement such
 behaviour!
 Does anybody know how to implement this?

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



[android-developers] How to use Media Player in a library class?

2009-02-24 Thread madcoder

I have successfully implemented the Media Player for my apps, but when
I tried to use some of the callback methods I ran into a problem.

What I'm trying to do is use Media Player in a reusable (library)
class.  This MediaPlayer is created by passing the Activity Context to
it's constructor.  I then use getApplicationContext to avoid any
potential memory leaks.  This works well and I'm quite happy with it.

My problem is trying to use callbacks.  When I implement
MediaPlayer.OnPreparedListener in my class (that doesn't extend an
Activity) I repeatedly get this error:

Illegal State Exception: PrepareAsync called in state 8

This error only occurs on the line:

mp.prepare();

I believe this is due to the class itself not being an Activity.  When
I implemented the callbacks in a separate test project, the mp.prepare
() works fine.

I cannot use a passed context to my library class, as that would
require the Activity to implement the listener and not my library
class.

How can I create a library class that creates/uses MediaPlayer and
it's callbacks without making it extend Activity?  Is this not
possible?

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

2009-02-19 Thread madcoder

Good luck with Google getting to your problem real quick-like.

I was all on board with Android 110%.  I've invested months of coding
time to learn the OS.  I've made several apps just waiting to be
released.  Now I can't even create a merchant account.  I asked why
and after several days, still no response (other than the standard
auto-response).  Heck, they didn't even tell me WHY I couldn't create
an account - not to mention their policy says that they WON'T tell me
why, either!

If it was just one thing like this, I could overlook it.

Sadly, it's not.

The number one thing is the software refund policy.  It's crap.  I
wouldn't doubt that as broke as most people in the world are (soon to
be), they will use an app for less than 24 hours and return it.  Even
your subscription service would be enjoyed, then returned.  Not that
people would want to steal from your company, but people wouldn't want
to use torrent sites too, right?

I can agree with a 2 hour refund policy.  That makes sense.  Try it
for a little bit.  If you like it - keep it.  Not 24 hours.

Also, the fact that people will need to use Google Checkout (thus
limiting purchasers right off the top), then making it easy to use
most apps for 'free', could mean a doomed market for android.

Lastly, I can't even compare my G1 to the iPhone.  Oooh, the flip-out
keyboard is cool, they say.  Then that's where the ooh stops.  The
lack of fluid animations, transitions  overall slick user-interface
make my G1 look like a Lite-Brite toy compared to the iPhone.

I don't have any choice but to develop for other phones.  Maybe 'if'
the Android platform fixes its problems, I will reconsider it.  But
for now its not looking good as a profitable platform for developers.

I hope I'm wrong about all this and the Android platform prospers.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: (simple?) problem with table layout

2009-01-31 Thread madcoder

Thanks guys, just what I needed!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] (simple?) problem with table layout

2009-01-30 Thread madcoder

I want to create a table layout so I don't have to use absolute
values.

I have 2 TableRow's in my TableLayout, and each row has 4 buttons,
all the same width.

The problem I'm having is with the last button on the first row.  the
button is as tall as two buttons combined.  I can make a button span 2
columns (width), but how do I make it span two rows and not move the
second row down?

e.g., What I would like (please excuse my poor ASCII art)

+++  +++  +++  +++
+=+  +=+  +=+  +=+
+++  +++  +++  +=+
+=+
+++  +++  +++  +=+
+=+  +=+  +=+  +=+
+++  +++  +++  +=+

What I'm getting:

+++  +++  +++  +++
+=+  +=+  +=+  +=+
+++  +++  +++  +=+
+=+
+=+
+=+
+++
+++  +++  +++
+=+  +=+  +=+
+++  +++  +++


Any advice on how to do this properly?!

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: Apple Granted Multitouch Patent

2009-01-28 Thread madcoder

In my opinion, the patent is worthless.  Multi-touch has been in use
long before the iphone started using it.  A good example of this is

www.jazzmutant.com

I hope Android will have multi-touch in a future update because of
this.


On Jan 28, 4:08 am, technick techn...@gmail.com wrote:
 The US is in need of some major copyright reform. Apple should of
 never been granted the patient on multi-touch interfaces, as its the
 next natural progression from a single touch interface.

 On Jan 27, 2:05 pm, Al Sutton a...@funkyandroid.com wrote:

  The most intelligent solution would be disabling it in the firmware
  shipped in the US. Most handst manufacturers are based in the far east,
  T-Mobile can ship them to whomever they want outside the US, and
  developers working outside the US can continue to work on it.

  The same approach was used with encryption in pre-2006 where I could
  order a VPN server from any number of European or far east websites
  which, technically, if I took into the US or left the US with I could be
  charged as an arms smuggler under US law.

  If your country has laws that prevent you getting a technology you
  should talk to the politicians about changing the law, not try and
  remove the functionality from devices shipped to those of us in the free
  world.

  Al.

  JP wrote:
   I speculate one of the reasons that multi-touch was not in the Android
   package because the patent was pending. I predict that noone outside
   Apple will touch multi-touch even with a 10ft. pole (pun intended).

   The bigger issue in my view is gesture-based scrolling, which *is*
   part of Android and which happens to be claimed in the patent.
   Somebody enlighten us how this is not going to be a battle down the
   road?

   On Jan 27, 9:52 am, Al Sutton a...@funkyandroid.com wrote:

   It's only a US patent and the world is a big place.

   All it means is that if anyone has a Multi-Touch innovation and wants to
   play it safe will stay out of the US market.

   Welcome to America, the land of the free, well, as long as you have the
   right lawyer that is.

   Al.

   robotissues wrote:

   via Slashdot ..

  http://yro.slashdot.org/article.pl?sid=09%2F01%2F27%2F024242from=rss

   Does this really put the kabosh on multitouch on Android for the next
   18 years?  Anyone out there have any thoughts on this?

  www.smileproject.com

   --
   ==
   Funky Android Limited is registered in England  Wales with the
   company number  6741909. The registered head office is Kemp House,
   152-160 City Road, London,  EC1V 2NX, UK.

   The views expressed in this email are those of the author and not
   necessarily those of Funky Android Limited, it's associates, or it's
   subsidiaries.

  --
  ==
  Funky Android Limited is registered in England  Wales with the
  company number  6741909. The registered head office is Kemp House,
  152-160 City Road, London,  EC1V 2NX, UK.

  The views expressed in this email are those of the author and not
  necessarily those of Funky Android Limited, it's associates, or it's
  subsidiaries.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Apple Granted Multitouch Patent

2009-01-28 Thread madcoder

Yes, I believe the G1 is capable of multi-touch, but I don't think
there will be many apps using it unless it is part of the standard
distribution from Google.

On the other hand, I could be wrong and many people could download a
third-party app that allows for multi-touch and that *may* avoid the
patent issue altogether.


On Jan 28, 7:58 pm, Marcio Alexandroni mar...@cialogica.com.br
wrote:
 In fact someone is already working on it for Android, JF has already
 released an Android fork with a multitouch browser. I did install it on my
 device.

 http://forum.xda-developers.com/showthread.php?p=3219972#post3219972

 Marcio Alexandroniwww.cialogica.com
 w  Tel. 55 11 3717-2345
    Cel. 55 11 9989-8316
   mar...@cialogica.com.br
  marcioalexandroni

 -Original Message-
 From: android-developers@googlegroups.com

 [mailto:android-develop...@googlegroups.com] On Behalf Of madcoder
 Sent: Wednesday, January 28, 2009 10:55
 To: Android Developers
 Subject: [android-developers] Re: Apple Granted Multitouch Patent

 In my opinion, the patent is worthless.  Multi-touch has been in use
 long before the iphone started using it.  A good example of this is

 www.jazzmutant.com

 I hope Android will have multi-touch in a future update because of
 this.

 On Jan 28, 4:08 am, technick techn...@gmail.com wrote:
  The US is in need of some major copyright reform. Apple should of
  never been granted the patient on multi-touch interfaces, as its the
  next natural progression from a single touch interface.

  On Jan 27, 2:05 pm, Al Sutton a...@funkyandroid.com wrote:

   The most intelligent solution would be disabling it in the firmware
   shipped in the US. Most handst manufacturers are based in the far east,
   T-Mobile can ship them to whomever they want outside the US, and
   developers working outside the US can continue to work on it.

   The same approach was used with encryption in pre-2006 where I could
   order a VPN server from any number of European or far east websites
   which, technically, if I took into the US or left the US with I could be
   charged as an arms smuggler under US law.

   If your country has laws that prevent you getting a technology you
   should talk to the politicians about changing the law, not try and
   remove the functionality from devices shipped to those of us in the free
   world.

   Al.

   JP wrote:
I speculate one of the reasons that multi-touch was not in the Android
package because the patent was pending. I predict that noone outside
Apple will touch multi-touch even with a 10ft. pole (pun intended).

The bigger issue in my view is gesture-based scrolling, which *is*
part of Android and which happens to be claimed in the patent.
Somebody enlighten us how this is not going to be a battle down the
road?

On Jan 27, 9:52 am, Al Sutton a...@funkyandroid.com wrote:

It's only a US patent and the world is a big place.

All it means is that if anyone has a Multi-Touch innovation and wants
 to
play it safe will stay out of the US market.

Welcome to America, the land of the free, well, as long as you have
 the
right lawyer that is.

Al.

robotissues wrote:

via Slashdot ..

   http://yro.slashdot.org/article.pl?sid=09%2F01%2F27%2F024242from=rss

Does this really put the kabosh on multitouch on Android for the
 next
18 years?  Anyone out there have any thoughts on this?

   www.smileproject.com

--
==
Funky Android Limited is registered in England  Wales with the
company number  6741909. The registered head office is Kemp House,
152-160 City Road, London,  EC1V 2NX, UK.

The views expressed in this email are those of the author and not
necessarily those of Funky Android Limited, it's associates, or it's
subsidiaries.

   --
   ==
   Funky Android Limited is registered in England  Wales with the
   company number  6741909. The registered head office is Kemp House,
   152-160 City Road, London,  EC1V 2NX, UK.

   The views expressed in this email are those of the author and not
   necessarily those of Funky Android Limited, it's associates, or it's
   subsidiaries.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Are you localizing an app? Do you want to be?

2009-01-18 Thread madcoder

I'm curious how this will impact me and others like me who are English-
speakers but staying in a foreign country.  I live in Thailand, and I
often deal with many 'localization' problems.

For example, when I log onto Google groups, it references the
http://groups.google.co.th/, and all the menus are in Thai script.  I
have to manually change the URL to '.com', then it's readable.
Fortunately, this is one of the 'easier-to-fix' problems.

I hope your localization takes into account the users selected
country, not the country they are currently located in.

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: How to catch global events?

2009-01-15 Thread madcoder

Nothing quite like giving full internet access permission, then having
a special service like this running in the background...


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

2009-01-15 Thread madcoder

It could be secret code implanted by the Umbrella Corporation...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 stop the device from sleeping

2009-01-12 Thread madcoder

Try this:

PowerManager pm = (PowerManager) this.getSystemService
(Context.POWER_SERVICE);
WakeLock wl = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, My
Tag);
wl.acquire();

when you are done with wake lock,
wl.release();

Alternatively, you can use this if you have only one activity:
PowerManager pm = (PowerManager) this.getApplication().getSystemService
(Context.POWER_SERVICE);

It's important to remember to release your wake lock.  I don't know
the 'perfect' or 'standard' way of using it, but anytime my activity
receives onPause(), I release it.

I had a nasty bug once where my app didn't release it, and because it
was still running in the background, my phone didn't sleep for quite
some time, almost draining the battery completely!

BTW, your app works great - my girlfriend became a zombie for a few
moments and didn't remember anything I did to her!



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Concern about application file size for publishing due to Media files

2009-01-09 Thread madcoder

Stoyan Damov wrote:
Re .mp3s, you surely can't expect the device to play a 48KHz .mp3 w/ a
320kbps bitrate so you can safely drop the quality to say 32KHz @
128kbps and the user wouldn't notice it for sure.

What is the audio limitations of the android platform/G1?  How do you
know that 32KHz/128kbps is the best quality that can be heard?

I'm not trying to be a jerk, but I would like to know the best audio
quality from android played through a good set of ear buds or
headphones.  File size is critical as well, so this is very important
information to get correct.

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: Slide Views ( like Google Scoreboard app )

2009-01-08 Thread madcoder

Wow, really good stuff.  I see the ViewFlipper methods allow for
setting which child view to display, as well as adding and removing
views.  Very nice.

Falcon4ever, if you check out the example at androidguys, above,
scroll down and they show how to add views in code.

Mark, I got your book, and it's quite good.  I would really like to
see a little more depth on the UI threads, but overall, well worth the
money.  It has saved me some headaches already.

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

2009-01-07 Thread madcoder

I would LOVE to see an example of this...

On Jan 8, 4:55 am, loty lev.pert...@gmail.com wrote:
 One easy way to implement it is with ViewFlipper. You can add in and
 out animations and create your views on the fly

 On Jan 7, 12:52 pm, Al alcapw...@googlemail.com wrote:

  I'd like to know this also. RomainGuy described the Home screen design
  as using Cell Layouts and using Scroller methods to scroll left/right,
  but the UI in Scoreboard seems much more advanced (not limited to 3
  screens, there can potentially be hundreds of screens).

  On Jan 6, 5:33 pm, avolo...@gmail.com avolo...@gmail.com wrote:

   Hi , i'm looking for the best way to implement UI that similar to
   Scoreboard app ( with views sliding ). I wonder if it was implemented
   the same way as the home screen or there is a better 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
-~--~~~~--~~--~--~---



[android-developers] Re: Market paid-for apps

2009-01-01 Thread madcoder

I'm an American living in Thailand, and I want to sell to the US, UK,
etc.  I plan on having multiple languages (when it's fully supported).

It would make sense for Google to allow people outside of a country
list apps for a different country.  But I don't know if Google will
allow this or not.

I would hate to wait for Thailand to be allowed on the list - it seems
this country always shows up at the bottom of the waiting list!

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