[android-developers] Re: ($25 reward) GPS not triggering onLocationChanged

2009-12-20 Thread dapaintballer331
Seems I'm having trouble keeping my service running.
12-21 02:24:49.060: WARN/MessageQueue(267):
java.lang.RuntimeException: Handler{43782188} sending message to a
Handler on a dead thread
12-21 02:24:49.060: WARN/MessageQueue(267): at
android.os.MessageQueue.enqueueMessage(MessageQueue.java:181)
12-21 02:24:49.060: WARN/MessageQueue(267): at
android.os.Handler.sendMessageAtTime(Handler.java:457)
12-21 02:24:49.060: WARN/MessageQueue(267): at
android.os.Handler.sendMessageDelayed(Handler.java:430)
12-21 02:24:49.060: WARN/MessageQueue(267): at
android.os.Handler.sendMessage(Handler.java:367)
12-21 02:24:49.060: WARN/MessageQueue(267): at
android.location.LocationManager$ListenerTransport.onLocationChanged
(LocationManager.java:147)
12-21 02:24:49.060: WARN/MessageQueue(267): at
android.location.ILocationListener$Stub.onTransact
(ILocationListener.java:65)
12-21 02:24:49.060: WARN/MessageQueue(267): at
android.os.Binder.execTransact(Binder.java:287)
12-21 02:24:49.060: WARN/MessageQueue(267): at
dalvik.system.NativeStart.run(Native Method)
12-21 02:24:49.070: WARN/MessageQueue(267): Handler{437aca88} sending
message to a Handler on a dead thread

Using a service or wakefulintent service, I still get this. I had
aquireStaticWakeLock called before my WakefulIntentService was
started...

On Dec 20, 1:47 pm, dapaintballer331 
wrote:
> I'll try the time zone problem.
>
> The reason I used your WakefulIntentService was just to make sure the
> application stays awake, I'm going to remove this now as it is working
> just as well as a regular service. This service is started from
> another service, which was triggered by an alarm. In regards to you
> underground issue, it's a not a problem. The service that starts this
> service will call the stopSelf method after 20 seconds, which is more
> than the 13 seconds it waits for a location.
>
> On Dec 20, 7:42 am, Mark Murphy  wrote:
>
>
>
> > dapaintballer331 wrote:
> > > If somebody can get this to work for me, using an emulator on the 1.5
> > > sdk, I will send them $25 via paypal if you need it. I am using the
> > > android 1.5 emulator.
>
> > > Problem: I see the satilite icon on the top of the phone, but when I
> > > send the device multiple coordinates, is never runs the
> > > onLocationChange method.
>
> > I don't think requestLocationUpdates() will work reliably from an
> > IntentService. The, um, intent of an IntentService is for it to shut
> > down (via stopSelf()) after it has exhausted its queue of work.
>
> > Also, I don't see where an IntentService will be called with onStop().
> > You might want to slap an @Override on there to confirm. If it does not
> > exist, as I suspect, then you will never release your location listener,
> > and that is seriously bad with an IntentService.
>
> > My guess is that you're trying to create a scheduled task, triggered by
> > an alarm, that will look up the current location and do something with
> > it. While the IntentService (Wakeful or otherwise) is normally a fine
> > answer, I suspect that it will give you loads of problems in this case,
> > since it automatically stops when the Intent is delivered and consumed.
> > You will probably need to fall back to a regular service, calling
> > stopSelf() after you have gotten your location fix, and using a WakeLock
> > to keep yourself awake in the interim. Even then, things could get a bit
> > icky (e.g., what if the user is underground and you never get a fix?).
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Android 1.6 Programming Books:http://commonsware.com/books

-- 
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] Manifest question

2009-12-20 Thread FJMustak
In my manifest, I defined , and when I published my game, I
got a user comment saying the game force closed on him.  I used that
configuration specifically because I only had access to phones with a
trackball (G1 and Google Ion).  How is it possible that a DROID user
was able to see it in the market with that attribute set (a droid has
a D-pad, and not a trackball)?  Could that have caused the crash?
I subsequently restricted Droids by using "supports-screens", until I
can test it out correctly.
Any ideas why the Droid user was able to see it? Or if the
reqNavigation attribute could have caused the crash on a phone with no
trackball?

-- 
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 get OEM of android device

2009-12-20 Thread saikiran n
Hi
I want to know original equipment manufaturer of android device
Is there any api to get this information
I have seen android.os.Build but it has regarding manufaturer like
Build.MANUFATURER
can any one help me

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

[android-developers] Moving the layout position at runtime

2009-12-20 Thread Sekar
I want to move the position of the layout( eg, linearLayout)  at
runtime, I tried to using Timer and LinearLayout.layout() function to
move the position  but first time only move it.


objLinearLayout.layout(prevLayout.getWidth(), 0, prevLayout.getRight
() ,prevLayout.getBottom() );

is it possible ?  or give me the idea for moving the postion of the
layout.

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] Need help in compiling android source on ubuntu 9.10

2009-12-20 Thread n179911
Hi,

i am trying to compile android (download the source of the master
trunk) on ubuntu 9.10.

I am getting the following linker error. Can anyone please tell me how
to fix it?

Thank you.

host Executable: acc (out/host/linux-x86/obj/EXECUTABLES/
acc_intermediates/acc)
/usr/bin/ld: out/host/linux-x86/obj/EXECUTABLES/
accRuntimeTest_intermediates/runtimeTest.o: in function symbolLookup
(void*, char const*):system/core/libacc/tests/runtimeTest.cpp:66:
error: undefined reference to 'dlsym'
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/
accRuntimeTest_intermediates/accRuntimeTest] Error 1
make: *** Waiting for unfinished jobs
/usr/bin/ld: out/host/linux-x86/obj/EXECUTABLES/acc_intermediates/
main.o: in function symbolLookup(void*, char const*):system/core/
libacc/tests/main.cpp:41: error: undefined reference to 'dlsym'
collect2: ld returned 1 exit status

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

Re: [android-developers] Re: Are the market stats for developers broken?

2009-12-20 Thread Wayne Wenthin
Glad to know I'm not alone.   I have dropped 3% in the last two days.  Seems
odd to me but then I don't have the high install percentages you guys seem
to have.

On Sun, Dec 20, 2009 at 4:16 PM, Justin Giles  wrote:

> I dropped another 3%.  This time it was almost a 1:1 ratio between
> increased downloads and decreased active installs.
>
>
>
> On Sun, Dec 20, 2009 at 2:51 PM, Kumar Bibek  wrote:
>
>> Me too, 15% drop
>>
>> On Dec 21, 1:41 am, Seni Sangrujee  wrote:
>> > I'm glad you posted this.  I thought it was just me, and I was pulling
>> > my hair out trying to figure out what happened.  Something definitely
>> > changed in the last couple of days with the active percentage stats.
>> > (9% drop here on one of my apps)
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Writing code is one of few things
that teaches me I don't know everything.

Join the Closed Beta of Call Girl Manager
http://www.fuligin.com/forums

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

Re: [android-developers] Re: [IME]avoiding softinput in one activity

2009-12-20 Thread Anonymous Anonymous
Hello - Dianne,

I just saw your post "Story 2: Embracing long press" , Thank you very much
and highly appreciated.

Thanks
On Tue, Sep 29, 2009 at 12:52 PM, Anonymous Anonymous <
firewallbr...@googlemail.com> wrote:

