[android-developers] Is there any way to parse JSON object into ArrayList or Map...

2010-07-13 Thread Sohan badaya
Hi,
Is there any way to parse JSON object, that comes from facebook server
in a response, into ArrayList or Map so that i can set values in my
ListView.
 I am finding difficulty in parsing because JSON
object itself contains JSONArray and this Array can contain JSONObject
may be in recurcive order.

Please suggest me any way to solve this problem.

Thanks

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


[android-developers] Re: Motorola Droid - QCIF Camera Preview and Capture

2010-07-13 Thread Ignas
I have heard rumors that this problem is not visible on Motorola
Milestone, which seems to be a very similar HW. Can someone confirm if
the same problem persists in Milestone? I would think that the camera
and related components should be the same. Thus, this seems like a
driver problem. Hopefully, 2.2 update might solve the problem.

On Jul 8, 4:52 pm, kao  wrote:
> i've faced the same issue with the droid's camera. and i think i can
> add few details.
>
> 1. reboot droid and start droid's "native" camera application
> preview is ok (every time after reboot)
> 2. exit the camera app and start modified (forQCIF) sample app
> preview is bad.
> 3. exit the sample app and start "native" camera app again (no reboot)
> preview is bad. and it stays bad until you reboot the droid.
>
> so it seems that all we need is to force camera's reset as it happens
> during droid startup. does anyone know how to do this?
>
> On Jun 23, 6:09 am, Ignas  wrote:
>
>
>
> > Hello,
>
> > I am seeing a very annoying behavior onMotorolaDroid when trying to
> > do a simple camera preview atQCIFresolution. And I was wondering if
> > someone experienced something similar. Is there a workaround? Am I
> > doing something wrong?
>
> > Let me explain the situation.
>
> > Firstly, right after boot-up, using native camera application there is
> > nothing out of ordinary, I see preview each time and it is all
> > perfectly well for as long as needed as many times as I want.
>
> > The "interesting" behavior starts when I use the slightly modified API
> > Demos (full app available in Android SDK, modified file is attached).
> > My goal is to preview (and later capture) video atQCIF(176 x 144)
> > resolution.
>
> > Using CameraPreview module in API Demos application I can start
> > preview and capture normally only the first time – picture is clear,
> > focused, normal colors, etc. Preview and all is nice. The second time
> > I do preview I see a very over-exposed picture, I need to turn it away
> > from any light source to see anything, otherwise it is all white. And
> > even in the shadow, everything is grainy, as if picture is taken with
> > too sensitive settings (high ISO) with too long exposure. The third
> > time, it is the opposite – the preview and capture is way too dark. I
> > need to point the camera directly into the light source to see even a
> > faintest picture. Pointing out of the window does not help, it has to
> > be straight into the lamp or sun. The effect is like taking pictures
> > with much too low ISO setting – it is way too underexposed.
>
> > The overexposed and underexposed sessions interchange, but it is not
> > clear-cut which one appears first. So far the prevailing pattern is
> > that overexposed one starts first. Now surprise comes when I try using
> > native camera application. The pattern continues! It is as if hardware
> > or or software (camera process) got "tainted" with theQCIF. This
> > continues until I reboot the device.
>
> > Another interesting point is that if I allow device to "rest",
> > symptoms are much less pronounced after 10 minutes, then in 15 minutes
> > they become barely visible. However, it all comes back after the first
> > time I capture inQCIF. Nothing like this is visible when resolution
> > is higher, say, CIF, VGA or similar. The problem is that, for my
> > purposes I need it to beQCIF.
>
> > This does look like a problem in HW, drivers, or somewhere around OS.
> > Any ideas, workarounds, tricks?
>
> > If it is not too much to ask, can somebody try the code modifications
> > below to try on your device? I am curious which devices are working
> > properly and which are not. Shall we have a vote?
>
> > === Device Information ===
> > Firmware version: 2.1-update-1
> > Baseband version: C_01.3E.03P
> > Kernel version: 2.6.29-omap1-g7fa8788 android-bu...@apa26 #1
> > Build number: ESE81
>
> > === To reproduce ===
> > Open CameraPreview.java from /samples/android-7/ApiDemos/src/
> > com/example/android/apis/graphics, and add the following method:
> >     @Override
> >     protected void onMeasure(int w, int h) {
> >         super.onMeasure(w, h);
> >         setMeasuredDimension(176, 144);
> >     }
>
> > Also in the surfaceChanged method, add the following line:
> >         parameters.setPreviewFrameRate(15);

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


[android-developers] Scrolling ListView manually by pixels

2010-07-13 Thread yuku
Hi,

I want to make use of the trackball or d-pad to scroll my ListView
smoothly.
Without implementing anything, by default the list scrolls by one
item, which is not appropriate for my app, since list items have
different heights and I just want to scroll it by a fixed amount.

Is there anything to call to let's say, emulate a 10 pixel drag down?

Thanks.
Yuku

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


Re: [android-developers] why does AlarmManagerService.java call "remove" first in a "set" alarm?

2010-07-13 Thread Dianne Hackborn
If they are the same intent, they can not be uniquely distinguished, so the
more recent one replaces the previous.

It's like doing:

HashMap alarms;

Foo foo1 = new Foo();
Foo foo2 = new Foo();

alarms.put("mything", foo1);
alarms.put("mything", foo2);

The second call replaces the value of the first.

On Tue, Jul 13, 2010 at 8:04 PM, Satya Komatineni <
satya.komatin...@gmail.com> wrote:

> It was a bit baffling (Probably there is a good reason, and it doesnt
> take much to baffle me)
>
> AlarmManager am;
> ...
> PendingIntent pi;
>
>
> am.set(pi, ...) at 11pm
> am.set(pi,...) at 2pm
>
> Same "pending intent" with the same intent and  request code, in
> otherwords they resolve to same intent on equals.
>
> Although I know what happens (being the latest one takes precedence),
> I would have expected my broadcast receiver to be called twice.
>
> I thought something funny is happening in the PendingIntent.
>
> However when I looked at the AlarmManagerService.java I have noticed
> that the "set.." methods are calling a "remove" using the
> PendingIntent that is passed in, essentially cancelling the one
> before.
>
> Why is that??
>
> It is late, my head hurts, I am hoping someone will throw some light.
>
> Thanks a bunch
> Satya
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

Re: [android-developers] Re: Will data remain after updating android os in mobile phones

2010-07-13 Thread Dianne Hackborn
On Thu, Jun 24, 2010 at 11:54 PM, FrankG  wrote:

> In my experience the manufacturer has in his "update" software the
> whole
> control whether he wants to delete  only user data, or everything
> before he update the device.
> But IMHO to avoid any trouble during the update, they prefer to delete
> everything.
>

We strongly discourage any kind of update that wipes data, and in fact go to
fair lengths in new versions of the platform to retain existing data.

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

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

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

[android-developers] Getting phone number from default SMS activity

2010-07-13 Thread Amit
Hi All,

I have started the default SMS application and specified the SMS text
to be sent through following code-

intent = new Intent(Intent.ACTION_VIEW, Uri.parse("sms:"));
intent.putExtra("sms_body", "SMS Text");
startActivity(intent);

It worked fine and sends the message to selected number from contact
list.

My requirement is that i want to know the number to which my SMS was
sent?

Please help me...its urgent.

Thanks in advance.

Amit

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


[android-developers] not able to compile code get from the git repository.

2010-07-13 Thread kamiomar


Hi,

Can anybody tell why i am not able to compile the code get from the
git repository. i think some libraries missing.

Example:
 i get Email Client code from the git repository.
  http://android.git.kernel.org/platform/packages/apps/Email.git

Import the project in my eclipse and set the android SDK version and
then compile the code, its showing some errors.

How can i resolve it.

Thanks.

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


[android-developers] Re: Approach to cache large amount of Textual and audio data in Android application

2010-07-13 Thread Samuh
:bump:

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


[android-developers] Re: App Inventor

2010-07-13 Thread Maps.Huge.Info (Maps API Guru)
Interesting article on the topic in the NYT's:

http://www.nytimes.com/2010/07/12/technology/12google.html?src=busln

Especially this paragraph:

"The tool is Web-based except for a small software download that
automatically syncs the programs created on a personal computer,
connected to the application inventor Web site, with an Android
smartphone. When making programs, the phone must be connected to a
computer with a U.S.B. link."

>From this I can assume that the result is an APK, not a project, so it
can't be used as a frontend type tool to prototype a UI and get some
base code created. That certainly makes it less valuable to any
experienced Android or Java programmer. Of course, there might be a
way to download the project in source form so it could be opened in
Eclipse and modified. It would seem silly that Google would go through
the trouble to create such a tool and not give the author access to
the finished project.

-John Coryat

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


[android-developers] Re: How to set the default download files location

2010-07-13 Thread uday
Hi Priyanka,

Whatever u have suggested is working fine to copy the PDF files..
Instead of adding this iText to the android project, by using java
methods we can achieve this..

I tried and i succeeded in it..

