I've got an App Widget that gets updated (er... I try to update it)
with the following chunk of code:
ComponentName thisWidget = new ComponentName(context,
MyAppWidgetProvider.class);
AppWidgetManager manager = AppWidgetManager.getInstance(context);
manager.updateAppWidget(thisWidget, remoteViews
. good point. noodling, noodling
On Oct 2, 2:00 pm, "Mark Murphy" wrote:
> > the problem is that a user could create multiple app widgets (on the
> > desktop), in which case the static variable would point to the last
> > one created...
>
> The static variable Ms. Hackborn mentione
s when destroyed.
>
>
>
> On Fri, Oct 2, 2009 at 1:31 PM, sdphil wrote:
>
> > so is there a way in the outer class to get access to that Service
> > object?
>
> > context.startService( new Intent(context, UpdateService.class) );
>
> > to start th
; On Fri, Oct 2, 2009 at 1:10 PM, sdphil wrote:
>
> > looking at this example --
>
> >http://android-developers.blogspot.com/2009/04/introducing-home-scree...
>
> > if the inner UpdateService class is not static, it cannot start the
> > service. The Acti
looking at this example --
http://android-developers.blogspot.com/2009/04/introducing-home-screen-widgets-and.html
if the inner UpdateService class is not static, it cannot start the
service. The ActivityManager complains "Unable to start service
Intent"...
any ideas why?
tia.
--~--~-
is there a way to have a view use a different layout when an
orientation change occurs.
suppose i want the view to look one way in portrait and another way in
landscape -- all the same data, but arranged differently.
I'm thinking one way to do this would be to have two different linear
layouts w
w resources as possible, so i don't want the
app widget starting a service or doing anything until it is triggered.
I guess I could create a very small local service in my app widget,
that I guess could simply be used as a way for my resource intensive
service to be able to communicate with it..
I need some help understanding how this works.
I have an app widget that extends an AppWidgetProvider to create an
application widget.
I would like the application widget to be idle until an activity in my
app runs; actually when a service in my app is started.
Once that service is started, I n
approach should 100% work.
>
> On Oct 2, 2:42 am, sdphil wrote:
>
> > I'm trying to do this in my service, and it never makes any calls into
> > my app widget...
>
> > @Override
> > public void onStart(Intent intent, int startId) {
> > super.onStar
Paul Turchenko wrote:
> Just retrieve appwidgetprovider and use RemoteViews to do that
>
> On Oct 2, 12:19 am, sdphil wrote:
>
> > ping. any thoughts?
>
> > On Sep 30, 7:01 pm, sdphil wrote:
>
> > > From a service that's running, how do I send an event
i create two separate intents using new Intent(context,
MyActivity.class).
I need to know which button was pressed so I add intent.putExtra(...).
But since these are pending intents, it always sends the first one.
how do I launch the same activity from the same app widget, but with
different in
ping. any thoughts?
On Sep 30, 7:01 pm, sdphil wrote:
> From a service that's running, how do I send an event or an intent to
> an app widget that is just sitting their idle...
>
> tia.
--~--~-~--~~~---~--~~
You received this message because y
ping. any thoughts here?
On Sep 30, 2:45 pm, sdphil wrote:
> i have an app widget that has a couple of buttons on it, and in my
> onUpdate() call, I am hooking up the buttons to do something when you
> press them --
>
> RemoteViews remoteViews = new
i want to change the background image of a button either into a
resource drawable or a solid color.
findViewById(R.id.myView).setBackgroundResource( xyz == 0 ?
R.drawable.myBackground : 0);
instead of zero, i want some solid color...
tia.
--~--~-~--~~~---~--~~
Y
how can I change the focus color (orange) on an edittext box. the
focus color is a small rim around the entire control and is bright
orange when the control has focus. how can I change the color of that
focus either with a different color or using a drawable.
tia.
--~--~-~--~~--
; uses your own graphics.
>
>
>
> On Wed, Sep 30, 2009 at 7:04 PM, sdphil wrote:
>
> > okay, just saw this --
>
> >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > so how do you change it for a "view" ?
>
> > On
okay, just saw this --
http://groups.google.com/group/android-developers/browse_thread/thread/2fd56aefad30de5d
so how do you change it for a "view" ?
On Sep 30, 7:02 pm, sdphil wrote:
> haven't heard anything on this, just wanted to reply to see if anyone
> had some thou
haven't heard anything on this, just wanted to reply to see if anyone
had some thoughts...
On Sep 30, 8:15 am, sdphil wrote:
> is there a way to change the default orange selection color/image?
>
> I'd like to do this app wide and it would be nice not to have to do it
>From a service that's running, how do I send an event or an intent to
an app widget that is just sitting their idle...
tia.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this
i have an app that binds to a local service. I want to add a desktop
widget that binds to the same service. does my service have to be a
remote service or can it still be local?
if it can still be local, how can I get at the local binder?
tia.
--~--~-~--~~~---~--~--
i have an app widget that has a couple of buttons on it, and in my
onUpdate() call, I am hooking up the buttons to do something when you
press them --
RemoteViews remoteViews = new RemoteViews(context.getPackageName
(), R.layout.appwidget);
remoteViews.setOnClickPe
i get an error message like --
09-30 20:08:24.733: ERROR/AndroidRuntime(949): Caused by:
android.content.ReceiverCallNotAllowedException: IntentReceiver
components are not allowed to bind to services
09-30 20:08:24.733: ERROR/AndroidRuntime(949): at
android.app.ReceiverRestrictedContext.bindS
is there a way to change the default orange selection color/image?
I'd like to do this app wide and it would be nice not to have to do it
for every control!
tia.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Andro
maybe more importantly going out of range.
specifically going out of data range (not voice). i.e. i'm browsing
for something and I go out of range.
or to control the speed of the connection?
tia.
--~--~-~--~~~---~--~~
You received this message because you are su
okay, so I have 1.5 and 1.6 co-existing on my dev boxes / build
machine.
I change my manifest to still say:
I'm not sure what happens when I need to use a 1.6 feature.
The build script still uses
android --target 2
So that it can support 1.5.
I guess what I'm doing then i
have not heard anything about this, anyone? anyone?
On Sep 25, 9:27 am, sdphil wrote:
> i read the migration notes for 1.6 and I could not tell if 1.5 and 1.6
> can co-existsidebyside.
>
> i need to build applications for both 1.5 and 1.6, and i only have one
> build machine.
ch to log/write it to
> somewhere on the device itself, that would be useful too for testing
> on the device itself?
>
> Kevin Hooke
>
> On Sep 25, 5:22 pm, sdphil wrote:
>
> > is there a way in android to get the call stack when an unhandled
> > exception occurs?
&
is there a way to tell if an activity is in the foregound or not
(other than setting a variable in onResume()).
tia.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, s
when i'm debugging, I notice a lot of "Binder Thread" threads.
is there a way to get at those threads - say for example to set an
unhandled exception handler for them or to rename them, or other
things?
tia.
--~--~-~--~~~---~--~~
You received this message because
is there a way in android to get the call stack when an unhandled
exception occurs?
or better yet, to trap an unhandled exception and do something when it
occurs.
tia.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups
+ ", uid=" + Binder.getCallingUid();
> Log.w(TAG, msg);
> return false;
> }
>
> On Sep 25, 11:45 pm, sdphil wrote:
>
> > I am attempting to enable/disable bluetooth support in my app, like
> > this:
>
> > A
I am attempting to enable/disable bluetooth support in my app, like
this:
AudioManager am = (AudioManager) getSystemService
(Context.AUDIO_SERVICE);
am.setBluetoothA2dpOn(bluetooth);
And when I make that call, I get:
09-25 22:42:20.290: WARN/AudioService(586): Audio Settin
i read the migration notes for 1.6 and I could not tell if 1.5 and 1.6
can co-exist side by side.
i need to build applications for both 1.5 and 1.6, and i only have one
build machine.
other than changing my PATH variable, are there any other gotchas?
especially for an automated build process whi
okay, first a couple of gripes --
gripe 1: why oh why t-mobile/htc did you decide to make a phone with a
non-standard USB/Power connector? I mean seriously, wth!!! just what
the world needs, yet another frigging connector.
gripe 2: what's up with providing a multi-media phone without a
standar
is there any way to catch this event and do something? i.e. log a
message.
and if there isn't, is there an event log or something you can grab to
get a stack trace.
I'm mostly interested in catching this in the wild. Obviously, if I
have a debugger attached, i can get all the info i need.
tia
I have a table which is 2x2. in the left column is some text fields,
and the right column has edit boxes. when I have a long text string
in the edit boxes it seems like it truncates the edit box on the right
hand side (so instead of rounded corners on the right, it cuts off
hard).
If I set the
i have an app with multiple activities and a local service.
if I finish() all the activites and stop the service, the process
still exists (if I go into adb shell and type ps, I still see it).
is there a way to make sure the process is killed when I "quit"?
tia.
--~--~-~--~~
oddly enough, after i installed the app, the final installation screen
(the one that shows "v Application installed" and has two buttons on
the bottom - "open" and "close") showed the right icon and the right
product name.
On Sep 18, 9:33 am, sdphil wrote:
>
i am seeing some strangeness with respect to installation.
sometimes when I install, I see the normal:
[ICON] Product Name
at the install screen. but somehow i get into a state every once in a
while where I see some other icon and instead of the product name, I
see "com.company.myapp" as the
ns to it they activities are re-created as needed so that
> it appears like it had continued running.
>
> On Thu, Sep 17, 2009 at 6:41 PM, sdphil wrote:
>
> >
> > that situation seems a bit contrived. if the process is killed, then
> > when it gets restarted, doesn&
: 0);
}
});
Which seems like the easiest way...
On Sep 18, 2:36 am, Mark Murphy wrote:
> sdphil wrote:
> > I want to change the android:background value when an image button is
> > selected (selected, not clicked). What's the easiest way to do that?
&
I want to change the android:background value when an image button is
selected (selected, not clicked). What's the easiest way to do that?
I think I could create a derived class and override onDraw, but isn't
there something like onClickListener() where I can get notified when
the focus for that
. You process will be restarted, with the top-most
> activity started. None of the others will be running at this point.
>
>
>
> On Thu, Sep 17, 2009 at 5:55 PM, sdphil wrote:
>
> > okay, what I wound up doing was to create a base class that all my
> > activities de
tarting the same activity component as
> your current root to send an intent down to that root (and finish all of the
> activities in-between, and then handle onNewIntent() there to see this
> intent and start the new desired activity and finish itself.
>
>
>
> On Thu, Sep 17,
tarting the same activity component as
> your current root to send an intent down to that root (and finish all of the
> activities in-between, and then handle onNewIntent() there to see this
> intent and start the new desired activity and finish itself.
>
>
>
> On Thu, Sep 17,
hi, i want to clear the activity stack and replace it with a new
activity as the root activity, even if that activity exists somewhere
on the stack (or not).
i see -- FLAG_ACTIVITY_CLEAR_TOP and FLAG_ACTIVITY_NEW_TASK, but
it's not obvious to me how to use those in conjunction to achieve what
I
l be brought to the front of the
> history stack, with this resulting order: A, C, D, B. This flag will
> be ignored if FLAG_ACTIVITY_CLEAR_TOP is also specified. "
>
> Tauno
>
> On Thu, Sep 17, 2009 at 11:31 AM, sdphil wrote:
>
> > I have the following situation. I
I have the following situation. I have a task with the following
activity stack --
A - B - C
I have a menu item that allows me to start activity D; so my activity
stack looks like this --
A - B - C - D
Then I could select a menu item that allows me to start an activity C,
which would cause my a
i have a service and an activity that will connect to that service.
from what i can tell --
bindService() generates a call to ServiceConnection.onServiceConnected
()
however, unbindService does NOT generate a call to
ServiceConnection.onServiceDisconnected().
Is there a way to know when a serv
is there a way to have a horizontal scrollbar on a TextView? I have
tried all kinds of variations, and it seems like it supports it, but i
cannot get it to work.
I did a google search online and it looks like at one point it was not
supported, i'm hoping / assuming that was under 1.1. anyway, h
update: okay, it does look like it will scroll horizontally, just no
scrollbar... ??
On Sep 14, 8:35 am, sdphil wrote:
> is there a way to have a horizontal scrollbar on a TextView? I have
> tried all kinds of variations, and it seems like it supports it, but i
> cannot get it to wo
is there a unique phone id (not the phone number -- since that can
obviously change).
on other phones it's called the "PIN" code.
tia.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To po
ack - nevermind. rtfm.
boolean onUnbind(Intent intent)
Called when all clients have disconnected from a particular interface
published by the service.
On Sep 11, 8:01 pm, sdphil wrote:
> i have a service that's running in the background, is there any way
> (short of keep
i have a service that's running in the background, is there any way
(short of keeping a count of onBind() and onUnbind()) to know the
number of activities that are bound to it?
I am trying to provide a "quit" function. all my activities derive
from the same base class. I am keeping a global sta
i have a base class "BaseActivity" and a class that dervies from
TabActivity.
I am doing a bunch of stuff in BaseActivity -- esp. in the overriden
methods so I can avoid having to do it in all my activities
("generalize and promote").
I am finding it a bit of a pain that I have to make all those
I have a ListView, and I want to do something special with the first
item in the listview.
So, I setup an adapter, an item in separate xml a java wrapper for the
item and I have a "render()" method.
Inside my render method, I realized that I can't do something like
"findViewById(R.id.test)" beca
oss
a variation on this would be like this:
+=+=+
| On | Off |
+=+=+
and a different background image on the one that's selected.
tia.
On Sep 10, 11:20 am, sdphil wrote:
> if i want a toggle button that looks like this:
>
>
if i want a toggle button that looks like this:
+=+=+
|On| |
+=+=+
+=+=+
|| Off|
+=+=+
where the empty space goes from right to left (and vice versa) when
you click on it -- revealing some text, what's the easiest way to do
tha
i want to resize a bitmap and write to a file. what's the best way to
do that?
tia.
--~--~-~--~~~---~--~~
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@
by the way, is there any way to know when Android is about to "force-
close" your process / service?
On Sep 10, 4:24 am, sdphil wrote:
> based on some other posts I have seen, I created a static variable
> inside my service class and I initialize it to false. when the
> se
to lack of memory."
which is exactly what I want...
tia.
On Sep 10, 4:05 am, Mark Murphy wrote:
> sdphil wrote:
> > i have a local service (based on LocalService).
>
> > when I start my app, the service gets created.
>
> > when I back out of my app (continuing to hit
i have a local service (based on LocalService).
when I start my app, the service gets created.
when I back out of my app (continuing to hit "back" until I get to the
desktop), my service's onDestroy() gets called, but the service is
still alive (presumably until android decides it's low on syste
hm... this is pretty good --
http://stackoverflow.com/questions/600207/android-check-if-a-service-is-running
any objections?
On Sep 9, 4:08 pm, sdphil wrote:
> when my activity gets started, i want to check for a service, if it
> exists, I want to show screen 2 and bind to the service,
when my activity gets started, i want to check for a service, if it
exists, I want to show screen 2 and bind to the service, if the
service is not running, I want to show screen 1 and start the service.
i could not find an easy way to know whether the service is running or
not...
tia.
--~--~
egads! that was it (well, kinda)
I had it in there, but I had it as remote --
android:process=":remote"
thanks!
On Sep 9, 12:41 pm, Dianne Hackborn wrote:
> Did you publish the service in your manifest?
>
>
>
> On Wed, Sep 9, 2009 at 11:37 AM, sdphil wrote:
>
&
I have the following base activity.
public class BaseActivity extends Activity
...
...
... onCreate(...) {
this.bindService(new Intent(BaseActivity.this,
LocalService.class), serviceConn, Context.BIND_AUTO_CREATE);
}
...
private ServiceConnection serviceConn = new ServiceConnectio
well I am making a media player like application -- so do i want it as
a separate process using AIDL?
what are the pros/cons of using a separate process with AIDL vs. a
local service?
On Sep 9, 10:05 am, Mark Murphy wrote:
> sdphil wrote:
> > if I want the service to be running afte
d to have the service running in a separate
> process from your code, so use the LocalService api demo model, and just do
> direct calls to Java objects both ways without dealing with aidl at all.
>
>
>
> On Wed, Sep 9, 2009 at 5:39 AM, Mark Murphy wrote:
>
> > sdphil wrote:
&
rtfm - http://developer.android.com/guide/topics/ui/notifiers/notifications.html
On Sep 9, 12:52 am, sdphil wrote:
> onCreate() --
> nm = (NotificationManager)
> getSystemService(NOTIFICATION_SERVICE);
>
> someOtherCall() --
> Notification
onCreate() --
nm = (NotificationManager)
getSystemService(NOTIFICATION_SERVICE);
someOtherCall() --
Notification notification = new Notification(R.drawable.icon,
"some
text", System.currentTimeMillis());
nm.notify(NOTIFY_ID, notification);
crash
i understand how to call methods on a service (aidl, etc...), but how
does a service event information out. how does it generate events
back to the application?
tia.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "A
I've got a ListView with an adapter that gets filled in on a different
thread. when it's done getting filled in (i.e. finished calling
adapter.add(...)),
I call
((ListView) findViewById(R.id.myListView)).clearChoices();
but the first item in the list is still selected!
where should i put that
how does the media player put itself in the "Ongoing" group when
playing?
tia.
--~--~-~--~~~---~--~~
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@google
hm.. nevermind, the background image does work (a 9x9 grid) -
however, it has rounded corners for some reason, any way to prevent
the rounded corners?
On Sep 6, 7:10 am, sdphil wrote:
> sorry, I should have included this in the original post, but this is
> my @drawable/progre
Sep 6, 3:26 am, Mark Murphy wrote:
> sdphil wrote:
> > this does not work --
>
> >
> > >
> > style="?android:attr/progressBarStyleHorizontal"
> >
this does not work --
Ideas?
tia.
--~--~-~--~~~---~--~~
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@googlegr
>
>
>
> On Fri, Sep 4, 2009 at 8:38 PM, sdphil wrote:
>
> > So then it has to be in the *same* namespace?
>
> > tia.
>
> > On Sep 4, 6:36 pm, Dianne Hackborn wrote:
> > > needs to be inside .
>
> > > You should see a warning message in the lo
So then it has to be in the *same* namespace?
tia.
On Sep 4, 6:36 pm, Dianne Hackborn wrote:
> needs to be inside .
>
> You should see a warning message in the log when you install your app about
> there being a problem in the manifest.
>
>
>
>
>
> On Fri,
tasks, so pressing the
> icon again brings the first one to the front and leave sthe second running.
> You can look at "adb shell dumpsys activity" to see what the stacks look
> like. Make sure you aren't using NEW_TASK, singleInstance, or singleTask.
>
>
>
> On Fri,
saw this related post --
http://groups.google.com/group/android-developers/browse_thread/thread/e82b09440a9aacaf/c71096392376c349?lnk=gst&q=startservice#c71096392376c349
but my situation is slightly different, my service is not in the same
package namespace as my application / activities.
so, i
after reading about the android lifecycle, i put some logging in my
current code --
I get --
Activity1.onCreate(null)
Activity1.onStart()
Activity1.onResume()
-- initiate gui action which causes startActivity(intent)
Activity2.onCreate(null)
Activity2.onStart()
Activity2.onResume()
Activity1.onS
i am running windows xp sp 2 --
i installed BusyBox [ http://www.novoda.com/blog/?p=3 ]
open up a command prompt and i type:
$ export PATH=/data/busybox:$PATH
$ ls
/data/busybox/ls
←[1;34mcache←[0m ←[1;32minit←[0m ←
[1;34msbin←[0m
←[1;34mdata←[0m
i would like to add some commands to be executed every time I run "adb
shell" (for example "alias ls="ls -l""). is there a .bashrc or a .sh
that i could add that to?
tia.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Grou
my bad! I had a base class activity that all my activities were
deriving from and in the base class i was not calling the super
methods in key (pun intended) areas where I should have been. thanks
everyone for your help. *sigh*
tia.
On Sep 4, 9:29 am, sdphil wrote:
> i ad
so
> you can see what is happening when.
>
> Lee
>
> On Sep 2, 3:00 am, sdphil wrote:
>
> > I have a bunch of activities that are launching each other through
> > intents. somehow, i got into a code state where some of the screens
> > the back button (physical butto
o see the current history stack.
>
> Use the debugger to step through your code when in the situation where you
> should be going back but aren't.
>
> On Tue, Sep 1, 2009 at 7:00 PM, sdphil wrote:
>
> > I have a bunch of activities that are launching each other through
times.
>
> Yusuf Saib
> Android
> ·T· · ·Mobile· stick together
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
> On Sep 3, 9:29 am,sdphil wrote:
>
;
> android:layout_width="wrap_content"
>
> android:layout_height="wrap_content"
> android:text="Fred"/>
>
>
>
> Keean.
>
&
and are there any tools out there that does a good job of this? i
would love to off-load some of the xml layout stuff to a non-
programmer but not require them to install all the devtools.
On Sep 3, 9:24 am, sdphil wrote:
> I am using eclipse 3.5 with the ADT plugin.
>
> when I view l
I am using eclipse 3.5 with the ADT plugin.
when I view layout xml files, i get two tabs in the view - the source
code view and a graphical view.
the graphical view almost never works for any of my layouts. it
usually shows "NullPointerException: null" at the top and nothing
else.
when it does
i am trying to create some text like this:
+===+
||
| Name: Fred |
||
+===+
and I want the combination of "Name: " and "Fred" to be
i've asked this before, and wonderful dianne has answered, but i'm not
satisfied with the answer :) -- dang he's stubborn!
i want to know within a method / code, is there a way to get at the
global application object or current activity without having an
activity / context / whatever first.
for
so is that directory protected from other apps, or do i need to
provide protection for any file I create in there?
On Sep 2, 4:27 pm, "Mark Murphy" wrote:
> > So, can I use getFilesDir() to find out where that path is, and then
> > use the standard java routines to read and write files in a dire
i saw that, however it looks like openFileOutput() does not support a
directory hierarchy --
"nameThe name of the file to open; can not contain path
separators."
So, can I use getFilesDir() to find out where that path is, and then
use the standard java routines to read and write files in
from the Android documentation:
"You can store files directly on the mobile device or on a removable
storage medium. By default, other applications cannot access these
files. "
I could write to the sdcard (/sdcard/file.tmp) and other apps could
access these files, right?
I would like some local
is there a way to get the resource id associated with an ImageView?
you can set one using -- ImageView.setImageResource() --
sure what be nice if there was a -- ImageView.getImageResource().
tia.
--~--~-~--~~~---~--~~
You received this message because you are sub
i suppose i could hard code a value, but i'd like something that would
be more generic and work for different size screens (i.e. in landscape
mode).
On Sep 1, 1:07 pm, Sekar wrote:
> Just put padding-left, padding-top to moving the position,
>
> http://youropensource.com/categories/75-Android
--
I have a bunch of activities that are launching each other through
intents. somehow, i got into a code state where some of the screens
the back button (physical button) works, but others it does not.
I didn't do anything intentionally to disable the back button - what
could be causing the back b
nevermind, i'm a tard - works exactly as expected.
On Sep 1, 4:24 pm, sdphil wrote:
> hm... even tried adapter.notifyDataSetChanged() as well - same
> result!
>
> On Sep 1, 4:09 pm, sdphil wrote:
>
> > i have a gridview with a bunch of thumbnails in it. when it fir
hm... even tried adapter.notifyDataSetChanged() as well - same
result!
On Sep 1, 4:09 pm, sdphil wrote:
> i have a gridview with a bunch of thumbnails in it. when it first
> gets draw, I put in a default icon.
>
> in a separate thread, i retrieve a bunch of images.
>
> whe
201 - 300 of 342 matches
Mail list logo