> :( i dotn want to change the frameworks behavior , can i override someway
> !! just only for my super nasty activity :D
>
>
> On Tue, Sep 29, 2009 at 12:47 PM, Dianne Hackborn wrote:
>
>> Again it's really not intended to be.  Consider long press on menu to be
>> the same as the user opening the lid on a device with a hardware keyboard.
>>
>>
>> On Mon, Sep 28, 2009 at 11:48 PM, Anonymous Anonymous <
>> firewallbr...@googlemail.com> wrote:
>>
>>> Hi Dianne,
>>>
>>> I understand, i have many activities and just for one i need remove it. i
>>> was able to remove as well by returning true on KEYCODE_MENU.
>>>
>>> But i do have an options menu (without long press).
>>>
>>> :(
>>>
>>> Thanks
>>>
>>>  On Tue, Sep 29, 2009 at 12:03 PM, Dianne Hackborn 
>>> wrote:
>>>
 Long press is a back-door for the user to bring up the keyboard outside
 of the app's control.  It isn't really intended to be turned off.


 On Mon, Sep 28, 2009 at 9:22 PM, Anonymous Anonymous <
 firewallbr...@googlemail.com> wrote:

> Hi All,
>
> I want to avoid softinput specifically in one activty in a very
> specific case.
>
> When i *long press "menu" button *softkeypad is coming irrespective of
> the activty.
>
> How can i avoid this? i have tried "stateAlwaysHidden" etc for that
> activity. But didit work.
>
> Al other cases ok. Just this case* long press "menu" button*.
>
>
> Thanks
>
>
>
>
>
>


 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.




>>>
>>>
>>>
>>
>>
>> --
>> Dianne Hackborn
>> Android framework engineer
>> hack...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time to
>> provide private support, and so won't reply to such e-mails.  All such
>> questions should be posted on public forums, where I and others can see and
>> answer them.
>>
>>
>> --~--~-~--~~~---~--~~
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>> -~--~~~~--~~--~--~---
>>
>>
>

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

Re: [android-developers] Re: Are the market stats for developers broken?

2009-12-20 Thread Justin Giles
I dropped another 3%.  This time it was almost a 1:1 ratio between increased
downloads and decreased active installs.



On Sun, Dec 20, 2009 at 2:51 PM, Kumar Bibek  wrote:

> Me too, 15% drop
>
> On Dec 21, 1:41 am, Seni Sangrujee  wrote:
> > I'm glad you posted this.  I thought it was just me, and I was pulling
> > my hair out trying to figure out what happened.  Something definitely
> > changed in the last couple of days with the active percentage stats.
> > (9% drop here on one of my apps)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: The GPS Shutdown Thing

2009-12-20 Thread Mark Wyszomierski
Alex, even if you use register / remove in onResume() / onPause(),
you're saying you still see the GPS icon get stuck on the notification
bar, unless you set your interval rate to something less than 35
seconds?:

  @Override
  protected void onPause() {
  super.onPause();
  locationManager.removeUpdates(this);
  }

  @Override
  protected void onResume() {
  super.onResume();
  locationManager.requestLocationUpdates(...);
  }

I made a test app with the above structure, and sometimes the GPS icon
will still get stuck on the notification bar. I'm using an interval of
two minutes. I wonder if I have to set it to < 35 seconds to get this
to stop? What a pain.

Thanks

On Dec 8, 3:28 pm, Alex  wrote:
> I see that too. There's not much more we can do other than release it
> in onPause or onDestroy.
>
> On Dec 5, 8:42 pm, Mark Wyszomierski  wrote:
>
>
>
> > Actually on the G1 running 1.5, theGPSicon doesn't remove itself
> > from the notifications bar if the phone goes into sleep mode while you
> > have a listener registered (even though I'm deregistering onPause()).
> > Example:
>
> >  1) on app start, register listener forgps.
> >  2) onPause() to home screen, log shows listener deregistered, icon
> > disappears.
> >  3) bring app to foreground again,gpslistener is registered, icon is
> > showing.
> >  4) let phone fall asleep with your activity in the foreground
> >  5) onPause() is still called, deregistering listener, log shows
> > deregister event.
> >  5) hit the menu key to wake the phone (but not completely awake yet)
> >  7)gpsicon is still in status bar.
>
> > I'm not sure ifgpsis actually running in this state, or it's just
> > stuck on the titlebar. I'm hoping it's just stuck on the titlebar when
> > falling asleep...
>
> > Thanks
>
> > On Dec 5, 12:25 am, Alex  wrote:
>
> > > This same code works fine on a G1 (1.5/1.6), Magic, Droid, Cliq,
> > > Samsung Behold and Moment.  I was previously using a 10 minute update
> > > interval.
>
> > > I think it was the firmware update Sprint/HTC applied recently.  While
> > > it fixed many of the gigantic bugs with theHero, it introduced this
> > > one.
>
> > > I confirmed it with this test code:
>
> > > public class GPSBugActivity extends Activity implements
> > > LocationListener
> > > {
> > >         private static final int MIN_TIME = 6; // 1 minute
> > >         private static final int MIN_DISTANCE = 1000; // 1 kilometer
>
> > >         private LocationManager locationManager = null;
>
> > >         @Override
> > >         public void onCreate(Bundle savedInstanceState)
> > >         {
> > >                 super.onCreate(savedInstanceState);
> > >                 setContentView(R.layout.main);
>
> > >                 locationManager = (LocationManager) getSystemService
> > > (Context.LOCATION_SERVICE);
> > >                 
> > > locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,
> > > MIN_TIME, MIN_DISTANCE, this);
> > >         }
>
> > >         @Override
> > >         protected void onDestroy()
> > >         {
> > >                 super.onDestroy();
>
> > >                 locationManager.removeUpdates(this);
> > >         }
>
> > >         @Override
> > >         public void onLocationChanged(Location arg0)
> > >         {
> > >         }
>
> > >         @Override
> > >         public void onProviderDisabled(String arg0)
> > >         {
> > >         }
>
> > >         @Override
> > >         public void onProviderEnabled(String arg0)
> > >         {
> > >         }
>
> > >         @Override
> > >         public void onStatusChanged(String arg0, int arg1, Bundle arg2)
> > >         {
> > >         }
>
> > > }
>
> > > The log had the fact that it was removing the listener...but it
> > > doesn't seem to matter...
>
> > > 12-05 00:20:46.008: DEBUG/LocationManager(1941): removeUpdates:
> > > listener = com.gpsbug.gpsbugactiv...@4348f94012-05 00:20:50.201: DEBUG/
> > > LocationManagerService(70): CdmaPollingThread exiting
>
> > > I'm still not sure if it's actually running theGPSor just flashing
> > > the icon, but either way it looks bad to the end user.
>
> > > -Alex
>
> > > On Dec 5, 12:04 am, Mark Wyszomierski  wrote:
>
> > > > Alex, have you tried a simple test of just registering, then
> > > > deregistering the listeners in an otherwise empty project? On my
> > > > G1/1.5, I don't get this behavior, theGPSicon goes away shortly
> > > > after a deregister. If it's a quirk on that device, that is worrisome.
> > > > In that case, many apps will burn out the user's battery?
>
> > > > Mark
>
> > > > On Dec 4, 11:57 pm, Alex  wrote:
>
> > > > > I can confirm that an update interval of greater than 35 seconds
> > > > > causes theGPSstatus icon to blink on an Sprint HTCHero(Firmware
> > > > > 1.56.651.2).  It does not ever go away, it will blink all day long.
> > > > > You can run and exit Google Maps and it goes away.
>
> > > > > So now I get to decide whether to have this "bug" or run my location
> > > > > listeners

[android-developers] Tips on simplifying asynchronous/callback code?

2009-12-20 Thread abnormative
Do you have a strategy (an app-internal architecture, a design
pattern?) that helps you structure your app's use of asynchronous/
callback operations like startActivityForResult() and bindService()?
Dealing with asynchronous events is standard for GUI code, but this
goes beyond that into code where you pretty much know the sequence of
events. And unlike, say, a desktop environment, you usually don't have
the option of blocking and unblocking a thread to hide the
asynchronous operation in the middle of some straight-line code.

With a typical startActivityForResult() for example, you have some
code for preparing the request Intent ("prepare-request"), some code
for interpreting the result Intent ("interpret-result"), and some code
for what to do next ("do-next"). And the do-next chunk typically
involves yet another asynchronous/callback operation.

In my first attempt at coding a use of startActivityForResult(), I had
onActivityResult() call methods in the parent Activity. I couldn't
follow my own code -- the flow of control from prepare-request to
interpret-result to do-next was just not apparent in the code! In
another callback situation, I used an anonymous inner class for my
TextToSpeech.OnInitListener, but found it similarly hard to see the
flow of control implicit in my code.

I've experimented with trying to encapsulate prepare-request and
interpret-result for a particular sub-Activity in a single class, and
passing in do-next chunks using the Command pattern, but it's
debatable whether that was any improvement.

Can you point me at better approaches for structuring this async/
callback code?

Mark

-- 
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: BroadcastReceiver and getSharedPreferences problem

2009-12-20 Thread David Fire
Solved
context.getSharedPreferences()
thanks
david

2009/12/20 David Fire 

> hi
> i cant call the function getSharedPreferences from  a Broadcastreceiver, it
> dosent compile... any idea?
> thanks
> David
>
> --
> (\__/)
> (='.'=)This is Bunny. Copy and paste bunny into your
> (")_(")signature to help him gain world domination.
>
>


-- 
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.

-- 
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] BroadcastReceiver and getSharedPreferences problem

2009-12-20 Thread David Fire
hi
i cant call the function getSharedPreferences from  a Broadcastreceiver, it
dosent compile... any idea?
thanks
David

-- 
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.

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

Re: [android-developers] What is the maximum number of threads allowed per application?