On Jul 4, 11:06 am, priyanka <2priya...@gmail.com> wrote:
> Hello,
>
> There is a library called "iText" which helps create pdf docs in Java.
> I read old posts from the author of iText regarding compiling this
> library for Android - not sure what the current status is. You can
> find some info about iText here 
> :http://viralpatel.net/blogs/2009/04/generate-pdf-file-in-java-using-i...
>
> If your requirement for PDF in Android is urgent, you may think of
> compiling iText for Android yourself - depending on whether the
> license terms allow it.
> Hope this helps.
>
> Regards,
> Priyanka
>
> On Jul 4, 9:45 am, uday  wrote:
>
> > Files downloaded from browser by default they are stored under sdcard/
> > downloads folder..
> > 1) Is it possible to create the .pdf files using client program in
> > android device and how to write the .pdf file content from server into
> > the local files
> > 2) is it the better way to store any pdf files into the device's
> > internal memory if the internal memory is high???
>
> > On Jul 2, 9:35 pm, Mark Murphy  wrote:
>
> > > On Fri, Jul 2, 2010 at 8:50 AM, uday  wrote:
> > > >  From my application i can able to download the files from the
> > > > internet. but the files are downloaded to sdcard/downloads directory
> > > > by default. Is it possible to change this location so that user can
> > > > give the path to save the file?? Is it possible to save the files in
> > > > internal memory???
>
> > > Don't use the Browser for the download. Handle the download yourself,
> > > and you can store it wherever you can write to.
>
> > > If you use the Browser for the download, it will download where the
> > > Browser wants to, not where you want it to.
>
> > > --
> > > Mark Murphy (a Commons 
> > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> > > Android Training...At Your Office:http://commonsware.com/training

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


[android-developers] Re: how to create a new account type for using exsiting providers

2010-07-13 Thread MG

At present Android code supports to add an exchange/corporate account.
When user adds an account, Nexus one shows option to add MS exchange
account or Google account, but this option is not available in Froyo/
Eclair code.  The gmail account is also added as an exchange account
and both these types of account use same database and same protocol to
communicate.

To give more clarity to user about which type of account she is going
to add, while adding an account we can ask whether she wants to add an
exchange account or gmail account, the way Nexus one is doing. Nexus
one has separate content providers for emails for exchange and gmail.
But I want to use same content providers, sync adapters and sync
service, and still want to be able to show to user different options
to add accounts.

I want to know what are the ways to achieve this separation of gmail
and exchange account.

Thanks,
MG

On Jul 13, 7:10 pm, TreKing  wrote:
> On Mon, Jul 12, 2010 at 3:25 AM, MG  wrote:
> > I want to create a new account type for gmail.
>
> I, personally, have no idea what this means or what you're trying to do. You
> may want to elaborate your question to get a good response.
>
> -
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://sites.google.com/site/rezmobileapps/treking

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


[android-developers] Re: Will data remain after updating android os in mobile phones

2010-07-13 Thread uday
Hi Guys,

Is android will wipe the preference variables data when the
application version is upgraded??

On Jun 25, 3:44 pm, santha  wrote:
> Thanks for the information.
>
> But in my application i want to backup the data when clicks on Factory
> Reset.. for that purpose i browse in the internet and came to know
> that android-2.2 provides Android Backup service.. But i dont know how
> much it is safe??
>
> could any one has tried this??
> On Jun 25, 11:54 am, FrankG  wrote:
>
> > In my experience the manufacturer has in his "update" software the
> > whole
> > control whether he wants to delete  only user data, or everything
> > before he update the device.
>
> > But IMHO to avoid any trouble during the update, they prefer to delete
> > everything.
>
> > I.E. they could run into trouble with already set persistent system
> > variables or already
> > existing Shared Preferences  and other dangling things like sysfs
> > entries and so on.
>
> > And I could also imagine that they want to force the user to make his
> > system settings again (
> > Language, Time , Emails clients, Home Screen and so on ..)
>
> > Best regards !
>
> >    Frank
>
> >   Frank
>
> > On 25 Jun., 06:18, Indicator Veritatis  wrote:
>
> > > Right. And with very rare exception (mentioned earlier in this
> > > thread), and unfortunate exception at that, an OS upgrade from the
> > > phone manufacturer will not wipe everything. Certainly not for
> > > Android. But one should expect a factory reset to wipe all user data:
> > > that is why it is called "factory reset": it resets the state of the
> > > phone to what it was when it left the factory.
>
> > > Of course, you know this, Mark. I added it only for the benefit of
> > > others who might not.
>
> > > On Jun 24, 12:11 pm, Mark Murphy  wrote:
>
> > > > On Thu, Jun 24, 2010 at 6:47 AM, Jon Wikman  
> > > > wrote:
> > > > > I lost all apps and data when I did a factory reset of my Android
> > > > > phone (X10 Mini).
>
> > > > A factory reset is supposed to wipe everything. An OS upgrade is not.
>
> > > > --
> > > > Mark Murphy (a Commons 
> > > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> > > > Android App Developer Books:http://commonsware.com/books-ZitiertenText 
> > > > ausblenden -
>
> > > - Zitierten Text anzeigen -

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


[android-developers] Re: Camera capture without a preview...

2010-07-13 Thread ashughes
I would also like to know how to do this. Have you figured it out?
Does anyone know how to take a picture in the background (such as a
service) without needing a preview?

Thanks,
Andrew

On Jun 30, 12:04 am, SaiKiranVeluri  wrote:
> Hi,
>
> Is it possible to capture an imagewithoutshowing the camerapreview?, i have a 
> requirement that i should be able to capture the
> image from a thread or from a service,withoutdisturbing the
> foreground application, where i do not want to show the camerapreview, but 
> still i want to capture the image in background and store
> it in the device.
>
> So is it possible to do using the Android 2.2 SDK version?
>
> Thanks in advance,
>
> Regards,
> Sai Kiran V.

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


[android-developers] Re: Rapid Android Development with AML, looking for feedback

2010-07-13 Thread Jeff Rowberg
Hello again everyone,

Due to the response I got from DZone, I've migrated my AML project to
its own website, which you can find here:

http://www.amlcode.com

My quest for feedback and input from the Android development community
is still going on though, so if anyone has any suggestions, ideas,
criticism, anything at all, I'm wide open to what you have to say.
Specifically, here's what I'm trying to find out:

1. Would you use this for your own app?
2. What would it need to do in order to be most useful?

Jeff

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


[android-developers] why does AlarmManagerService.java call "remove" first in a "set" alarm?

2010-07-13 Thread Satya Komatineni
It was a bit baffling (Probably there is a good reason, and it doesnt
take much to baffle me)

AlarmManager am;
...
PendingIntent pi;


am.set(pi, ...) at 11pm
am.set(pi,...) at 2pm

Same "pending intent" with the same intent and  request code, in
otherwords they resolve to same intent on equals.

Although I know what happens (being the latest one takes precedence),
I would have expected my broadcast receiver to be called twice.

I thought something funny is happening in the PendingIntent.

However when I looked at the AlarmManagerService.java I have noticed
that the "set.." methods are calling a "remove" using the
PendingIntent that is passed in, essentially cancelling the one
before.

Why is that??

It is late, my head hurts, I am hoping someone will throw some light.

Thanks a bunch
Satya

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


[android-developers] Re: how to check if the current thread is in the ui thread?

2010-07-13 Thread DanH
You'd be amazed how many exceptions are thrown loading a single class.

On Jul 13, 5:05 pm, TreKing  wrote:
> On Tue, Jul 13, 2010 at 2:30 PM, Frank Weiss  wrote:
> > I suppose you might also try just catching the IllegalStateException which
> > would occur if not a UI thread AFAIK..
>
> Exceptions are for exceptional situations. You really should not be using
> them for logic flow, and definitely not where threads are concerned.
>
> Particularly if this code is to be run frequently, the trying and
> particularly the catching will kill your performance unnecessarily.
>
> I would do as Mark suggests.
>
> -
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://sites.google.com/site/rezmobileapps/treking

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


[android-developers] Video playback (mediaplayer) always logs ERROR/OsclAsyncFile(12290): OsclAsyncFile::ConstructL!! on Samsung Galaxy S

2010-07-13 Thread Mathias Lin
I'm using a mediaplayer 
(http://developer.android.com/reference/android/media/MediaPlayer.html) 
to playback a video. Everything works fine actually but I noticed that 
on a Samsung Galaxy S, despite that everything seems to run ok, I still 
see errors in the log, which I don't get on Nexus One or HTC Desire. (on 
2.1update1)


For example "ERROR/OsclAsyncFile(12290): OsclAsyncFile::ConstructL!!", 
which seems to be related to the OpenCore framework, and the origin 
probably lies somewhere around

http://www.netmite.com/android/mydroid/external/opencore/oscl/oscl/osclio/src/oscl_file_async_read.cpp

Is anybody else experiencing this on Samsung Galaxy S (I 9000) and 
having any idea why it occurs / how to avoid it?
Maybe anything to pay attention to in the code of the mediaplayer api 
when using mediaplayer.



07-14 10:40:35.395: VERBOSE/AudioHardwareALSA(12290): 
>> ALSA OPEN mode 0,device 2
07-14 10:40:35.410: INFO/AudioHardwareALSA(12290): Initialized ALSA 
PLAYBACK device AndroidPlayback_Speaker_normal
07-14 10:40:35.415: DEBUG/AudioHardwareALSA(12290): Set PLAYBACK PCM 
format to S16_LE (Signed 16 bit Little Endian)
07-14 10:40:35.415: DEBUG/AudioHardwareALSA(12290): Using 2 channels for 
PLAYBACK.
07-14 10:40:35.415: DEBUG/AudioHardwareALSA(12290): Set PLAYBACK sample 
rate to 44100 HZ

07-14 10:40:35.415: DEBUG/AudioHardwareALSA(12290): Buffer size: 4096
07-14 10:40:35.415: DEBUG/AudioHardwareALSA(12290): Latency: 92879
07-14 10:40:36.260: DEBUG/(12290): SISO TEST registering 
PVMFRecognizerPluginFactory
07-14 10:40:36.260: DEBUG/(12290): SISO TEST registering 
PVMFRecognizerPluginFactory success
07-14 10:40:36.260: DEBUG/(12290): SISO TEST 
PVOMA1FFRecognizerFactory::CreateRecognizerPlugin()
07-14 10:40:36.265: DEBUG/(12290): SISO TEST 
PVOMA1FFRecognizerFactory::CreateRecognizerPlugin() plugin found
07-14 10:40:36.265: DEBUG/(12290): SISO TEST 
PVOMA1FFRecognizerFactory::DestroyRecognizerPlugin()

07-14 10:40:36.290: ERROR/(12290): ASF_HeaderObjectLoad : ERROR code = 4
07-14 10:40:36.290: ERROR/OsclAsyncFile(12290): OsclAsyncFile::ConstructL!!
07-14 10:40:36.560: WARN/PlayerDriver(12290): Using generic video MIO
07-14 10:40:36.570: ERROR/OsclAsyncFile(12290): OsclAsyncFile::ConstructL!!
07-14 10:40:36.715: ERROR/OsclAsyncFile(12290):
07-14 10:40:36.950: ERROR/VideoMIO(12290): 
AndroidSurfaceOutput::setParametersSync()  VIDEO RENDERER 1
07-14 10:41:10.215: DEBUG/(12290): SISO TEST registering 
PVMFRecognizerPluginFactory
07-14 10:41:10.215: DEBUG/(12290): SISO TEST registering 
PVMFRecognizerPluginFactory success
07-14 10:41:10.220: DEBUG/(12290): SISO TEST 
PVOMA1FFRecognizerFactory::CreateRecognizerPlugin()
07-14 10:41:10.220: DEBUG/(12290): SISO TEST 
PVOMA1FFRecognizerFactory::CreateRecognizerPlugin() plugin found
07-14 10:41:10.220: DEBUG/(12290): SISO TEST 
PVOMA1FFRecognizerFactory::DestroyRecognizerPlugin()

07-14 10:41:10.245: ERROR/(12290): ASF_HeaderObjectLoad : ERROR code = 4
07-14 10:41:10.245: ERROR/OsclAsyncFile(12290): OsclAsyncFile::ConstructL!!
07-14 10:41:10.525: WARN/PlayerDriver(12290): Using generic video MIO
07-14 10:41:10.535: ERROR/OsclAsyncFile(12290): OsclAsyncFile::ConstructL!!
07-14 10:41:10.680: ERROR/OsclAsyncFile(12290): OsclAsyncFile::ConstructL!!
07-14 10:41:10.835: ERROR/VideoMIO(12290): 
AndroidSurfaceOutput::setParametersSync()  VIDEO RENDERER 1
07-14 10:41:13.040: INFO/AudioHardwareALSA(12290): Output standby 
called!!. Turn off PCM device.


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


[android-developers] Re: how to deal with button clickevent in a listview?

2010-07-13 Thread Jeruliu
Well, that will be similar with handling the checkbox in the item.

I handled it in my customized adapter with a dirty approach.

On Jul 12, 4:55 pm, 苗忠良  wrote:
> hi,Jeruliu:
> I need not that how to handle the item,  in my code, I wrote it , I want
> to know is that how to handle the button in the item.
>
> but still thank you!
>
> 2010/7/12 Jeruliu 
>
> > Please find my working code snippet below:
>
> > // get a reference to the ListView
> > listView = (ListView) findViewById(android.R.id.list);
> > ...
> > // single click event
> > listView.setOnItemClickListener(new OnItemClickListener() {
> > public void onItemClick(AdapterView arg0, View arg1, int arg2,
> > long arg3) {
>
> > My list view works with the customized adapter.
>
> > On Jul 11, 9:18 pm, 苗忠良  wrote:
> > > hi,all:
>
> > >   I write a listactivty,the item including a textview and a button,the
> > data
> > > came from a sqlite。but in handling the clickevent , i meet some problem,
> > in
> > > the CursorAdapter's bindView() function,i cann't get the current
> > position。in
> > > log,i find position of Cursor is the position I last click the item of
> > > listview.
> > >   the code as follows:
> > > package miaozl.hello;
>
> > > import android.app.ListActivity;
> > > import android.content.Context;
> > > import android.database.Cursor;
> > > import android.os.Bundle;
> > > import android.util.Log;
> > > import android.view.LayoutInflater;
> > > import android.view.View;
> > > import android.view.ViewGroup;
> > > import android.view.View.OnClickListener;
> > > import android.widget.AdapterView;
> > > import android.widget.Button;
> > > import android.widget.CursorAdapter;
> > > import android.widget.ImageButton;
> > > import android.widget.ListView;
> > > import android.widget.SimpleCursorAdapter;
> > > import android.widget.TextView;
>
> > > public class helloActivity extends ListActivity{
> > > private helloAdapter mDbHelper;
> > > private final static String TAG ="helloActivity";
> > > private static LayoutInflater mFactory;
> > > ListView lv;
> > > /** Called when the activity is first created. */
> > > @Override
> > > public void onCreate(Bundle savedInstanceState) {
> > > super.onCreate(savedInstanceState);
> > > mDbHelper = new helloAdapter(this);
> > > mDbHelper.open();
> > > mFactory = LayoutInflater.from(this);
> > > lv= getListView();
> > > lv.setChoiceMode(1);
> > > lv.setOnItemClickListener(new AdapterView.OnItemClickListener(){
>
> > > @Override
> > > public void onItemClick(AdapterView arg0, View arg1, int
> > > arg2,
> > > long arg3) {
> > > // TODO Auto-generated method stub
> > > Log.d(TAG,"onItemClick===arg3 is ==="+arg3);
> > > }
>
> > > });
> > > fillData();
> > >  }
> > > private void fillData() {
> > > // TODO Auto-generated method stub
> > > Cursor c = mDbHelper.fetchAllNotes();
> > > startManagingCursor(c);
>
> > > String[] from = new String[] {
> > > helloAdapter.KEY_WORD,helloAdapter.KEY_ID};
> > > int[] to = new int[] { R.id.word,R.id.button};
> > > lv.setAdapter(new ListAdapter(this, c));
> > > }
> > > private static class ListAdapter extends CursorAdapter {
>
> > > public ListAdapter(Context context, Cursor c) {
> > > super(context, c);
> > > // TODO Auto-generated constructor stub
> > > }
>
> > > @Override
> > > public void bindView(View view, Context context, final Cursor
> > > cursor) {
> > > // TODO Auto-generated method stub
> > > Button onButton=(Button)view.findViewById(R.id.button);
> > > onButton.setOnClickListener(new OnClickListener(){
>
> > > @Override
> > > public void onClick(View arg0) {
> > > // TODO Auto-generated method stub
> > > Log.d(TAG,
> > > "=cursor.getPosition()="+cursor.getPosition());
> > > }
> > > });
>
> > > }
>
> > > @Override
> > > public View newView(Context context, Cursor cursor, ViewGroup
> > > parent) {
> > > // TODO Auto-generated method stub
> > > View ret= mFactory.inflate(R.layout.list_item,parent,false);
> > > TextView word=(TextView)ret.findViewById(R.id.word);
> > > Button onButton=(Button)ret.findViewById(R.id.button);
> > > onButton.setFocusable(false);
>
> > word.setText(cursor.getString(cursor.getColumnIndex(helloAdapter.KEY_WORD)));
> > > onButton.setBackgroundResource(R.drawable.icon);
> > > return ret;
> > > }
>
> > > }
>
> > > }
>
> > >  the ListAdapter as fallows:
>
> > > package miaozl.hello;
>
> > > import android.content.ContentValues;
> > > import android.content.Context;
> > > import andro

[android-developers] Re: Android market hiding apps with bluetooth permissions from Android 1.5 and 1.6

2010-07-13 Thread DonFrench
Ok, I clicked the star and added my support.

On Jul 13, 12:17 pm, "Jonas Petersson"  wrote:
> On 07/13/2010 09:05 PM, DonFrench wrote:
>  > > [Joe's app ]
>
> > So Bluetooth is not necessary to benefit from using your app but those
> > whose phones support it can reap the additional Bluetooth benefits
> > that you so thoughtfully added, is that it?.   Since your app is still
> > valuable even without Bluetooth functionality, people with pre-2.0
> > phones should not be prohibited from purchasing it, right?   Well, you
> > make a good point.
>
> IMHO, the above case is very similar to the enhancement request I added
> almost 6 months ago:
>
> http://code.google.com/p/android/issues/detail?id=6266
>
> Some permissions are non-critical for the application and it should be
> possible to flag them as such and then let the application find out
> whether it was given or not and adjust accordingly.
>
> So far only 51 people seem to have agreed with me, so either I'm wrong
> or most people have not realized why this would be significant enhancement.
>
>                         Best / Jonas

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


[android-developers] Market question about copy protection

2010-07-13 Thread Stephen Lebed
Hi all,

I would have posted this in the Android Market group, but it looks
like there's no one home over there.

Anyway, I have an paid app currently selling in the market with its
copy protection turned on.  I'm thinking about turning this off in
order to reduce the size of my app and allow the "move to sd card"
function to work.

I've read that, in the past, people were having issues when the dev
switched the copy protection setting from off to on.  Is this still an
issue?  If users are still having problems then I'll leave things as
they are.  I understand that copy protection isn't really helping and
I should just leave it off, but since I've had it on through several
updates now, I'd hate to cause my users grief by changing now.

Anyone with experience in this please let me know.

Best,
Stephen Lebed

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


[android-developers] Re: how to add fixed view to PreferenceActivity

2010-07-13 Thread mkhwang
like below... there are title-bar on top, buttons on bottom and
preferences having scollbar on middle.

+-+
|Tital bar(TextView)|
+-+
| Preference 1   ||
|  ||
|--||
| Preference 2   ||
|  ||
|--||
| Preference 3   ||
|  ||
|--||
| Preference 4   ||
|   |
|---|
| Preference 5|
+---+---+---+--+
| Btn   | Btn  | Btn  | Btn  |
|   1|   2   |   3|   4   |
+-+

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


[android-developers] Where should I change a ListView's backing data from?

2010-07-13 Thread CodeFusion
I have a ListView that is filled from my adapter with my custom
views.  Each view has two buttons, one that starts another activity to
edit the contents of that list item and one to delete that item.

My question is where should my ClickEvent handlers for those buttons
be?  Should I put them right in my custom view code since I have all
the information I need? Should I start an ASyncTask that deletes the
item and updates the adapter data and calls onDataSetChanged() etc?

Should all of this be bubbled up through events to my ListActivity?

I could probably make it work at any level, but at what level along
this hierarchy (Activity->ListView->Adapter->ListItemView) is the
proper place to edit/delete backing data for the ListView?

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


[android-developers] facebook api help

2010-07-13 Thread XiaoDar
i've been palying with facebok-android api for a few days now
i've followed the tutorial from
http://www.mobisoftinfotech.com/blog/android/845/
and now i've successfully get the app to work
however i would like to preset a default value in the text box here
http://www.mobisoftinfotech.com/blog/wp-content/uploads/2010/05/3rd.jpg
i'm trying to develop a scanner/facebook app that auto adds whatever
text i scan frmo the scanner to the text box as shown above.
for now i'm trying to pre-set a value in the textbox before going into
the scanner part.
anyone know how to preset the values?
thanks in advance, greatly appreciated

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


[android-developers] How to compile and install mplayer from source code

2010-07-13 Thread xlshe
Hi,

I want to compile and install mplayer for my android phone. Has anyone
done the similar thing? Can you give me some suggestion about how to
do it? Thank you very much!

Best regards,
Longsheng Xia

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


[android-developers] Re: Setting emulator phone number

2010-07-13 Thread jotobjects
Sorry to reply to my own posting.  I'm asking because my project is
using the Telephony API getLine1Number() and I'm wondering if the
telephone number is the same on all emulators or if it can be changed
somehow for testing without getting the same number every time.
Anybody have experience with that question?


On Jul 12, 10:20 pm, jotobjects  wrote:
> In Settings it shows a phone number for the device when running the
> emulator.  It shows the same phone number with several different
> AVD's.  Is this number the same across all development systems (i.e.,
> is it hardcoded or random or...)?  Can it be set to some specific
> number and how to do that?

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


[android-developers] Re: Fixing a performance issue on a financial calculator program

2010-07-13 Thread Zsolt Vasvari
In my app, in a generic report viewer, I just draw the lines on a
Canvas.  It's very fast and lightweight.   If you send me an e-mail, I
can send you my code.

On Jul 14, 2:02 am, Mark Murphy  wrote:
> On Tue, Jul 13, 2010 at 1:21 PM, Connie Walsh
>
>  wrote:
> > I am writing a financial calculator and part of my code is printing
> > out an amortization table for 25 - 30 years. Some times there can be
> > up to 2000 rows on the page. Here is my code to do this part:
>
> Ack!
>
> > Should I try to add them as the person scrolls down?
>
> You should use a ListView. This will automatically handle scrolling,
> will let you recycle your rows to minimize memory consumption, will
> only process the rows presently visible to increase execution speed,
> etc.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android 2.2 Programming Books:http://commonsware.com/books

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


[android-developers] how to add fixed view to PreferenceActivity

2010-07-13 Thread mkhwang
Hi everyone~

It occur some problems to develop U/I.

there is a PreferenceActivity that was aleady developped and is
typecally like 'Settings' of android.

by the way, the customer is requiring to change U/I like IPhone

Requirements are

1. application title-bar using ImageView(or TextView) positions to top
2. remove ContextMenu, alternativly static menu buttons positon to
bottom.
3. PreferenceActivity is able to scroll and title-bar & menu buttons
are fixed each positions.

just all.

but It's very difficult to add & fix two views in PreferenceActivity.

do you have the solution?

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


[android-developers] Re: problems with the old and new Contact API

2010-07-13 Thread Zsolt Vasvari
What you are trying to do is probably much more sophisticated than
what most people are doing with Contacts, so I wouldn't expect much
help.

If I were in your situation, I'd download the source to the Contact
app and the Contact provider and see what they are doing.  Debugging
this with the source code should be very doable.

On Jul 14, 5:33 am, Alvin  wrote:
> anyone helpe?
>
> On Jul 13, 2:29 pm, Alvin  wrote:
>
>
>
> > here's a few things i couldn't figure out and could find anyone else
> > posting them in the discussion:
> > 1.
> > In the new API
> > ContactsContract.AggregationExceptions table does not really work for
> > me: when I try to insert a row into the table, it gives me this error:
>
> > 07-13 14:20:09.399: ERROR/X(3074):
> > java.lang.UnsupportedOperationException: URI:
> > content://com.android.contacts/aggregation_exceptions, calling
> > user: 
> > my code here:
>
> > ContentValues values = new ContentValues();
> > values.put(AggregationExceptions.RAW_CONTACT_ID1,
> > String.valueOf(oldRawContactId));
> > values.put(AggregationExceptions.RAW_CONTACT_ID2,
> > String.valueOf(newRawContactId));
> > values.put(AggregationExceptions.TYPE,
> > AggregationExceptions.TYPE_KEEP_TOGETHER);
> > mContentResolver.insert(AggregationExceptions.CONTENT_URI, values);
>
> > and I'm sure the two raw contact id exists.
>
> > 2.
> > in the old API:
> > when I create a group in Contact book, the name of the group is not
> > shown(or not shown correctly)
> > here's the code:
>
> > ContentValues values = new ContentValues();
> > values.put(Contacts.Groups.SHOULD_SYNC, 1);
> > values.put(Contacts.Groups.SYSTEM_ID, mGroupID);
> > values.put(Contacts.Groups.NAME, mGroupTitle);
> > mContentResolver.insert(Contacts.Groups.CONTENT_URI, values);
>
> > 3.
> > in the old API:
> > when I insert a custom IM contact method for a contact, the data is
> > inserted and shown correctly, but user cannot edit the contact using
> > the default contact app any more. If I remove the contact method, user
> > can edit the contact again.
> > here's the code for inserting the contact method:
>
> > ContentValues values = new ContentValues();
> > values.put(ContactMethods.PERSON_ID, newContactId);
> > values.put(ContactMethods.KIND, Contacts.KIND_IM);
> > values.put(ContactMethods.TYPE, ContactMethods.TYPE_CUSTOM);
> > values.put(ContactMethods.AUX_DATA,
> > ContactMethods.encodeCustomImProtocol(MYIM_PROTOCOL));
> > values.put(ContactMethods.DATA, buddyId);
> > values.put(ContactMethods.ISPRIMARY, 0);
> > values.put(ContactMethods.LABEL, IM_LABEL);
>
> > mContentResolver.insert(ContactMethods.CONTENT_URI, values);- 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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: How can I find unneeded permission?

2010-07-13 Thread Dianne Hackborn
On Tue, Jul 13, 2010 at 11:54 AM, deg  wrote:

> But, I do hope that some toolmeister inside Google sees this thread
> and picks up the gauntlet someday.
>

You don't need Google to do such things.

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

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

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

[android-developers] Stack Exchange Audio Programming Proposal

2010-07-13 Thread jeremynealbrown
Hi,

If you are generally interested in Audio Programming and a
StackOverflow/StackExchange enthusiast, be sure to follow the
development of the Audio Programming proposal @ Area51:

http://area51.stackexchange.com/proposals/13007/audio-programming

In order for this to become an actual forum we need to generate at
least 60 followers.

Thanks,
~Jeremy

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


[android-developers] how to setup vold.conf for USB mass storage device

2010-07-13 Thread rhardy
Can anyone tell me how to setup vold.conf for ums.  I can't find any
documentation on it.  I want vold to mount a hotplugged USB storage
device and broadcast notifications (intents) when it is plugged and
unplugged.

Thanks

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


Re: [android-developers] Force an Application to be alive

2010-07-13 Thread Dianne Hackborn
Please don't use that.  I didn't realize this got left in the public API...
 it should not be. :(  It is very broken for apps to use this; expect it to
be turned into a no-op in the future.

On Tue, Jul 13, 2010 at 12:54 AM, y 00o00o0o0o000o00o0o0o <
yszhou4t...@gmail.com> wrote:

> I read the reference and come across this. You can try if it works for you.
>
>
> http://developer.android.com/reference/android/Manifest.permission.html#PERSISTENT_ACTIVITY
>
> sincerely
> yolilla
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

Re: [android-developers] Re: Are the Maps libraries included on every phone?

2010-07-13 Thread Mark Murphy
On Tue, Jul 13, 2010 at 8:16 PM, Dianne Hackborn  wrote:
> 2. You can use  (I think this was
> introduced in 2.0) to say you don't require the library.  If the library
> doesn't exist you can still be installed, and you can use the normal Java
> tricks of dealing with those classes not being there.

Ah...missed that. Thanks!

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

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

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


Re: [android-developers] Re: 3D Game Development

2010-07-13 Thread Renan Henrique Pereira de Lima
Thank you all, guys!

I'm looking for some kind of 3D game development engine or API, like an
Unreal Engine, but for mobile devices. Apparently, there aren't too much.
Recently, I've found Shiva 3D, which has the capability to export it games
to mobile. Do you know this engine? Or other one?

Thanks again

Renan

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

Re: [android-developers] Re: Are the Maps libraries included on every phone?

2010-07-13 Thread Dianne Hackborn
Not true.

1. If you say  by default it is assumed you require the
library, and thus your app will not be shown in market on devices that don't
have the library and the platform will fail installing the app if the
library doesn't exist.

2. You can use  (I think this was
introduced in 2.0) to say you don't require the library.  If the library
doesn't exist you can still be installed, and you can use the normal Java
tricks of dealing with those classes not being there.

On Tue, Jul 13, 2010 at 3:50 PM, Mark Murphy wrote:

> On Tue, Jul 13, 2010 at 6:48 PM, paladin  wrote:
> > So there would be no way to make the maps part of your app optional?
>
> Unfortunately, no. You could have multiple editions of your app on the
> Market (Maps and no-Maps, like the "lite" vs. "pro" editions you see
> other developers use).
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android 2.2 Programming Books: http://commonsware.com/books
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

Re: [android-developers] Re: how to check if the current thread is in the ui thread?

2010-07-13 Thread Dianne Hackborn
On Tue, Jul 13, 2010 at 12:30 PM, Frank Weiss  wrote:

> I suppose you might also try just catching the IllegalStateException
> which would occur if not a UI thread AFAIK..
>

You can't trust this will actually be shown.  We try to show it when we do
detect a bad thread is entering the view hierarchy; however the view
hierarchy is not multi-thread safe so once you stick another thread in
there, it is undefined what will happen (except it probably won't be good).

Also the thread could well have modified some critical state in a bad way
before it ever figured out to throw the exception.

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

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

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

[android-developers] Re: Killi Process with files on SD card

2010-07-13 Thread ls02
I tried this on Motorola DROID and it does not work. I do not receive
any events in receiver onReceive.

On Jul 10, 9:23 pm, Streets Of Boston  wrote:
> Register your broadcast receiver like this:
>
> IntentFilter intentFilter = new
> IntentFilter(Intent.ACTION_MEDIA_EJECT);
> intentFilter.addAction(Intent.ACTION_MEDIA_MOUNTED);
> intentFilter.addDataScheme("file");
> intentFilter.addDataAuthority("*", null);
> intentFilter.addDataPath((mIsExternal
>                            ?CursorUtils.EXTERNAL_STORAGE_ROOT
>                            :CursorUtils.PHONE_STORAGE_ROOT).getAbsolutePath(),
> PatternMatcher.PATTERN_LITERAL);
> context.registerReceiver(this, intentFilter);
>
> Then close all your files when you get an ACTION_MEDIA_EJECT
> and re-open them (if necessary) on ACTION_MEDIA_MOUNTED.
> (in the 'public void onReceive(Context context, Intent intent)' method
> of this broadcast receiver).
>
> (EXTERNAL_STORAGE_ROOT is the standard value for external-storage
> (usually "/sdcard") and PHONE_STORAGE_ROOT is "/emmc" (for HTC
> Incredible and such phones)).
>
> I'm not sure if this is the 'official' way of doing it, but it works
> for me. :)
>
> On Jul 10, 3:50 pm, ls02  wrote:
>
> > I register for this broadcast. However the process is killed before I
> > receive any broadcast event.
>
> > On Jul 10, 2:59 pm, Dianne Hackborn  wrote:
>
> > > There is a broadcast sent when the SD card is being unmounted (sorry I 
> > > don't
> > > remember the name off-hand).  You should close all your files at that 
> > > point.
> > >  If you don't, the platform needs to kill the process because Linux can't
> > > unmount the file system while any files remain open on it.
>
> > > On Sat, Jul 10, 2010 at 10:35 AM, ls02  wrote:
> > > > I found that Android kills my app process that has files open on SD
> > > > card when the card is mounted when the device connects to a computer.
> > > > It is done without any notification, I see in the log something like
> > > > KillProcessWithFilesOpenedOnCard message, my app receives no
> > > > notification, has no chance to gracefully shutdown. Moreover Android
> > > > restarts my app immediately after killing it with latest Activity not
> > > > the default activity launched in default standard mode. It does it
> > > > while the card is still mounted and device is still connected to a
> > > > computer.
>
> > > > Can someone explain this all to me, how it I supposed to work, and if
> > > > there is any way to alter this weird rude behavior? Particularly, if
> > > > there is way to get any notification before the process is killed by
> > > > the OS and to prevent relaunching it while the card is still mounted?
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > hack...@android.com
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support, and so won't reply to such e-mails.  All such
> > > questions should be posted on public forums, where I and others can see 
> > > and
> > > answer them.- 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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Sections in ListView

2010-07-13 Thread Mark Murphy
On Tue, Jul 13, 2010 at 6:54 PM, Jens  wrote:
> What is the preferred way to sectionize a ListView by declaring a
> header before each section?

In the end, you need a ListAdapter that is aware of your sections and
can put in the headings as needed. You could roll one yourself. Or,
you could use my MergeAdapter:

http://github.com/commonsguy/cwac-merge

Here is a sample of using that for section headings:

http://github.com/commonsguy/cw-advandroid/tree/master/ListView/Sections/

There are other implementations of the same concept floating around as well.

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

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

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


[android-developers] Full size image with scroll ability

2010-07-13 Thread Tommy
Hi everyone,

I have an image that I want to be able to display full size but when I
place it in my imageview it scales. I would like it to display full
size with scroll bars. Is there a way I can make my main view that the
image view is in have scroll bars vertical and horizontal or how can I
do this. The images are local on the SD card. I would really like to
get the same effect that the webview offers if i were to look at these
image from a URL.

Thanks for your help,

Tommy

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


[android-developers] Sections in ListView

2010-07-13 Thread Jens
What is the preferred way to sectionize a ListView by declaring a
header before each section?

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


[android-developers] Numeric Soft Keyboard

2010-07-13 Thread Shivaansh
How can we default to a numeric soft keyboard when the user focuses on
a web page edit field where input=number?

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


Re: [android-developers] Re: Are the Maps libraries included on every phone?

2010-07-13 Thread Mark Murphy
On Tue, Jul 13, 2010 at 6:48 PM, paladin  wrote:
> So there would be no way to make the maps part of your app optional?

Unfortunately, no. You could have multiple editions of your app on the
Market (Maps and no-Maps, like the "lite" vs. "pro" editions you see
other developers use).

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

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

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


Re: [android-developers] xcode equivalent for android development

2010-07-13 Thread aniruddha dhamal
Run your android device
Go to tools folder and run ddms.
You will get the log.


On Tue, Jul 13, 2010 at 3:32 PM, Frank Weiss  wrote:

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



-- 
Thanks and Regards

Aniruddha Dhamal
ani123.dha...@gmail.com

" No matter which direction you start
Its always against the wind coming  back "

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

[android-developers] Re: Are the Maps libraries included on every phone?

2010-07-13 Thread paladin
On Jul 13, 4:46 pm, TreKing  wrote:
> On Tue, Jul 13, 2010 at 2:34 PM, paladin  wrote:
> You don't, but your app probably won't be able to be installed on the device
> if you require the library. For example, creating an AVD without the Google
> Maps add-on and trying to install my app with the "uses-library" tag yields
> an install error: "INSTALL_FAILED_MISSING_SHARED_LIBRARY".

So there would be no way to make the maps part of your app optional?

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


Re: [android-developers] xcode equivalent for android development

2010-07-13 Thread Frank Weiss
www.eclipse.org + Android SDK

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


Re: [android-developers] Re: how to check if the current thread is in the ui thread?

2010-07-13 Thread TreKing
On Tue, Jul 13, 2010 at 2:30 PM, Frank Weiss  wrote:

> I suppose you might also try just catching the IllegalStateException which
> would occur if not a UI thread AFAIK..
>

Exceptions are for exceptional situations. You really should not be using
them for logic flow, and definitely not where threads are concerned.

Particularly if this code is to be run frequently, the trying and
particularly the catching will kill your performance unnecessarily.

I would do as Mark suggests.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

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

Re: [android-developers] Google Maps API in Israel

2010-07-13 Thread Steve Howard
Likely the same as this:

http://code.google.com/p/gmaps-api-issues/issues/detail?id=664

Steve

On Tue, Jul 13, 2010 at 1:15 PM, oriharel  wrote:

> Can a Googler please answer this one -
> how come I don't see detailed Israel map when I integrate with the
> MapView in my MapActivity?
> I can see just about any other country except Israel.
>
> thanks,
> Ori
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] xcode equivalent for android development

2010-07-13 Thread rahul jain
Hi there !,

Whats the xcode equivalent for android ? ..like i would like to see
crash viewer, log viewer and etc.

Thanks.

RJ

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


[android-developers] Re: problems with the old and new Contact API

2010-07-13 Thread Alvin
anyone helpe?

On Jul 13, 2:29 pm, Alvin  wrote:
> here's a few things i couldn't figure out and could find anyone else
> posting them in the discussion:
> 1.
> In the new API
> ContactsContract.AggregationExceptions table does not really work for
> me: when I try to insert a row into the table, it gives me this error:
>
> 07-13 14:20:09.399: ERROR/X(3074):
> java.lang.UnsupportedOperationException: URI:
> content://com.android.contacts/aggregation_exceptions, calling
> user: 
> my code here:
>
> ContentValues values = new ContentValues();
> values.put(AggregationExceptions.RAW_CONTACT_ID1,
> String.valueOf(oldRawContactId));
> values.put(AggregationExceptions.RAW_CONTACT_ID2,
> String.valueOf(newRawContactId));
> values.put(AggregationExceptions.TYPE,
> AggregationExceptions.TYPE_KEEP_TOGETHER);
> mContentResolver.insert(AggregationExceptions.CONTENT_URI, values);
>
> and I'm sure the two raw contact id exists.
>
> 2.
> in the old API:
> when I create a group in Contact book, the name of the group is not
> shown(or not shown correctly)
> here's the code:
>
> ContentValues values = new ContentValues();
> values.put(Contacts.Groups.SHOULD_SYNC, 1);
> values.put(Contacts.Groups.SYSTEM_ID, mGroupID);
> values.put(Contacts.Groups.NAME, mGroupTitle);
> mContentResolver.insert(Contacts.Groups.CONTENT_URI, values);
>
> 3.
> in the old API:
> when I insert a custom IM contact method for a contact, the data is
> inserted and shown correctly, but user cannot edit the contact using
> the default contact app any more. If I remove the contact method, user
> can edit the contact again.
> here's the code for inserting the contact method:
>
> ContentValues values = new ContentValues();
> values.put(ContactMethods.PERSON_ID, newContactId);
> values.put(ContactMethods.KIND, Contacts.KIND_IM);
> values.put(ContactMethods.TYPE, ContactMethods.TYPE_CUSTOM);
> values.put(ContactMethods.AUX_DATA,
> ContactMethods.encodeCustomImProtocol(MYIM_PROTOCOL));
> values.put(ContactMethods.DATA, buddyId);
> values.put(ContactMethods.ISPRIMARY, 0);
> values.put(ContactMethods.LABEL, IM_LABEL);
>
> mContentResolver.insert(ContactMethods.CONTENT_URI, values);

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


[android-developers] Re: merge a bitmap overtop of another

2010-07-13 Thread String
Use Canvas.drawBitmap(Bitmap bitmap, Rect src, Rect dst, Paint paint)
with a Paint having the appropriate Porter/Duff transfer mode. Exactly
which mode you want depends on how your code is set up, but it'll
probably be either SRC_OVER or DST_OVER.

String

On Jul 13, 8:47 pm, Eric Murtaugh  wrote:
> ok so i have sort of a picture frame type bitmap and a picture bitmap
> so think of it like this i have a 64x64 frame image where (5,6) to
> like (56,54) is where the picture should be, how can i merge the
> picture bitmap into the frame bitmap with those bounds and make it one
> bitmap? ive been searching everywhere to no avail please and thanks

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


[android-developers] Re: Attach debugger to a process running in the emulator via eclipse.

2010-07-13 Thread MB
Yes, it is enabled. I killed the process in step 1.) via the suspend/
terminate button in the eclipse debugger gui.
After the process is killed I re launch it in the emulator. When it is
relaunched, I want to re-attach the debugger.

On Jul 13, 12:47 am, Kostya Vasilyev  wrote:
> Is debugging enabled in your application's manifest? You can only debug
> applications that are marked for debugging.
>
> -- Kostya
>
> 13.07.2010 11:44, MB пишет:
>
>
>
>
>
> > Hi,
>
> > Is there some way to attach debugger to a process running in the
> > emulator via eclipse?
>
> > I am trying to debug the following scenario.
>
> > 1.) Kill a process via pressing the red terminate button from Debug
> > perspective in eclipse.
> > 2.) Relaunch the app in emulator.
>
> > When the app is relaunched in step 2.), I want to step through the
> > debugger.
> > I am unable to figure out a way to attach debugger to a process
> > running in the emulator.
>
> > I would really appreciate any pointers regarding this.
>
> > Thanks a lot,
>
> > --MB.
>
> --
> Kostya Vasilev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com

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


[android-developers] EditText input text not drawing after a while

2010-07-13 Thread Al
I have a chat app and one the problems I haven't been able to solve is
the EditText input box stops showing text after a while. I've verified
the problem myself but it seems to depend on the IME you use. I use
HTC's ime and have never had the problem. For purposes of finding the
problem, I switched to stock Android ime and the problem showed up
quite quickly.

After a bit of typing and sending messages, once you type, the
EditText no longer seems to redraw and show the input. If you hide the
IME, the text reappears.

The problem _seems_ to have started around the time I made an option
for disabling/enabling auto correction and capitalization. The code
I'm using for that is below:

final boolean auto =
prefs.getBoolean(getString(R.string.pref_auto_cap_correct), true);

int types = mEt.getInputType();
types = auto
 ? types | (InputType.TYPE_TEXT_FLAG_AUTO_CORRECT |
InputType.TYPE_TEXT_FLAG_CAP_SENTENCES)
 : types & ~(InputType.TYPE_TEXT_FLAG_AUTO_CORRECT |
InputType.TYPE_TEXT_FLAG_CAP_SENTENCES);

mEt.setInputType(types);

and my layout xml is:



I'd _really_ like to get to the bottom of this.

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


[android-developers] Re: multiple mapviews

2010-07-13 Thread Michael
Good idea. I would put them in tabs

On Jul 13, 9:46 am, TreKing  wrote:
> On Tue, Jul 13, 2010 at 12:31 AM, rukiman  wrote:
> > Any way I can implement this?
>
> Idea: Override onDraw() on the MapView (or Activity, or wherever), set the
> parameters you need (location, zoom level) to draw scaled down, draw to a
> canvas or bitmap, scale up, draw again to a new canvas or bitmap, then
> stitch the two together somehow. Fill in the specific, more complicated
> details from there =).
>
> --- 
> --
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://sites.google.com/site/rezmobileapps/treking

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


