[android-developers] Setting "Use by default for this action" option crashes android

2008-11-21 Thread Thao

Hi All,

I try to replace the standard contact application by my custom
application. Now that I click on the android contact icon, it prompts
me with launching the standard contact app AND my custom app...That's
cool...

If I launched my custom app from this, it work very well. But when I
select the "Use by default for this action" option so I don't have to
choose next time, then launch my app, the emulator crashes with the
following message :
 "The process android.process.acore has stopped unexpectely. Please
try again"

This is the log I have from logcat :

I/ActivityManager(   65): Starting activity: Intent
{ action=android.intent.action.MAIN categories=
{android.intent.category.LAUNCHER} flags=0x1000 comp=
{com.android.contacts/
com.android.contacts.DialtactsContactsEntryActivity} }
D/dalvikvm( 3098): GC freed 1116 objects / 61840 bytes in 60ms
I/ActivityManager(   65): Displayed activity
com.android.contacts/.DialtactsContactsEntryActivity: 718 ms
D/AndroidRuntime( 3098): Shutting down VM
W/dalvikvm( 3098): threadid=3: thread exiting with uncaught exception
(group=0x40010e28)
E/AndroidRuntime( 3098): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime( 3098): java.lang.SecurityException: Neither user
10002 nor current process has
android.permission.SET_PREFERRED_APPLICATIONS.
E/AndroidRuntime( 3098):at android.os.Parcel.readException
(Parcel.java:1234)
E/AndroidRuntime( 3098):at android.os.Parcel.readException
(Parcel.java:1222)
E/AndroidRuntime( 3098):at android.content.pm.IPackageManager
$Stub$Proxy.addPreferredActivity(IPackageManager.java:1701)
E/AndroidRuntime( 3098):at android.app.ApplicationContext
$ApplicationPackageManager.addPreferredActivity
(ApplicationContext.java:2259)
E/AndroidRuntime( 3098):at
com.android.internal.app.ResolverActivity.onClick
(ResolverActivity.java:177)
E/AndroidRuntime( 3098):at
com.android.internal.app.AlertController$AlertParams$3.onItemClick
(AlertController.java:828)
E/AndroidRuntime( 3098):at
android.widget.AdapterView.performItemClick(AdapterView.java:283)
E/AndroidRuntime( 3098):at
android.widget.ListView.performItemClick(ListView.java:3049)
E/AndroidRuntime( 3098):at android.widget.AbsListView
$PerformClick.run(AbsListView.java:1415)
E/AndroidRuntime( 3098):at android.os.Handler.handleCallback
(Handler.java:542)
E/AndroidRuntime( 3098):at android.os.Handler.dispatchMessage
(Handler.java:86)
E/AndroidRuntime( 3098):at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime( 3098):at android.app.ActivityThread.main
(ActivityThread.java:3742)
E/AndroidRuntime( 3098):at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 3098):at java.lang.reflect.Method.invoke
(Method.java:515)
E/AndroidRuntime( 3098):at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:739)
E/AndroidRuntime( 3098):at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
E/AndroidRuntime( 3098):at dalvik.system.NativeStart.main
(Native Method)
I/Process (   65): Sending signal. PID: 3098 SIG: 3
I/dalvikvm( 3098): threadid=7: reacting to signal 3
I/dalvikvm( 3098): Wrote stack trace to '/data/anr/traces.txt'
V/DumpStateReceiver(   65): Running: /system/bin/dumpcrash
I/DumpStateReceiver(   65): Finished: 1788 bytes read; status 0
I/DumpStateReceiver(   65): Added state dump to 1 crashes
I/Process ( 3098): Sending signal. PID: 3098 SIG: 9
I/ActivityManager(   65): Process android.process.acore (pid 3098) has
died.
I/WindowManager(   65): WIN DEATH: Window{433d46d0
com.android.launcher/com.android.launcher.Launcher}
I/WindowManager(   65): WIN DEATH: Window{433e78d8
com.android.contacts/
com.android.contacts.DialtactsContactsEntryActivity}
I/ActivityManager(   65): Start proc android.process.acore for
activity com.android.launcher/.Launcher: pid=3136 uid=10002 gids=
{3003}


- What I can see in those logs, it that the default contact activity
starts first ( after that its shows me the drop list with the
choice...) . It seems that this activity raises an exception.
Is it normal that it start first then prompt with the choice ?

- Seeing this :  java.lang.SecurityException: Neither user 10002 nor
current process has android.permission.SET_PREFERRED_APPLICATIONS.

So I tried to set the permission in my manifest :
 

But it still raising the same error message...

Can someone help please ? Or have a track to move on ? I really have
no idea of what is happening ...

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

[android-developers] Re: FTP Client

2008-11-21 Thread friedger

I think I saw a package like com.android.ftp or similar but I can't
find it on the device anymore after an update. Maybe the package might
be of some use.

Friedger

On 20 Nov., 18:41, Sahil R Cooner <[EMAIL PROTECTED]> wrote:
> nothing that I know of, but if you're working on one that you'd like
> help on I'd be willing to join in on the project.
>
> On Wed, Nov 19, 2008 at 02:03:22PM -0800, Phubeone wrote:
>
> > Is anyone out there working on a FTP client for Android or does anyone
> > know if one is already available?  I have been looking for awhile and
> > haven't found anything.
>
> > 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] What are the capabilities of a Web View?

2008-11-21 Thread Brad Gies
I'm in the design process of a new app, and I'm mulling over the
possibilities for the user interface. My app will need to communicate with
my web server (or a web service) for almost every interaction it has. The
app will need to occasionally send GPS information to the server, and on
rare occasions it will need to take a picture and send it to the server. Of
course, it always needs to respond to the actions of the user, and it will
need to use the information passed back from the web server (or web service)
and display the results to the user. 

 

So the question on my mind is how much can I rely on the web view for
interacting with the user? If Android supported ASP.NET or something
similar, then it would be possible to use the browser for almost anything I
need, and that would be very handy because it would mean that I could easily
make changes, and add new functionality by simply updating the web pages.
However from what I've seen and read so far, it seems the capabilities of
the Web View are quite limited for client side processing.

 

My main question is this: Is there a way to use any of the Android system
functions from a web page? If I could have an android app that has a couple
of buttons on the top and say, Location permissions, and then uses the rest
of the screen for a web browser, and the web page would be able to access
the GPS information somehow, it would be very powerful. 

 

Can anyone comment on this or direct me to some good information that I can
read for myself. 

 

Has anyone else attempted to use Web pages as the main user interface for
their apps? It would be handy to see what others have done if there are some
apps already out there.

 

 

Sincerely,

 

Brad Gies

 

 

-

Brad Gies

27415 Greenfield Rd, # 2,

Southfield, MI, USA

48076

-

 

Moderation in everything, including abstinence

 


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



[android-developers] A bit of a moral boost....

2008-11-21 Thread Al Sutton

I thought I'd post this as I know it's always nice to see your work is 
doing well;

AndAppStore.com is uses Struts 2.1.2 core, codebehind, rest, and 
sitemesh plugins (as well as the SSL one from googlecode), we're 
regularly seeing 250,000+ hits a day (yes, quarter of a million) on a 
single server without any problems (except the odd dumb mistake I make 
in my code), and 95+% of those requests are REST URLs served via the 
S2.1 framework.

A typical server is an Athon64 3500+ based machine with 1GB of RAM, 
160GB of RAID 1 disk storage, and running OpenSuSE 10.3 (x86-64),  Java 
1.6.0_07, Tomcat 6.0.18, and have a local PostgreSQL instance to improve 
database access speed.

So all in all I'd say that the core of S2.1 is ready for the prime time 
and is in a stable, usable state.

Have a nice weekend,

Al.

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

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


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



[android-developers] [Fwd: A bit of a moral boost....]

2008-11-21 Thread Al Sutton
Sorry guys, this should have gone to struts-dev.. damn that 
auto-completion!!!

Al.

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

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


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

--- Begin Message ---
I thought I'd post this as I know it's always nice to see your work is 
doing well;

AndAppStore.com is uses Struts 2.1.2 core, codebehind, rest, and 
sitemesh plugins (as well as the SSL one from googlecode), we're 
regularly seeing 250,000+ hits a day (yes, quarter of a million) on a 
single server without any problems (except the odd dumb mistake I make 
in my code), and 95+% of those requests are REST URLs served via the 
S2.1 framework.

A typical server is an Athon64 3500+ based machine with 1GB of RAM, 
160GB of RAID 1 disk storage, and running OpenSuSE 10.3 (x86-64),  Java 
1.6.0_07, Tomcat 6.0.18, and have a local PostgreSQL instance to improve 
database access speed.

So all in all I'd say that the core of S2.1 is ready for the prime time 
and is in a stable, usable state.

Have a nice weekend,

Al.

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

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


--- End Message ---


[android-developers] Re: Notification details Activity never receives Intent used to fire it

2008-11-21 Thread Matthias

Well, when /do/ PendingIntents match? All I can say is that calling
PendingActivity.getActivity() created a new PendingIntent each time I
called it (I checked the OID in the debugger), and in this new object,
I always store a new Intent object.

As Guillaume suggested, I solved the problem by calling getActivity()
like this:

private static int requestCode;
...
pi = PendingIntent.getActivity(context, requestCode++, intent, 0)

and now everything works as expected. As for the intent itself, I
instantiated it using FLAG_ACTIVITY_NEW_TASK and
FLAG_ACTIVITY_SINGLE_TOP.