2009-12-20 Thread Dianne Hackborn
I don't believe there is a serious maximum.  Or at least, if you do hit the
maximum, you are using way too many threads. :)

Keep it in the 10s of threads, and only a few if you can (there is no
benefit to having lots of threads since all devices have a single CPU, and a
thread is not an especially light-weight primitive, especially compared to
say posting messages to a single thread running a message queue).

On Sun, Dec 20, 2009 at 6:22 AM, Agus  wrote:

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




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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

Re: [android-developers] Re: Droid AVD (2.0, WVGA854) resolution hell

2009-12-20 Thread Dianne Hackborn
Build against 1.6 (or a later version of the platform that has the APIs you
need), be careful about how you use newer APIs, set the minSdkVersion to 3,
and make sure your app works on 1.5.

Just building against a newer platform doesn't mean it won't work on an
older one; you just need to be careful about what you do.

On Sun, Dec 20, 2009 at 11:08 AM, greg1x  wrote:

> I was planning to support 1.5 too, since it has 27.7% on the platform
> version pie here:
>
> http://developer.android.com/intl/zh-CN/resources/dashboard/platform-versions.html
>
> So, I have to choose between high resolution on Droid or 27.7% of
> users?
> The only way is to build a specific version just because 1.5?
>
> Thank you Lance!
>
> On Dec 20, 2:19 pm, Lance Nanek  wrote:
> > The build target in the project properties has to be set to Android
> > 1.6 or higher to use that.
> >
> > On Dec 20, 3:59 am, greg1x  wrote:
> >
> > > Thank you!
> >
> > > I'm trying to specify the screen size support, but I'm getting these
> > > errors in the manifest:
> >
> > > ERROR No resource identifier found for attribute 'anyDensity' in
> > > package 'android'
> >
> > > Here is my manifest:
> >
> > > 
> > > http://schemas.android.com/apk/res/android";
> > >   package="com..bbb"
> > >   android:versionCode="1"
> > >   android:versionName="1.0.0">
> >
> > >> >   android:anyDensity="true" />
> >
> > > 
> > > 
> > > 
> > > 
> >
> > > If i remove versionCode and versionName (or mofify to anything
> > > higher), nothing changes.
> >
> > > What should I change? I haven't read anywhere a specific resource
> > > qualifier for anyDensity="true".
> >
> > > Thank you for your time.
> >
> > > On Dec 20, 4:44 am, Lance Nanek  wrote:
> >
> > > > Your application is being run in compatibility mode. You can read
> > > > about that and how to avoid it here:
> http://developer.android.com/intl/zh-CN/guide/practices/screens_suppo...
> >
> > > > On Dec 19, 8:57 am, greg1x  wrote:
> >
> > > > > Hi!
> >
> > > > > I'm developing a 2D game I started on Android 1.0/1.1. It scales
> > > > > itself to the actual surface size, so I had nothing to change
> because
> > > > > of the newer higher-resolution devices.I have a G1, but I'd like to
> > > > > test it on a Droid too, so I've created an AVD with Android 2.0,
> > > > > WVGA854. I did not check the "Scale display to real size" option,
> so I
> > > > > expected that I'll get the real WVGA dimensions on surfaceChanged.
> > > > > It doesn't happen like this. My application receives strange width/
> > > > > height values on surfaceChanged.
> > > > > Width is 569. (height is also very low)
> > > > > Shouldn't it be around 854?
> > > > > So, my application draws/scales itself to a smaller screen and then
> > > > > the emulator seems to stretch the lower resolution surface to 854
> > > > > pixels. (not even 854, in Photoshop I measured ~866 instead)
> > > > > It means that I get an awfully-looking low resolution app on a big
> > > > > screen.
> >
> > > > > How can I avoid this, so my application gets the real screen size
> on
> > > > > surfaceChanged?
> >
> > > > > 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
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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

Re: [android-developers] Droid - How to create a top bar notification during calls.

2009-12-20 Thread Dianne Hackborn
It works the same as all other Android phones.

On Sun, Dec 20, 2009 at 12:02 PM, Matt  wrote:

> This just doesn't seem to be possible on the Droid.  The notification
> is just killed and never delivered.
>
> Thanks,
>
> Matt
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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

Re: [android-developers] Re: Same servicein multiple APKs, only want "best one" to launch

2009-12-20 Thread Dianne Hackborn
Yeah, that is the typical way to this.  For example it is exactly how the
launcher presents and runs applications, except it is looking for activities
(with action MAIN and category LAUNCHER).

You can find the package and class names in the ServiceInfo that you get
back, to construct a ComponentName from.

On Sat, Dec 19, 2009 at 12:22 PM, Watcher  wrote:

> Hi, I have read your post already which is why I was playing around
> with the packagemanager. I suppose that is the workable solution you
> are mentionning ?
> If that is so then my question to Diane remains : how do I launch a
> service explicitly, not using a string action, when its class is in
> another APK ?
>
> On 18 déc, 17:15, whitemice  wrote:
> > I already had this discussion and was able to put together a workable
> > solution. I bloged it here:http://tinyurl.com/9hwdva
> >
> > Regards
> > Mark
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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

[android-developers] Re: streaming issue with mediaplayer on android 2.0

2009-12-20 Thread cvance383
I've tried that too. No one has any clue as why this might happen?

On Dec 19, 4:52 pm, Mark Murphy  wrote:
> cvance383 wrote:
> > any ideas?
>
> If the problem occurs only on the DROID, not on the 2.0.1 emulator, you
> might consider posting your question on a MOTODEV board:
>
> http://developer.motorola.com
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 2.8
> 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] Re: Two selectable items in each list Item in listView.

2009-12-20 Thread Casper
Hi

 Is there any one who can help me in achieving this kind of focus. In
the same list item, i want the focus to
change from the text item to the Right arrow button.

Thanks in advance

Vijay.

On Dec 16, 9:14 pm, Casper  wrote:
> Hi Nithin,
>
> Thanks for your reply. The layout that i am talking about is the one
> that i saw in Amazon Mp3 application. If you observe there, one list
> item has two parts in it. and both can focussed individually with your
> left and right keys. I want to do something similar to that.
>
> On Dec 16, 2:07 pm, Nithin  wrote:
>
>
>
> > Hi Vijay,
>
> > check this,http://www.androidsnippets.org/snippets/125/
> > in this , they are using textView and ImageView, else use button and
> > the text as you require. I feel they made it complex.
> > You can make it simpler as you wish. You can take the core from it.
>
> > On Dec 16, 11:58 pm, vijay bhushan  wrote:
>
> > > The way i want it is, per row there will be a text and is followed by a
> > > right arrow button, so that the user can click on that button to edit the
> > > content of that row. If the user is using the keypad, by using the left 
> > > and
> > > right buttons on the keypad , he should be able to select the textview or
> > > the Button in that particular row. I have seen this in a couple of apps. 
> > > The
> > > way i see that working on those apps appear as if they are maintaining two
> > > lists in parallel.  The reason i felt it this way is, if i am on row 1 of
> > > the list, and if i press the right key on the phone keypad, then the right
> > > arrow button will get highlighted and now if i use the down key or if i 
> > > keep
> > > pressing the down key, then the focus will scroll through that arrow 
> > > button
> > > only as if that is an another parallel list contructed. I dont know if 
> > > that
> > > is a good way to do it. Can any one help me in this.
>
> > > I tried many for getting this to work, but couldn't succeed.

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


Re: [android-developers] Converting a free app to a paid-for

2009-12-20 Thread Mark Murphy
frantz lohier wrote:
> Is there a way to convert a free app to a paid for ? Does not look like
> this option is available in the "upload an Application" page. What are
> the options ?

You cannot start charging for an app that was previously free. You will
need to release a separate paid app.

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

_Beginning Android_ from Apress Now Available!

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


[android-developers] Converting a free app to a paid-for

2009-12-20 Thread frantz lohier
Is there a way to convert a free app to a paid for ? Does not look like this
option is available in the "upload an Application" page. What are the
options ?

-- 
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 the market stats for developers broken?

2009-12-20 Thread Kumar Bibek
Me too, 15% drop

On Dec 21, 1:41 am, Seni Sangrujee  wrote:
> I'm glad you posted this.  I thought it was just me, and I was pulling
> my hair out trying to figure out what happened.  Something definitely
> changed in the last couple of days with the active percentage stats.
> (9% drop here on one of my apps)

-- 
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 the market stats for developers broken?

2009-12-20 Thread Seni Sangrujee
I'm glad you posted this.  I thought it was just me, and I was pulling
my hair out trying to figure out what happened.  Something definitely
changed in the last couple of days with the active percentage stats.
(9% drop here on one of my apps)