Re: [android-developers] Are the Maps libraries included on every phone?

2010-07-13 Thread TreKing
On Tue, Jul 13, 2010 at 2:34 PM, paladin  wrote:

> Does anyone know if these libraries are guaranteed to be included on every
> Android phone?
>

I don't think it's absolutely guaranteed, but it's a pretty good bet.


> If not, how would I know if they are not there?
>

You don't, but your app probably won't be able to be installed on the device
if you require the library. For example, creating an AVD without the Google
Maps add-on and trying to install my app with the "uses-library" tag yields
an install error: "INSTALL_FAILED_MISSING_SHARED_LIBRARY".

I assume the same would happen on an actual device that did not have the
library.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

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

[android-developers] Re: Force an Application to be alive

2010-07-13 Thread mah
Or you could make use of the AlarmManager.

On Jul 13, 8:59 am, Nadav  wrote:
> However you might be able to set up a broadcast receiver for different
> system events that would at least restart your service in case its
> down. For example listening to the boot, phone being plugged into
> power, etc..
>
> Nadav
>
> On Jul 13, 7:44 am, Mark Murphy  wrote:
>
> > On Tue, Jul 13, 2010 at 3:49 AM, perumal316  wrote:
> > > I am writing an application to do fileobservation which can be done.
> > > Is there any way I can make the application to run in the background
> > > without killing it?
>
> > No, sorry. Anything can be killed by the user or the operating system.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> > Android 2.2 Programming Books:http://commonsware.com/books

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