On 20 Nov., 22:55, "Dianne Hackborn" <[EMAIL PROTECTED]> wrote:
> I am really not clear on exactly what you are doing or expecting, but one
> thing to watch out for -- when you get a PendingIntent, if there is already
> a PendingIntent matching the Intent you have been given (NOT including the
> extras), then you get that PendingIntent, NOT a new one.  So if you want to
> change the extras you will either need to cancel the existing one, or modify
> something in the action, type, data, or category so that it doesn't match
> the existing one.
>
> This is covered (not very well) in the last paragraph of the PendingIntent
> documentation:
>
> http://code.google.com/android/reference/android/app/PendingIntent.html
>
>
>
> On Thu, Nov 20, 2008 at 8:38 AM, Matthias <[EMAIL PROTECTED]> wrote:
>
> > This gets weirder every minute.
>
> > Just out of curiosity I just called setIntent(null) in onPause() to
> > make sure the Intent the Activity was started with is always reset. As
> > soon as I start the Activity again though, getIntent() will AGAIN
> > return the Intent I supposedly set to null before.. this Intent it
> > returns even exists across re-deployments of the whole application
> > (not across emulator reboots tho)!
>
> > Am I the only one having these problems? ^^ This whole thing looks
> > completely broken to me. None of the functionalities I used exposed
> > the behavior that was documented.
>
> > On 20 Nov., 17:03, Matthias <[EMAIL PROTECTED]> wrote:
> > > I think this may be a bug in Android. I also tried following the
> > > instructions from the docs under section "Launch Modes and Launch
> > > Flags" with no success. That section suggested to declare any Activity
> > > launched from NotificationManager to set the taskAffinitity to "" and
> > > finishOnTaskLaunch to true, so that the Activity does a clean start
> > > everytime it is called.
>
> > > Even though the Activity is completely restarted now (onStart() is
> > > called), getIntent() always yields the same intent, the one it was
> > > started with for the very first time...
>
> > > On 20 Nov., 14:17, Matthias <[EMAIL PROTECTED]> wrote:
>
> > > > Hi,
>
> > > > I have the following problem: When posting a new Notification, I pass
> > > > along a PendingIntent used to fire up an Activity that shows details
> > > > about this Notification. These details are passed as a Serializable
> > > > Extra.
>
> > > > However, the Intent holding the Extra is only updated once, when the
> > > > Activity was started for the first time. If a new Notification arrives
> > > > however, although I instantiate a new Intent, neither getIntent() nor
> > > > onNewIntent() of said Activity deliver this new intent, instead they
> > > > always deliver the Intent that was active when the Activity was
> > > > started for the first time.
>
> > > > I tried combining many of the flags that can be passed to Intents and
> > > > PendingIntents (in particular FLAG_ACTIVITY_SINGLE_TOP which is said
> > > > to do exactly what I need, namely calling onNewIntent() with the new
> > > > intent, but that's not the case), but no luck.
>
> > > > So, how can I update my Activity with the Intent used to fire it,
> > > > whenever the Activity is already running?
>
> > > > Thanks,
> > > > Matthias
>
> --
> Dianne Hackborn
> Android framework engineer
> [EMAIL PROTECTED]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Setting "Use by default for this action" option crashes when attempting to replace a standard application

2008-11-21 Thread Thao

He Dianne,

Sorry but I don't understand your comment. Could you please detail
your thought, maybe it could help me to understand how it works.

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



[android-developers] Re: Notification details Activity never receives Intent used to fire it

2008-11-21 Thread Guillaume Perrot
I retested my application, I can post two notifications with two pending
intents with the same action (but different extra args) and this works only
if put different request codes each time...
I tested to click them in different orders to check it this really works: it
works, the correct extra args values are received by my activity which
handle these intents.
This activity is in singleTop launch mode, I received these intents via the
onNewIntent() method.

2008/11/21 Matthias <[EMAIL PROTECTED]>

>
> Well, when /do/ PendingIntents match? All I can say is that calling
> PendingActivity.getActivity() created a new PendingIntent each time I
> called it (I checked the OID in the debugger), and in this new object,
> I always store a new Intent object.
>
> As Guillaume suggested, I solved the problem by calling getActivity()
> like this:
>
> private static int requestCode;
> ...
> pi = PendingIntent.getActivity(context, requestCode++, intent, 0)
>
> and now everything works as expected. As for the intent itself, I
> instantiated it using FLAG_ACTIVITY_NEW_TASK and
> FLAG_ACTIVITY_SINGLE_TOP.
>
> On 20 Nov., 22:55, "Dianne Hackborn" <[EMAIL PROTECTED]> wrote:
> > I am really not clear on exactly what you are doing or expecting, but one
> > thing to watch out for -- when you get a PendingIntent, if there is
> already
> > a PendingIntent matching the Intent you have been given (NOT including
> the
> > extras), then you get that PendingIntent, NOT a new one.  So if you want
> to
> > change the extras you will either need to cancel the existing one, or
> modify
> > something in the action, type, data, or category so that it doesn't match
> > the existing one.
> >
> > This is covered (not very well) in the last paragraph of the
> PendingIntent
> > documentation:
> >
> > http://code.google.com/android/reference/android/app/PendingIntent.html
> >
> >
> >
> > On Thu, Nov 20, 2008 at 8:38 AM, Matthias <[EMAIL PROTECTED]>
> wrote:
> >
> > > This gets weirder every minute.
> >
> > > Just out of curiosity I just called setIntent(null) in onPause() to
> > > make sure the Intent the Activity was started with is always reset. As
> > > soon as I start the Activity again though, getIntent() will AGAIN
> > > return the Intent I supposedly set to null before.. this Intent it
> > > returns even exists across re-deployments of the whole application
> > > (not across emulator reboots tho)!
> >
> > > Am I the only one having these problems? ^^ This whole thing looks
> > > completely broken to me. None of the functionalities I used exposed
> > > the behavior that was documented.
> >
> > > On 20 Nov., 17:03, Matthias <[EMAIL PROTECTED]> wrote:
> > > > I think this may be a bug in Android. I also tried following the
> > > > instructions from the docs under section "Launch Modes and Launch
> > > > Flags" with no success. That section suggested to declare any
> Activity
> > > > launched from NotificationManager to set the taskAffinitity to "" and
> > > > finishOnTaskLaunch to true, so that the Activity does a clean start
> > > > everytime it is called.
> >
> > > > Even though the Activity is completely restarted now (onStart() is
> > > > called), getIntent() always yields the same intent, the one it was
> > > > started with for the very first time...
> >
> > > > On 20 Nov., 14:17, Matthias <[EMAIL PROTECTED]> wrote:
> >
> > > > > Hi,
> >
> > > > > I have the following problem: When posting a new Notification, I
> pass
> > > > > along a PendingIntent used to fire up an Activity that shows
> details
> > > > > about this Notification. These details are passed as a Serializable
> > > > > Extra.
> >
> > > > > However, the Intent holding the Extra is only updated once, when
> the
> > > > > Activity was started for the first time. If a new Notification
> arrives
> > > > > however, although I instantiate a new Intent, neither getIntent()
> nor
> > > > > onNewIntent() of said Activity deliver this new intent, instead
> they
> > > > > always deliver the Intent that was active when the Activity was
> > > > > started for the first time.
> >
> > > > > I tried combining many of the flags that can be passed to Intents
> and
> > > > > PendingIntents (in particular FLAG_ACTIVITY_SINGLE_TOP which is
> said
> > > > > to do exactly what I need, namely calling onNewIntent() with the
> new
> > > > > intent, but that's not the case), but no luck.
> >
> > > > > So, how can I update my Activity with the Intent used to fire it,
> > > > > whenever the Activity is already running?
> >
> > > > > Thanks,
> > > > > Matthias
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > [EMAIL PROTECTED]
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support.  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 Developer

[android-developers] Re: How to rotate the emulator screen on a mac

2008-11-21 Thread Dan B.

should be Ctrl+F12

On Nov 20, 8:35 pm, Eelke Folmer <[EMAIL PROTECTED]> wrote:
> Hi,
>
> According to the emulator faq the screen can be rotated using F11 and
> F12 but this doesn't work on  my new macbook as apple put the volume
> adjustments there. Is there a workaround?
>
> Cheers Eelke
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Notification details Activity never receives Intent used to fire it

2008-11-21 Thread Matthias

And to further clear up my intentions:

I have a model class called "Event". It represents user activity in my
system (such as rating items or writing messages). These events are
delivered to the user through NotificationManager. For every such
event, the NM calls Event.toNotification() and delivers the
notification.

Furthermore, I have an activity called EventDetailsActivity. This is
triggered whenever the user taps on the notification to read the event
info in full length. This implies primarily two things:

1. I must be able to pass an Event model object to
EventDetailsActivity whenever the user taps the corresponding
notification
2. I must be able to reuse EventDetailsActivity even it is already
displaying another event (e.g. update it via onNewIntent())

Thus, in Event.toNotification(), I do this:

public final Notification toNotification(Context context) {
Intent intent = new Intent(context,
EventDetailsActivity.class);
intent.putExtra("event", this);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_SINGLE_TOP);
configureIntent(intent); // template method for subclasses

PendingIntent contentIntent = PendingIntent.getActivity
(context,
requestCode++, intent, 0);

Notification notification = new Notification
(getNotificationIcon(),
getTickerText(), getDate().getTime());
notification.setLatestEventInfo(context, getTitle(), getText
(),
contentIntent);

return notification;
}

Hope that clears up my intentions.

On 21 Nov., 11:14, Matthias <[EMAIL PROTECTED]> wrote:
> Well, when /do/ PendingIntents match? All I can say is that calling
> PendingActivity.getActivity() created a new PendingIntent each time I
> called it (I checked the OID in the debugger), and in this new object,
> I always store a new Intent object.
>
> As Guillaume suggested, I solved the problem by calling getActivity()
> like this:
>
> private static int requestCode;
> ...
> pi = PendingIntent.getActivity(context, requestCode++, intent, 0)
>
> and now everything works as expected. As for the intent itself, I
> instantiated it using FLAG_ACTIVITY_NEW_TASK and
> FLAG_ACTIVITY_SINGLE_TOP.
>
> On 20 Nov., 22:55, "Dianne Hackborn" <[EMAIL PROTECTED]> wrote:
>
> > I am really not clear on exactly what you are doing or expecting, but one
> > thing to watch out for -- when you get a PendingIntent, if there is already
> > a PendingIntent matching the Intent you have been given (NOT including the
> > extras), then you get that PendingIntent, NOT a new one.  So if you want to
> > change the extras you will either need to cancel the existing one, or modify
> > something in the action, type, data, or category so that it doesn't match
> > the existing one.
>
> > This is covered (not very well) in the last paragraph of the PendingIntent
> > documentation:
>
> >http://code.google.com/android/reference/android/app/PendingIntent.html
>
> > On Thu, Nov 20, 2008 at 8:38 AM, Matthias <[EMAIL PROTECTED]> wrote:
>
> > > This gets weirder every minute.
>
> > > Just out of curiosity I just called setIntent(null) in onPause() to
> > > make sure the Intent the Activity was started with is always reset. As
> > > soon as I start the Activity again though, getIntent() will AGAIN
> > > return the Intent I supposedly set to null before.. this Intent it
> > > returns even exists across re-deployments of the whole application
> > > (not across emulator reboots tho)!
>
> > > Am I the only one having these problems? ^^ This whole thing looks
> > > completely broken to me. None of the functionalities I used exposed
> > > the behavior that was documented.
>
> > > On 20 Nov., 17:03, Matthias <[EMAIL PROTECTED]> wrote:
> > > > I think this may be a bug in Android. I also tried following the
> > > > instructions from the docs under section "Launch Modes and Launch
> > > > Flags" with no success. That section suggested to declare any Activity
> > > > launched from NotificationManager to set the taskAffinitity to "" and
> > > > finishOnTaskLaunch to true, so that the Activity does a clean start
> > > > everytime it is called.
>
> > > > Even though the Activity is completely restarted now (onStart() is
> > > > called), getIntent() always yields the same intent, the one it was
> > > > started with for the very first time...
>
> > > > On 20 Nov., 14:17, Matthias <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi,
>
> > > > > I have the following problem: When posting a new Notification, I pass
> > > > > along a PendingIntent used to fire up an Activity that shows details
> > > > > about this Notification. These details are passed as a Serializable
> > > > > Extra.
>
> > > > > However, the Intent holding the Extra is only updated once, when the
> > > > > Activity was started for the first time. If a new Notification arrives
> > > > > however, although I instantiate a new Intent, neither getIntent() nor
> > > > > onNewIntent() of sai

[android-developers] Re: How to rotate the emulator screen on a mac

2008-11-21 Thread Grigory Fishilevich

> According to the emulator faq the screen can be rotated using F11 and
> F12 but this doesn't work on  my new macbook as apple put the volume
> adjustments there. Is there a workaround?

FN + Ctrl+F12

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



[android-developers] Re: error in opening file in fileexplorer application

2008-11-21 Thread Charlie Collins

I believe you will need to go back to the code you got from anddev.org
and check that manifest. As far as I know "file://STRING" is NOT a
scheme/uri that any built in system intent can handle, that's a custom
Uri, so you are going to have to write the Activity that handles that
on your own (which is probably what any anddev example did - which
example are you talking about exactly, that might help?).  After you
write the Activity then YOU will also have to define the filter for
that data scheme which is handled by that Activity in your manifest.


On Nov 21, 12:03 am, Asif k <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> anyone is aware of which intent filters are nedded in manifest.xml
>
> On Nov 20, 6:13 pm, Charlie Collins <[EMAIL PROTECTED]> wrote:
>
> > I am not familiar with that particular application, but it looks like
> > you need the Intent and IntentFilter setup correctly for the action
> > "action=android.intent.action.VIEW data=file:///sdcard/1.txt".  Sorry
> > if that's obvious, but does your manifest have a filter for that
> > action, which specifies the activity to handle that?
>
> > On Nov 20, 12:19 am, Asif k <[EMAIL PROTECTED]> wrote:
>
> > > Hi All,
>
> > > I am working on file explorer application in which I cannot open any
> > > file.I am using following code to open the file which I got from
> > > anddev.org.
>
> > >             OnClickListener okButtonListener = new OnClickListener(){
> > >                  // @Override
> > >                  public void onClick(DialogInterface arg0, int arg1) {
> > >                       // Lets start an intent to View the file, that
> > > was clicked...
> > >                 Intent myIntent = new Intent
> > > (android.content.Intent.ACTION_VIEW,Uri.parse("file://" +
> > > aDirectory.getAbsolutePath()));
> > >                 startActivity(myIntent);
> > >                  }
> > >             };
> > >             OnClickListener cancelButtonListener = new OnClickListener
> > > (){
> > >                  // @Override
> > >                  public void onClick(DialogInterface arg0, int arg1) {
> > >                       // Do nothing
> > >                  }
> > >             };
> > >             new AlertDialog.Builder(this)
> > >             .setTitle("Question")
> > >             .setMessage("Do you want to open that file?\n"+
> > > aDirectory.getName())
> > >             .setPositiveButton("OK", okButtonListener)
> > >             .setNegativeButton("Cancel", cancelButtonListener)
> > >             .show();
>
> > > But I am getting following exception after clicking on any file.
>
> > > 11-20 10:26:51.290: INFO/ActivityManager(50): Starting activity:
> > > Intent { action=android.intent.action.VIEW data=file:///sdcard/1.txt }
> > > 11-20 10:26:51.299: WARN/System.err(218):
> > > android.content.ActivityNotFoundException: No Activity found to handle
> > > Intent { action=android.intent.action.VIEW data=file:///sdcard/1.txt }
> > > 11-20 10:26:51.369: WARN/System.err(218):     at
> > > android.app.Instrumentation.checkStartActivityResult
> > > (Instrumentation.java:1472)
> > > 11-20 10:26:51.369: WARN/System.err(218):     at
> > > android.app.Instrumentation.execStartActivity(Instrumentation.java:
> > > 1442)
> > > 11-20 10:26:51.380: WARN/System.err(218):     at
> > > android.app.Activity.startActivityForResult(Activity.java:2528)
> > > 11-20 10:26:51.388: WARN/System.err(218):     at
> > > android.app.Activity.startActivity(Activity.java:2572)
> > > 11-20 10:26:51.409: WARN/System.err(218):     at
> > > android.file.FileExplorer.onListItemClick(FileExplorer.java:171)
> > > 11-20 10:26:51.409: WARN/System.err(218):     at
> > > android.app.ListActivity$2.onItemClick(ListActivity.java:312)
> > > 11-20 10:26:51.409: WARN/System.err(218):     at
> > > android.widget.AdapterView.performItemClick(AdapterView.java:283)
> > > 11-20 10:26:51.409: WARN/System.err(218):     at
> > > android.widget.ListView.performItemClick(ListView.java:3049)
> > > 11-20 10:26:51.420: WARN/System.err(218):     at
> > > android.widget.AbsListView$PerformClick.run(AbsListView.java:1415)
>
> > > Is there any permission is needed to open any file or any resources
> > > are required??
> > > Plese give ur suggestions as soon as possible.
> > > Thanks in advance
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: What are the capabilities of a Web View?

2008-11-21 Thread Charlie Collins

Android has a pretty capable web browser from what I have seen (sans
Flash).  It can run several of my GWT apps, for example, and
JavaScript/XHR are usually what many other mobile browsers cannot
handle. Also, I believe that yes, the WebView does allow you to bind
from the running application process into the web process, via
JavaScript (this I also haven't used, so I cannot speak to how well it
works, but just having it is pretty darn powerful:
http://code.google.com/android/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)).

Now all that said, I would think you would have to heavily customize
any existing web app, or write an entirely new one, to work with the
Android concepts - IF you want to pass the GPS location directly and
so on. If you have to go to that extent anyway, in my opinion, it
would be better just to write a native Android app rather than try to
write a specialized web app with a few buttons above a web view for
Android (again, because this web app would not be useful outside of
Android, where the WebView passing stuff really would be powerful in
my mind is in allowing you to leverage existing apps, or write apps
that are new but you want to use them in multiple contexts, Android or
otherwise).

As for ASP.NET and such, sorry, but isn't that a server side
technology anyway?  I don't use ASP.NET, but it doesn't seem to have
any bearing here. If Android supported it, that would be for running a
server on Android (because it does of course support it from the
standpoint of a client, Android supports HTTP really well)?  A native
Android app should be able to talk to just about any HTTP/REST or HTTP/
SOAP backend, or many other HTTP related approaches, regardless of the
server side technology.

If you need to talk to the server side a lot, and send your location,
and send binary files, etc, you want a native Android app that uses
HTTP to talk to said server. You should build a nice server side API
first (REST would be my recommendation there in Android client terms,
for many reasons, but that's another discussion), and then communicate
with it. Doesn't seem like for your use case there is any need to shoe
horn anything into a web app?



On Nov 21, 4:45 am, "Brad Gies" <[EMAIL PROTECTED]> wrote:
> I'm in the design process of a new app, and I'm mulling over the
> possibilities for the user interface. My app will need to communicate with
> my web server (or a web service) for almost every interaction it has. The
> app will need to occasionally send GPS information to the server, and on
> rare occasions it will need to take a picture and send it to the server. Of
> course, it always needs to respond to the actions of the user, and it will
> need to use the information passed back from the web server (or web service)
> and display the results to the user.
>
> So the question on my mind is how much can I rely on the web view for
> interacting with the user? If Android supported ASP.NET or something
> similar, then it would be possible to use the browser for almost anything I
> need, and that would be very handy because it would mean that I could easily
> make changes, and add new functionality by simply updating the web pages.
> However from what I've seen and read so far, it seems the capabilities of
> the Web View are quite limited for client side processing.
>
> My main question is this: Is there a way to use any of the Android system
> functions from a web page? If I could have an android app that has a couple
> of buttons on the top and say, Location permissions, and then uses the rest
> of the screen for a web browser, and the web page would be able to access
> the GPS information somehow, it would be very powerful.
>
> Can anyone comment on this or direct me to some good information that I can
> read for myself.
>
> Has anyone else attempted to use Web pages as the main user interface for
> their apps? It would be handy to see what others have done if there are some
> apps already out there.
>
> Sincerely,
>
> Brad Gies
>
> -
>
> Brad Gies
>
> 27415 Greenfield Rd, # 2,
>
> Southfield, MI, USA
>
> 48076
>
> -
>
> Moderation in everything, including abstinence
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Using Amazons Content Delivery Network for APK distribution

2008-11-21 Thread Al Sutton

I've added the ability to upload and publish via Amazons Content 
Delivery Network (CloudFront) into AndAppStore.com, so if you'd like to 
distribute your apps using CloudFront you can do so by following the 
instructions at;

http://andappstore.com/AndroidPhoneApplications/awshosting.jsp

Al.

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

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


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



[android-developers] Re: ViewFlipper onFlipListener

2008-11-21 Thread Ngewi

Yes, ViewFlipper can flip on its own. When you call setFlipInterval
(int timeInMs)  and then call startFlipping() the flipper will switch
the views every timeInMs millisecs.
I can handle the flips that I trigger manually, but I want to also
handle them when they are automatic.
There is the possibility of using a Timer object and scheduling a
TimerTask to run every timeInMs, but this does not provide accuracy.
i.e. I do not have a guarantee that the timing is synchronized, so I
cannot achieve the goal of performing an action just before showing
the next view.
I was just wondering if there is a better way to do this.

Thanks for your response.


On Nov 20, 7:30 pm, loty <[EMAIL PROTECTED]> wrote:
> I don't understand it - you tell ViewFlipper to flip views, it doesn't
> flip anything on it's own. So why can't you keep track of your views
> in the event handler that initiates your flips?
>
> On Nov 20, 4:38 am, Ngewi <[EMAIL PROTECTED]> wrote:
>
> > Hi everyone,
> > I am using the ViewFlipper class with automatic flipping through
> > views. Is there a way to get notified or register a listener to be
> > called each time just before a new child view is displayed. (i.e with
> > automatic flipping ). So far I have not seen any listeners in the
> > documentation for this purpose.
>
> > I would also like to use this to check, each time a view is loaded, if
> > it is the last and return to the calling activity instead wrapping
> > around to start from the beginning of the ViewFlipper child views.
>
> > If someone has any bright ideas please share.
>
> > 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: PackageManager??

2008-11-21 Thread teo2706

Will PackageManager.installPackage() be available for applications in
future versions? Ot will it be possible to install applications only
through Package Installer application, as you suggested below in this
thread?

On 26 Авг, 09:36, hackbod <[EMAIL PROTECTED]> wrote:
> This is not available to applications, sorry.
>
> On Aug 26, 12:25 am, Wesley Sagittarius <[EMAIL PROTECTED]> wrote:
>
> > hi,
>
> > Does anyone successful use the PackageManager  to install apk???
>
> > wesley.

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



[android-developers] Re: Notification details Activity never receives Intent used to fire it

2008-11-21 Thread Matthias

that's exactly the behavior I am noticing, too.

On 21 Nov., 11:38, "Guillaume Perrot" <[EMAIL PROTECTED]>
wrote:
> I retested my application, I can post two notifications with two pending
> intents with the same action (but different extra args) and this works only
> if put different request codes each time...
> I tested to click them in different orders to check it this really works: it
> works, the correct extra args values are received by my activity which
> handle these intents.
> This activity is in singleTop launch mode, I received these intents via the
> onNewIntent() method.
>
> 2008/11/21 Matthias <[EMAIL PROTECTED]>
>
>
>
> > Well, when /do/ PendingIntents match? All I can say is that calling
> > PendingActivity.getActivity() created a new PendingIntent each time I
> > called it (I checked the OID in the debugger), and in this new object,
> > I always store a new Intent object.
>
> > As Guillaume suggested, I solved the problem by calling getActivity()
> > like this:
>
> > private static int requestCode;
> > ...
> > pi = PendingIntent.getActivity(context, requestCode++, intent, 0)
>
> > and now everything works as expected. As for the intent itself, I
> > instantiated it using FLAG_ACTIVITY_NEW_TASK and
> > FLAG_ACTIVITY_SINGLE_TOP.
>
> > On 20 Nov., 22:55, "Dianne Hackborn" <[EMAIL PROTECTED]> wrote:
> > > I am really not clear on exactly what you are doing or expecting, but one
> > > thing to watch out for -- when you get a PendingIntent, if there is
> > already
> > > a PendingIntent matching the Intent you have been given (NOT including
> > the
> > > extras), then you get that PendingIntent, NOT a new one.  So if you want
> > to
> > > change the extras you will either need to cancel the existing one, or
> > modify
> > > something in the action, type, data, or category so that it doesn't match
> > > the existing one.
>
> > > This is covered (not very well) in the last paragraph of the
> > PendingIntent
> > > documentation:
>
> > >http://code.google.com/android/reference/android/app/PendingIntent.html
>
> > > On Thu, Nov 20, 2008 at 8:38 AM, Matthias <[EMAIL PROTECTED]>
> > wrote:
>
> > > > This gets weirder every minute.
>
> > > > Just out of curiosity I just called setIntent(null) in onPause() to
> > > > make sure the Intent the Activity was started with is always reset. As
> > > > soon as I start the Activity again though, getIntent() will AGAIN
> > > > return the Intent I supposedly set to null before.. this Intent it
> > > > returns even exists across re-deployments of the whole application
> > > > (not across emulator reboots tho)!
>
> > > > Am I the only one having these problems? ^^ This whole thing looks
> > > > completely broken to me. None of the functionalities I used exposed
> > > > the behavior that was documented.
>
> > > > On 20 Nov., 17:03, Matthias <[EMAIL PROTECTED]> wrote:
> > > > > I think this may be a bug in Android. I also tried following the
> > > > > instructions from the docs under section "Launch Modes and Launch
> > > > > Flags" with no success. That section suggested to declare any
> > Activity
> > > > > launched from NotificationManager to set the taskAffinitity to "" and
> > > > > finishOnTaskLaunch to true, so that the Activity does a clean start
> > > > > everytime it is called.
>
> > > > > Even though the Activity is completely restarted now (onStart() is
> > > > > called), getIntent() always yields the same intent, the one it was
> > > > > started with for the very first time...
>
> > > > > On 20 Nov., 14:17, Matthias <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hi,
>
> > > > > > I have the following problem: When posting a new Notification, I
> > pass
> > > > > > along a PendingIntent used to fire up an Activity that shows
> > details
> > > > > > about this Notification. These details are passed as a Serializable
> > > > > > Extra.
>
> > > > > > However, the Intent holding the Extra is only updated once, when
> > the
> > > > > > Activity was started for the first time. If a new Notification
> > arrives
> > > > > > however, although I instantiate a new Intent, neither getIntent()
> > nor
> > > > > > onNewIntent() of said Activity deliver this new intent, instead
> > they
> > > > > > always deliver the Intent that was active when the Activity was
> > > > > > started for the first time.
>
> > > > > > I tried combining many of the flags that can be passed to Intents
> > and
> > > > > > PendingIntents (in particular FLAG_ACTIVITY_SINGLE_TOP which is
> > said
> > > > > > to do exactly what I need, namely calling onNewIntent() with the
> > new
> > > > > > intent, but that's not the case), but no luck.
>
> > > > > > So, how can I update my Activity with the Intent used to fire it,
> > > > > > whenever the Activity is already running?
>
> > > > > > Thanks,
> > > > > > Matthias
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > [EMAIL PROTECTED]
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private

[android-developers] Re: Text-To-Speech

2008-11-21 Thread blindfold

Hi Pulkit,

I have not implemented any TTS. As an intermediate solution I just use
a partially self-voicing approach with built-in speech samples. I can
afford to wait a bit longer until the TTS dust settles. Right now
there are several Android TTS projects based on FreeTTS, in various
stages of development, and I am uncertain about which one will become
a de facto standard. Also, I have not heard any reports on any of the
TTS projects with respect to how well things work on an actual phone
(T-Mobile G1). So I cannot advise you. Near the bottom of my web page
http://www.seeingwithsound.com/android.htm I have listed the Android
TTS projects that I am aware of.

Regards

On Nov 21, 7:53 am, "Pulkit Arora" <[EMAIL PROTECTED]> wrote:
> Hi blindfold,have you implemented your TTS in the emulator, i am in a middle
> of a project, and i am in urgent need of a TTS system in Android ( Emulator
> will also do, as of now ). The project by Alvaro need a server, can you
> please suggest me a place where i can get a native-like TTS app 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Base Adapter View and OnClick Lister

2008-11-21 Thread alexdonnini

Hello,

You need to post all of the code in question.

Alex Donnini

On Nov 21, 2:24 am, "for android" <[EMAIL PROTECTED]> wrote:
> I have extended a BaseAdapter for a listView.
>
> The List View is on the lines of ListAdapter Collapsed ,but instead of the
> dialogue box i have a seek bar(which gets enabled and disabled)On the
> trigger of the expansion.There is an imagebutton widget which changes to
> play/pause.
>
> On the onClicklistern of the imageButtons(I change the image),I observe that
> the getView of the Adapter gets called again??(Whats the reason for this)
>
> Also in the list what i am observing is that  only the first row of the
> list, i see that the play button changes to pause.(i am using the Image
> Button).The rest of the rows donot change to the play/pause of the image
> button though the media player changes from play to pause and vice versa.  i
> am surprised because there no where in my code there is hardcoding,the
> action are based on the positions.But only the first row is behaving the way
> i want,what could be the pssible reason..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] problem in implementing Http 4 classes for sdk1.0

2008-11-21 Thread suchita bhardwaj
Hey all,
 Can u tell what mehod can be used as a replacement for
getMethod.getResponseBodyAsStream() in line
parser.parse(getMethod.getResponseBodyAsStream(), myContentHandler);
I am not getting parsed file in proper format.
Here is my code:

package com.parsing;

import org.apache.*;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import java.io.*;
import org.apache.http.HttpResponse;
import org.apache.http.client.*;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import java.util.ArrayList;
import org.apache.http.HttpEntity;
public class connectionHandler{

private HttpClient client=null;
private HttpResponse response ;

private HttpGet getMethod=null;
private int statusCode;
private String contents=null;
private MyContentHandler myContentHandler = null;
private SAXParser parser=null;
HttpEntity entity=null;

public static String str_err;


public void getRequest(String reqName,String url){

try {

  client = new DefaultHttpClient();
  myContentHandler = new MyContentHandler();
  //client.setTimeout(8000);

  getMethod = new HttpGet(url);

 response = client.execute(getMethod);
 System.out.println(response.getStatusLine());
 Http getMethod.getParams();

 entity = response.getEntity();

 if (entity != null)
 {
InputStream instream = entity.getContent();

parser = SAXParserFactory.newInstance().newSAXParser();
 parser.parse(instream, myContentHandler);


  }

 else
 {System.out.println("error");}

 }
   catch(Exception e)
   {
   System.out.print(e.getMessage());
   }
}

}

//  parser.parse(instream, myContentHandler); line is giving error at
runtime.

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



[android-developers] Marketplace html error - cannot administrate my downloads or create new applications. Will someone in google please read !

2008-11-21 Thread Richard Green

Hi there. There is an error in the javascript being generated on my
marketplace page that effectively renders the page useless for me. I
can no longer view the programs that I have uploaded, nor can I upload
any others. The bug is in the code that generates the js files -

Error: invalid XML tag syntax

Source File: 
http://market.android.com/publish/gwt/C1EC4AF9F1B1A6AEDEDB919B4E67D008.cache.html
Line: 207, Column: 39
Source Code:
function fT(a){if(a<=30){return 1

[android-developers] Re: Is there a hook to run code on device shutdown (power off)?

2008-11-21 Thread Eric Mill

Dianne, do you think this will be added to the API in the future?
Saving state on phone shutdown could be important for some apps.

-- Eric

On Nov 20, 9:12 pm, Jon Colverson <[EMAIL PROTECTED]> wrote:
> Eek. That makes things a bit more difficult. Thank you for the quick
> response, though!
>
> On Nov 20, 9:55 pm, "Dianne Hackborn" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Sorry, there is nothing available to find out when the device is being
> > turned off.
>
> > On Thu, Nov 20, 2008 at 5:37 AM, Jon Colverson <[EMAIL PROTECTED]> wrote:
>
> > > Hello.
>
> > > Part of the app I'm writing is a Service that does some work. If it
> > > hasn't finished when the user switches the device off I'd like to be
> > > able to save my state to a file and then restart the Service when the
> > > device starts up again.
>
> > > I can see how to start it up again (receive the ACTION_BOOT_COMPLETED
> > > Intent), but I can't figure out a way to run the saving code on
> > > shutdown. I was expecting my Service's onDestroy() to be called, but
> > > this doesn't seem to be the case.
>
> > > Thanks.
>
> > > --
> > > Jon
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > [EMAIL PROTECTED]
>
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support.  All such questions should be posted on public
> > forums, where I and others can see and answer them.
>
> --
> Jon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is there a hook to run code on device shutdown (power off)?

2008-11-21 Thread Dorn Hetzel

And at least with respect to the current hardware instance (G1) is any
inability a hardware, firmware, or software limitation?

On Fri, Nov 21, 2008 at 9:39 AM, Eric Mill <[EMAIL PROTECTED]> wrote:
>
> Dianne, do you think this will be added to the API in the future?
> Saving state on phone shutdown could be important for some apps.
>
> -- Eric
>
> On Nov 20, 9:12 pm, Jon Colverson <[EMAIL PROTECTED]> wrote:
>> Eek. That makes things a bit more difficult. Thank you for the quick
>> response, though!
>>
>> On Nov 20, 9:55 pm, "Dianne Hackborn" <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> > Sorry, there is nothing available to find out when the device is being
>> > turned off.
>>
>> > On Thu, Nov 20, 2008 at 5:37 AM, Jon Colverson <[EMAIL PROTECTED]> wrote:
>>
>> > > Hello.
>>
>> > > Part of the app I'm writing is a Service that does some work. If it
>> > > hasn't finished when the user switches the device off I'd like to be
>> > > able to save my state to a file and then restart the Service when the
>> > > device starts up again.
>>
>> > > I can see how to start it up again (receive the ACTION_BOOT_COMPLETED
>> > > Intent), but I can't figure out a way to run the saving code on
>> > > shutdown. I was expecting my Service's onDestroy() to be called, but
>> > > this doesn't seem to be the case.
>>
>> > > Thanks.
>>
>> > > --
>> > > Jon
>>
>> > --
>> > Dianne Hackborn
>> > Android framework engineer
>> > [EMAIL PROTECTED]
>>
>> > Note: please don't send private questions to me, as I don't have time to
>> > provide private support.  All such questions should be posted on public
>> > forums, where I and others can see and answer them.
>>
>> --
>> Jon
> >
>

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



[android-developers] Re: ViewFlipper onFlipListener

2008-11-21 Thread loty

Ok, I guess I misunderstood. Well you can use Timer object to initiate
your flips instead of doing setFlipInterval and startFlipping. This
way you can do whatever you want before and after each flip.

On Nov 21, 7:40 am, Ngewi <[EMAIL PROTECTED]> wrote:
> Yes, ViewFlipper can flip on its own. When you call setFlipInterval
> (int timeInMs)  and then call startFlipping() the flipper will switch
> the views every timeInMs millisecs.
> I can handle the flips that I trigger manually, but I want to also
> handle them when they are automatic.
> There is the possibility of using a Timer object and scheduling a
> TimerTask to run every timeInMs, but this does not provide accuracy.
> i.e. I do not have a guarantee that the timing is synchronized, so I
> cannot achieve the goal of performing an action just before showing
> the next view.
> I was just wondering if there is a better way to do this.
>
> Thanks for your response.
>
> On Nov 20, 7:30 pm,loty<[EMAIL PROTECTED]> wrote:
>
> > I don't understand it - you tell ViewFlipper to flip views, it doesn't
> > flip anything on it's own. So why can't you keep track of your views
> > in the event handler that initiates your flips?
>
> > On Nov 20, 4:38 am, Ngewi <[EMAIL PROTECTED]> wrote:
>
> > > Hi everyone,
> > > I am using the ViewFlipper class with automatic flipping through
> > > views. Is there a way to get notified or register a listener to be
> > > called each time just before a new child view is displayed. (i.e with
> > > automatic flipping ). So far I have not seen any listeners in the
> > > documentation for this purpose.
>
> > > I would also like to use this to check, each time a view is loaded, if
> > > it is the last and return to the calling activity instead wrapping
> > > around to start from the beginning of the ViewFlipper child views.
>
> > > If someone has any bright ideas please share.
>
> > > 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Getting images off the network, via a cache

2008-11-21 Thread David Given

I have an app that's going to want to display quite a lot of thumbnail
images, downloaded off the network. These are eventually going to be
used as Drawables. As I'm going to be referring to them quite often,
from one run of the app to the next, I want to cache them.

What I've currently got is quite a lot of complex code that keeps an
in-memory cache where I can ask for an image by URL, and then I'll get
called back asynchronously when it's arrived and the Drawable is ready
for use; I can then add this to my UI, replacing the placeholder
thumbnail via a nice transition. It's all painful and fiddly.

Given that this is the sort of thing that people are likely to want to
do, are there any system services that will do it all for me, so I can
throw away all my custom code?

-- 
David Given
[EMAIL PROTECTED]

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



[android-developers] Re: Text-To-Speech

2008-11-21 Thread Pulkit Arora
Heya,Ya i had already seen that long back.. thanks.. I myself had been
hunting (and perhaps waiting) for a robust TTS app for Android, i hope it
comes out soon, coz i believe google employees are also working on it and we
can expect it from them soon..
Lets hope for the best.

On Fri, Nov 21, 2008 at 7:01 PM, blindfold <[EMAIL PROTECTED]>wrote:

>
> Hi Pulkit,
>
> I have not implemented any TTS. As an intermediate solution I just use
> a partially self-voicing approach with built-in speech samples. I can
> afford to wait a bit longer until the TTS dust settles. Right now
> there are several Android TTS projects based on FreeTTS, in various
> stages of development, and I am uncertain about which one will become
> a de facto standard. Also, I have not heard any reports on any of the
> TTS projects with respect to how well things work on an actual phone
> (T-Mobile G1). So I cannot advise you. Near the bottom of my web page
> http://www.seeingwithsound.com/android.htm I have listed the Android
> TTS projects that I am aware of.
>
> Regards
>
> On Nov 21, 7:53 am, "Pulkit Arora" <[EMAIL PROTECTED]> wrote:
> > Hi blindfold,have you implemented your TTS in the emulator, i am in a
> middle
> > of a project, and i am in urgent need of a TTS system in Android (
> Emulator
> > will also do, as of now ). The project by Alvaro need a server, can you
> > please suggest me a place where i can get a native-like TTS app code..
>
> >
>


-- 
Pulkit Arora

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



[android-developers] Re: Possibility of changing the graphic used for a radio button?

2008-11-21 Thread [EMAIL PROTECTED]

I solved this one myself:

There's a property that radiobuttons have called button, this can
contain a reference to a drawable.

On Nov 20, 10:09 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm wondering if it is possible to replace the image used for the
> option buttons to something else. I'm not worried if it's just a
> permanent image (with no indication if the option button is checked or
> not).
>
> Basically I want 6 images with the same behaviour as a radiogroup (if
> you click the same one twice nothing happens, but if you select a
> different one you get a checkchanged event).
>
> Thanks.
>
> Redders.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Using WiFi Manager

2008-11-21 Thread Anirudha Shinde

hello,

I am trying to use following:

WifiManager wm = (WifiManager) getSystemService
(Context.WIFI_SERVICE);

but whenever i use following it throws an error

wm.setWifiEnabled(true);

at the same time
wm.isWiFiEnabled() returns false.

I have added  for accessing wifi state into manifest
file.

Can i use wifi of underlying machine using emulator as emulator dont
have dedicated wifi adapter?

if yes, it is possible use underlying systems wifi adapter through
emulator, can you tell me how to do it?
I want to obtain IP address in the emulator, assigned to wifi adapter
assigned by dhcp server after i connect to Wifi AP.


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



[android-developers] How to insure the singed file is correct?

2008-11-21 Thread [EMAIL PROTECTED]

I upgraded my android app version, but user report me Error: "Package
file was not signed correctly".



keytool -genkey-keystore keys/androidrss.keystore -alias
androidrss.keystore -keyalg RSA -validity 1
   keytool -genkey -v -keystore keys/androidrss.keystore -alias
androidrss.keystore -keyalg RSA -validity 1

jarsigner -verbose -keystore keys/androidrss.keystore -signedjar
androidrss_signed.apk androidrss.apk androidrss.keystore

I retry this twice, but not fix this problem. can you help me asap?

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



[android-developers] Re: question about build android

2008-11-21 Thread [EMAIL PROTECTED]

Hi,

I've also run into this issue. Did you find the solution?

Br.
Roman

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



[android-developers] How to debug web browser project on eclipse platform single?

2008-11-21 Thread Steven

After import browser project to eclipse(windows version), I found lots
of error.
I tried to add external JARS to project(come from lib directory), some
errors were modified, by also has a lot.

Any suggestion and clue will be welcome.

Thanks in advance !

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



[android-developers] Re: Unable to Run sample App

2008-11-21 Thread Ken

Wait for a while until the emulator settle-down? It takes a while for
Android emulator to load.

If this doesn't work, try to set a breakpoint in your debugger to see
what happened.

On Nov 19, 3:29 am, Neel <[EMAIL PROTECTED]> wrote:
> Hi,
> I tried running the sample, Hello Android, app given on Android's
> site.
> I didn't work for me. It shows me an emulator with Android written on
> it.
> Means, my code doesnt get executed.
>
> The code is same as on the site...
>
> package com.android.hello;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.widget.TextView;
>
> public class HelloAndroid extends Activity {
>/** Called when the activity is first created. */
>@Override
>public void onCreate(Bundle savedInstanceState) {
>super.onCreate(savedInstanceState);
>TextView tv = new TextView(this);
>tv.setText("Hello, Android");
>setContentView(tv);
>}
>
> }
>
> Do I need to make any changes in this?
>
> 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Receiving SMS Messages in 1.0?

2008-11-21 Thread Mihai

  Thanks for the code example, I tried and it worked just fine.
However, I would like to know if in version 1.0 there are other ways
of reacting to an SMS and parsing its data, it seems to me a little
bit weird that there is no high level way to do this.

Have fun,
Mihai

On Sep 24, 12:21 pm, Cristina <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I do not know if it is the right way, but I have found a way to get
> the message.
> Here I include my code to get the SmsMessages. I hope it helps you
>
> public class ServerMessagesReceiver extends BroadcastReceiver {
>
>     static final String ACTION =
> "android.provider.Telephony.SMS_RECEIVED";
>
>     public void onReceive(Context context, Intent intent) {
>         if (intent.getAction().equals(ACTION)) {
>                  StringBuilder buf = new StringBuilder();
>                  Bundle bundle = intent.getExtras();
>                  if (bundle != null) {
>                          Object[] pdusObj = (Object[]) bundle.get("pdus");
>                          SmsMessage[] messages = new 
> SmsMessage[pdusObj.length];
>                          for (int i = 0; i                                  messages[i] = SmsMessage.createFromPdu 
> ((byte[]) pdusObj[i]);
>                          }
> 
> 
> ...
>
> By the way, Does somebody know how to receive anSMSthat has been
> sent using
> an application port using the methos.sendDataMessage?
>
> On 24 sep, 08:15, Reto Meier <[EMAIL PROTECTED]> wrote:
>
> > Is it still possible to listen for incomingSMSmessages in the latest
> > 1.0 SDK release?
>
> > The SMS_RECEIVED_ACTION string used to listen for incomingSMS
> > messages seems to have gone missing. It used to be available from the
> > android.provider.Telephony.Smspackage, which also seems to have
> > disappeared, so getMessagesFromIntent has gone too.
>
> > Previously, you could create a Broadcast Receiver to listen forSMS
> > messages using this code:
>
> >   String incoming_SMS =
> > android.provider.Telephony.Sms.Intents.SMS_RECEIVED_ACTION;
>
> >   public void onReceive(Context _context, Intent _intent) {
>
> >     if (_intent.getAction().equals(incoming_SMS)) {
> >       SmsManagersms= SmsManager.getDefault();
> >       SmsMessage[] messages =
> >Sms.Intents.getMessagesFromIntent(_intent);
> >     }
>
> > Is there still a way to do this?
>
> > Thanks
> > Reto

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



[android-developers] Re: Need help using hat to track down memory usage

2008-11-21 Thread Riaz Rahaman
I am facing a similar problem.  As per the instruction on monkey usage I 
generate the profiling data using --hprof option passed to monkey.

There are a few files generated in the /data/misc folder. As per the 
instructions on http://code.google.com/android/reference/monkey.html I 
tried opening the files using traceview and also  dmtracedump but I am 
getting the below errors.

->dmtracedump heap-dump-tm1227259382-pid51.hprof
ERROR: not at start of version (found ' ')
Cannot read trace.

->dmtracedump heap-dump-tm1227259382-pid51.hprof-head
ERROR: not at start of version (found 'JAVA PROFI')
Cannot read trace.

->traceview heap-dump-tm1227259382-pid51.hprof
Exception in thread "main" java.lang.NumberFormatException: For input 
string: "  [EMAIL PROTECTED] C7?XC; @@  ?@ z(@ @ ??@ .?@ 8?@ ??@ Q`@ 
?@ g?@ U?@ 0?@ [EMAIL PROTECTED] p@ ?H@ SP@ Q@  @ ?@ ?h@ ??@ J?@
  
??@ Y?@ [EMAIL PROTECTED], CA??@ [EMAIL PROTECTED]@?@@ ??@ U @ ?8@ =`CF?X@ 
[EMAIL PROTECTED]@  ??@ ??@ ??@ i8@ ??@ X`@ wP@ "xCF?@ ?h@  [EMAIL 
PROTECTED]@ ?pC6?@  8U @ ??@  x@"
at 
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.valueOf(Integer.java:526)
at java.lang.Integer.decode(Integer.java:918)
at 
com.google.traceview.DmTraceReader.parseKeys(DmTraceReader.java:359)
at 
com.google.traceview.DmTraceReader.generateTrees(DmTraceReader.java:77)
at com.google.traceview.DmTraceReader.(DmTraceReader.java:71)
at com.google.traceview.MainWindow.main(MainWindow.java:187)


->traceview heap-dump-tm1227259382-pid51.hprof-head
Exception in thread "main" java.lang.NumberFormatException: For input 
string: "JAVA PROFILE 1.0.3   ?\   !&??id_aa_signatureTimeStampToken*s?STOP 
 &??message  &��KEY_CIPHER  $� 
A??M???°???_??U???I?  )��?B???S?°?I??T???/ 
(�8??±.??....A???P???E  
'�(?CM???T???C??I 

 
( ??I???S?  '� °±E?±?L??±??"
?? 
.???±.N?F?E.°??IS±(N?F?E.:48)
?? .???±.I???±??.?I??(I???±??.:447)
?? .???±.I???±??.?O°(I???±??.:526)
?? .???±.I???±??.??(I???±??.:918)
?? 
???.±??±??.?.D?TR?.?K???(D?TR?.:359)
?? 
???.±??±??.?.D?TR?.±???T(D?TR?.:77)
?? ???.±??±??.?.D?TR?.(D?TR?.:71)
?? ???.±??±??.?.M???W?.(M???W?.:187)


Have also tried using hat

->hat heap-dump-tm1227259382-pid51.hprof
Started HTTP server on port 7000
Reading from heap-dump-tm1227259382-pid51.hprof...
java.io.IOException: Unrecognized magic number: 469762048
at hat.parser.Reader.readFile(Reader.java:99)
at hat.Main.main(Main.java:149)

->hat heap-dump-tm1227259382-pid51.hprof-head
Started HTTP server on port 7000
Reading from heap-dump-tm1227259382-pid51.hprof-head...
java.io.IOException: Version string not recognized at byte 17
at hat.parser.HprofReader.readVersionHeader(HprofReader.java:325)
at hat.parser.HprofReader.read(HprofReader.java:169)
at hat.parser.Reader.readFile(Reader.java:90)
at hat.Main.main(Main.java:149)

Whatz the use case of --hprof option to monkey when there isn't any tool 
available to dump the data?

- Riaz


fadden wrote:
> On Nov 20, 9:48 am, qvark <[EMAIL PROTECTED]> wrote:
>   
>> If the output is not compatible with a standard hprof format, could
>> somebody at Google point out the differences and the motivations for
>> them? With such advice we could try to adapt a tool or make the format
>> compatible with the existing ones...
>> 
>
> In the git sources, see dalvik/vm/hprof/Hprof.h and the list of tags
> commented "Android".
>
> >
>   


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



[android-developers] REPOST: ListView selection highlight size

2008-11-21 Thread Andriy Zakharchuk

Hello all,

I'm trying to create a list view with small list item views (smth
similar to ListView we had in m3_rc37 version of SDK). Yes, I know
they are not usable for finger touch mode, however I still want to
have it.

SDK 1.0_r1 samples contain Views/Lists/6. ListAdapter Collapsed
screen. I don't need collapsed lists, but that sample displays the
problem I have.

If you look at that list you'll find small list item views, and about
twice larger (higher) orange selection highlight box. Is there any way
to make selection highlight have the same height as list item views
have?

Thank you in advance.

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



[android-developers] Re: use dependencies

2008-11-21 Thread Tom

Same question for me.  What is the suggested mechanism to get to the
MultipartEntity class?


On Oct 24, 10:12 am, jphdsn <[EMAIL PROTECTED]> wrote:
> Anyone knows how to use dependencies in Android.
>
> I need to
>
> import org.apache.http.entity.mime.MultipartEntity;
> import org.apache.http.entity.mime.content.FileBody;
>
> but I don't know how import classes that are not in Android.
>
> thank's

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



[android-developers] PLUGIN Eclipse

2008-11-21 Thread [EMAIL PROTECTED]

L'URL per scaricare i plugin di eclipse non funziona

come posso settare Eclipse???

GRAZIE


The URL of Eclipse plugin's is not aviable.

how can I set the Eclipse IDE's???

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



[android-developers] PLUGIN Eclipse

2008-11-21 Thread [EMAIL PROTECTED]

The URL of Eclipse plugin's is not aviable.

how can I set the Eclipse IDE's???

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



[android-developers] Re: map view problem

2008-11-21 Thread Boris Malenšek

I have the same problem but can not solve it.
My background should be Map but it is some kind of white-gray stupid
picture.
In left-bottom corner is Google sign, so it means that shomhow it
works but not well.
I have double-checked my apiKey for registering my application and it
is correct.

Any1?

On Oct 29, 12:49 pm, sami <[EMAIL PROTECTED]> wrote:
> Hi ,
>
> I got mapview 3days before ,but from yesterday i am getting grid
> instead of mapview.i got solution from our goups also but its still
> not working .please help me.DATA_Preferences,DATA_Tileswas not
> created automatically .i pushed those files manually also.please help
> me .i am struggling ...

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



[android-developers] ListView selection highlight size

2008-11-21 Thread Andriy Zakharchuk

Hello all,

I'd like to create a list with small list items (like it was in
m3_rc37). Yes, I know this is not compatible with touch mode, but I'd
like to have this anyway :)

In the 1.0_r1 samples I see ListAdapter Collapsed example. I don't
need collapsed items, but I refer to it since it displays the problem.
When all items are collapsed, it looks exactly as the list I created.
List item views are small (size I need), but orange selection box is
about twice larger (higher).

Is there any way to make highlight box smaller, the same size as list
view item is (like it was in m3_rc37)?

Thank you in advance.

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



[android-developers] Android and bluetooth

2008-11-21 Thread developer
Hi

I have just started developing a new android app which needs to access 
bluetooth. But I came to know that android 1.0 doesnt support bluetooth, and 
has no API.
is it? is there any other way to use bluetooth? 

Its really surprising me that android has no support for bluetooth,and 
developers will not be able to develope apps which uses bluetooth.



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



[android-developers] P2P Conference invitation

2008-11-21 Thread Bogomil "Bogo" Shopov

Hi guys,
If anyone form you are interested in a talk about Android for a
conference in Bulgaria, please let me know or learn more here:
http://wtconferences.com/?page_id=85

Bogo

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



[android-developers] Re: PLUGIN Eclipse

2008-11-21 Thread Jun'ichi Hirayama
really ? I tested to download ADT(Eclipse plugin) from URL  just now.not
problems.

what type of message is displayed  ?

On Sat, Nov 22, 2008 at 12:10 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>wrote:

>
> The URL of Eclipse plugin's is not aviable.
>
> how can I set the Eclipse IDE's???
>
> >
>

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



[android-developers] Re: map view problem

2008-11-21 Thread Mark Murphy

Boris Malenšek wrote:
> I have the same problem but can not solve it.
> My background should be Map but it is some kind of white-gray stupid
> picture.
> In left-bottom corner is Google sign, so it means that shomhow it
> works but not well.
> I have double-checked my apiKey for registering my application and it
> is correct.

Do you have the INTERNET permission in your AndroidManifest.xml file?

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.4 Published!

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



[android-developers] Re: ListView selection highlight size

2008-11-21 Thread Mark Murphy

Andriy Zakharchuk wrote:
> Is there any way to make highlight box smaller, the same size as list
> view item is (like it was in m3_rc37)?

There may be a theme or style that handles this, but you can always 
create your own layout for the adapter to use, and you can control the 
height that way.

Either pass in the ID to your custom layout in the adapter constructor 
or subclass the adapter, override getView(), and inflate/construct the 
rows yourself (search http://androidguys.com for "Fancy ListViews" for a 
series of blog posts on this technique).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.4 Published!

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



[android-developers] Re: Android and bluetooth

2008-11-21 Thread Mark Murphy

developer wrote:
> Its really surprising me that android has no support for bluetooth

Android has support for Bluetooth. Android does not have APIs for 
developers to use Bluetooth at this time.

http://android-developers.blogspot.com/2008/08/some-information-on-apis-removed-in.html

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

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

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



[android-developers] What are the possible way to work on database?

2008-11-21 Thread dilu

Hi,
I have a question in my mind that what are the possible way to work on
databse?
My means, can we create the database in our main file only through
code? OR first create the database using Sqlite manager and then
integrate it to the code.If second option, we can use then it will be
little bit easy comparing to the first method.If second method works
in android then can anyone provide me a sample code for this?
I will be highly obliged for this.
Thanks
Dilu.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Netbeans

2008-11-21 Thread Peter Stevenson

Peter wrote
Work well
I using Netbeans 6,5

Thustle wrote:
> I've not tried it yet...
>
> http://kenai.com/projects/nbandroid/pages/Install
>
> On 20 Nov, 14:08, moa <[EMAIL PROTECTED]> wrote:
>   
>> Does anyone know what the current state is for development with the
>> netbeans ide?
>> 
> >
>
>   


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



[android-developers] Re: ListView selection highlight size

2008-11-21 Thread Andriy Zakharchuk

Thank you for answering.

The problem is not with list item view itself. I do everything you are
talking about: I created my custom adapter, which returns my custom
list item views, which extend LinearLayout and contain a number of
widgets inside. However with Adapter.new/getView() I can control only
view, however, adapter is not responsible for selection highlight box
painting.

If you look at the the sample I mentioned above, you'll see the same.
It uses its own adapter (SpeechListAdapter), its own list item view
(SpeechView), but highlight bar is approx. twice larger than list item
view.

I tried to use just a TextView as a list item view and played with
styles a little bit. When I used TextAppearance_Large or
TextAppearance_Medium style for, then highlight bar had exactly the
same height as list view item (TextView) did. But once I switched to
TextAppearance_Small - TextView got smaller, whereas selection
highlight bar did not.

So my question was about selected item highlight, not the list item
view.

BTW, thank you for links to nice Android resources.

On Nov 21, 8:00 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
> Andriy Zakharchuk wrote:
> > Is there any way to make highlight box smaller, the same size as list
> > view item is (like it was in m3_rc37)?
>
> There may be a theme or style that handles this, but you can always
> create your own layout for the adapter to use, and you can control the
> height that way.
>
> Either pass in the ID to your custom layout in the adapter constructor
> or subclass the adapter, override getView(), and inflate/construct the
> rows yourself (searchhttp://androidguys.comfor "Fancy ListViews" for a
> series of blog posts on this technique).
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 1.4 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ListView selection highlight size

2008-11-21 Thread Mark Murphy

Andriy Zakharchuk wrote:
> So my question was about selected item highlight, not the list item
> view.

Ah, terribly sorry.

Have you tried setting your own list selector via android:listSelector 
or setSelector(int)?

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

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

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



[android-developers] Issues: Webview.loadData() trying to load a string created from a read file(asset) and a string

2008-11-21 Thread polo777

Hi Everyone,

I want to display into a WebView the concatenation of a string and the
content of a file located in my asset.
With the code below, when I display the string in my log it looks
perfect but when I launch the activity I just get the following
message:  "Web page not available the web page at data:text/html;utf-8
and then the content of my string/page escaped... might be temporarly
down or it may have moved permanently ro a new web address".


InputStreamReader is = new 
InputStreamReader(getAssets().open
("header.html"));
//
BufferedReader buff = new BufferedReader(is);
//
StringBuffer out = new StringBuffer();
//
String strLine = null;
//
while ((strLine = buff.readLine()) != null)
{
out.append(strLine);
}
//
is.close();

String mimeType = "text/html";
String encoding = "utf-8";

String fin = new String(out.toString());

mWebView.loadData(fin, mimeType, encoding);


Does someone have a solution? That would be great.

Thanks a lot in advance.
polo


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



[android-developers] Re: missing javax audio?

2008-11-21 Thread Sriramv

What about the SoniVox audio APIs?
SoniVox (http://www.sonivoxrocks.com/google.html) is already in the
source tree under external libraries.
Can they be used to access sample-level audio streams at the moment?

On Nov 20, 8:29 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> We are committed to improved multimedia support, as I've made clear in
> other posts. You'll see some new features in the next major SDK
> release. We just don't think that javax is the best way to support
> audio.
>
> On Nov 20, 12:36 pm, blindfold <[EMAIL PROTECTED]> wrote:
>
> > Fair enough. Sorry (also to Ethan) for perhaps distracting a bit from
> > javax.sound even though Java ME supports much the same javax.sound
> > AudioInputStream functionality that Ethan was specifically inquiring
> > about. Glad to hear that our ideas match. It should help in getting
> > the actual work done.
>
> > Thanks
>
> > On Nov 20, 9:23 pm, Dan Bornstein <[EMAIL PROTECTED]> wrote:
>
> > > The original request was (and the subject line still is) specifically
> > > about functionality in javax.sound. I responded in that context. My
> > > later remarks were meant to frame the larger picture. Briefly put, we
> > > agree.
>
> > > -dan

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



[android-developers] How do I make sure one row ListView is always in focus

2008-11-21 Thread j

 myListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);

 works fine in non-touch mode.

However, I notice that when in touch mode, myListView does not show a
focused row (the orange row highlight).  How do I make it so that
there is always one row that has orange highlight?
myListView.setSelection did not do the trick.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Issues: Webview.loadData() trying to load a string created from a read file(asset) and a string

2008-11-21 Thread Mark Murphy

polo777 wrote:
> Does someone have a solution? That would be great.

Use loadDataWithBaseURL(), even if you have to pass in a fake URL.

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

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

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



[android-developers] Re: How do I make sure one row ListView is always in focus

2008-11-21 Thread Romain Guy

You can't. That's the purpose of the choice mode.

On Fri, Nov 21, 2008 at 11:35 AM, j <[EMAIL PROTECTED]> wrote:
>
>  myListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
>
>  works fine in non-touch mode.
>
> However, I notice that when in touch mode, myListView does not show a
> focused row (the orange row highlight).  How do I make it so that
> there is always one row that has orange highlight?
> myListView.setSelection did not do the trick.
> >
>



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



[android-developers] Re: How do I make sure one row ListView is always in focus

2008-11-21 Thread Romain Guy

I mean, the purpose of the choice mode is to let the user have a
persistent selection. He needs to touch the item or click it with the
trackball.

You cannot keep the highlight.

On Fri, Nov 21, 2008 at 11:43 AM, Romain Guy <[EMAIL PROTECTED]> wrote:
> You can't. That's the purpose of the choice mode.
>
> On Fri, Nov 21, 2008 at 11:35 AM, j <[EMAIL PROTECTED]> wrote:
>>
>>  myListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
>>
>>  works fine in non-touch mode.
>>
>> However, I notice that when in touch mode, myListView does not show a
>> focused row (the orange row highlight).  How do I make it so that
>> there is always one row that has orange highlight?
>> myListView.setSelection did not do the trick.
>> >>
>>
>
>
>
> --
> Romain Guy
> www.curious-creature.org
>



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



[android-developers] Re: What are the possible way to work on database?

2008-11-21 Thread atrus123

Hello Dilu,

Have you gone through the Android Notepad tutorial yet?  There is a
lot of database stuff in there with examples that fit what you're
asking.

J.

On Nov 21, 1:21 pm, dilu <[EMAIL PROTECTED]> wrote:
> Hi,
> I have a question in my mind that what are the possible way to work on
> databse?
> My means, can we create the database in our main file only through
> code? OR first create the database using Sqlite manager and then
> integrate it to the code.If second option, we can use then it will be
> little bit easy comparing to the first method.If second method works
> in android then can anyone provide me a sample code for this?
> I will be highly obliged for this.
> Thanks
> Dilu.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to insure the singed file is correct?

2008-11-21 Thread atrus123

Hello,

If you try and install a signed package on top of a pre-existing
unsigned package, you will get this error.  To resolve, uninstall the
currently existing package from the G1.

Sometimes if an install has previously failed, you may have to
reinstall the unsigned package and then uninstall in order to remove
any left-over files (databases, etc.)

Hope this helps,

J.

On Nov 21, 11:36 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I upgraded my android app version, but user report me Error: "Package
> file was not signed correctly".
>
> keytool -genkey    -keystore keys/androidrss.keystore -alias
> androidrss.keystore -keyalg RSA -validity 1
>    keytool -genkey -v -keystore keys/androidrss.keystore -alias
> androidrss.keystore -keyalg RSA -validity 1
>
> jarsigner -verbose -keystore keys/androidrss.keystore -signedjar
> androidrss_signed.apk androidrss.apk androidrss.keystore
>
> I retry this twice, but not fix this problem. can you help me asap?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Issues: Webview.loadData() trying to load a string created from a read file(asset) and a string

2008-11-21 Thread polo777

Thanks a lot of Mark.

This workaround did the trick.

 String mimeType = "text/html";
 String encoding = "utf-8";
 mWebView.loadDataWithBaseURL("fake://fake.com", out.toString(),
mimeType, encoding, null);

Regards,
Polo


On Nov 21, 11:42 am, Mark Murphy <[EMAIL PROTECTED]> wrote:
> polo777 wrote:
> > Does someone have a solution? That would be great.
>
> Use loadDataWithBaseURL(), even if you have to pass in a fake URL.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Service processing restrictions on main thread

2008-11-21 Thread sandy8531

I have a service which I start off in a separate process from the
application using "process:myname" tag.

Do I need to be careful to take longish running method calls out of
the main thread, even when the service is in its own process ? I do
some initialization during onCreate/onStart that could take a few
seconds.  I would like to understand what is the implication of
leaving these calls here, or should I take these calls off on to a
separate thread.



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



[android-developers] Re: Service processing restrictions on main thread

2008-11-21 Thread Dianne Hackborn
Yes, whatever process you are in, the main thread needs to be kept
responsive.

Also, for what it's worth, I would recommend against running things in
separate processes unless there is a really strong direct reason to do so.
Our current baseline overhead for a process is unfortunately about 2mb, so a
process is an extremely heavy-weight entity.

On Fri, Nov 21, 2008 at 1:33 PM, sandy8531 <[EMAIL PROTECTED]> wrote:

>
> I have a service which I start off in a separate process from the
> application using "process:myname" tag.
>
> Do I need to be careful to take longish running method calls out of
> the main thread, even when the service is in its own process ? I do
> some initialization during onCreate/onStart that could take a few
> seconds.  I would like to understand what is the implication of
> leaving these calls here, or should I take these calls off on to a
> separate thread.
>
>
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

Note: please don't send private questions to me, as I don't have time to
provide private support.  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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to set the 'singleActivityMode' flag for an activity group's constructor?

2008-11-21 Thread Cheryl Sedota

How can I set the 'singleActivityMode' flag for an activity group's
constructor?

http://code.google.com/android/reference/android/app/ActivityGroup.html#ActivityGroup(boolean)

The problem I am encountering is that although my activity group's
onResume/onPause methods are getting called, the onResume/onPause
methods of each of the activities started by the activity group's
local activity manager are not getting called.  I looked at the source
code for LocalActivityManager's dispatchPause() and dispatchResume()
APIs and I see that when this 'singleActivityMode' flag is
'true' (which is the default), the underlying activities' onPause/
onResume lifecycle events don't get called.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: missing javax audio?

2008-11-21 Thread Dianne Hackborn
On Thu, Nov 20, 2008 at 12:16 PM, blindfold <[EMAIL PROTECTED]>wrote:

> > When Dianne said...
> > > Contributing patches would be a much more effective approach than a
> petition.
> > ...the specific patches she presumably meant would be patches to make
> > this as-yet incomplete code into a stable, usable, library.
> My concern is that at its lowest level javax.sound too is mostly
> hampered by Android MediaPlayer being a "more or less stand-alone and
> closed-source native application" that communicates with Android
> through a too limited set of methods and data structures (e.g.,
> files).


As far as I know, there is nothing related to any of the issues being
discussed that is at this point closed source.  The media player application
source is available; the framework's implementation of MediaPlayer (this is
part of the framework, not an application) is certainly all open sourced;
and the low-level native PV libraries are all available as source.

You can, today, go and download the android open-source project, and
starting modifying PV and the framework to support streaming.  That was all
that I was trying to point out when saying people can submit patches: this
discussion seems to be rooted on the view that "google is the only one who
can help us," when this is no longer the case and anyone can contribute.  So
if there is some specific feature you absolutely need, in some cases it may
be a good use of time to just go and add it instead of asking for others to
do so.

That all said, I am not that familiar with the media stuff, but as David has
said the things being asked for here are already well known limitations that
effort is being put in to addressing.  By and large, all of the thingsbeing
asked for aren't missing because they weren't deemed important, but simply
because doing them is not trivial and will take significant effort to
accomplish.  As such, continual requests to have them added is not going to
make that happen any faster. :)

-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

Note: please don't send private questions to me, as I don't have time to
provide private support.  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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to set the 'singleActivityMode' flag for an activity group's constructor?

2008-11-21 Thread Dianne Hackborn
This can't be changed dynamically after the
ActivityGroup/LocalActivityManager is created.

On Fri, Nov 21, 2008 at 2:17 PM, Cheryl Sedota <[EMAIL PROTECTED]>wrote:

>
> How can I set the 'singleActivityMode' flag for an activity group's
> constructor?
>
>
> http://code.google.com/android/reference/android/app/ActivityGroup.html#ActivityGroup(boolean)
>
> The problem I am encountering is that although my activity group's
> onResume/onPause methods are getting called, the onResume/onPause
> methods of each of the activities started by the activity group's
> local activity manager are not getting called.  I looked at the source
> code for LocalActivityManager's dispatchPause() and dispatchResume()
> APIs and I see that when this 'singleActivityMode' flag is
> 'true' (which is the default), the underlying activities' onPause/
> onResume lifecycle events don't get called.
> >
>


-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

Note: please don't send private questions to me, as I don't have time to
provide private support.  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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: san disk

2008-11-21 Thread Michael

San disk?

If you're referring to the SD card... there are already APIs to access
files on the SD card, these are standard Java file IO libraries.  What
is it that you're trying to do?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to set the 'singleActivityMode' flag for an activity group's constructor?

2008-11-21 Thread Cheryl Sedota

Is there any XML attribute I can set in the android manifest when
declaring the activity group by any chance? :)

On Nov 21, 4:22 pm, "Dianne Hackborn" <[EMAIL PROTECTED]> wrote:
> This can't be changed dynamically after the
> ActivityGroup/LocalActivityManager is created.
>
> On Fri, Nov 21, 2008 at 2:17 PM, Cheryl Sedota <[EMAIL PROTECTED]>wrote:
>
>
>
>
>
> > How can I set the 'singleActivityMode' flag for an activity group's
> > constructor?
>
> >http://code.google.com/android/reference/android/app/ActivityGroup.ht...)
>
> > The problem I am encountering is that although my activity group's
> > onResume/onPause methods are getting called, the onResume/onPause
> > methods of each of the activities started by the activity group's
> > local activity manager are not getting called.  I looked at the source
> > code for LocalActivityManager's dispatchPause() and dispatchResume()
> > APIs and I see that when this 'singleActivityMode' flag is
> > 'true' (which is the default), the underlying activities' onPause/
> > onResume lifecycle events don't get called.
>
> --
> Dianne Hackborn
> Android framework engineer
> [EMAIL PROTECTED]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is there a hook to run code on device shutdown (power off)?

2008-11-21 Thread Dianne Hackborn
It's something not implemented in the software.  Users seem to have a
disturbing habit of just pulling the battery out as a way to turn off their
phone, so I'm not sure how much I would want to rely on a clean shutdown. :}

On Fri, Nov 21, 2008 at 7:52 AM, Dorn Hetzel <[EMAIL PROTECTED]> wrote:

>
> And at least with respect to the current hardware instance (G1) is any
> inability a hardware, firmware, or software limitation?
>
> On Fri, Nov 21, 2008 at 9:39 AM, Eric Mill <[EMAIL PROTECTED]> wrote:
> >
> > Dianne, do you think this will be added to the API in the future?
> > Saving state on phone shutdown could be important for some apps.
> >
> > -- Eric
> >
> > On Nov 20, 9:12 pm, Jon Colverson <[EMAIL PROTECTED]> wrote:
> >> Eek. That makes things a bit more difficult. Thank you for the quick
> >> response, though!
> >>
> >> On Nov 20, 9:55 pm, "Dianne Hackborn" <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >>
> >> > Sorry, there is nothing available to find out when the device is being
> >> > turned off.
> >>
> >> > On Thu, Nov 20, 2008 at 5:37 AM, Jon Colverson <[EMAIL PROTECTED]>
> wrote:
> >>
> >> > > Hello.
> >>
> >> > > Part of the app I'm writing is a Service that does some work. If it
> >> > > hasn't finished when the user switches the device off I'd like to be
> >> > > able to save my state to a file and then restart the Service when
> the
> >> > > device starts up again.
> >>
> >> > > I can see how to start it up again (receive the
> ACTION_BOOT_COMPLETED
> >> > > Intent), but I can't figure out a way to run the saving code on
> >> > > shutdown. I was expecting my Service's onDestroy() to be called, but
> >> > > this doesn't seem to be the case.
> >>
> >> > > Thanks.
> >>
> >> > > --
> >> > > Jon
> >>
> >> > --
> >> > Dianne Hackborn
> >> > Android framework engineer
> >> > [EMAIL PROTECTED]
> >>
> >> > Note: please don't send private questions to me, as I don't have time
> to
> >> > provide private support.  All such questions should be posted on
> public
> >> > forums, where I and others can see and answer them.
> >>
> >> --
> >> Jon
> > >
> >
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

Note: please don't send private questions to me, as I don't have time to
provide private support.  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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Notification details Activity never receives Intent used to fire it

2008-11-21 Thread Dianne Hackborn
On Thu, Nov 20, 2008 at 11:31 PM, Guillaume Perrot <[EMAIL PROTECTED]
> wrote:

> Will the SDK be improved to allow several matching pending intents ?


This isn't a limitation, it is a feature.  It allows you to retrieve a
PendingIntent you had previously created, so you can cancel it or do other
things with it.

It is also a little protection against applications spamming out tons of
different PendingIntents without explicitly canceling them, which can be a
pretty significant resource problem since the system needs to maintain a
global list of all such activity pending intents which also all need an IPC
token.

-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

Note: please don't send private questions to me, as I don't have time to
provide private support.  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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Notification details Activity never receives Intent used to fire it

2008-11-21 Thread Dianne Hackborn
On Fri, Nov 21, 2008 at 2:14 AM, Matthias <[EMAIL PROTECTED]> wrote:

> Well, when /do/ PendingIntents match? All I can say is that calling
> PendingActivity.getActivity() created a new PendingIntent each time I
> called it (I checked the OID in the debugger), and in this new object,
> I always store a new Intent object.


A match is the same as that defined by Intent:

http://code.google.com/android/reference/android/content/Intent.html#filterEquals(android.content.Intent)

-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

Note: please don't send private questions to me, as I don't have time to
provide private support.  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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Detect which Home screen the user is on?

2008-11-21 Thread songs

Hi,

So there are three "screens" that the user can flip between on the
Home screen.  Is there a way to detect which screen they're on or some
way to catch when they've flipped between screens?

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



[android-developers] Re: Detect which Home screen the user is on?

2008-11-21 Thread Romain Guy

No there is no way to do this.

On Fri, Nov 21, 2008 at 2:29 PM, songs <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> So there are three "screens" that the user can flip between on the
> Home screen.  Is there a way to detect which screen they're on or some
> way to catch when they've flipped between screens?
>
> Thanks,
> Steve
> >
>



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



[android-developers] Re: another new return of findViewById???

2008-11-21 Thread Michael


This isn't a bug - see what Mark said about your activity being
destroyed and recreated when the orientation changes.

If you want to work around this (and know that it's the right thing to
do), set up your app to handle the orientation configuration change
(set android:configChanges in AndroidManifest.xml) and change the
orientation yourself in onConfigurationChanged() in your Activity.
You'll have to save the value of your EditText object, recreate the
entire layout, and then set the value of the new EditText.  I do this
with an app I wrote, and it works just fine.

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



[android-developers] Re: Notification details Activity never receives Intent used to fire it

2008-11-21 Thread Guillaume Perrot
Ok, so there is a bug and we are exploiting it.

2008/11/21 Dianne Hackborn <[EMAIL PROTECTED]>

> On Fri, Nov 21, 2008 at 2:14 AM, Matthias <[EMAIL PROTECTED]>wrote:
>
>> Well, when /do/ PendingIntents match? All I can say is that calling
>> PendingActivity.getActivity() created a new PendingIntent each time I
>> called it (I checked the OID in the debugger), and in this new object,
>> I always store a new Intent object.
>
>
> A match is the same as that defined by Intent:
>
>
> http://code.google.com/android/reference/android/content/Intent.html#filterEquals(android.content.Intent)
>
> --
> Dianne Hackborn
> Android framework engineer
> [EMAIL PROTECTED]
>
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Notification details Activity never receives Intent used to fire it

2008-11-21 Thread Dianne Hackborn
Ah you are right, the request code is also part of its identity.

For the nitty gritty details, this file defines a PendingIntent maintained
by the system and the full key used to match them:

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=services/java/com/android/server/am/PendingIntentRecord.java

On Fri, Nov 21, 2008 at 3:07 AM, Matthias <[EMAIL PROTECTED]> wrote:

>
> And to further clear up my intentions:
>
> I have a model class called "Event". It represents user activity in my
> system (such as rating items or writing messages). These events are
> delivered to the user through NotificationManager. For every such
> event, the NM calls Event.toNotification() and delivers the
> notification.
>
> Furthermore, I have an activity called EventDetailsActivity. This is
> triggered whenever the user taps on the notification to read the event
> info in full length. This implies primarily two things:
>
> 1. I must be able to pass an Event model object to
> EventDetailsActivity whenever the user taps the corresponding
> notification
> 2. I must be able to reuse EventDetailsActivity even it is already
> displaying another event (e.g. update it via onNewIntent())
>
> Thus, in Event.toNotification(), I do this:
>
>public final Notification toNotification(Context context) {
>Intent intent = new Intent(context,
> EventDetailsActivity.class);
>intent.putExtra("event", this);
>intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
>| Intent.FLAG_ACTIVITY_SINGLE_TOP);
>configureIntent(intent); // template method for subclasses
>
>PendingIntent contentIntent = PendingIntent.getActivity
> (context,
>requestCode++, intent, 0);
>
>Notification notification = new Notification
> (getNotificationIcon(),
>getTickerText(), getDate().getTime());
>notification.setLatestEventInfo(context, getTitle(), getText
> (),
>contentIntent);
>
>return notification;
>}
>
> Hope that clears up my intentions.
>
> On 21 Nov., 11:14, Matthias <[EMAIL PROTECTED]> wrote:
> > Well, when /do/ PendingIntents match? All I can say is that calling
> > PendingActivity.getActivity() created a new PendingIntent each time I
> > called it (I checked the OID in the debugger), and in this new object,
> > I always store a new Intent object.
> >
> > As Guillaume suggested, I solved the problem by calling getActivity()
> > like this:
> >
> > private static int requestCode;
> > ...
> > pi = PendingIntent.getActivity(context, requestCode++, intent, 0)
> >
> > and now everything works as expected. As for the intent itself, I
> > instantiated it using FLAG_ACTIVITY_NEW_TASK and
> > FLAG_ACTIVITY_SINGLE_TOP.
> >
> > On 20 Nov., 22:55, "Dianne Hackborn" <[EMAIL PROTECTED]> wrote:
> >
> > > I am really not clear on exactly what you are doing or expecting, but
> one
> > > thing to watch out for -- when you get a PendingIntent, if there is
> already
> > > a PendingIntent matching the Intent you have been given (NOT including
> the
> > > extras), then you get that PendingIntent, NOT a new one.  So if you
> want to
> > > change the extras you will either need to cancel the existing one, or
> modify
> > > something in the action, type, data, or category so that it doesn't
> match
> > > the existing one.
> >
> > > This is covered (not very well) in the last paragraph of the
> PendingIntent
> > > documentation:
> >
> > >http://code.google.com/android/reference/android/app/PendingIntent.html
> >
> > > On Thu, Nov 20, 2008 at 8:38 AM, Matthias <[EMAIL PROTECTED]>
> wrote:
> >
> > > > This gets weirder every minute.
> >
> > > > Just out of curiosity I just called setIntent(null) in onPause() to
> > > > make sure the Intent the Activity was started with is always reset.
> As
> > > > soon as I start the Activity again though, getIntent() will AGAIN
> > > > return the Intent I supposedly set to null before.. this Intent
> it
> > > > returns even exists across re-deployments of the whole application
> > > > (not across emulator reboots tho)!
> >
> > > > Am I the only one having these problems? ^^ This whole thing looks
> > > > completely broken to me. None of the functionalities I used exposed
> > > > the behavior that was documented.
> >
> > > > On 20 Nov., 17:03, Matthias <[EMAIL PROTECTED]> wrote:
> > > > > I think this may be a bug in Android. I also tried following the
> > > > > instructions from the docs under section "Launch Modes and Launch
> > > > > Flags" with no success. That section suggested to declare any
> Activity
> > > > > launched from NotificationManager to set the taskAffinitity to ""
> and
> > > > > finishOnTaskLaunch to true, so that the Activity does a clean start
> > > > > everytime it is called.
> >
> > > > > Even though the Activity is completely restarted now (onStart() is
> > > > > called), getIntent() always yields the same intent, the one it was
> > > > > started with for the very first time...
> >
> > 

[android-developers] Re: san disk

2008-11-21 Thread Ernest Tam
I plan to store a mini-database in SD card. When I bring up my app in G1
phone, I can access the data from the little database in SD card. The data
in SD card is preloaded by us.

Ernie

On Fri, Nov 21, 2008 at 2:23 PM, Michael <[EMAIL PROTECTED]> wrote:

>
> San disk?
>
> If you're referring to the SD card... there are already APIs to access
> files on the SD card, these are standard Java file IO libraries.  What
> is it that you're trying to do?
> >
>


-- 
Ernie

Home Phone: 650 494 9282

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



[android-developers] Re: PackageManager??

2008-11-21 Thread Dianne Hackborn
Current this API is not planned to be available to third party apps, they
will need to go through the system installer UI.

2008/11/21 teo2706 <[EMAIL PROTECTED]>

>
> Will PackageManager.installPackage() be available for applications in
> future versions? Ot will it be possible to install applications only
> through Package Installer application, as you suggested below in this
> thread?
>
> On 26 Авг, 09:36, hackbod <[EMAIL PROTECTED]> wrote:
> > This is not available to applications, sorry.
> >
> > On Aug 26, 12:25 am, Wesley Sagittarius <[EMAIL PROTECTED]> wrote:
> >
> > > hi,
> >
> > > Does anyone successful use the PackageManager  to install apk???
> >
> > > wesley.
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

Note: please don't send private questions to me, as I don't have time to
provide private support.  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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Notification details Activity never receives Intent used to fire it

2008-11-21 Thread Guillaume Perrot

Thanks for your answer, it eventually solves the mystery \o/
I quoted it in the Issue 863.
http://code.google.com/p/android/issues/detail?id=863

On 21 nov, 23:38, "Dianne Hackborn" <[EMAIL PROTECTED]> wrote:
> Ah you are right, the request code is also part of its identity.
>
> For the nitty gritty details, this file defines a PendingIntent maintained
> by the system and the full key used to match them:
>
> http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...
>
>
>
> On Fri, Nov 21, 2008 at 3:07 AM, Matthias <[EMAIL PROTECTED]> wrote:
>
> > And to further clear up my intentions:
>
> > I have a model class called "Event". It represents user activity in my
> > system (such as rating items or writing messages). These events are
> > delivered to the user through NotificationManager. For every such
> > event, the NM calls Event.toNotification() and delivers the
> > notification.
>
> > Furthermore, I have an activity called EventDetailsActivity. This is
> > triggered whenever the user taps on the notification to read the event
> > info in full length. This implies primarily two things:
>
> > 1. I must be able to pass an Event model object to
> > EventDetailsActivity whenever the user taps the corresponding
> > notification
> > 2. I must be able to reuse EventDetailsActivity even it is already
> > displaying another event (e.g. update it via onNewIntent())
>
> > Thus, in Event.toNotification(), I do this:
>
> >    public final Notification toNotification(Context context) {
> >        Intent intent = new Intent(context,
> > EventDetailsActivity.class);
> >        intent.putExtra("event", this);
> >        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
> >                | Intent.FLAG_ACTIVITY_SINGLE_TOP);
> >        configureIntent(intent); // template method for subclasses
>
> >        PendingIntent contentIntent = PendingIntent.getActivity
> > (context,
> >                requestCode++, intent, 0);
>
> >        Notification notification = new Notification
> > (getNotificationIcon(),
> >                getTickerText(), getDate().getTime());
> >        notification.setLatestEventInfo(context, getTitle(), getText
> > (),
> >                contentIntent);
>
> >        return notification;
> >    }
>
> > Hope that clears up my intentions.
>
> > On 21 Nov., 11:14, Matthias <[EMAIL PROTECTED]> wrote:
> > > Well, when /do/ PendingIntents match? All I can say is that calling
> > > PendingActivity.getActivity() created a new PendingIntent each time I
> > > called it (I checked the OID in the debugger), and in this new object,
> > > I always store a new Intent object.
>
> > > As Guillaume suggested, I solved the problem by calling getActivity()
> > > like this:
>
> > > private static int requestCode;
> > > ...
> > > pi = PendingIntent.getActivity(context, requestCode++, intent, 0)
>
> > > and now everything works as expected. As for the intent itself, I
> > > instantiated it using FLAG_ACTIVITY_NEW_TASK and
> > > FLAG_ACTIVITY_SINGLE_TOP.
>
> > > On 20 Nov., 22:55, "Dianne Hackborn" <[EMAIL PROTECTED]> wrote:
>
> > > > I am really not clear on exactly what you are doing or expecting, but
> > one
> > > > thing to watch out for -- when you get a PendingIntent, if there is
> > already
> > > > a PendingIntent matching the Intent you have been given (NOT including
> > the
> > > > extras), then you get that PendingIntent, NOT a new one.  So if you
> > want to
> > > > change the extras you will either need to cancel the existing one, or
> > modify
> > > > something in the action, type, data, or category so that it doesn't
> > match
> > > > the existing one.
>
> > > > This is covered (not very well) in the last paragraph of the
> > PendingIntent
> > > > documentation:
>
> > > >http://code.google.com/android/reference/android/app/PendingIntent.html
>
> > > > On Thu, Nov 20, 2008 at 8:38 AM, Matthias <[EMAIL PROTECTED]>
> > wrote:
>
> > > > > This gets weirder every minute.
>
> > > > > Just out of curiosity I just called setIntent(null) in onPause() to
> > > > > make sure the Intent the Activity was started with is always reset.
> > As
> > > > > soon as I start the Activity again though, getIntent() will AGAIN
> > > > > return the Intent I supposedly set to null before.. this Intent
> > it
> > > > > returns even exists across re-deployments of the whole application
> > > > > (not across emulator reboots tho)!
>
> > > > > Am I the only one having these problems? ^^ This whole thing looks
> > > > > completely broken to me. None of the functionalities I used exposed
> > > > > the behavior that was documented.
>
> > > > > On 20 Nov., 17:03, Matthias <[EMAIL PROTECTED]> wrote:
> > > > > > I think this may be a bug in Android. I also tried following the
> > > > > > instructions from the docs under section "Launch Modes and Launch
> > > > > > Flags" with no success. That section suggested to declare any
> > Activity
> > > > > > launched from NotificationManager to set the taskAffinitity to ""
> > and
> > > > > > f

[android-developers] Possible bug in originating from libgl.so when drawing bitmap

2008-11-21 Thread [EMAIL PROTECTED]

Hello,

   I've identified a possible bug, when rendering a bitmap with the
following code, the application occasionally, but unpredictably
crashes. More likely to crash the more times in a row this code has
been executed.

Code snippet:

   c=getHolder().lockCanvas();
   c.drawBitmap(bm, 0, 0, new Paint());
   getHolder().unlockCanvasAndPost(c);

produces this error trace from ddms

11-21 14:27:54.018: INFO/DEBUG(21): signal 11 (SIGSEGV), fault addr
0024
11-21 14:27:54.018: INFO/DEBUG(21):  r0 001bd250  r1 001a93dc  r2
001a9404  r3 
11-21 14:27:54.018: INFO/DEBUG(21):  r4   r5 001a9390  r6
ac1261c4  r7 001a9404
11-21 14:27:54.018: INFO/DEBUG(21):  r8 001bd250  r9   10
  fp 
11-21 14:27:54.018: INFO/DEBUG(21):  ip ac05c858  sp 447adc60  lr
ac05ca70  pc ac05c874  cpsr 6010
11-21 14:27:54.057: INFO/DEBUG(21):  #00  pc ac05c874  /system/
lib/libsgl.so
11-21 14:27:54.057: INFO/DEBUG(21):  #01  pc ac05ca6c  /system/
lib/libsgl.so
11-21 14:27:54.057: INFO/DEBUG(21):  #02  pc ac05e398  /system/
lib/libsgl.so
11-21 14:27:54.057: INFO/DEBUG(21):  #03  pc ac05c13c  /system/
lib/libsgl.so
11-21 14:27:54.066: INFO/DEBUG(21):  #04  pc ad33b67a  /system/
lib/libandroid_runtime.so
11-21 14:27:54.066: INFO/DEBUG(21):  #05  pc ad00d9f4  /system/
lib/libdvm.so

  Any help is appreciated, I have not seen this particular bug
documented yet.

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



[android-developers] Reuse of AndroidManifest.xml

2008-11-21 Thread magicpig

Hi,
   I am building android apps using ant. I have two
AndroidManifest.xml files which contain a slightly difference:
The second one  adds a   element to the first one
under application element.

   Any simple way to do this?

Thanks a lot.



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



[android-developers] ActivityInstrumentationTestCase issue - can't send key

2008-11-21 Thread dreamerBoy

The goal of this little test program is to launch initiate a call and
then generate a press to the ENDCALL button.


1.  It appears that I am incapable of unlocking the keyguard:

11-21 14:40:58.445: INFO/InstTest(209): after
inKeyguardRestrictedInputMode() ? true

2.  Then, Android tells me I don't have permission to send a key
event:

11-21 14:41:00.173: WARN/WindowManager(53): Permission denied:
injecting key event from pid 209 uid 10019 to window Window{43506808
com.android.phone/com.android.phone.InCallScreen} owned by uid 1001

EmptyActivity is just as it sounds - no additional code other than
what Eclipse generates.


If anyone can see something that is not being done correctly, I would
very much appreciate their thoughts -

Thanks -

Paul




package test.instTest;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.test.ActivityInstrumentationTestCase;
import android.util.Log;
import android.view.KeyEvent;
import android.app.Instrumentation;
import android.view.View;
import android.content.IntentFilter;
import android.app.Instrumentation.ActivityResult;
import android.app.KeyguardManager;

public class InstTest extends
ActivityInstrumentationTestCase
{
   private static final String LOG_TAG= "InstTest";
   private TelephonyManagertelMgr;
   private Instrumentation instrumentation;
   private Context context;
   private KeyguardManager keyguardMgr;

   public InstTest()
   {
  super("test.instTest", EmptyActivity.class);
   }

   public void testPreconditions()
   {
  instrumentation = getInstrumentation();
  assertTrue("Instrumentation must be non-null", instrumentation !
= null);
  context = instrumentation.getContext();
  assertTrue("Context must be non-null", context != null);
  telMgr = (TelephonyManager) context.getSystemService
(Context.TELEPHONY_SERVICE);
  assertTrue("TelephonyManager must be non-null", telMgr != null);
  keyguardMgr = (KeyguardManager) context.getSystemService
(Context.KEYGUARD_SERVICE);
  assertTrue("KeyguardManager must be non-null", keyguardMgr !=
null);
   }

   public void testCall()
   {
  testPreconditions();

  Log.i(LOG_TAG, "before inKeyguardRestrictedInputMode() ? " +
keyguardMgr.inKeyguardRestrictedInputMode());

  KeyguardManager.KeyguardLock keyguardLock =
keyguardMgr.newKeyguardLock(LOG_TAG);
  keyguardLock.disableKeyguard();

  Log.i(LOG_TAG, "after inKeyguardRestrictedInputMode() ? " +
keyguardMgr.inKeyguardRestrictedInputMode());

  IntentFilter intentFilter = new IntentFilter
(Intent.ACTION_CALL);

  Uri parsedPhoneNumber = Uri.parse("tel:1234567");

  Intent myIntent = new Intent(Intent.ACTION_CALL,
parsedPhoneNumber);
  Intent resultData = new Intent(Intent.ACTION_CALL,
parsedPhoneNumber);
  // myIntent = new Intent(Intent.ACTION_DIAL, parsedPhoneNumber);

  myIntent.setFlags(Intent.FLAG_DEBUG_LOG_RESOLUTION |
Intent.FLAG_FROM_BACKGROUND
| Intent.FLAG_ACTIVITY_SINGLE_TOP |
Intent.FLAG_ACTIVITY_NEW_TASK);
  resultData.setFlags(Intent.FLAG_DEBUG_LOG_RESOLUTION |
Intent.FLAG_FROM_BACKGROUND
| Intent.FLAG_ACTIVITY_SINGLE_TOP |
Intent.FLAG_ACTIVITY_NEW_TASK);

  Instrumentation.ActivityResult actResult = new
Instrumentation.ActivityResult(Activity.RESULT_OK, resultData);

  Instrumentation.ActivityMonitor actMonitor = new
Instrumentation.ActivityMonitor(intentFilter, actResult, false);

  Log.i(LOG_TAG, "starting call.");

  instrumentation.waitForIdleSync();

  context.startActivity(myIntent);

  instrumentation.waitForIdleSync();

  Log.i(LOG_TAG, "number of hits from ActivityMonitor: " +
actMonitor.getHits());
  Activity phoneActivity = actMonitor.getLastActivity();
  if (phoneActivity != null)
 Log.i(LOG_TAG, "phoneActivity is NOT NULL!!");
  else
 Log.i(LOG_TAG, "phoneActivity is NULL");

  Log.i(LOG_TAG, "before phone state is " + phoneStateToString());

  Activity activity = getActivity();
  Log.i(LOG_TAG, "activity class is " + activity.getClass());

  View view = getActivity().getCurrentFocus();
  if (view == null)
 Log.i(LOG_TAG, "Focus view is NULL");
  else
 Log.i(LOG_TAG, "Focus view is NOT NULL");

  Log.i(LOG_TAG, "Sending ENDCALL");
  sendKeys(KeyEvent.KEYCODE_ENDCALL);

  instrumentation.waitForIdleSync();
  Log.i(LOG_TAG, "Sent ENDCALL, sleeping");

  sleep(1000);

  Log.i(LOG_TAG, "after phone state is " + phoneStateToString());
   }
}

~~


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







[android-developers] Import Typeface from another apk?

2008-11-21 Thread Peli

Is it possible to import a Typeface from another apk? Or from the SD
card?

I only found: Typeface.createFromAsset(AssetManager mgr, String path)
http://code.google.com/android/reference/android/graphics/Typeface.html

I would like to ship fonts as an add-on to the main application, since
font files can be large. For this reason, the main application would
have to access a font from a different location than its own asset
folder.

I thought about maybe overriding AssetManager to provide a custom
InputStream for the font data, but this is not possible because
AssetManager is declared as final.

Are there any other tricks I could use to obtain Typeface from a
different location?

Peli


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



[android-developers] Re: how to inject a KeyEvent

2008-11-21 Thread dreamerBoy

Hi Hackbod -

I tried this using Instrumentation -

The goal of this little program is to make an outgoing call and then
generate a keypress on the ENDCALL button.

1. It appears that I am incapable of unlocking the keyguard:

11-21 14:40:58.445: INFO/InstTest(209): after
inKeyguardRestrictedInputMode() ? true

2. Then, Android tells me I don't have permission to send a key event:

11-21 14:41:00.173: WARN/WindowManager(53): Permission denied:
injecting key event from pid 209 uid 10019 to window Window{43506808
com.android.phone/com.android.phone.InCallScreen} owned by uid 1001

EmptyActivity is just as it sounds - no additional code other than
what Eclipse generates.


If anyone can see something that is not being done correctly, I would
very much appreciate their thoughts -

Thanks -

Paul

~~

package test.instTest;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.test.ActivityInstrumentationTestCase;
import android.util.Log;
import android.view.KeyEvent;
import android.app.Instrumentation;
import android.view.View;
import android.content.IntentFilter;
import android.app.Instrumentation.ActivityResult;
import android.app.KeyguardManager;

public class InstTest extends
ActivityInstrumentationTestCase
{
   private static final String LOG_TAG= "InstTest";
   private TelephonyManagertelMgr;
   private Instrumentation instrumentation;
   private Context context;
   private KeyguardManager keyguardMgr;

   public InstTest()
   {
  super("test.instTest", EmptyActivity.class);
   }

   public void testPreconditions()
   {
  instrumentation = getInstrumentation();
  assertTrue("Instrumentation must be non-null", instrumentation !
= null);
  context = instrumentation.getContext();
  assertTrue("Context must be non-null", context != null);
  telMgr = (TelephonyManager) context.getSystemService
(Context.TELEPHONY_SERVICE);
  assertTrue("TelephonyManager must be non-null", telMgr != null);
  keyguardMgr = (KeyguardManager) context.getSystemService
(Context.KEYGUARD_SERVICE);
  assertTrue("KeyguardManager must be non-null", keyguardMgr !=
null);
   }

   public void testCall()
   {
  testPreconditions();

  Log.i(LOG_TAG, "before inKeyguardRestrictedInputMode() ? " +
keyguardMgr.inKeyguardRestrictedInputMode());

  KeyguardManager.KeyguardLock keyguardLock =
keyguardMgr.newKeyguardLock(LOG_TAG);
  keyguardLock.disableKeyguard();

  Log.i(LOG_TAG, "after inKeyguardRestrictedInputMode() ? " +
keyguardMgr.inKeyguardRestrictedInputMode());

  IntentFilter intentFilter = new IntentFilter
(Intent.ACTION_CALL);

  Uri parsedPhoneNumber = Uri.parse("tel:1234567");

  Intent myIntent = new Intent(Intent.ACTION_CALL,
parsedPhoneNumber);
  Intent resultData = new Intent(Intent.ACTION_CALL,
parsedPhoneNumber);
  // myIntent = new Intent(Intent.ACTION_DIAL, parsedPhoneNumber);

  myIntent.setFlags(Intent.FLAG_DEBUG_LOG_RESOLUTION |
Intent.FLAG_FROM_BACKGROUND
| Intent.FLAG_ACTIVITY_SINGLE_TOP |
Intent.FLAG_ACTIVITY_NEW_TASK);
  resultData.setFlags(Intent.FLAG_DEBUG_LOG_RESOLUTION |
Intent.FLAG_FROM_BACKGROUND
| Intent.FLAG_ACTIVITY_SINGLE_TOP |
Intent.FLAG_ACTIVITY_NEW_TASK);

  Instrumentation.ActivityResult actResult = new
Instrumentation.ActivityResult(Activity.RESULT_OK, resultData);

  Instrumentation.ActivityMonitor actMonitor = new
Instrumentation.ActivityMonitor(intentFilter, actResult, false);

  Log.i(LOG_TAG, "starting call.");

  instrumentation.waitForIdleSync();

  context.startActivity(myIntent);

  instrumentation.waitForIdleSync();

  Log.i(LOG_TAG, "number of hits from ActivityMonitor: " +
actMonitor.getHits());
  Activity phoneActivity = actMonitor.getLastActivity();
  if (phoneActivity != null)
 Log.i(LOG_TAG, "phoneActivity is NOT NULL!!");
  else
 Log.i(LOG_TAG, "phoneActivity is NULL");

  Log.i(LOG_TAG, "before phone state is " + phoneStateToString());

  Activity activity = getActivity();
  Log.i(LOG_TAG, "activity class is " + activity.getClass());

  View view = getActivity().getCurrentFocus();
  if (view == null)
 Log.i(LOG_TAG, "Focus view is NULL");
  else
 Log.i(LOG_TAG, "Focus view is NOT NULL");

  Log.i(LOG_TAG, "Sending ENDCALL");
  sendKeys(KeyEvent.KEYCODE_ENDCALL);

  instrumentation.waitForIdleSync();
  Log.i(LOG_TAG, "Sent ENDCALL, sleeping");

  sleep(1000);

  Log.i(LOG_TAG, "after phone state is " + phoneStateToString());
   }
}


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





  

[android-developers] Re: Quality of audio recording from MediaRecorder

2008-11-21 Thread Michael

I'd love a way to be able to analyze the sound as it's coming in,
rather than having to record to a file first.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: PackageManager??

2008-11-21 Thread Dorn Hetzel
If PackageManager has to do the installation, can PackageManager be
launch from another application and passed information to help it
locate the desired application?

2008/11/21 Dianne Hackborn <[EMAIL PROTECTED]>:
> Current this API is not planned to be available to third party apps, they
> will need to go through the system installer UI.
>
> 2008/11/21 teo2706 <[EMAIL PROTECTED]>
>>
>> Will PackageManager.installPackage() be available for applications in
>> future versions? Ot will it be possible to install applications only
>> through Package Installer application, as you suggested below in this
>> thread?
>>
>> On 26 Авг, 09:36, hackbod <[EMAIL PROTECTED]> wrote:
>> > This is not available to applications, sorry.
>> >
>> > On Aug 26, 12:25 am, Wesley Sagittarius <[EMAIL PROTECTED]> wrote:
>> >
>> > > hi,
>> >
>> > > Does anyone successful use the PackageManager  to install apk???
>> >
>> > > wesley.
>>
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> [EMAIL PROTECTED]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Issues: Webview.loadData() trying to load a string created from a read file(asset) and a string

2008-11-21 Thread polo777

Re,

Actually, I still have a problem.
When I use this trick, the javascript containing in my page doesn't
work whereas the same page(html/javascript) works when I load it from
the network or from a file:///android_asset/myfile.html.

Anything?

Polo

On Nov 21, 1:06 pm, polo777 <[EMAIL PROTECTED]> wrote:
> Thanks a lot of Mark.
>
> This workaround did the trick.
>
>  String mimeType = "text/html";
>  String encoding = "utf-8";
>  mWebView.loadDataWithBaseURL("fake://fake.com", out.toString(),
> mimeType, encoding, null);
>
> Regards,
> Polo
>
> On Nov 21, 11:42 am, Mark Murphy <[EMAIL PROTECTED]> wrote:
>
> > polo777 wrote:
> > > Does someone have a solution? That would be great.
>
> > Use loadDataWithBaseURL(), even if you have to pass in a fake URL.
>
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com
>
> > Android Training on the Ranch! -- Mar 16-20, 
> > 2009http://www.bignerdranch.com/schedule.shtml
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: PackageManager??

2008-11-21 Thread Dianne Hackborn
You can put any .apk on the phone, and start a VIEW intent on it to bring up
the installer UI.

2008/11/21 Dorn Hetzel <[EMAIL PROTECTED]>

> If PackageManager has to do the installation, can PackageManager be
> launch from another application and passed information to help it
> locate the desired application?
>
> 2008/11/21 Dianne Hackborn <[EMAIL PROTECTED]>:
> > Current this API is not planned to be available to third party apps, they
> > will need to go through the system installer UI.
> >
> > 2008/11/21 teo2706 <[EMAIL PROTECTED]>
> >>
> >> Will PackageManager.installPackage() be available for applications in
> >> future versions? Ot will it be possible to install applications only
> >> through Package Installer application, as you suggested below in this
> >> thread?
> >>
> >> On 26 Авг, 09:36, hackbod <[EMAIL PROTECTED]> wrote:
> >> > This is not available to applications, sorry.
> >> >
> >> > On Aug 26, 12:25 am, Wesley Sagittarius <[EMAIL PROTECTED]> wrote:
> >> >
> >> > > hi,
> >> >
> >> > > Does anyone successful use the PackageManager  to install apk???
> >> >
> >> > > wesley.
> >>
> >>
> >
> >
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > [EMAIL PROTECTED]
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support.  All such questions should be posted on public
> > forums, where I and others can see and answer them.
> >
> >
> > >
> >
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

Note: please don't send private questions to me, as I don't have time to
provide private support.  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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: PackageManager??

2008-11-21 Thread Dianne Hackborn
(Btw, this is exactly what happens when you download an .apk from the
browser, the browser just downloads it and then starts whatever activity can
view it, letting the system find the package installer activity.)

2008/11/21 Dianne Hackborn <[EMAIL PROTECTED]>

> You can put any .apk on the phone, and start a VIEW intent on it to bring
> up the installer UI.
>
> 2008/11/21 Dorn Hetzel <[EMAIL PROTECTED]>
>
> If PackageManager has to do the installation, can PackageManager be
>> launch from another application and passed information to help it
>> locate the desired application?
>>
>> 2008/11/21 Dianne Hackborn <[EMAIL PROTECTED]>:
>> > Current this API is not planned to be available to third party apps,
>> they
>> > will need to go through the system installer UI.
>> >
>> > 2008/11/21 teo2706 <[EMAIL PROTECTED]>
>> >>
>> >> Will PackageManager.installPackage() be available for applications in
>> >> future versions? Ot will it be possible to install applications only
>> >> through Package Installer application, as you suggested below in this
>> >> thread?
>> >>
>> >> On 26 Авг, 09:36, hackbod <[EMAIL PROTECTED]> wrote:
>> >> > This is not available to applications, sorry.
>> >> >
>> >> > On Aug 26, 12:25 am, Wesley Sagittarius <[EMAIL PROTECTED]> wrote:
>> >> >
>> >> > > hi,
>> >> >
>> >> > > Does anyone successful use the PackageManager  to install apk???
>> >> >
>> >> > > wesley.
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Dianne Hackborn
>> > Android framework engineer
>> > [EMAIL PROTECTED]
>> >
>> > Note: please don't send private questions to me, as I don't have time to
>> > provide private support.  All such questions should be posted on public
>> > forums, where I and others can see and answer them.
>> >
>> >
>> > >
>> >
>>
>> >>
>>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> [EMAIL PROTECTED]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them.
>
>


-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

Note: please don't send private questions to me, as I don't have time to
provide private support.  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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to inject a KeyEvent

2008-11-21 Thread Dianne Hackborn
Correct, one application can not inject key events into another
application.  There should be no way around this.

For instrumentation test cases that cross application boundaries, I strongly
recommend you set up an ActivityMonitor to block the launching of that other
application's activity, returning a mocked result instead.

On Fri, Nov 21, 2008 at 3:34 PM, dreamerBoy <[EMAIL PROTECTED]> wrote:

>
> Hi Hackbod -
>
> I tried this using Instrumentation -
>
> The goal of this little program is to make an outgoing call and then
> generate a keypress on the ENDCALL button.
>
> 1. It appears that I am incapable of unlocking the keyguard:
>
> 11-21 14:40:58.445: INFO/InstTest(209): after
> inKeyguardRestrictedInputMode() ? true
>
> 2. Then, Android tells me I don't have permission to send a key event:
>
> 11-21 14:41:00.173: WARN/WindowManager(53): Permission denied:
> injecting key event from pid 209 uid 10019 to window Window{43506808
> com.android.phone/com.android.phone.InCallScreen} owned by uid 1001
>
> EmptyActivity is just as it sounds - no additional code other than
> what Eclipse generates.
>
>
> If anyone can see something that is not being done correctly, I would
> very much appreciate their thoughts -
>
> Thanks -
>
> Paul
>
> ~~
>
> package test.instTest;
>
> import android.app.Activity;
> import android.content.Context;
> import android.content.Intent;
> import android.net.Uri;
> import android.telephony.PhoneStateListener;
> import android.telephony.TelephonyManager;
> import android.test.ActivityInstrumentationTestCase;
> import android.util.Log;
> import android.view.KeyEvent;
> import android.app.Instrumentation;
> import android.view.View;
> import android.content.IntentFilter;
> import android.app.Instrumentation.ActivityResult;
> import android.app.KeyguardManager;
>
> public class InstTest extends
> ActivityInstrumentationTestCase
> {
>   private static final String LOG_TAG= "InstTest";
>   private TelephonyManagertelMgr;
>   private Instrumentation instrumentation;
>   private Context context;
>   private KeyguardManager keyguardMgr;
>
>   public InstTest()
>   {
>  super("test.instTest", EmptyActivity.class);
>   }
>
>   public void testPreconditions()
>   {
>  instrumentation = getInstrumentation();
>  assertTrue("Instrumentation must be non-null", instrumentation !
> = null);
>  context = instrumentation.getContext();
>  assertTrue("Context must be non-null", context != null);
>  telMgr = (TelephonyManager) context.getSystemService
> (Context.TELEPHONY_SERVICE);
>  assertTrue("TelephonyManager must be non-null", telMgr != null);
>  keyguardMgr = (KeyguardManager) context.getSystemService
> (Context.KEYGUARD_SERVICE);
>  assertTrue("KeyguardManager must be non-null", keyguardMgr !=
> null);
>   }
>
>   public void testCall()
>   {
>  testPreconditions();
>
>  Log.i(LOG_TAG, "before inKeyguardRestrictedInputMode() ? " +
> keyguardMgr.inKeyguardRestrictedInputMode());
>
>  KeyguardManager.KeyguardLock keyguardLock =
> keyguardMgr.newKeyguardLock(LOG_TAG);
>  keyguardLock.disableKeyguard();
>
>  Log.i(LOG_TAG, "after inKeyguardRestrictedInputMode() ? " +
> keyguardMgr.inKeyguardRestrictedInputMode());
>
>  IntentFilter intentFilter = new IntentFilter
> (Intent.ACTION_CALL);
>
>  Uri parsedPhoneNumber = Uri.parse("tel:1234567");
>
>  Intent myIntent = new Intent(Intent.ACTION_CALL,
> parsedPhoneNumber);
>  Intent resultData = new Intent(Intent.ACTION_CALL,
> parsedPhoneNumber);
>  // myIntent = new Intent(Intent.ACTION_DIAL, parsedPhoneNumber);
>
>  myIntent.setFlags(Intent.FLAG_DEBUG_LOG_RESOLUTION |
> Intent.FLAG_FROM_BACKGROUND
>| Intent.FLAG_ACTIVITY_SINGLE_TOP |
> Intent.FLAG_ACTIVITY_NEW_TASK);
>  resultData.setFlags(Intent.FLAG_DEBUG_LOG_RESOLUTION |
> Intent.FLAG_FROM_BACKGROUND
>| Intent.FLAG_ACTIVITY_SINGLE_TOP |
> Intent.FLAG_ACTIVITY_NEW_TASK);
>
>  Instrumentation.ActivityResult actResult = new
> Instrumentation.ActivityResult(Activity.RESULT_OK, resultData);
>
>  Instrumentation.ActivityMonitor actMonitor = new
> Instrumentation.ActivityMonitor(intentFilter, actResult, false);
>
>  Log.i(LOG_TAG, "starting call.");
>
>  instrumentation.waitForIdleSync();
>
>  context.startActivity(myIntent);
>
>  instrumentation.waitForIdleSync();
>
>  Log.i(LOG_TAG, "number of hits from ActivityMonitor: " +
> actMonitor.getHits());
>  Activity phoneActivity = actMonitor.getLastActivity();
>  if (phoneActivity != null)
> Log.i(LOG_TAG, "phoneActivity is NOT NULL!!");
>  else
> Log.i(LOG_TAG, "phoneActivity is NULL");
>
>  Log.i(LOG_TAG, "before phone state is " + phoneStateToString());
>
>  Activity activity = getActivity();
>  Log.i(LOG_TAG, "activity class is " + activity.getClass());
>
>  View view = getActivity().getCurrentFocus();
>  if (view == null)
> Log.i(LOG_

[android-developers] Re: Import Typeface from another apk?

2008-11-21 Thread Dianne Hackborn
You can just create a context for the other application, and get its
resources and then asset manager and use that.

On Fri, Nov 21, 2008 at 3:07 PM, Peli <[EMAIL PROTECTED]> wrote:

>
> Is it possible to import a Typeface from another apk? Or from the SD
> card?
>
> I only found: Typeface.createFromAsset(AssetManager mgr, String path)
> http://code.google.com/android/reference/android/graphics/Typeface.html
>
> I would like to ship fonts as an add-on to the main application, since
> font files can be large. For this reason, the main application would
> have to access a font from a different location than its own asset
> folder.
>
> I thought about maybe overriding AssetManager to provide a custom
> InputStream for the font data, but this is not possible because
> AssetManager is declared as final.
>
> Are there any other tricks I could use to obtain Typeface from a
> different location?
>
> Peli
>
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

Note: please don't send private questions to me, as I don't have time to
provide private support.  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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Reuse of AndroidManifest.xml

2008-11-21 Thread Dianne Hackborn
Nothing automatic, sorry.  I am sure you could use some XML tools to
automatically generate the two form some common template.

On Fri, Nov 21, 2008 at 2:55 PM, magicpig <[EMAIL PROTECTED]> wrote:

>
> Hi,
>   I am building android apps using ant. I have two
> AndroidManifest.xml files which contain a slightly difference:
> The second one  adds a   element to the first one
> under application element.
>
>   Any simple way to do this?
>
> Thanks a lot.
>
>
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

Note: please don't send private questions to me, as I don't have time to
provide private support.  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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Issues: Webview.loadData() trying to load a string created from a read file(asset) and a string

2008-11-21 Thread Mark Murphy

polo777 wrote:
> Re,
> 
> Actually, I still have a problem.
> When I use this trick, the javascript containing in my page doesn't
> work whereas the same page(html/javascript) works when I load it from
> the network or from a file:///android_asset/myfile.html.
> 
> Anything?

Your simple options are:

1. Instead of your fake base URL, use a real network URL pointing to the 
spot where the Javascript, images, and other stuff lives. Of course, 
this will require a network connection to work. You may wish to also 
supply your WebView with a WebViewClient implementation, so you can hook 
shouldOverrideUrlLoading() to determine if a given clicked-upon link 
should go to the Internet or should be loaded from your 
locally-generated content.

2. Don't use WebView for locally-generated material.

Your more complicated options include building a ContentProvider for 
serving your HTML, Javascript, and whatnot, and using the appropriate 
content: URL to load it.

In general, Android makes it rather difficult for one to support 
locally-hosted Web content.

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

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

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



[android-developers] Re: Issues: Webview.loadData() trying to load a string created from a read file(asset) and a string

2008-11-21 Thread polo777

Hi Mark,

First thanks a lot for your answers...

After having tried to use "addJavascriptInterface", I start working on
the ContentProvider-based solution that you described.
With this solution can I just create/open/read/delete a file in which
I would store my string (javascript + html) so that I could use
loadUrl or loadDataWithBaseURL properly using the url "content://
blabla.provider"?

I am not sure exactly how to proceed.

Thanks
Polo

On Nov 21, 4:26 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
> polo777 wrote:
> > Re,
>
> > Actually, I still have a problem.
> > When I use this trick, the javascript containing in my page doesn't
> > work whereas the same page(html/javascript) works when I load it from
> > the network or from a file:///android_asset/myfile.html.
>
> > Anything?
>
> Your simple options are:
>
> 1. Instead of your fake base URL, use a real network URL pointing to the
> spot where the Javascript, images, and other stuff lives. Of course,
> this will require a network connection to work. You may wish to also
> supply your WebView with a WebViewClient implementation, so you can hook
> shouldOverrideUrlLoading() to determine if a given clicked-upon link
> should go to the Internet or should be loaded from your
> locally-generated content.
>
> 2. Don't use WebView for locally-generated material.
>
> Your more complicated options include building a ContentProvider for
> serving your HTML, Javascript, and whatnot, and using the appropriate
> content: URL to load it.
>
> In general, Android makes it rather difficult for one to support
> locally-hosted Web content.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Issues: Webview.loadData() trying to load a string created from a read file(asset) and a string

2008-11-21 Thread Mark Murphy

polo777 wrote:
> After having tried to use "addJavascriptInterface", I start working on
> the ContentProvider-based solution that you described.
> With this solution can I just create/open/read/delete a file in which
> I would store my string (javascript + html) so that I could use
> loadUrl or loadDataWithBaseURL properly using the url "content://
> blabla.provider"?

In theory, yes. I haven't tried it myself, though I should be giving 
that a shot sometime next week, I think. I've seen other posts on these 
lists that suggest others have it working, though it is not exactly trivial.

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

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

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



[android-developers] Re: Issues: Webview.loadData() trying to load a string created from a read file(asset) and a string

2008-11-21 Thread polo777

I am gonna give a try and let you know. Thanks Mark!


On Nov 21, 4:45 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
> polo777 wrote:
> > After having tried to use "addJavascriptInterface", I start working on
> > the ContentProvider-based solution that you described.
> > With this solution can I just create/open/read/delete a file in which
> > I would store my string (javascript + html) so that I could use
> > loadUrl or loadDataWithBaseURL properly using the url "content://
> > blabla.provider"?
>
> In theory, yes. I haven't tried it myself, though I should be giving
> that a shot sometime next week, I think. I've seen other posts on these
> lists that suggest others have it working, though it is not exactly trivial.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] how to write a file on SD card in android?

2008-11-21 Thread Dr. Tingrong Lu
I want to write a file on SD card, how to refer SD card in android? I know Java 
file I/O, I mean what "path" to refer SD card in android? Can anyone please 
give a sample code?

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



[android-developers] Re: how to write a file on SD card in android?

2008-11-21 Thread Mark Murphy

Dr. Tingrong Lu wrote:
> I want to write a file on SD card, how to refer SD card in android? I 
> know Java file I/O, I mean what "path" to refer SD card in android? Can 
> anyone please give a sample code?

The simple answer: /sdcard

There might be an API to look that up, but I forget.

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

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

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



[android-developers] Re: How to insure the singed file is correct?

2008-11-21 Thread [EMAIL PROTECTED]

can we test this process on emulator ? if can do, how do it, thanks

On Nov 22, 5:03 am, atrus123 <[EMAIL PROTECTED]> wrote:
> Hello,
>
> If you try and install a signed package on top of a pre-existing
> unsigned package, you will get this error.  To resolve, uninstall the
> currently existing package from the G1.
>
> Sometimes if an install has previously failed, you may have to
> reinstall the unsigned package and then uninstall in order to remove
> any left-over files (databases, etc.)
>
> Hope this helps,
>
> J.
>
> On Nov 21, 11:36 am, "[EMAIL PROTECTED]"
>
>
>
> <[EMAIL PROTECTED]> wrote:
> > I upgraded my android app version, but user report me Error: "Package
> > file was not signed correctly".
>
> > keytool -genkey    -keystore keys/androidrss.keystore-alias
> >androidrss.keystore-keyalg RSA -validity 1
> >    keytool -genkey -v -keystore keys/androidrss.keystore-alias
> >androidrss.keystore-keyalg RSA -validity 1
>
> > jarsigner -verbose -keystore keys/androidrss.keystore-signedjar
> > androidrss_signed.apk androidrss.apkandroidrss.keystore
>
> > I retry this twice, but not fix this problem. can you help me asap?- Hide 
> > quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: missing javax audio?

2008-11-21 Thread [EMAIL PROTECTED]

There is no approved method for getting at sample audio input or
output in SDK 1.0. We are aware that is a significant limitation and
efforts are underway to address it.

On Nov 21, 11:06 am, Sriramv <[EMAIL PROTECTED]> wrote:
> What about the SoniVox audio APIs?
> SoniVox (http://www.sonivoxrocks.com/google.html) is already in the
> source tree under external libraries.
> Can they be used to access sample-level audio streams at the moment?
>
> On Nov 20, 8:29 pm, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > We are committed to improved multimedia support, as I've made clear in
> > other posts. You'll see some new features in the next major SDK
> > release. We just don't think that javax is the best way to support
> > audio.
>
> > On Nov 20, 12:36 pm, blindfold <[EMAIL PROTECTED]> wrote:
>
> > > Fair enough. Sorry (also to Ethan) for perhaps distracting a bit from
> > > javax.sound even though Java ME supports much the same javax.sound
> > > AudioInputStream functionality that Ethan was specifically inquiring
> > > about. Glad to hear that our ideas match. It should help in getting
> > > the actual work done.
>
> > > Thanks
>
> > > On Nov 20, 9:23 pm, Dan Bornstein <[EMAIL PROTECTED]> wrote:
>
> > > > The original request was (and the subject line still is) specifically
> > > > about functionality in javax.sound. I responded in that context. My
> > > > later remarks were meant to frame the larger picture. Briefly put, we
> > > > agree.
>
> > > > -dan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Regarding video file playback in android emulator

2008-11-21 Thread [EMAIL PROTECTED]

If you look at the music player application, there are some lines in
the AndroidManifest.xml file that you can uncomment to add it to
Launcher as a video player and have it respond to video view intents.
It's not the best experience, but it should get you started.

Alternatively, there is sample code available in this forum that
demonstrates how to write your own player app.

On Nov 20, 8:28 pm, "Girish H T" <[EMAIL PROTECTED]> wrote:
> Dear all,
>
> I am new to android, I downloaded android source code from 
> thehttp://source.android.com/ built it. I also downloaded the android SDK for
> my development platform (I am using Ubuntu).
>
> I made the development environment up . I can playback some audio files in
> the music player. But i am wondering how to play back the video files.
> because i cant see any media player in the android emulator to playback mp4
> or 3gp files.
>
> Is there anyway to check the out put logs of the of the media player
> (Application and middleware) ? any setting needs to be done ? Please
> clarify.
>
> Regards
> Girish
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] terminate the incoming call?

2008-11-21 Thread AndroidAppDev

There's a way to trap the incoming call with LISTEN_CALL_STATE, but
how do we terminate the incoming call?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



  1   2   >