-- 
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 the market stats for developers broken?

2009-12-20 Thread Matt
Same here.  Active install percentage dropped 15% in a single day for
one app.  Another app dropped 7 or 8% in a single day.  That is a very
dramatic adjustment with several hundred installs.

Matt


On Dec 20, 9:25 am, Greg Donald  wrote:
> On Sun, Dec 20, 2009 at 10:19 AM, Greg Donald  wrote:
> > In the past 48 hours my active installs went from a very steady 83%
> > down to 68% but with the same usual amount of downloads.  Something
> > seems broken.
>
> I have also observed market stats getting several "small" updates the
> past few days, where previously I would only see "large" updates a
> couple times a day.  Clearly some changes are being made there.
>
> --
> Greg Donaldhttp://destiney.com/

-- 
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] Droid - How to create a top bar notification during calls.

2009-12-20 Thread Matt
This just doesn't seem to be possible on the Droid.  The notification
is just killed and never delivered.

Thanks,

Matt

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


Re: [android-developers] Re: After Activity closed, restart of APP??

2009-12-20 Thread Mark Murphy
guruk wrote:
> Or is there any other way I could prevent that onCreate is called
> again?

Not really, no.

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

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.2 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] Dont show Link Borders in WebView

2009-12-20 Thread guruk
Hi, first thanks for all your previous help before :)

Now I need a solution for HOW to disable the standart LINK Borders in
a WebView!

I mean. For example I have a page with some Pics or Text and all with
Links.

So when i Click on them .. the Android Browser shows me a orange
Border around
of them. I dont need that.. how can i disable that ?

Thx
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 at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: After Activity closed, restart of APP??

2009-12-20 Thread guruk
yes, looks like that...
shit...
so i have to somehow save my last visited url and when it starts
/onCreate i have to load that url instead the StartUrl.

Or is there any other way I could prevent that onCreate is called
again?

Greets
Chris


On 20 Dez., 20:52, Mark Murphy  wrote:
> guruk wrote:
> > Hi,
>
> > I check within a Webview for a mp4 than I call:
>
> > Intent intent = new Intent(Intent.ACTION_VIEW);
> >                   intent.setDataAndType(Uri.parse(url), "video/mp4");
> >                   startActivity(intent);
> >                   return true;
>
> > to start the Videoplayer with that VideoUrl
>
> > FINE, works perfect.
>
> > But when i close the Videoplayer I would wish (and it was once)
> > that he just show the Webview as it was before (with the link to the
> > video)
>
> > Instead it restarts my App . goes onCreate again and than jumps in
> > onResume??
> > Usualy after an Activity is closed it jumps into the onRestart !!!
>
> > So what could be wrong??
>
> Perhaps your activity was destroyed to free up memory for the video
> playback, and then has to be re-created after you BACK out of the video
> player.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Development Wiki:http://wiki.andmob.org

-- 
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: Droid AVD (2.0, WVGA854) resolution hell

2009-12-20 Thread greg1x
I was planning to support 1.5 too, since it has 27.7% on the platform
version pie here:
http://developer.android.com/intl/zh-CN/resources/dashboard/platform-versions.html

So, I have to choose between high resolution on Droid or 27.7% of
users?
The only way is to build a specific version just because 1.5?

Thank you Lance!

On Dec 20, 2:19 pm, Lance Nanek  wrote:
> The build target in the project properties has to be set to Android
> 1.6 or higher to use that.
>
> On Dec 20, 3:59 am, greg1x  wrote:
>
> > Thank you!
>
> > I'm trying to specify the screen size support, but I'm getting these
> > errors in the manifest:
>
> > ERROR No resource identifier found for attribute 'anyDensity' in
> > package 'android'
>
> > Here is my manifest:
>
> > 
> > http://schemas.android.com/apk/res/android";
> >       package="com..bbb"
> >       android:versionCode="1"
> >       android:versionName="1.0.0">
>
> >            >                   android:anyDensity="true" />
>
> >     
> >     
> >     
> > 
>
> > If i remove versionCode and versionName (or mofify to anything
> > higher), nothing changes.
>
> > What should I change? I haven't read anywhere a specific resource
> > qualifier for anyDensity="true".
>
> > Thank you for your time.
>
> > On Dec 20, 4:44 am, Lance Nanek  wrote:
>
> > > Your application is being run in compatibility mode. You can read
> > > about that and how to avoid it 
> > > here:http://developer.android.com/intl/zh-CN/guide/practices/screens_suppo...
>
> > > On Dec 19, 8:57 am, greg1x  wrote:
>
> > > > Hi!
>
> > > > I'm developing a 2D game I started on Android 1.0/1.1. It scales
> > > > itself to the actual surface size, so I had nothing to change because
> > > > of the newer higher-resolution devices.I have a G1, but I'd like to
> > > > test it on a Droid too, so I've created an AVD with Android 2.0,
> > > > WVGA854. I did not check the "Scale display to real size" option, so I
> > > > expected that I'll get the real WVGA dimensions on surfaceChanged.
> > > > It doesn't happen like this. My application receives strange width/
> > > > height values on surfaceChanged.
> > > > Width is 569. (height is also very low)
> > > > Shouldn't it be around 854?
> > > > So, my application draws/scales itself to a smaller screen and then
> > > > the emulator seems to stretch the lower resolution surface to 854
> > > > pixels. (not even 854, in Photoshop I measured ~866 instead)
> > > > It means that I get an awfully-looking low resolution app on a big
> > > > screen.
>
> > > > How can I avoid this, so my application gets the real screen size on
> > > > surfaceChanged?
>
> > > > 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] Rotate animation applied to full window -- view crops width? How to fix?

2009-12-20 Thread jean-guys
Hi all,

I have a pretty simple view hierarchy, including an ImageView in a
FrameLayout with a source drawable that is bigger than the window
size.  Using scaleType=center the image is cropped and centered, as
expected, when laid out.

In response to user interaction we need to rotate the ImageView.  I am
using a rotate animation XML definition and View.startAnimation().
This works with one remaining problem: the cropped part of the image
remains cropped when rotated, so when the image is rotated by 90
degrees in portrait orientation the image is clearly cropped on the
top and bottom.  Essentially it looks like a rectangle the size of the
view window is being rotated, rather than the oversized image in its
entirety (note it is intentionally oversized in the hope of avoiding
this cropping problem).  We want the image to fill the screen
regardless of the angle of rotation.

What am I missing?

Thanks in advance for any assistance!

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


Re: [android-developers] After Activity closed, restart of APP??

2009-12-20 Thread Mark Murphy
guruk wrote:
> Hi,
> 
> I check within a Webview for a mp4 than I call:
> 
> Intent intent = new Intent(Intent.ACTION_VIEW);
>   intent.setDataAndType(Uri.parse(url), "video/mp4");
>   startActivity(intent);
>   return true;
> 
> to start the Videoplayer with that VideoUrl
> 
> FINE, works perfect.
> 
> But when i close the Videoplayer I would wish (and it was once)
> that he just show the Webview as it was before (with the link to the
> video)
> 
> Instead it restarts my App . goes onCreate again and than jumps in
> onResume??
> Usualy after an Activity is closed it jumps into the onRestart !!!
> 
> So what could be wrong??

Perhaps your activity was destroyed to free up memory for the video
playback, and then has to be re-created after you BACK out of the video
player.

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

Android Development Wiki: http://wiki.andmob.org

-- 
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: ($25 reward) GPS not triggering onLocationChanged

2009-12-20 Thread dapaintballer331
I'll try the time zone problem.

The reason I used your WakefulIntentService was just to make sure the
application stays awake, I'm going to remove this now as it is working
just as well as a regular service. This service is started from
another service, which was triggered by an alarm. In regards to you
underground issue, it's a not a problem. The service that starts this
service will call the stopSelf method after 20 seconds, which is more
than the 13 seconds it waits for a location.