Re: [android-developers] Re: Can I put a donation link in my free app?

2010-07-13 Thread Tomáš Hubálek
Michael,

seriously: where to ask? And do you think that you get it?

Tom

On Jul 13, 2010 10:30 PM, "Michael A."  wrote:

Hi,

You would have to ask Google about that, but the existence or lack of
a market payment processor does not really change the terms of
service. It's just one way in which those of us who are outside the
Google Checkout zone are screwed over by the Android market.

Regards,

Michael A.



On Jun 30, 10:21 am, Tomáš Hubálek  wrote:
> And what if market payment pro...
> On Wed, Jun 30, 2010 at 10:17 AM, Michael A. wrote:

>
>
>
> > Hi,
>
> > As I understand it (and as Andrew also mentions); yes - you can put a
> > donati...
> > 

>

>
> > > >> For more options, visit this group at
> > > >>http://groups.google.com/group/android-deve...
> > 

>

>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-develo...
>
---
> Tom Hubalek (tom.huba...@gmail.com),http://android.hubalek.net,
http://blog.hubalek.net/http://facebook.com/thubalek,http://www.linkedin.com/in/thubalekhttp://twitter.com/thubalek,http://twitter.com/android_dev_tom

--

You received this message because you are subscribed to the Google
Groups "Android Developers" group...

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