On Dec 20, 7:42 am, Mark Murphy  wrote:
> dapaintballer331 wrote:
> > If somebody can get this to work for me, using an emulator on the 1.5
> > sdk, I will send them $25 via paypal if you need it. I am using the
> > android 1.5 emulator.
>
> > Problem: I see the satilite icon on the top of the phone, but when I
> > send the device multiple coordinates, is never runs the
> > onLocationChange method.
>
> I don't think requestLocationUpdates() will work reliably from an
> IntentService. The, um, intent of an IntentService is for it to shut
> down (via stopSelf()) after it has exhausted its queue of work.
>
> Also, I don't see where an IntentService will be called with onStop().
> You might want to slap an @Override on there to confirm. If it does not
> exist, as I suspect, then you will never release your location listener,
> and that is seriously bad with an IntentService.
>
> My guess is that you're trying to create a scheduled task, triggered by
> an alarm, that will look up the current location and do something with
> it. While the IntentService (Wakeful or otherwise) is normally a fine
> answer, I suspect that it will give you loads of problems in this case,
> since it automatically stops when the Intent is delivered and consumed.
> You will probably need to fall back to a regular service, calling
> stopSelf() after you have gotten your location fix, and using a WakeLock
> to keep yourself awake in the interim. Even then, things could get a bit
> icky (e.g., what if the user is underground and you never get a fix?).
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android 1.6 Programming Books:http://commonsware.com/books

-- 
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] After Activity closed, restart of APP??

2009-12-20 Thread guruk
Hi,

I check within a Webview for a mp4 than I call:

Intent intent = new Intent(Intent.ACTION_VIEW);
  intent.setDataAndType(Uri.parse(url), "video/mp4");
  startActivity(intent);
  return true;

to start the Videoplayer with that VideoUrl

FINE, works perfect.

But when i close the Videoplayer I would wish (and it was once)
that he just show the Webview as it was before (with the link to the
video)

Instead it restarts my App . goes onCreate again and than jumps in
onResume??
Usualy after an Activity is closed it jumps into the onRestart !!!

So what could be wrong??

thx
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 at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Only onCreate and no onRestart after startActivity ! Please Help

2009-12-20 Thread guruk
Hi,
its quiet urgent. I thought my project and now i found a big bug.

I have a webview and there I call an activity

  if (url.indexOf(".mp4") != -1) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse(url), "video/
mp4");
startActivity(intent);
return true;
}

The Videoplayer starts fine!

But when I click "BACK" or the Video ends... my whole Activity is
restarted with onCreate... I proofed.. and it does NOT call
onRestart!!!

So it always loads Splashscreen and all that again...

What could I do??

Thx
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 at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Sip voip apps for android: Is sipdroid the only joice?

2009-12-20 Thread Ricardo Martins
Hi all! Is there anyone working on an SIP voip app for android?

I tried sipdroid app but it is still tied to pabxes.org. It's a problem 
for people trying to use this app on locally installed pabxes. It adds a 
quite high amount of delay.

Is there anyone interested in a bounty for working on sipdroid code and 
opening it to any sip provider? We could either release this on 
android/sipdroid community...

Regards, Ricardo.

-- 
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] setting spinner selection based on strings

2009-12-20 Thread Jags
I am displaying a few string values in spinner through resources, and
am storing the string values in db. Now i need to set the selection on
the basis of these string values. for example if spinner has "a", "b",
"c", "d"

and value in db is "c", third item should be selection while my screen
appears, how to do that ?

any similar method in spinner ?

regards

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


[android-developers] Bluetooth

2009-12-20 Thread DAVIDT
Hi All,

How to detect the bluetooths device found?

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


Re: [android-developers] Confusion in me app architecture regarding database

2009-12-20 Thread Stephen Abrams
Hi Alok,

I instantiated my DBAdapter class (presumably your "core layer") from the
(singleton?) class extending android.app.Application:

public class MyApplication extends Application {

private DbAdapter dbAdapter;

/**
 * @return dbAdapter, already opened
 */
public DbAdapter getDbAdapter() {
if (dbAdapter == null) {
dbAdapter = new DbAdapter(this);
dbAdapter.open();
}
return dbAdapter;
}

@Override
public void onTerminate() {
Log.d(TAG, "Calling onTerminate...");
if (dbAdapter != null)
dbAdapter.close();
dbAdapter = null;
super.onTerminate();
}

}

I'd be curious to hear what others think. I have occasionally seen sqlite
errors that I havn't root caused, but I can't think why this would be a bad
approach.  Any Activity needing a db connection can get it from this
instance, which should be available throughout the app's lifetime.

Steve

On Sun, Dec 20, 2009 at 9:15 AM, Alok Kulkarni  wrote:

> Hi guys,
>
> I have a database with 5 tables in it.There is a core layer which
> communicates with the database and fetches the results and stores them in
> memory temporarily.
> Now my UI layer wishes to display the data retrieved by core layer in the
> UI.
> What i want to have ideally is to create an object of the core class and
> call the DB operations whenever i want.The class which creates this core
> object does not extend activity , but from examples i see , i need to pass
> the activity as a context parameter to SQLiteOpenHelper.What context shd i
> pass in that case ? There is also some concept of AsyncTask in Android but i
> havent yet chkd how to use it.. Please help me on this one.. Thanks..Alok.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
>
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] how can resource xml will be changed in runtime..

2009-12-20 Thread Mark Murphy
Abdul Mateen wrote:
>  I have tried that, but an error that says, this method is not supported
> by RemoteViews.

H...that's surprising.

If you look at the source code to RemoteViews, all of the other methods
pretty much delegate to setInt(), setLong(), and so forth. That would
suggest that setInt(R.id.your_layout, "setBackgroundResource",
R.drawable.foo) should work.

If it doesn't, then I do not know how you can change the background of a
LinearLayout at runtime in an app widget.

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

_Android Programming Tutorials_ Version 1.0 In Print!

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


Re: [android-developers] how can resource xml will be changed in runtime..

2009-12-20 Thread Abdul Mateen
 I have tried that, but an error that says, this method is not supported by
RemoteViews.

On Sun, Dec 20, 2009 at 11:49 AM, Mark Murphy wrote:

> Abdul Mateen wrote:
> > Can you provide the classes to use.. RemoteView does not allow this.
>
> Try:
>
>
> http://developer.android.com/reference/android/widget/RemoteViews.html#setInt(int,%20java.lang.String,%20int)
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Android 1.6 Programming Books: http://commonsware.com/books
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] how can resource xml will be changed in runtime..

2009-12-20 Thread Mark Murphy
Abdul Mateen wrote:
> Can you provide the classes to use.. RemoteView does not allow this.

Try:

http://developer.android.com/reference/android/widget/RemoteViews.html#setInt(int,%20java.lang.String,%20int)

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

Android 1.6 Programming Books: http://commonsware.com/books

-- 
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] Example of formatted text as an XML resource?

2009-12-20 Thread Agus
Example of formatted text as an XML resource?

-- 
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] cell triangulation

2009-12-20 Thread DAVIDT
Hi All

How to implement cell triangulation in android ?

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


Re: [android-developers] Are the market stats for developers broken?

2009-12-20 Thread Greg Donald
On Sun, Dec 20, 2009 at 10:19 AM, Greg Donald  wrote:
> In the past 48 hours my active installs went from a very steady 83%
> down to 68% but with the same usual amount of downloads.  Something
> seems broken.

I have also observed market stats getting several "small" updates the
past few days, where previously I would only see "large" updates a
couple times a day.  Clearly some changes are being made there.

-- 
Greg Donald
http://destiney.com/

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


Re: [android-developers] Re: Are the market stats for developers broken?

2009-12-20 Thread Justin Giles
No, the downloads increased by 250, but the active installs decreased by
200.  Just seems strange that it has had a steady track record over a month
and a half and then just over the past two days with over 1500 total
downloads the active install number has actually decreased.  And the
percentage has gone down by 12%.



On Sun, Dec 20, 2009 at 10:15 AM, Maps.Huge.Info (Maps API Guru) <
cor...@gmail.com> wrote:

> This may be better posted in the Android - Discuss forum...
>
> Everything looks good to me. Active installs are 71%, downloads keep
> increasing as expected.
>
> Did you mean by -250 that your downloads actually decreased? That
> would seem odd indeed.
>
> Is this a free or paid app?
>
> -John Coryat
>
> "Radar Now!" (#10 "News & Weather")
>
> "What Zip Code?"
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Are the market stats for developers broken?

2009-12-20 Thread Greg Donald
On Sun, Dec 20, 2009 at 9:45 AM, Justin Giles  wrote:
> For a month and a half my application has had a number of downloads versus
> number of active installs percentage of 77% and then over the past two days
> it has gone down to 65%.  The most recent update my downloads went up by
> ~250 and my active installs actually DECREASED by 200.  Seems like a plus
> sign was switched with a minus sign in the update script or something.  Just
> doesn't seem right that over a months time my percentage stays the same and
> then overnight it changes so drastically.  Any insight on this?  Anyone else
> seeing the same thing?

In the past 48 hours my active installs went from a very steady 83%
down to 68% but with the same usual amount of downloads.  Something
seems broken.


-- 
Greg Donald
http://destiney.com/

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


Re: [android-developers] how can resource xml will be changed in runtime..

2009-12-20 Thread Abdul Mateen
Hi,
Can you provide the classes to use.. RemoteView does not allow this. and
appwidet to update get the RemoteView.
On Sun, Dec 20, 2009 at 11:07 AM, Mark Murphy wrote:

> Abdul Mateen wrote:
> > Hi,
> > Is there any other way I can implemented a themed appwidget background.
> > like I am using a LinearLayout with background. can I change background
> > drawable at runtime..?
>
> Sure. The next time you update the app widget, set a different
> background drawable.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, $35/Year
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Viewing database contents on device

2009-12-20 Thread Neilz
Hi all.

How can I view the contents of my databases on the actual phone? I
have followed the docs, using the adb and sqlite commands, but while
these work fine on an emulator when I'm connected to the device I get
a permissions error.

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: Are the market stats for developers broken?

2009-12-20 Thread Maps.Huge.Info (Maps API Guru)
This may be better posted in the Android - Discuss forum...

Everything looks good to me. Active installs are 71%, downloads keep
increasing as expected.

Did you mean by -250 that your downloads actually decreased? That
would seem odd indeed.

Is this a free or paid app?

-John Coryat

"Radar Now!" (#10 "News & Weather")

"What Zip Code?"

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


Re: [android-developers] how can resource xml will be changed in runtime..

2009-12-20 Thread Mark Murphy
Abdul Mateen wrote:
> Hi,
> Is there any other way I can implemented a themed appwidget background.
> like I am using a LinearLayout with background. can I change background
> drawable at runtime..?

Sure. The next time you update the app widget, set a different
background drawable.

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

Warescription: Three Android Books, Plus Updates, $35/Year

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


Re: [android-developers] how can resource xml will be changed in runtime..

2009-12-20 Thread Abdul Mateen
Hi,
Is there any other way I can implemented a themed appwidget background. like
I am using a LinearLayout with background. can I change background drawable
at runtime..?

On Sun, Dec 20, 2009 at 10:59 AM, Mark Murphy wrote:

> Abdul Mateen wrote:
> > Hi,
> > How can the resource drawable xml can be changed at runtime for example.
> >
> > 
> > #f00
> >
> > #ff
> >
> > #f0f0
> >
> > 
> >
> > can be changed in runtime to
> >
> > 
> > #ff00
> >
> > #fff
> >
> > #f0ff0
> >
> > 
>
> You cannot modify resources at runtime.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Android Training in US: 11-15 January 2010: http://onlc.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] how can i upload photo to flickr in photostream project?

2009-12-20 Thread zeeshan
Hi Dear,

i am working on flickr api for Android and need some help to solve the
following problem.

after a quick research on flick api, i managed to authenticate flickr
by api, secret key but unable to get photoset as flickr.jar use the
javax.imageio library which is not available in Android and i am
getting error.

i just found photosream project which interact with flickr to view
photos and very interested to include it in my application.
it does the job very well but i need to modify some of its funtions as
follows:

i need to display photoset in a list view after login and there would
be another funtion to add photo in the selected photoset.

i believe that i need to set a wirte permission in order to upload an
image but i can't find any permission set in the photostream project.

could anybody advise how can i add these funtion?




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


Re: [android-developers] how can resource xml will be changed in runtime..

2009-12-20 Thread Mark Murphy
Abdul Mateen wrote:
> Hi,
> How can the resource drawable xml can be changed at runtime for example.
> 
> 
> #f00
> 
> #ff
> 
> #f0f0
> 
> 
> 
> can be changed in runtime to
> 
> 
> #ff00
> 
> #fff
> 
> #f0ff0
> 
> 

You cannot modify resources at runtime.

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

Android Training in US: 11-15 January 2010: http://onlc.com

-- 
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 can resource xml will be changed in runtime..

2009-12-20 Thread Abdul Mateen
Hi,
How can the resource drawable xml can be changed at runtime for example.


#f00
#ff
#f0f0


can be changed in runtime to


#ff00
#fff
#f0ff0


-- 
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] Are the market stats for developers broken?

2009-12-20 Thread Justin Giles
For a month and a half my application has had a number of downloads versus
number of active installs percentage of 77% and then over the past two days
it has gone down to 65%.  The most recent update my downloads went up by
~250 and my active installs actually DECREASED by 200.  Seems like a plus
sign was switched with a minus sign in the update script or something.  Just
doesn't seem right that over a months time my percentage stays the same and
then overnight it changes so drastically.  Any insight on this?  Anyone else
seeing the same thing?

-- 
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] Multiplayer - Multicast Group

2009-12-20 Thread Business Talk
In the multi-player setup, every device joins the same multicast group
and every device is a broadcaster as well as a receiver of the
multicast messages. So, when a device sends a message to the multicast
group (for example, a description of the aviator's move) for others to
update their game status, this message comes back to the original
device. Is there any way to prevent the pockets to come back to the
original device? I am trying to filter the incoming pockets and ignore
those that originated on my device but it is impossible to test it on
the emulator (since it doesn’t emulate wifi) and also it's wasteful
having to deal with the bogus packets.

-- 
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] What is the maximum number of threads allowed per application?

2009-12-20 Thread Agus
What is the maximum number of threads allowed per application?

-- 
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: alarm cancel

2009-12-20 Thread Jags
no way there is ?

On Dec 18, 8:46 pm, Jags  wrote:
> Now that i am able to successfully fire alarms, I need a case where if
> i delete a record in my db the corresponding alarm should be
> cancelled. i send recid which is primary key for my table with the
> pendingintent through putExtra. can i cancel on the basis of that
> primary key ? if yes, how ?
>
> thanks and regards

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


[android-developers] Re: this is just too much

2009-12-20 Thread ko5tik
While this is outright fraud,  somebody not living in USA
has VERY limited options to prosecute this.   Only goodwill
of paypal and craigslist will help here.

( I had similar issue in germany,  and it took me only 20 minutes to
instruct
a lawyer to generate C&D letter with lawyer bill over 1200 EUR for the
delinquent
- bill was payd )

regards,

On Dec 20, 4:19 am, Matt  wrote:
> There is usually a cyber-crime division in each state.  However, they
> are severely under-staffed.  For example, Utah only has 3 officers for
> cyber-crime, and two of them spend all of their time on child
> pornography cases.
>
> However, I would still report it.
>
> Regards,
>
> Matt
>
> On Dec 18, 5:27 pm, Warren  wrote:
>
> > Have you contacted law enforcement? You might have a hard time getting
> > their attention for something "small" but it is their job to
> > investigate and prosecute these things. When someone downloads
> > something they don't have the rights to, that is wrong, but it gets
> > much more serious when someone is profiting from their copyright
> > infringement.
>
> > On Dec 18, 5:01 pm, David Overcash  wrote:
>
> > > Send him a C&D for fun.  Then tell Paypal he's selling illegally pirated
> > > goods, they'll probably freeze his account.  At the least you can stop him
> > > for a while.
>
> > > On Fri, Dec 18, 2009 at 12:28 PM, Andrei  wrote:
> > > > Somebody on Craigslist selling our apps half price
>
> > > >http://knoxville.craigslist.org/mob/1515792578.html
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com > > >  cr...@googlegroups.com>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Confusion in me app architecture regarding database

2009-12-20 Thread Alok Kulkarni
Hi guys,

I have a database with 5 tables in it.There is a core layer which
communicates with the database and fetches the results and stores them in
memory temporarily.
Now my UI layer wishes to display the data retrieved by core layer in the
UI.
What i want to have ideally is to create an object of the core class and
call the DB operations whenever i want.The class which creates this core
object does not extend activity , but from examples i see , i need to pass
the activity as a context parameter to SQLiteOpenHelper.What context shd i
pass in that case ? There is also some concept of AsyncTask in Android but i
havent yet chkd how to use it.. Please help me on this one.. Thanks..Alok.

-- 
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: Multicast

2009-12-20 Thread Business Talk
After some research I realized that the multicast address must belong
to a predefined range of the multicast addresses; 224.0.0.0 through
239.255.255.255. What I am confused about is that a number of
multicast implementation examples used the host address as the
multicast group address, which does not belong to the range thus is
not a multicast. What gives?


On Dec 19, 2:02 pm, Business Talk 
wrote:
> I am getting ' attempted to join non-multicast group' when joining a
> group;
>
> _MulticastSocket.joinGroup(getBroadcastAddress());
>
> where
>
> public final InetAddress getBroadcastAddress() throws IOException,
> Exception
>         {
>                 WifiManager wifi = (WifiManager) _Context.getSystemService
> (Context.WIFI_SERVICE);
>
>                 DhcpInfo dhcp = wifi.getDhcpInfo();
>
>                 if (dhcp == null)
>                 {
>                         throw new Exception();
>                 }
>
>                 int broadcast = (dhcp.ipAddress & dhcp.netmask) | 
> ~dhcp.netmask;
>
>                 byte[] quads = new byte[4];
>
>                 for (int k = 0; k < 4; k++)
>                 {
>                         quads[k] = (byte) ((broadcast >> k * 8) & 0xFF);
>                 }
>
>                 return InetAddress.getByAddress(quads);
>         }

-- 
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: Custom (created at run-time) notification bar icon

2009-12-20 Thread Menny Even Danan
Here is how:
http://developer.android.com/reference/android/app/Notification.html#number

On Thu, Dec 10, 2009 at 00:55, Menny  wrote:

> Hi,
> I'm looking for a way to provide to the NotificationManager an icon
> which was not statically created, but rather created at run-time by
> the application.
>
> I want to write a very simple weather application, which shows the
> current conditions icon and temperature at the notification bar, all
> packed into a small icon.
> So, I would like to know how to superimpose text onto an icon, and how
> to display the new icon in the notification bar, which, as you know,
> takes resource ID only.
>
> Thanks a bunch,
> Menny.

-- 
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: Droid AVD (2.0, WVGA854) resolution hell

2009-12-20 Thread Lance Nanek
The build target in the project properties has to be set to Android
1.6 or higher to use that.

On Dec 20, 3:59 am, greg1x  wrote:
> Thank you!
>
> I'm trying to specify the screen size support, but I'm getting these
> errors in the manifest:
>
> ERROR No resource identifier found for attribute 'anyDensity' in
> package 'android'
>
> Here is my manifest:
>
> 
> http://schemas.android.com/apk/res/android";
>       package="com..bbb"
>       android:versionCode="1"
>       android:versionName="1.0.0">
>
>                              android:anyDensity="true" />
>
>     
>     
>     
> 
>
> If i remove versionCode and versionName (or mofify to anything
> higher), nothing changes.
>
> What should I change? I haven't read anywhere a specific resource
> qualifier for anyDensity="true".
>
> Thank you for your time.
>
> On Dec 20, 4:44 am, Lance Nanek  wrote:
>
> > Your application is being run in compatibility mode. You can read
> > about that and how to avoid it 
> > here:http://developer.android.com/intl/zh-CN/guide/practices/screens_suppo...
>
> > On Dec 19, 8:57 am, greg1x  wrote:
>
> > > Hi!
>
> > > I'm developing a 2D game I started on Android 1.0/1.1. It scales
> > > itself to the actual surface size, so I had nothing to change because
> > > of the newer higher-resolution devices.I have a G1, but I'd like to
> > > test it on a Droid too, so I've created an AVD with Android 2.0,
> > > WVGA854. I did not check the "Scale display to real size" option, so I
> > > expected that I'll get the real WVGA dimensions on surfaceChanged.
> > > It doesn't happen like this. My application receives strange width/
> > > height values on surfaceChanged.
> > > Width is 569. (height is also very low)
> > > Shouldn't it be around 854?
> > > So, my application draws/scales itself to a smaller screen and then
> > > the emulator seems to stretch the lower resolution surface to 854
> > > pixels. (not even 854, in Photoshop I measured ~866 instead)
> > > It means that I get an awfully-looking low resolution app on a big
> > > screen.
>
> > > How can I avoid this, so my application gets the real screen size on
> > > surfaceChanged?
>
> > > 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


Re: [android-developers] ($25 reward) GPS not triggering onLocationChanged

2009-12-20 Thread Mark Murphy
dapaintballer331 wrote:
> If somebody can get this to work for me, using an emulator on the 1.5
> sdk, I will send them $25 via paypal if you need it. I am using the
> android 1.5 emulator.
> 
> Problem: I see the satilite icon on the top of the phone, but when I
> send the device multiple coordinates, is never runs the
> onLocationChange method.

I don't think requestLocationUpdates() will work reliably from an
IntentService. The, um, intent of an IntentService is for it to shut
down (via stopSelf()) after it has exhausted its queue of work.

Also, I don't see where an IntentService will be called with onStop().
You might want to slap an @Override on there to confirm. If it does not
exist, as I suspect, then you will never release your location listener,
and that is seriously bad with an IntentService.

My guess is that you're trying to create a scheduled task, triggered by
an alarm, that will look up the current location and do something with
it. While the IntentService (Wakeful or otherwise) is normally a fine
answer, I suspect that it will give you loads of problems in this case,
since it automatically stops when the Intent is delivered and consumed.
You will probably need to fall back to a regular service, calling
stopSelf() after you have gotten your location fix, and using a WakeLock
to keep yourself awake in the interim. Even then, things could get a bit
icky (e.g., what if the user is underground and you never get a fix?).

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

Android 1.6 Programming Books: http://commonsware.com/books

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


[android-developers] Re: what is wrong here?

2009-12-20 Thread rompelstilchen666
ok it works now, nevermind :-)

On 20 déc, 13:08, rompelstilchen666 
wrote:
> Hi,
> I registered myself on this mailing list yesterday
>
> I 've send an honnest/serious/polite.. question
>
> so why is this not apearing in the group ?
>
> why don't I see at leas my mail in the list ?
>
> cheers

-- 
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 me decide

2009-12-20 Thread rompelstilchen666
Hi,

I wrote a GWT app that used gears as a locald datastore (was running
on a pda, retreiving all db from server)
how can I do this with an android phone ?
I have read it was possible to write my own content provider
http://www.techjini.com/blog/2009/01/10/android-tip-1-contentprovider-accessing-local-file-system-from-webview-showing-image-in-webview-using-content/

- is this an official way ? I read that android did not like webview
to access local data (in my case it is definetly needed)
- is there a way to access regular db fields, id, int, varchar,
blobs 
- do i have to write a plugin for web view ?
- android does not and will never adress that kind of need and I
should just give it up, find another solution ?

thx a lot for your time
and precious help

have a gr8 day

-- 
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] what is wrong here?

2009-12-20 Thread rompelstilchen666
Hi,
I registered myself on this mailing list yesterday

I 've send an honnest/serious/polite.. question

so why is this not apearing in the group ?

why don't I see at leas my mail in the list ?

cheers

-- 
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 debug BadTokenException?

2009-12-20 Thread Chander Pechetty
As an example take the case of Market App. It doesn't give any toast
or progress when you leave the app. Once the user leaves the app for
whatever reason, only a notification is given if the download fails/
succeeds.
Any progress dialogs you have when you leave the app should be
dismissed/cleaned up in the onPause. Depending on what kind of app
yours is, you can either show a notification (may be from the service
once the Task is completed, after it attempts several retries in case
of error) using the NotificationManager, or I would just cancel the
Task if I was using a AsyncTask.

I wouldn't want a toast or progress result/or a force close  show up
when I receive a call, or trying to use some other app; those make
sense only when I am looking at your app.



On Dec 19, 10:38 pm, Mariano Kamp  wrote:
> Thanks for your help here.
>
> I reas the bug report, but I am not quite sure what to make of it and what
> the solution is.
>
> In my case the user enters username/password and then I show a progress
> monitor. When the user backs out or goes to home then I still want to
> display the result, at least when an error occurred.
>
> How is this to be accomplished?
>
> Can I somehow find out beforehand if I will run in this error and then use
> some other mean, say a toast, to at least notify the user that not all is
> good?
>
> On Mon, Nov 23, 2009 at 8:01 AM, Chander Pechetty wrote:
>
> > There are currently few issues logged around this bug:
> >http://code.google.com/p/android/issues/detail?id=3953
>
> > I don't know your specific case, but was easy to fix in my case, when
> > I made sure that the dialogs/views/adapters that were being created
> > are with the right context/activity.
> > Pressing a back button usually finishes the activity, so if you have
> > created for discussion sake created an static ListAdapter and passed
> > it (this), an activity instance,
>
> >  this static adapter can no longer be used for showing dialogs etc.
> > with the previous contexts. This behaviour gets complex depending on
> > the launch modes/flags you set when starting an activity, and also
> > whether you handle back button events.
>
> > So "token
> > android.os.binderpr...@431d28f0 is not valid; is your activity
> > running? " means your activity instance is no longer in History stack,
> > but your are trying to use it somewhere.
> > Since there is no knowing when your activity got finished and the
> > sequence of steps that caused it, depending on different modes, you
> > get sporadic reports.
>
> > -Chander
>
> > On Nov 22, 1:23 pm, Mariano Kamp  wrote:
> > > Hey,
>
> > >   I sporadically get bug reports with a BadTokenException.
>
> > >   As I don't see my app in the stacktrace I am wondering how to find the
> > > cause of this? Any idea?
>
> > > Cheers,
> > > Mariano
>
> > > -- Android Version: sdk=3, release=1.5, inc=eng.root.20090719.200906
> > > -- Memory free: 1.01MB total: 4.01MB max: 16.00MB
> > > -- Custom ROM: Stock Android
> > > -- NewsRob Version: 3.2.9/329
> > > -- Stacktrace:(1178)
> > > android.view.WindowManager$BadTokenException: Unable to add window --
> > token
> > > android.os.binderpr...@431d28f0 is not valid; is your activity running?
> > > at android.view.ViewRoot.setView(ViewRoot.java:425)
> > > at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:178)
> > > at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
> > > at android.view.Window$LocalWindowManager.addView(Window.java:392)
> > > at
> > android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2674)
> > > at
> > android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2287)
> > > at android.app.ActivityThread.access$1800(ActivityThread.java:112)
> > > at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
> > > at android.os.Handler.dispatchMessage(Handler.java:99)
> > > at android.os.Looper.loop(Looper.java:123)
> > > at android.app.ActivityThread.main(ActivityThread.java:3948)
> > > at java.lang.reflect.Method.invokeNative(Native Method)
> > > at java.lang.reflect.Method.invoke(Method.java:521)
> > > at
>
> > com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
> > > at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
> > > at dalvik.system.NativeStart.main(Native Method)
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com