Re: [android-developers] Re: Android market hiding apps with bluetooth permissions from Android 1.5 and 1.6

2010-07-13 Thread Kostya Vasilyev


To original poster:

I am guessing you are already using reflection to use Android 1.5 
Bluetooth APIs vs. 2.0 APIs, similar to this:


http://code.google.com/p/backport-android-bluetooth

If that's the case, seems like you don't have to rely on Market to only 
make your app available to phones with Bluetooth.


To Jonas:

The app would have to be notified / query which permissions it was 
granted, and fail or downgrade gracefully. I guess that's the idea, but 
there are already two ways to achieve this: coarse-grained 
android:minSdkVersion, and fine-grained Java reflection.


-- Kostya

14.07.2010 0:17, Michael MacDonald пишет:

Seems like a work-around for that would be to have a base app that only
requests the base permissions, and have it on-demand install an optional
add-on that requests the additional permissions.  The base app calls
into the add-on to do the additional functionality.

On 07/13/10 15:17, Jonas Petersson wrote:
   

On 07/13/2010 09:05 PM, DonFrench wrote:
 

[Joe's app ]
 

So Bluetooth is not necessary to benefit from using your app but those
whose phones support it can reap the additional Bluetooth benefits
that you so thoughtfully added, is that it?.   Since your app is still
valuable even without Bluetooth functionality, people with pre-2.0
phones should not be prohibited from purchasing it, right?   Well, you
make a good point.
   

IMHO, the above case is very similar to the enhancement request I
added almost 6 months ago:

http://code.google.com/p/android/issues/detail?id=6266

Some permissions are non-critical for the application and it should be
possible to flag them as such and then let the application find out
whether it was given or not and adjust accordingly.

So far only 51 people seem to have agreed with me, so either I'm wrong
or most people have not realized why this would be significant
enhancement.

 Best / Jonas

 
   



--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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


[android-developers] Re: Can I put a donation link in my free app?

2010-07-13 Thread Michael A.
Hi,

You would have to ask Google about that, but the existence or lack of
a market payment processor does not really change the terms of
service. It's just one way in which those of us who are outside the
Google Checkout zone are screwed over by the Android market.

Regards,

Michael A.


On Jun 30, 10:21 am, Tomáš Hubálek  wrote:
> And what if market payment processor does not exist? Currently there is no
> market payment processor for many countries available?
>
> Tom
>
> On Wed, Jun 30, 2010 at 10:17 AM, Michael A. wrote:
>
>
>
> > Hi,
>
> > As I understand it (and as Andrew also mentions); yes - you can put a
> > donation link in your App.
>
> > However, you may not offer the user anything in return for the
> > donation (i.e., no rewards), as that would amount to a sale and
> > therefore be in violation of the TOS which require sales to go through
> > the market payment processor.
>
> > If there is a problem, that would seem to be the critical clause.
>
> > Regards,
>
> > Michael A.
>
> > On Jun 30, 3:37 am, Alex Xin  wrote:
> > > Hi, Chandana
>
> > > Thanks for this very useful post!
>
> > > From the post one of Google employee wrote:
>
> > > *Our policies are intended to protect users from a situation where an app
> > is
> > > listed for free, but then actually requires a payment inside the app in
> > > order for it to function. *
> > > *
> > > *
> > > *My question:*
> > > *User can use my free app in full function mode without any payment
> > > required. There's no any notification to user that they should donate in
> > > order to use my app, just a donation link in app's About dialog. What I
> > want
> > > to add is just a donation, so my case is not the situation that they try
> > > to prevent. Does Google allow this?*
> > > *
> > > *thank you
> > > Alex
>
> > > On Sun, Jun 27, 2010 at 10:36 PM, Chandana Napagoda  > >wrote:
>
> > > > Hi,
>
> > > > I think you need to go through these post's. They said you dev account
> > > > might be banned.
>
> > > >http://www.google.com/support/forum/p/Android+Market/thread?tid=588c3.
> > ..
>
> > > > Chandana
>
> > > > On 27 June 2010 18:46, Alex Xin  wrote:
>
> > > >> Hi, folks
>
> > > >> I want to login my app as free app, but I think maybe I can put a
> > donation
> > > >> link in my app, of course, my users can use my app without any
> > donations. I
> > > >> don't sell my app.
> > > >> Does Google allow developer to do this?
>
> > > >> Thanks a lot
>
> > > >> Alex
>
> > > >>  --
> > > >> You received this message because you are subscribed to the Google
> > > >> Groups "Android Developers" group.
> > > >> To post to this group, send email to
> > android-developers@googlegroups.com
> > > >> To unsubscribe from this group, send email to
> > > >> android-developers+unsubscr...@googlegroups.com
> > 
>
> > > >> For more options, visit this group at
> > > >>http://groups.google.com/group/android-developers?hl=en
>
> > > >  --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> > android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > 
>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> ---
> Tom Hubalek 
> (tom.huba...@gmail.com),http://android.hubalek.net,http://blog.hubalek.net/http://facebook.com/thubalek,http://www.linkedin.com/in/thubalekhttp://twitter.com/thubalek,http://twitter.com/android_dev_tom

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


[android-developers] soft keyboard selection from app?

2010-07-13 Thread ddum...@gmail.com
So Sony appears to have included their own IME with their xperia
phones.

I have an edit box for numerical input that i have specified as number|
numberDecimal|phone
It allows for easy number entry and allows users to enter in decimal
numbers.   However the IME in the xperia phones is missing the decimal
key.
Is there a way to specify it should only be using the android IME?

Can I specify resources for specific phones similar to how I can
control resources for versions of 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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Android market hiding apps with bluetooth permissions from Android 1.5 and 1.6

2010-07-13 Thread Michael MacDonald
Seems like a work-around for that would be to have a base app that only
requests the base permissions, and have it on-demand install an optional
add-on that requests the additional permissions.  The base app calls
into the add-on to do the additional functionality.

On 07/13/10 15:17, Jonas Petersson wrote:
> On 07/13/2010 09:05 PM, DonFrench wrote:
> > > [Joe's app ]
>> So Bluetooth is not necessary to benefit from using your app but those
>> whose phones support it can reap the additional Bluetooth benefits
>> that you so thoughtfully added, is that it?.   Since your app is still
>> valuable even without Bluetooth functionality, people with pre-2.0
>> phones should not be prohibited from purchasing it, right?   Well, you
>> make a good point.
>
> IMHO, the above case is very similar to the enhancement request I
> added almost 6 months ago:
>
> http://code.google.com/p/android/issues/detail?id=6266
>
> Some permissions are non-critical for the application and it should be
> possible to flag them as such and then let the application find out
> whether it was given or not and adjust accordingly.
>
> So far only 51 people seem to have agreed with me, so either I'm wrong
> or most people have not realized why this would be significant
> enhancement.
>
> Best / Jonas
>

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


[android-developers] Google Maps API in Israel

2010-07-13 Thread oriharel
Can a Googler please answer this one -
how come I don't see detailed Israel map when I integrate with the
MapView in my MapActivity?
I can see just about any other country except Israel.

thanks,
Ori

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


[android-developers] Re: OpenGL ES libraries

2010-07-13 Thread Sundog
Thanks, that does look interesting, and the Apache license is less
cumbersome. Given the state of development right now though, maybe a
wait-and-see approach would be appropriate.



On Jul 13, 1:33 pm, christoph widulle
 wrote:
> http://code.google.com/p/libgdx/
>
> libgdx could be something you are looking for.
>
> Greetings,
> Christoph
>
> On 13 Jul., 16:23, Sundog  wrote:
>
> > I looked around for info on this in the group but couldn't find any...
> > so far in my OpenGL programming I've just done everything directly,
> > but I was curious if anyone had written any "wrapper" libraries for it
> > besides min3d. Min3d is great (or is getting there) but it's GPL'd,
> > making it unsuitable for a commercial product (if my understanding of
> > the license is correct).

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


Re: [android-developers] Re: Easy and fast XML Parser?

2010-07-13 Thread Mark Murphy
On Tue, Jul 13, 2010 at 3:27 PM, Frank Weiss  wrote:
> You noted that there is a marked difference, in favor of pull, for
> "compiled XML resource". What does that mean and why would it make
> such a differnce?

A compiled XML resource is an Android resource that is in XML. Like,
say, layouts. Or menus. Or preferences. Or some types of drawables,
strings, arrays, dimensions, colors, etc.

Part of the build process converts ordinary XML into a "binary XML"
format that is smaller and quicker to parse at runtime.

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

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

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


Re: [android-developers] Are the Maps libraries included on every phone?

2010-07-13 Thread Mark Murphy
On Tue, Jul 13, 2010 at 3:34 PM, paladin  wrote:
> My app uses location services, and has the manifest entry:
>
> 
>
> Does anyone know if these libraries are guaranteed to be included on
> every Android phone?

They are not guaranteed to be on every Android device.

> If not, how would I know if they are not there?

If your code is running, then they are there. The  is
supposed to block installation on devices that lack Google Maps.

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

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

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


[android-developers] Re: Are the Maps libraries included on every phone?

2010-07-13 Thread Alvin
same question

On Jul 13, 3:34 pm, paladin  wrote:
> My app uses location services, and has the manifest entry:
>
> 
>
> Does anyone know if these libraries are guaranteed to be included on
> every Android phone? If not, how would I know if they are not there?

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


[android-developers] merge a bitmap overtop of another

2010-07-13 Thread Eric Murtaugh
ok so i have sort of a picture frame type bitmap and a picture bitmap
so think of it like this i have a 64x64 frame image where (5,6) to
like (56,54) is where the picture should be, how can i merge the
picture bitmap into the frame bitmap with those bounds and make it one
bitmap? ive been searching everywhere to no avail please and thanks

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


[android-developers] Are the Maps libraries included on every phone?

2010-07-13 Thread paladin
My app uses location services, and has the manifest entry:



Does anyone know if these libraries are guaranteed to be included on
every Android phone? If not, how would I know if they are not there?

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


[android-developers] Re: OpenGL ES libraries

2010-07-13 Thread christoph widulle
http://code.google.com/p/libgdx/

libgdx could be something you are looking for.

Greetings,
Christoph

On 13 Jul., 16:23, Sundog  wrote:
> I looked around for info on this in the group but couldn't find any...
> so far in my OpenGL programming I've just done everything directly,
> but I was curious if anyone had written any "wrapper" libraries for it
> besides min3d. Min3d is great (or is getting there) but it's GPL'd,
> making it unsuitable for a commercial product (if my understanding of
> the license is correct).

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


Re: [android-developers] Re: how to check if the current thread is in the ui thread?

2010-07-13 Thread Frank Weiss
I suppose you might also try just catching the IllegalStateException
which would occur if not a UI thread AFAIK..

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


Re: [android-developers] Re: Easy and fast XML Parser?

2010-07-13 Thread Frank Weiss
I did some research on the difference between SAX push/pull parsers.
The consensus was that generally they are within an order of
magnitude, the speed varies somewhat depending on the data, and that
there is a factor of the preference for programming push vs pull.

You noted that there is a marked difference, in favor of pull, for
"compiled XML resource". What does that mean and why would it make
such a differnce?

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


Re: [android-developers] Re: Android market hiding apps with bluetooth permissions from Android 1.5 and 1.6

2010-07-13 Thread Jonas Petersson

On 07/13/2010 09:05 PM, DonFrench wrote:
> > [Joe's app ]

So Bluetooth is not necessary to benefit from using your app but those
whose phones support it can reap the additional Bluetooth benefits
that you so thoughtfully added, is that it?.   Since your app is still
valuable even without Bluetooth functionality, people with pre-2.0
phones should not be prohibited from purchasing it, right?   Well, you
make a good point.


IMHO, the above case is very similar to the enhancement request I added 
almost 6 months ago:


http://code.google.com/p/android/issues/detail?id=6266

Some permissions are non-critical for the application and it should be 
possible to flag them as such and then let the application find out 
whether it was given or not and adjust accordingly.


So far only 51 people seem to have agreed with me, so either I'm wrong 
or most people have not realized why this would be significant enhancement.


Best / Jonas

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


Re: [android-developers] Re: How to access shared preference outside of Activity

2010-07-13 Thread Gene Augustine
I had asked the question " Is it possible to pass a variable to the
characters method event in the XMLReader.parse() of a SAX2 driver? If so
does anyone have an example? and was sent a message to use
PreferenceManager.getDefaultSharedPreferences().
I entered the statement:

 SharedPreferences mySharedPreferences =

PreferenceManager.getDefaultSharedPreferences(*this*);

and received the message :
“The method getDefaultSharedPreferences(Context) in the type PreferenceManager
is not applicable for the arguments (RSSHandler)”.
Am I missing something or is this not a solution?

Thanks,
Gene


On Sun, Jul 11, 2010 at 1:26 AM, Jeruliu  wrote:

> Thanks, you solved my problem, again.
>
> On Jul 9, 7:40 pm, Mark Murphy  wrote:
> > On Fri, Jul 9, 2010 at 5:03 AM, Jeruliu  wrote:
> > > Thanks, actually i need to access the shared preference in a class
> > > that extends from BroadcastReceiver, how can i call the context then?
> >
> > PreferenceManager.getDefaultSharedPreferences(), passing in the
> > Context supplied to you in onReceive() of your BroadcastReceiver.
> >
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com|
> http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>  >
> > _The Busy Coder's Guide to Android Development_ Version 3.1 Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: Android market hiding apps with bluetooth permissions from Android 1.5 and 1.6

2010-07-13 Thread DonFrench
So Bluetooth is not necessary to benefit from using your app but those
whose phones support it can reap the additional Bluetooth benefits
that you so thoughtfully added, is that it?.   Since your app is still
valuable even without Bluetooth functionality, people with pre-2.0
phones should not be prohibited from purchasing it, right?   Well, you
make a good point.


On Jul 13, 6:47 am, Joe  wrote:
> Actually even though pre 2.0 devices don't support bluetooth fully -
> you can make your apps backward compatible. Which of course my apps
> are. It's a mistake by Google to now filter them from the market for
> 1.5 and 1.6 devices.
>
> The apps require the bluetooth permissions - they do not require the
> bluetooth feature. There is a difference.
>
> It seems now the "requires feature" option is being introduced into
> the manifest for 2.2 an assumption is being made that apps that
> require the permission also require the feature...
>
> So if your app happens to support some bluetooth function for users
> with android 2+ you have also just managed to loose 50% of users
> because they can no longer see your app.
>
> Btw this only happens for updated apps, if you already have an app on
> the market it will be ok until you update it.
>
> On Jul 13, 5:24 am, DonFrench  wrote:
>
> > I guess the lack of API support for Bluetooth is the reason Google
> > doesn't show Bluetooth-capable apps for pre-2.0 devices?  Out of
> > curiosity, what are you doing to get around the lack of Bluetooth
> > support in the APIs prior to 2.0?
>
> > On Jul 10, 5:33 am, Joe  wrote:
>
> > > Hi
>
> > > I released updates of my apps yesterday and they are being hidden from
> > > android 1.5 and 1.6 phones.
>
> > > This is due to a Market bug which hides apps with bluetooth
> > > permissions from android 1.5 and 1.6.
>
> > > Come on Google fix the market. We spend countless hours making are
> > > apps work on ALL android versions and now you do this...
>
> > > This issue has been raised since June, but has only affected me since
> > > i made an update to the market yesterday.
>
> > > I am now have annoyed customers and i am missing out on what 50% of
> > > users because of the flakey market...

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


Re: [android-developers] Re: App launching

2010-07-13 Thread Brad Gies
My data source is just a JSONArray I pass in to the constructor for my 
spinner activity, and then to the Javascript when it is ready, along 
with some other setup parameters.


If you look at the declaration for The AndoidBridge in my second message 
you will see that it is a private class that just contains the functions 
you want to be able to call from javascript, so you can set it up 
however you want.


I took a lot of the code I started with from a tutorial somewhere on the 
net... I think if you Google for "Android SpinnerActivity" you should 
find it. Unfortunately, most of my code is already highly customized so 
it's not really a great starting place.



On 13/07/2010 11:11 AM, kypriakos wrote:

Hi Brad,

What is the data source to your spinner? Or that is not necessary? I
guess because
I cannot see what is before this code segment I was curious how you
use that.
Also, I am not familiar with the AndroidBridge() - is that part of the
standard API?

Thanks


On Jul 12, 8:20 pm, Brad Gies  wrote:
   

Yes, you can read pages stored on the phone:

I'm using index.html here. Put it into your assets folder :

  webView = (WebView)
spinnerView.findViewById(R.id.spinnerviewwebview);

  webView.getSettings().setJavaScriptEnabled(true);
  webView.addJavascriptInterface(new AndroidBridge(), "android");
  webView.setVerticalScrollBarEnabled(false);

  webView.setWebChromeClient(new WebChromeClient()
  {
public void onConsoleMessage(String message, int
lineNumber, String sourceID)
{

}
  });

  webView.loadUrl("file:///android_asset/index.html");

The above also sets the WebView up to use Javascript.

On 12/07/2010 2:10 PM, kypriakos wrote:

 

In this case below, the URL can only be public and remote? I could not
read
a page stored locally on the phone - or is storing files locally not
an option?
   
 

Uri uri = Uri.parse("http://www.example.com";);
   Intent intent = new Intent(Intent.ACTION_VIEW, uri);
   startActivity(intent);
   
 

Thanks
   
 

On Jul 12, 3:21 pm, Mark Murphywrote:
   
 

On Mon, Jul 12, 2010 at 3:10 PM, kypriakoswrote:
 
 

Instead of launching a UI I was wondering if I could have a process
monitor
the execution of a javascript in the emulator's browser and read in
the output
data. Is it possible to execute a local javascript file using the
phone's browser?
   
 

You can use WebView, but only from an Activity.
 
 

If you want to embed a Javascript interpreter, you can consider Rhino.
 
 

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

Android App Developer Books:http://commonsware.com/books
 

--
Sincerely,

Brad Gies
---
Bistro Bot - Bistro 
Blurbhttp://www.bgies.comhttp://www.bistroblurb.comhttp://www.ihottonight.com
---

Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead
 
   


--
Sincerely,

Brad Gies
---
Bistro Bot - Bistro Blurb
http://www.bgies.com
http://www.bistroblurb.com
http://www.ihottonight.com
---

Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead

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


Re: [android-developers] Re: Easy and fast XML Parser?

2010-07-13 Thread Dianne Hackborn
As a very rough sketch, the performance you can expect is:

SAX is 10-100x slower than XmlPullParser on a compiled XML resource.
DOM is 10-100x slower than SAX.

(XmlPullParser on a raw XML file is slower than SAX, but not an order of
magnitude.)

For some context on that, a significant amount of time was spent on
optimizing XmlPullParser on a compiled XML resource since that is critical
to things like app launch time (which involves parsing layout and other XML
resources).  The current performance of that is sufficient but, especially
for low-end devices, a 10x slow-down would very seriously negatively impact
UI performance.

So: if you are parsing XML as part of UI interaction, an XmlPullParser on a
compiled resource should be sufficient for relatively real-time performance
(just parse directly and display).  A SAX or XmlPullParser on a raw XML file
is most likely going to be slow enough to warrant doing in another thread
and showing the result to the user when done.  The DOM parser is going to be
significantly slower than that.

Of course this all depends on exactly what you are doing and the work that
is needed outside of the raw XML parsing.

On Tue, Jul 13, 2010 at 9:31 AM, DanH  wrote:

> The choice between SAX and DOM is partly one of simplicity vs speed/
> compactness, and partly a matter of what sort of "consumption model"
> you have.  If you're only going to scan through the XML once, and you
> know what data you want, and it's pretty well formed (you know
> precisely what order elements will be in, etc) then SAX is good.  If
> you need to keep referring to the data, or you need to extract data
> from documents that may be a bit disordered (with elements in varying
> order, extraneous elements, etc) then DOM is a lot simpler.
>
> But, yes, DOM does take up a fair amount of storage -- no hard numbers
> but I'd guess easily 20-50 times the size of the XML file.
>
> On Jul 12, 6:51 pm, Indicator Veritatis  wrote:
> > SAX is faster than DOM. Easier too, if you don't mind viewing
> > everything as event driven. Rumor has it there is something faster,
> > but I am not convinced it is anything more than rumor. But do a Google
> > search "xml parser sax dom faster" and see if you think Piccolo or
> > NanoXML are worth checking out.
> >
> > I would stick with SAX though, until these newer ones have been
> > reviewed and proven not to have major omissions and bugs. Besides: SAX
> > and DOM are already in Android. If you choose one of the others, even
> > Apache's Betwixt or Xerces, you will have to include it as an extra
> > Jar in your build.
> >
> > On Jul 12, 12:30 pm, Siva  wrote:
> >
> > > Can anyone tell me the easy and fastest XML Parser?
> >
> > > I need guide/sample code...
> >
> > > please help me...
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

[android-developers] Re: Launch an Activity Form a Service

2010-07-13 Thread Boozel
That Did IT! Thank You

On Jul 13, 8:47 pm, Kostya Vasilyev  wrote:
> Boozel,
>
> The second parameter should be without quotes - i.e. a reference to the
> actual Java class object of your activity.
>
> new Intent(BbService.this, TsandCs.class);
> startActivity(intent);
>
> If specifying class name by string, the ".class" should not be there,
> since you're not making a reference to the Java class, like above.
>
> -- Kostya
>
> 13.07.2010 22:42, Boozel пишет:
>
>
>
>
>
> > This is the code i used
> > Intent intent = new Intent(BbService.this, "TsandCs.class");
> >                                    startActivity(intent);
> > but eclipse says: The constructor Intent(BbService,String) is
> > undefined
> > i tried putting the first parameter in quotes too like above but the
> > constructor Intent(String,String) is undefined
> > any ideas?
>
> > On Jul 13, 8:32 pm, chethan kumar  wrote:
>
> >> you want to start activity from a service rite
>
> >> So you can just do this.
>
> >> Intent intent = new Intent("*Your Service Class Name.this*", "*Activity You
> >> Want to Go.class*");
> >> startActivity(intent);
>
> >> MAke sure you have added the activity in your Manifest.
>
> >> regards
> >> Chethan
>
> >> On Tue, Jul 13, 2010 at 11:52 PM, Boozel  wrote:
>
> >>> It now gives this error
> >>> Unable to find explicit activity class {com.example.test/
> >>> TsandCs.class}; have you declared this activity in your
> >>> AndroidManifest.xml?
> >>> here is the code i used
>
> >>> try{
>
> >>>         Intent i = new Intent( Intent.ACTION_MAIN );
> >>>                 Log.d( LOG_TAG,"onCreate - 3" );
> >>>                 i.setComponent(
> >>>                             new ComponentName( "com.example.test",
> >>> "TsandCs.class" )
> >>>                         );
> >>>                 Log.d( LOG_TAG,"onCreate - 4" );
> >>>                 i.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
> >>>                 i.addFlags( Intent.FLAG_FROM_BACKGROUND);
> >>>                 Log.d( LOG_TAG,"onCreate - 5" );
> >>>                          startActivity( i );
> >>>                       Log.d( LOG_TAG,"onCreate - 6" );
> >>>                 }
> >>> and my manifest is shown in the other post.
> >>> ant ideas?
>
> >>> On Jul 13, 7:33 pm, Pent  wrote:
>
>  Intent i = new Intent( Intent.ACTION_MAIN );  // don't think main is
>  necessary actually :)
>
>  i.setComponentName(
>       new ComponentName( "pkgname", "activityclassname" )
>  );
>
>  i.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
>  i.addFlags( Intent.FLAG_FROM_BACKGROUND);
>
>  try {
>            startActivity( i );}
>
>  catch ( ActivityNotFoundException e ) {
>
>  }
>
>  If the user has just left an app via Home, you might find it takes 5
>  seconds for your activity to appear. An Android bug I logged about 9
>  months ago,
>  grouse grouse :)
>
>  Pent
>
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Android Developers" group.
> >>> To post to this group, send email to android-developers@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> android-developers+unsubscr...@googlegroups.com >>>  cr...@googlegroups.com>
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/android-developers?hl=en
>
> --
> Kostya Vasilev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com

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


[android-developers] Re: How can I find unneeded permission?

2010-07-13 Thread deg
Unfortunately, I'm not going to do this anytime soon; the tradeoff is
clearly not worth it within the domain of just my company and our
apps.

Nor am I likely to persuade you that it's worthwhile; nor you to
persuade me. The arguments over static analysis tools are religious
and, even after thirty-five years, people are still arguing the pros
and cons of lint, in the C world.

So, really no more to say on this thread.
But, I do hope that some toolmeister inside Google sees this thread
and picks up the gauntlet someday.

David

On Jul 13, 8:45 pm, TreKing  wrote:
> On Tue, Jul 13, 2010 at 9:00 AM, deg  wrote:
> > Actually, I can imagine two very common cases:
>
> > 1) Code or even functionality is changed in an application, possibly
> > in some minor way. The developer does not realize that he has removed
> > the last SDK call using a permission. The permission lingers on in the
> > manifest. It doesn't do much harm, but add minor bloat and maybe
> > scares aways some users.
>
> I wouldn't call this common since if you're removing permissions you're
> likely removing features / functionality which relied on said permission,
> which is not very likely.
>
> > 2) A developer adds a new feature, and does not realize that a
> > permission is needed. Best case, he catches this immediately when
> > testing, but still wastes time and annoyance on an extra compile/
> > deploy/test cycle.
>
> You answered your own question. If you're adding a new feature, I would hope
> you're testing it. Odds are you don't just do one compile / deploy test
> cycle for any feature you add, so one more to catch a permission you forgot
> to add, like any other programming error you catch while debugging, is
> negligible. You'd run into a "permission required" exception almost
> immediately while testing and you fix it right then and there.
>
> > It seems that it would not be too hard to annotate the SDK and and a static
> > permissions check to the build cycle.
>
> I really don't think the time it would take to make this happen is worth it
> versus how much time it would actually save. You seem to think it is, so you
> are welcome to grab the source code and modify it to make this happen. Good
> luck.
>
> --- 
> --
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://sites.google.com/site/rezmobileapps/treking

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


Re: [android-developers] Re: Launch an Activity Form a Service

2010-07-13 Thread Kostya Vasilyev

Boozel,

The second parameter should be without quotes - i.e. a reference to the 
actual Java class object of your activity.


new Intent(BbService.this, TsandCs.class);
startActivity(intent);

If specifying class name by string, the ".class" should not be there, 
since you're not making a reference to the Java class, like above.


-- Kostya

13.07.2010 22:42, Boozel пишет:

This is the code i used
Intent intent = new Intent(BbService.this, "TsandCs.class");
startActivity(intent);
but eclipse says: The constructor Intent(BbService,String) is
undefined
i tried putting the first parameter in quotes too like above but the
constructor Intent(String,String) is undefined
any ideas?

On Jul 13, 8:32 pm, chethan kumar  wrote:
   

you want to start activity from a service rite

So you can just do this.

Intent intent = new Intent("*Your Service Class Name.this*", "*Activity You
Want to Go.class*");
startActivity(intent);

MAke sure you have added the activity in your Manifest.

regards
Chethan



On Tue, Jul 13, 2010 at 11:52 PM, Boozel  wrote:
 

It now gives this error
Unable to find explicit activity class {com.example.test/
TsandCs.class}; have you declared this activity in your
AndroidManifest.xml?
here is the code i used
   
 

try{
   
 

Intent i = new Intent( Intent.ACTION_MAIN );
Log.d( LOG_TAG,"onCreate - 3" );
i.setComponent(
new ComponentName( "com.example.test",
"TsandCs.class" )
);
Log.d( LOG_TAG,"onCreate - 4" );
i.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
i.addFlags( Intent.FLAG_FROM_BACKGROUND);
Log.d( LOG_TAG,"onCreate - 5" );
 startActivity( i );
  Log.d( LOG_TAG,"onCreate - 6" );
}
and my manifest is shown in the other post.
ant ideas?
   
 

On Jul 13, 7:33 pm, Pent  wrote:
   

Intent i = new Intent( Intent.ACTION_MAIN );  // don't think main is
necessary actually :)
 
 