[android-developers] SPB TV

2009-12-20 Thread fala70
Interesting application. Somebody know how they do to decoder video ?

it seem a realtime the they don't use a file system streaming.

-- 
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: Droid AVD (2.0, WVGA854) resolution hell

2009-12-20 Thread greg1x
Thank you!

I'm trying to specify the screen size support, but I'm getting these
errors in the manifest:

ERROR No resource identifier found for attribute 'anyDensity' in
package 'android'

Here is my manifest:


http://schemas.android.com/apk/res/android";
  package="com..bbb"
  android:versionCode="1"
  android:versionName="1.0.0">

  






If i remove versionCode and versionName (or mofify to anything
higher), nothing changes.

What should I change? I haven't read anywhere a specific resource
qualifier for anyDensity="true".

Thank you for your time.

On Dec 20, 4:44 am, Lance Nanek  wrote:
> Your application is being run in compatibility mode. You can read
> about that and how to avoid it 
> here:http://developer.android.com/intl/zh-CN/guide/practices/screens_suppo...
>
> On Dec 19, 8:57 am, greg1x  wrote:
>
> > Hi!
>
> > I'm developing a 2D game I started on Android 1.0/1.1. It scales
> > itself to the actual surface size, so I had nothing to change because
> > of the newer higher-resolution devices.I have a G1, but I'd like to
> > test it on a Droid too, so I've created an AVD with Android 2.0,
> > WVGA854. I did not check the "Scale display to real size" option, so I
> > expected that I'll get the real WVGA dimensions on surfaceChanged.
> > It doesn't happen like this. My application receives strange width/
> > height values on surfaceChanged.
> > Width is 569. (height is also very low)
> > Shouldn't it be around 854?
> > So, my application draws/scales itself to a smaller screen and then
> > the emulator seems to stretch the lower resolution surface to 854
> > pixels. (not even 854, in Photoshop I measured ~866 instead)
> > It means that I get an awfully-looking low resolution app on a big
> > screen.
>
> > How can I avoid this, so my application gets the real screen size on
> > surfaceChanged?
>
> > 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: using soundPool but sound plays after a delay, sound is lagging

2009-12-20 Thread rukiman
Is there any difference in soundPool between OGGs and MP3s?

On Dec 19, 8:12 pm, rukiman  wrote:
> Some feedback. I have noticed thesoundis pretty instant and great
> when there isn't anothersoundeffect being played, otherwise the
> delay is pretty bad. So say if I select a piece then thesoundeffect
> is instant, however if I quickly select another piece as thesoundis
> being played, there is a very big noticeable delay before thesound
> effect is heard.
>
> On Dec 19, 7:57 pm, rukiman  wrote:
>
> > seems like I was wrong. Profiling shows 60% is spent on getting the
> > audio service and setting up the volume. Only 40% is spent on the
> > actual play function. So would seem like I setting up the volume
> > before hand is the way to go. I'll try that out and see how things go.
>
> > On Dec 19, 7:46 pm, rukiman  wrote:
>
> > > I cannot quatify it but it is very noticeable and feels "wrong" when
> > > playing my game. for example I play asoundwhen a piece is selected
> > > however due to the lag thesoundfeel a bit out of place.
> > > I will try to profile whats going on here. But I thought perhaps
> > > someone may have had experienced this issue and come up with a
> > > solution or workaround. I will try Matts idea of calculating the
> > > volume before hand etc so I have to simply call soundPool.play(). Only
> > > issue is that creates extra work i.e thesoundvolume might have
> > > changed by the user meanwhile and also I'm very doubtful if it will
> > > improve the lag.
>
> > > On Dec 19, 6:37 am, Robert Green  wrote:
>
> > > > Can you quantify the lag?  How much is it lagging?  Lately I've been
> > > > seeing my footstep sounds, which are individually triggered right and
> > > > left steps, take 2-50ms to trigger for some reason.  I'm not sure if
> > > > it has something to do with the way the OGG is encoded, but I feel
> > > > like it could.  Perhaps the SoundPool author would like to chime in
> > > > and give us some hints?
>
> > > > On Dec 18, 3:45 am, rukiman  wrote:
>
> > > > > I am using the SoundPool as follows:
>
> > > > > Caching my sounds:
> > > > >                         // loadsoundeffects
> > > > >                         soundPool = new SoundPool(2, 
> > > > > AudioManager.STREAM_MUSIC, 0);
> > > > >                         soundPoolMap = new HashMap > > > > Integer>();
> > > > >                         AssetFileDescriptor afd;
> > > > >                         try {
> > > > >                                 afd = 
> > > > > context.getAssets().openFd("sounds/piecemove.ogg");
> > > > >                                 soundPoolMap.put(SOUND_PIECEMOVE, 
> > > > > soundPool.load(afd, 1));
>
> > > > >                                 afd = 
> > > > > context.getAssets().openFd("sounds/piecestop.ogg");
> > > > >                                 soundPoolMap.put(SOUND_PIECESTOP, 
> > > > > soundPool.load(afd, 1));
>
> > > > >                                 afd = 
> > > > > context.getAssets().openFd("sounds/pieceattack.ogg");
> > > > >                                 soundPoolMap.put(SOUND_PIECEATTACK, 
> > > > > soundPool.load(afd, 1));
>
> > > > >                                 afd = 
> > > > > context.getAssets().openFd("sounds/pieceselect.ogg");
> > > > >                                 soundPoolMap.put(SOUND_PIECESELECT, 
> > > > > soundPool.load(afd, 1));
>
> > > > >                                 afd = 
> > > > > context.getAssets().openFd("sounds/selection.ogg");
> > > > >                                 soundPoolMap.put(SOUND_MENUSELECTION, 
> > > > > soundPool.load(afd, 1));
>
> > > > >                                 afd = 
> > > > > context.getAssets().openFd("sounds/pageturn.ogg");
> > > > >                                 soundPoolMap.put(SOUND_PAGETURN, 
> > > > > soundPool.load(afd, 1));
> > > > >                         } catch (IOException e) {
> > > > >                                 e.printStackTrace();
> > > > >                         }
>
> > > > > Function to play sounds:
>
> > > > >         public static int playSound(Context context, intsound) {
>
> > > > >                 AudioManager mgr = (AudioManager) context
> > > > >                                 
> > > > > .getSystemService(Context.AUDIO_SERVICE);
> > > > >                 float streamVolumeCurrent = mgr
> > > > >                                 
> > > > > .getStreamVolume(AudioManager.STREAM_MUSIC);
> > > > >                 float streamVolumeMax = mgr
> > > > >                                 
> > > > > .getStreamMaxVolume(AudioManager.STREAM_MUSIC);
> > > > >                 float volume = streamVolumeCurrent / streamVolumeMax;
> > > > >                 /* Play thesoundwith the correct volume */
> > > > >                 return soundPool
> > > > >                                 .play(soundPoolMap.get(sound), 
> > > > > volume, volume, 1, 0, 1f);
> > > > >         }
>
> > > > > Playing asoundeffect i.e when button is clicked:
>
> > > > >       Resources.playSound(context, Resources.SOUND_PIECESELECT);
>
> >