i.setComponentName(
 new ComponentName( "pkgname", "activityclassname" )
);
 
 

i.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
i.addFlags( Intent.FLAG_FROM_BACKGROUND);
 
 

try {
  startActivity( i );}
 
 

catch ( ActivityNotFoundException e ) {
 
 

}
 
 

If the user has just left an app via Home, you might find it takes 5
seconds for your activity to appear. An Android bug I logged about 9
months ago,
grouse grouse :)
 
 

Pent
 
 

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



--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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


Re: [android-developers] Re: Launch an Activity Form a Service

2010-07-13 Thread Kostya Vasilyev

I believe this:

new ComponentName( "com.example.test", "TsandCs.class" )

is supposed to be either:

new ComponentName( context, TsandCs.class)

or

new ComponentName( "com.example.test", "TsandCs")

Use the first case if the activity is in the same application as the 
service, the second case if not.


-- Kostya

13.07.2010 22:35, chethan kumar ?:

Also Add this in between
Intent intent = new Intent("Your Service Class Name.this", "Activity 
You Want to Go.class");

intent.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );

startActivity(intent);

On Wed, Jul 14, 2010 at 12:02 AM, chethan kumar > wrote:


you want to start activity from a service rite
So you can just do this.
Intent intent = new Intent("*Your Service Class Name.this*",
"*Activity You Want to Go.class*");
startActivity(intent);
MAke sure you have added the activity in your Manifest.
regards
Chethan

On Tue, Jul 13, 2010 at 11:52 PM, Boozel mailto:boozelcl...@gmail.com>> wrote:

It now gives this error
Unable to find explicit activity class {com.example.test/
TsandCs.class}; have you declared this activity in your
AndroidManifest.xml?
here is the code i used

try{

   Intent i = new Intent( Intent.ACTION_MAIN );
   Log.d( LOG_TAG,"onCreate - 3" );
   i.setComponent(
   new ComponentName(
"com.example.test", "TsandCs.class" )
   );
   Log.d( LOG_TAG,"onCreate - 4" );
   i.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
   i.addFlags( Intent.FLAG_FROM_BACKGROUND);
   Log.d( LOG_TAG,"onCreate - 5" );
startActivity( i );
 Log.d( LOG_TAG,"onCreate - 6" );
   }
and my manifest is shown in the other post.
ant ideas?


On Jul 13, 7:33 pm, Pent mailto:tas...@dinglisch.net>> wrote:
> Intent i = new Intent( Intent.ACTION_MAIN );  // don't think
main is
> necessary actually :)
>
> i.setComponentName(
> new ComponentName( "pkgname", "activityclassname" )
> );
>
> i.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
> i.addFlags( Intent.FLAG_FROM_BACKGROUND);
>
> try {
>  startActivity( i );}
>
> catch ( ActivityNotFoundException e ) {
>
> }
>
> If the user has just left an app via Home, you might find it
takes 5
> seconds for your activity to appear. An Android bug I logged
about 9
> months ago,
> grouse grouse :)
>
> Pent

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

To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com

For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



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



--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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

[android-developers] Re: Launch an Activity Form a Service

2010-07-13 Thread Boozel
This is the code i used
Intent intent = new Intent(BbService.this, "TsandCs.class");
startActivity(intent);
but eclipse says: The constructor Intent(BbService,String) is
undefined
i tried putting the first parameter in quotes too like above but the
constructor Intent(String,String) is undefined
any ideas?

On Jul 13, 8:32 pm, chethan kumar  wrote:
> you want to start activity from a service rite
>
> So you can just do this.
>
> Intent intent = new Intent("*Your Service Class Name.this*", "*Activity You
> Want to Go.class*");
> startActivity(intent);
>
> MAke sure you have added the activity in your Manifest.
>
> regards
> Chethan
>
>
>
> On Tue, Jul 13, 2010 at 11:52 PM, Boozel  wrote:
> > It now gives this error
> > Unable to find explicit activity class {com.example.test/
> > TsandCs.class}; have you declared this activity in your
> > AndroidManifest.xml?
> > here is the code i used
>
> > try{
>
> >        Intent i = new Intent( Intent.ACTION_MAIN );
> >                Log.d( LOG_TAG,"onCreate - 3" );
> >                i.setComponent(
> >                            new ComponentName( "com.example.test",
> > "TsandCs.class" )
> >                        );
> >                Log.d( LOG_TAG,"onCreate - 4" );
> >                i.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
> >                i.addFlags( Intent.FLAG_FROM_BACKGROUND);
> >                Log.d( LOG_TAG,"onCreate - 5" );
> >                         startActivity( i );
> >                      Log.d( LOG_TAG,"onCreate - 6" );
> >                }
> > and my manifest is shown in the other post.
> > ant ideas?
>
> > On Jul 13, 7:33 pm, Pent  wrote:
> > > Intent i = new Intent( Intent.ACTION_MAIN );  // don't think main is
> > > necessary actually :)
>
> > > i.setComponentName(
> > >     new ComponentName( "pkgname", "activityclassname" )
> > > );
>
> > > i.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
> > > i.addFlags( Intent.FLAG_FROM_BACKGROUND);
>
> > > try {
> > >          startActivity( i );}
>
> > > catch ( ActivityNotFoundException e ) {
>
> > > }
>
> > > If the user has just left an app via Home, you might find it takes 5
> > > seconds for your activity to appear. An Android bug I logged about 9
> > > months ago,
> > > grouse grouse :)
>
> > > Pent
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: Launch an Activity Form a Service

2010-07-13 Thread chethan kumar
Also Add this in between
Intent intent = new Intent("Your Service Class Name.this", "Activity You
Want to Go.class");
intent.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );

startActivity(intent);


On Wed, Jul 14, 2010 at 12:02 AM, chethan kumar  wrote:

> you want to start activity from a service rite
>
> So you can just do this.
>
> Intent intent = new Intent("*Your Service Class Name.this*", "*Activity
> You Want to Go.class*");
> startActivity(intent);
>
> MAke sure you have added the activity in your Manifest.
>
> regards
> Chethan
>
>   On Tue, Jul 13, 2010 at 11:52 PM, Boozel  wrote:
>
>> It now gives this error
>> Unable to find explicit activity class {com.example.test/
>> TsandCs.class}; have you declared this activity in your
>> AndroidManifest.xml?
>> here is the code i used
>>
>> try{
>>
>>Intent i = new Intent( Intent.ACTION_MAIN );
>>Log.d( LOG_TAG,"onCreate - 3" );
>>i.setComponent(
>>new ComponentName( "com.example.test",
>> "TsandCs.class" )
>>);
>>Log.d( LOG_TAG,"onCreate - 4" );
>>i.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
>>i.addFlags( Intent.FLAG_FROM_BACKGROUND);
>>Log.d( LOG_TAG,"onCreate - 5" );
>> startActivity( i );
>>  Log.d( LOG_TAG,"onCreate - 6" );
>>}
>> and my manifest is shown in the other post.
>> ant ideas?
>>
>>
>> On Jul 13, 7:33 pm, Pent  wrote:
>> > Intent i = new Intent( Intent.ACTION_MAIN );  // don't think main is
>> > necessary actually :)
>> >
>> > i.setComponentName(
>> > new ComponentName( "pkgname", "activityclassname" )
>> > );
>> >
>> > i.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
>> > i.addFlags( Intent.FLAG_FROM_BACKGROUND);
>> >
>> > try {
>> >  startActivity( i );}
>> >
>> > catch ( ActivityNotFoundException e ) {
>> >
>> > }
>> >
>> > If the user has just left an app via Home, you might find it takes 5
>> > seconds for your activity to appear. An Android bug I logged about 9
>> > months ago,
>> > grouse grouse :)
>> >
>> > Pent
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>

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

Re: [android-developers] Re: Launch an Activity Form a Service

2010-07-13 Thread chethan kumar
you want to start activity from a service rite

So you can just do this.

Intent intent = new Intent("*Your Service Class Name.this*", "*Activity You
Want to Go.class*");
startActivity(intent);

MAke sure you have added the activity in your Manifest.

regards
Chethan

On Tue, Jul 13, 2010 at 11:52 PM, Boozel  wrote:

> It now gives this error
> Unable to find explicit activity class {com.example.test/
> TsandCs.class}; have you declared this activity in your
> AndroidManifest.xml?
> here is the code i used
>
> try{
>
>Intent i = new Intent( Intent.ACTION_MAIN );
>Log.d( LOG_TAG,"onCreate - 3" );
>i.setComponent(
>new ComponentName( "com.example.test",
> "TsandCs.class" )
>);
>Log.d( LOG_TAG,"onCreate - 4" );
>i.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
>i.addFlags( Intent.FLAG_FROM_BACKGROUND);
>Log.d( LOG_TAG,"onCreate - 5" );
> startActivity( i );
>  Log.d( LOG_TAG,"onCreate - 6" );
>}
> and my manifest is shown in the other post.
> ant ideas?
>
>
> On Jul 13, 7:33 pm, Pent  wrote:
> > Intent i = new Intent( Intent.ACTION_MAIN );  // don't think main is
> > necessary actually :)
> >
> > i.setComponentName(
> > new ComponentName( "pkgname", "activityclassname" )
> > );
> >
> > i.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
> > i.addFlags( Intent.FLAG_FROM_BACKGROUND);
> >
> > try {
> >  startActivity( i );}
> >
> > catch ( ActivityNotFoundException e ) {
> >
> > }
> >
> > If the user has just left an app via Home, you might find it takes 5
> > seconds for your activity to appear. An Android bug I logged about 9
> > months ago,
> > grouse grouse :)
> >
> > Pent
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] problems with the old and new Contact API

2010-07-13 Thread Alvin
here's a few things i couldn't figure out and could find anyone else
posting them in the discussion:
1.
In the new API
ContactsContract.AggregationExceptions table does not really work for
me: when I try to insert a row into the table, it gives me this error:

07-13 14:20:09.399: ERROR/X(3074):
java.lang.UnsupportedOperationException: URI:
content://com.android.contacts/aggregation_exceptions, calling
user: 
my code here:

ContentValues values = new ContentValues();
values.put(AggregationExceptions.RAW_CONTACT_ID1,
String.valueOf(oldRawContactId));
values.put(AggregationExceptions.RAW_CONTACT_ID2,
String.valueOf(newRawContactId));
values.put(AggregationExceptions.TYPE,
AggregationExceptions.TYPE_KEEP_TOGETHER);
mContentResolver.insert(AggregationExceptions.CONTENT_URI, values);

and I'm sure the two raw contact id exists.

2.
in the old API:
when I create a group in Contact book, the name of the group is not
shown(or not shown correctly)
here's the code:

ContentValues values = new ContentValues();
values.put(Contacts.Groups.SHOULD_SYNC, 1);
values.put(Contacts.Groups.SYSTEM_ID, mGroupID);
values.put(Contacts.Groups.NAME, mGroupTitle);
mContentResolver.insert(Contacts.Groups.CONTENT_URI, values);

3.
in the old API:
when I insert a custom IM contact method for a contact, the data is
inserted and shown correctly, but user cannot edit the contact using
the default contact app any more. If I remove the contact method, user
can edit the contact again.
here's the code for inserting the contact method:

ContentValues values = new ContentValues();
values.put(ContactMethods.PERSON_ID, newContactId);
values.put(ContactMethods.KIND, Contacts.KIND_IM);
values.put(ContactMethods.TYPE, ContactMethods.TYPE_CUSTOM);
values.put(ContactMethods.AUX_DATA,
ContactMethods.encodeCustomImProtocol(MYIM_PROTOCOL));
values.put(ContactMethods.DATA, buddyId);
values.put(ContactMethods.ISPRIMARY, 0);
values.put(ContactMethods.LABEL, IM_LABEL);

mContentResolver.insert(ContactMethods.CONTENT_URI, values);

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


Re: [android-developers] Changing Main/Launch activity

2010-07-13 Thread Dianne Hackborn
You will break any shortcuts that have been made to that activity (or other
explicit intents that have been made to it, though for main/launcher a
shortcut is by far the most common case).

On Tue, Jul 13, 2010 at 6:08 AM, Justin  wrote:

> I think I already know the answer to this, but I just wanted to
> confirm (I think no horrible ramifications):
>
> Are there any ramifications to changing the "MAIN"/"LAUNCHER" tags in
> the manifest to a different activity?  See example below:
>
> (original manifest segment)
> ---
>android:label="@string/app_name" android:theme="@android:style/
> Theme.NoTitleBar">
>  
>   
>   
>   
> 
>   android:label="@string/numbertwo"
>  android:theme="@android:style/Theme.NoTitleBar">
> 
> 
>
>
> (new manifest segment)
> 
>android:label="@string/app_name" android:theme="@android:style/
> Theme.NoTitleBar">
> 
>   android:label="@string/numbertwo"
>  android:theme="@android:style/Theme.NoTitleBar">
>  
>   
>   
>   
> 
> 
>
> Thanks,
>
> Justin
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

[android-developers] Re: Launch an Activity Form a Service

2010-07-13 Thread Boozel
It now gives this error
Unable to find explicit activity class {com.example.test/
TsandCs.class}; have you declared this activity in your
AndroidManifest.xml?
here is the code i used

try{

Intent i = new Intent( Intent.ACTION_MAIN );
Log.d( LOG_TAG,"onCreate - 3" );
i.setComponent(
new ComponentName( "com.example.test", 
"TsandCs.class" )
);
Log.d( LOG_TAG,"onCreate - 4" );
i.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
i.addFlags( Intent.FLAG_FROM_BACKGROUND);
Log.d( LOG_TAG,"onCreate - 5" );
 startActivity( i );
  Log.d( LOG_TAG,"onCreate - 6" );
}
and my manifest is shown in the other post.
ant ideas?


On Jul 13, 7:33 pm, Pent  wrote:
> Intent i = new Intent( Intent.ACTION_MAIN );  // don't think main is
> necessary actually :)
>
> i.setComponentName(
>     new ComponentName( "pkgname", "activityclassname" )
> );
>
> i.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
> i.addFlags( Intent.FLAG_FROM_BACKGROUND);
>
> try {
>          startActivity( i );}
>
> catch ( ActivityNotFoundException e ) {
>
> }
>
> If the user has just left an app via Home, you might find it takes 5
> seconds for your activity to appear. An Android bug I logged about 9
> months ago,
> grouse grouse :)
>
> Pent

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


[android-developers] Re: how to check if the current thread is in the ui thread?

2010-07-13 Thread guich
Thanks, i'll try it.

regards

 guich

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


Re: [android-developers] Changing Main/Launch activity

2010-07-13 Thread TreKing
On Tue, Jul 13, 2010 at 12:58 PM, Greg Pasquariello  wrote:

> See the attached document.


Which has what to do with the OP's post?

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

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

[android-developers] Re: App launching

2010-07-13 Thread kypriakos
Hi Brad,

What is the data source to your spinner? Or that is not necessary? I
guess because
I cannot see what is before this code segment I was curious how you
use that.
Also, I am not familiar with the AndroidBridge() - is that part of the
standard API?

Thanks


On Jul 12, 8:20 pm, Brad Gies  wrote:
> Yes, you can read pages stored on the phone:
>
> I'm using index.html here. Put it into your assets folder :
>
>          webView = (WebView)
> spinnerView.findViewById(R.id.spinnerviewwebview);
>
>          webView.getSettings().setJavaScriptEnabled(true);
>          webView.addJavascriptInterface(new AndroidBridge(), "android");
>          webView.setVerticalScrollBarEnabled(false);
>
>          webView.setWebChromeClient(new WebChromeClient()
>          {
>                public void onConsoleMessage(String message, int
> lineNumber, String sourceID)
>                {
>
>                }
>              });
>
>          webView.loadUrl("file:///android_asset/index.html");
>
> The above also sets the WebView up to use Javascript.
>
> On 12/07/2010 2:10 PM, kypriakos wrote:
>
> > In this case below, the URL can only be public and remote? I could not
> > read
> > a page stored locally on the phone - or is storing files locally not
> > an option?
>
> > Uri uri = Uri.parse("http://www.example.com";);
> >   Intent intent = new Intent(Intent.ACTION_VIEW, uri);
> >   startActivity(intent);
>
> > Thanks
>
> > On Jul 12, 3:21 pm, Mark Murphy  wrote:
>
> >> On Mon, Jul 12, 2010 at 3:10 PM, kypriakos  wrote:
>
> >>> Instead of launching a UI I was wondering if I could have a process
> >>> monitor
> >>> the execution of a javascript in the emulator's browser and read in
> >>> the output
> >>> data. Is it possible to execute a local javascript file using the
> >>> phone's browser?
>
> >> You can use WebView, but only from an Activity.
>
> >> If you want to embed a Javascript interpreter, you can consider Rhino.
>
> >> --
> >> Mark Murphy (a Commons 
> >> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> >> Android App Developer Books:http://commonsware.com/books
>
> --
> Sincerely,
>
> Brad Gies
> ---
> Bistro Bot - Bistro 
> Blurbhttp://www.bgies.comhttp://www.bistroblurb.comhttp://www.ihottonight.com
> ---
>
> Never doubt that a small group of thoughtful, committed people can
> change the world. Indeed. It is the only thing that ever has - Margaret Mead

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


Re: [android-developers] Memory Info

2010-07-13 Thread chethan kumar
Check out this link
http://developer.android.com/reference/android/app/ActivityManager.MemoryInfo.html
it gives you memory info of the device.
Regards
Chethan
On Mon, Jul 12, 2010 at 4:18 PM, aparna  wrote:

> Hello,
>
> How can I fetch the memory Information(physical and storage) from
> mobile device.
>
> I didn't get any API's..
>
> Plz help
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Can Android 2.X connect to 3G and Wifi data networks simultaneously?

2010-07-13 Thread Mark Murphy
On Tue, Jul 13, 2010 at 2:01 PM, RickB  wrote:
> We have an application where we'd like to use the Wifi connection on a
> local network (intranet) with no Internet connectivity, and use the 3G
> connection simultaneously as the data connection to the internet.

Like the WiFi hotspot built into Android 2.2.

> To summarize:
>
> - We need to connect to two distinct networks at the same time
> - We need data traffic to be properly routed to the appropriate
> network based on its IP address
> - We need both radios (Wifi and 3G) on and active
>
> This can easily be done on the iPhone, but not sure if it can be done
> on the Android.  Any info/insights welcomed.

AFAIK, at the SDK level, Android only supports one active connection
at a time. Custom firmware can clearly arrange for multi-radio
support, as the WiFi hotspot in 2.2 demonstrates.

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

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

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


Re: [android-developers] Fixing a performance issue on a financial calculator program

2010-07-13 Thread Mark Murphy
On Tue, Jul 13, 2010 at 1:21 PM, Connie Walsh
 wrote:
> I am writing a financial calculator and part of my code is printing
> out an amortization table for 25 - 30 years. Some times there can be
> up to 2000 rows on the page. Here is my code to do this part:

Ack!

> Should I try to add them as the person scrolls down?

You should use a ListView. This will automatically handle scrolling,
will let you recycle your rows to minimize memory consumption, will
only process the rows presently visible to increase execution speed,
etc.

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

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

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


[android-developers] Can Android 2.X connect to 3G and Wifi data networks simultaneously?

2010-07-13 Thread RickB
We have an application where we'd like to use the Wifi connection on a
local network (intranet) with no Internet connectivity, and use the 3G
connection simultaneously as the data connection to the internet.

To summarize:

- We need to connect to two distinct networks at the same time
- We need data traffic to be properly routed to the appropriate
network based on its IP address
- We need both radios (Wifi and 3G) on and active

This can easily be done on the iPhone, but not sure if it can be done
on the Android.  Any info/insights welcomed.

Rick

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


Re: [android-developers] how to check if the current thread is in the ui thread?

2010-07-13 Thread Mark Murphy
On Tue, Jul 13, 2010 at 1:38 PM, guich  wrote:
> I have a situation where i want to show a dialog. However, the code
> that calls the method to show the dialog can be running either in the
> ui thread or not.
>
> How can i find if the current thread is running in the ui thread or
> not?

Actually, for that case, you may as well just wrap it in a Runnable
and call runOnUiThread():

runOnUiThread(new Runnable() {
public void run() {
// launch your dialog here
}
});

This will ensure that the code runs on the UI thread, regardless of
whether you are on the UI thread or not.

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

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

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


Re: [android-developers] RadioGroup

2010-07-13 Thread chethan kumar
You mean you want to fire some action based on which RadioButton is Clicked
rite...
If that is the case use *isChecked() method*  in your Button.ONclick
ListenerHope it helps

Regards
Chethan

On Tue, Jul 13, 2010 at 9:01 PM, anil kukreti wrote:

> use the setChecked(boolean) method for particular radiobutton which you
> want to get selected on clicking submit button
>
>
> On Tue, Jul 13, 2010 at 9:48 AM, perumal316  wrote:
>
>> Hi All,
>>
>> In my application I have a RadioGroup within which has 2 RadioButtons
>> Then I have another 'submit' button.
>>
>> Upon clicking submit button I want to do tasks based on which button
>> is selected in the RadioGroup.
>>
>> I can do this when there is no RadioGroup involved and there are only
>> 2 buttons but with RadioGroup nothing happens when I click submit
>> button.
>>
>> Any idea how to resolve this?
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
>
> --
> Thanks for Cooperating!
>  Anil Kukreti
>
> Network transforms ideas to reality.
> 09312646623
> Linked In : http://in.linkedin.com/in/anilkukreti
> Skype Id : anil.kleward
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers]

2010-07-13 Thread o


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

Re: [android-developers] Re: How can I find unneeded permission?

2010-07-13 Thread TreKing
On Tue, Jul 13, 2010 at 9:00 AM, deg  wrote:

> Actually, I can imagine two very common cases:
>
> 1) Code or even functionality is changed in an application, possibly
> in some minor way. The developer does not realize that he has removed
> the last SDK call using a permission. The permission lingers on in the
> manifest. It doesn't do much harm, but add minor bloat and maybe
> scares aways some users.
>

I wouldn't call this common since if you're removing permissions you're
likely removing features / functionality which relied on said permission,
which is not very likely.


> 2) A developer adds a new feature, and does not realize that a
> permission is needed. Best case, he catches this immediately when
> testing, but still wastes time and annoyance on an extra compile/
> deploy/test cycle.
>

You answered your own question. If you're adding a new feature, I would hope
you're testing it. Odds are you don't just do one compile / deploy test
cycle for any feature you add, so one more to catch a permission you forgot
to add, like any other programming error you catch while debugging, is
negligible. You'd run into a "permission required" exception almost
immediately while testing and you fix it right then and there.


> It seems that it would not be too hard to annotate the SDK and and a static
> permissions check to the build cycle.
>

I really don't think the time it would take to make this happen is worth it
versus how much time it would actually save. You seem to think it is, so you
are welcome to grab the source code and modify it to make this happen. Good
luck.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

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

[android-developers] how to check if the current thread is in the ui thread?

2010-07-13 Thread guich
Hi,

I have a situation where i want to show a dialog. However, the code
that calls the method to show the dialog can be running either in the
ui thread or not.

How can i find if the current thread is running in the ui thread or
not?

thanks

   guich

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


[android-developers] Re: Launch an Activity Form a Service

2010-07-13 Thread Boozel
sorry i realized i dont need a first parameter.
When i run the app though i get an error that says No Activity found
to handle intent
i know this is a manifest problem my is shown below,


http://schemas.android.com/apk/res/android";
  package="com.example.packagename"
  android:versionCode="1"
  android:versionName="1.0">












i read one of your older posts here
http://www.mail-archive.com/android-beginn...@googlegroups.com/msg10539.html
how exactly would i apply that to this mainfest.
Thank you for your help, your support is great.


On Jul 13, 7:00 pm, Boozel  wrote:
> its a service packaged as a .jar so it can be included in other
> peoples applications so they will start it and it only needs to pop up
> once in the life on the app.
> What is the first parameter i must give to the initial intent
> deceleration?
> i've tried this: Intent test = new Intent(,"TsandCs.class");
>
> can you suggest a better way to do this?
>
> thanks
>
> On Jul 13, 3:21 pm, Mark Murphy  wrote:
>
>
>
> > On Tue, Jul 13, 2010 at 9:15 AM, Boozel  wrote:
> > > i'd like to Launch an Activity Form a Service.
> > > I know that this is not best practice for android however i am
> > > creating an application that is just a service and the first time it
> > > runs the user needs to accept some terms and conditions (this is the
> > > activity i need to launch).
>
> > What do you think is going to cause the service to run in the first place?
>
> > > Can any one help me some code to do this? Is it possible?
>
> > You can call startActivity() from a Service. However, you are going to
> > get a lot of one-star ratings on the Market if you just pop up a set
> > of terms and conditions unannounced.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> > Android 2.2 Programming Books:http://commonsware.com/books

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


[android-developers] Re: Launch an Activity Form a Service

2010-07-13 Thread Pent
Intent i = new Intent( Intent.ACTION_MAIN );  // don't think main is
necessary actually :)

i.setComponentName(
new ComponentName( "pkgname", "activityclassname" )
);

i.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
i.addFlags( Intent.FLAG_FROM_BACKGROUND);

try {
 startActivity( i );
}
catch ( ActivityNotFoundException e ) {
}

If the user has just left an app via Home, you might find it takes 5
seconds for your activity to appear. An Android bug I logged about 9
months ago,
grouse grouse :)

Pent

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


Re: [android-developers] Changing Main/Launch activity

2010-07-13 Thread TreKing
On Tue, Jul 13, 2010 at 8:08 AM, Justin  wrote:

> Are there any ramifications to changing the "MAIN"/"LAUNCHER" tags in the
> manifest to a different activity?
>

I *think* I remember seeing people post about issues where they removed or
renamed the main activity and the launcher icons failed to load the app
because they were trying to reference the old activity, which no longer
existed.

If yours is still there, just no longer the main, I guess worst case would
be that the launch icons continue to load the old activity.

If it were me, I would tell my users to uninstall the previous version of
the app just in case.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

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

  1   2   >