Friday, November 6, 2009

Re: [android-developers] Re: Working with the new ContactContracts API

Here's what you might want to know about deletion:

- Deleting an aggregated contact will delete all constituent raw contacts
- Deleting all constituent raw contacts will delete the aggregated contact
- Deleting a raw contact automatically deletes all constituent data rows.
- This is a technical detail, but resolver.delete(...), does not physically delete a raw contacts row.  It sets the DELETED flag on the raw contact.  The sync adapter then deletes the raw contact from the server and finalizes phone-side deletion by calling resolver.delete(...) again and passing the CALLER_IS_SYNCADAPTER query parameter.

Cheers,
- Dmitri

On Fri, Nov 6, 2009 at 2:09 AM, jarkman <jarkman@gmail.com> wrote:
Jake - thanks for that. Your code seems to match my understanding of
Dmitri's recipe, and also actually seems to work for me. Which i hope
is good news... :-)

Richard

On Nov 5, 9:20 pm, "jak." <koda...@gmail.com> wrote:
> Hi Dmitri & Jarkman,
> Hope everyone's having a good day.
>
> I'm also working on adding photo's for a contact. Based on your
> discussion I came up with this method.
> It's seems to do the job, but I'm not entirely confident that I'm
> doing things in the best way.
> Can you please review it and let me know If I am fully grasping the
> concept. I'm a little confused about when to use CONTACT_ID vs.
> RAW_CONTACT_ID etc.
>
> Code below. Thanks a bunch!
> Jake
>
> -------
>
> public static void setPhoto(Uri personUri, byte[] photo, Context
> context) {
>     ContentValues values = new ContentValues();
>     int photoRow = -1;
>     String where = ContactsContract.Data.RAW_CONTACT_ID + " == " +
> ContentUris.parseId(personUri) + " AND " + Data.MIMETYPE + "=='" +
> ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE + "'";
>     Cursor cursor = context.getContentResolver().query
> (ContactsContract.Data.CONTENT_URI, null, where, null, null);
>     int idIdx = cursor.getColumnIndexOrThrow
> (ContactsContract.Data._ID);
>     if(cursor.moveToFirst()){
>         photoRow = cursor.getInt(idIdx);
>     }
>     cursor.close();
>
>     values.put(ContactsContract.Data.RAW_CONTACT_ID,
> ContentUris.parseId(personUri));
>     values.put(ContactsContract.Data.IS_SUPER_PRIMARY, 1);
>     values.put(ContactsContract.CommonDataKinds.Photo.PHOTO, photo);
>     values.put(ContactsContract.Data.MIMETYPE,
> ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE);
>
>     if(photoRow >= 0){
>         context.getContentResolver().update
> (ContactsContract.Data.CONTENT_URI, values, ContactsContract.Data._ID
> + " = " + photoRow, null);
>     } else {
>         context.getContentResolver().insert
> (ContactsContract.Data.CONTENT_URI, values);
>     }
>
> }
>
> On Nov 5, 12:17 pm, Dmitri Plotnikov <dplotni...@google.com> wrote:
>
> > Right.
>
> > Setting the new photo to super-primary should take care of the PHOTO_ID
> > reference.  You should not need to worry about resetting the super-primary
> > flag on other photos for the same contact - that's also automatic.
>
> > Cheers,
> > - Dmitri
>
> > On Thu, Nov 5, 2009 at 12:04 PM, jarkman <jark...@gmail.com> wrote:
> > > Oops! I see what you mean. Perhaps that update was a little
> > > bold... :-)
>
> > > So I need to search out the right row (with the right contact ID and
> > > the photo's MIME type) in the Data table with a query, then update
> > > that row ?
>
> > > If there isn't a pre-existing photo, do I also need to update
> > > ContactsContract.Data.PHOTO_ID on the contact after I have added a
> > > photo ?
>
> > > Thanks!
>
> > > R.
>
> > > On Nov 5, 7:09 pm, Dmitri Plotnikov <dplotni...@google.com> wrote:
> > > > This line:
>
> > > > context.getContentResolver().update(ContactsContract.Data.CONTENT_URI,
> > > > values, ContactsContract.Data.RAW_CONTACT_ID + " = " + personId,
> > > > null);
>
> > > > attempts to change ALL data rows that have RAW_CONTACT_ID == personId,
> > > which
> > > > includes the photo, but also phone numbers, emails etc.  You will need to
> > > > find the specific row before updating it. The condition should say:
> > > Data._ID
> > > > + "=" + dataId.  Alternatively, you can construct a specific URI:
> > > > ContentUris.withAppendedId(Data.CONTENT_URI, dataId)
>
> > > > I hope this helps.
> > > > - Dmitri
>
> > > > On Thu, Nov 5, 2009 at 9:05 AM, jarkman <jark...@gmail.com> wrote:
> > > > > Dmitri - I wasn't, but I am now - thanks for the tip.
>
> > > > > It doesn't fix the problem, though. It seems as though I can set the
> > > > > photo once on a brand-new contact, but I can never set it again on
> > > > > that contact.
>
> > > > > Do I perhaps need to do something with
> > > > > ContactsContract.Data.PHOTO_ID ?
>
> > > > > Here's code:
>
> > > > > ContentValues values = new ContentValues();
> > > > > values.put(ContactsContract.Data.RAW_CONTACT_ID, personId);
> > > > > values.put(ContactsContract.Data.IS_SUPER_PRIMARY, 1);
> > > > > values.put(ContactsContract.CommonDataKinds.Photo.PHOTO,
> > > > > bytes.toByteArray());
> > > > > values.put(ContactsContract.Data.MIMETYPE,
> > > > > ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE );
>
> > > > > context.getContentResolver().update(ContactsContract.Data.CONTENT_URI,
> > > > > values, ContactsContract.Data.RAW_CONTACT_ID + " = " + personId,
> > > > > null);
>
> > > > > And here's a stack:
>
> > > > > 11-05 17:03:36.781: ERROR/DatabaseUtils(103): Writing exception to
> > > > > parcel
> > > > > 11-05 17:03:36.781: ERROR/DatabaseUtils(103):
> > > > > android.database.sqlite.SQLiteException: unknown error: Unable to
> > > > > convert BLOB to string
> > > > > 11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
> > > > > android.database.CursorWindow.getString_native(Native Method)
> > > > > 11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
> > > > > android.database.CursorWindow.getString(CursorWindow.java:329)
> > > > > 11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
> > > > > android.database.AbstractWindowedCursor.getString
> > > > > (AbstractWindowedCursor.java:49)
> > > > > 11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
>
> > > com.android.providers.contacts.ContactsProvider2$DataRowHandler.getAugmente dValues
> > > > > (ContactsProvider2.java:1038)
> > > > > 11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
>
> > > com.android.providers.contacts.ContactsProvider2$CommonDataRowHandler.updat e
> > > > > (ContactsProvider2.java:1225)
> > > > > 11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
>
> > > com.android.providers.contacts.ContactsProvider2$PhoneDataRowHandler.update
> > > > > (ContactsProvider2.java:1445)
> > > > > 11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
> > > > > com.android.providers.contacts.ContactsProvider2.updateData
> > > > > (ContactsProvider2.java:3091)
> > > > > 11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
> > > > > com.android.providers.contacts.ContactsProvider2.updateData
> > > > > (ContactsProvider2.java:3075)
> > > > > 11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
> > > > > com.android.providers.contacts.ContactsProvider2.updateInTransaction
> > > > > (ContactsProvider2.java:2854)
> > > > > 11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
> > > > > com.android.providers.contacts.SQLiteContentProvider.update
> > > > > (SQLiteContentProvider.java:139)
> > > > > 11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
> > > > > com.android.providers.contacts.ContactsProvider2.update
> > > > > (ContactsProvider2.java:1923)
> > > > > 11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
> > > > > android.content.ContentProvider$Transport.update(ContentProvider.java:
> > > > > 180)
> > > > > 11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
> > > > > android.content.ContentProviderNative.onTransact
> > > > > (ContentProviderNative.java:195)
> > > > > 11-05 17:03:36.781: ERROR/DatabaseUtils(103):     at
> > > > > android.os.Binder.execTransact(Binder.java:287)
>
> > > > > On Nov 5, 4:41 pm, Dmitri Plotnikov <dplotni...@google.com> wrote:
> > > > > > Hi Richard,
>
> > > > > > Regarding photos: are you setting the IS_SUPER_PRIMARY flag on your
> > > Photo
> > > > > > row?  The notion of "super-primary" has to do with multiple accounts.
> > > > >  You
> > > > > > can have only one super-primary photo for an entire aggregated
> > > contact.
>
> > > > > > Cheers,
> > > > > > - Dmitri
>
> > > > > > On Thu, Nov 5, 2009 at 1:51 AM, jarkman <jark...@gmail.com> wrote:
> > > > > > > Jake - no, you are not the only one who suffers that frustration
> > > with
> > > > > > > the ContactsContract documentation.
>
> > > > > > > I've spent a lot of time writing frankly experimental code because
> > > I
> > > > > > > couldn't work out from the docs how the various URIs and string
> > > > > > > constants had to be knitted together to actually work. I think the
> > > > > > > docs really need a lot more tiny examples, to make the context
> > > clear
> > > > > > > for each definition.
>
> > > > > > > I still can't work out how to set contact photos reliably. I
> > > thought I
> > > > > > > had a fix yesterday, but it fails in some cases. Tiem for more
> > > > > > > experiments...
>
> > > > > > > Richard
>
> > > > > > > On Nov 5, 2:11 am, "jak." <koda...@gmail.com> wrote:
> > > > > > > > Thank you Dmitri,
>
> > > > > > > > Your response was very helpful. Along with that, and the sample
> > > you
> > > > > > > > posted on another thread about using both Contact Apis from one
> > > app,
> > > > > > > > I've gotten most of the way there. It is much appreciated.
>
> > > > > > > > I'm still however having some problems that I'm hard pressed to
> > > find
> > > > > a
> > > > > > > > solution for.
> > > > > > > > I'd be grateful if anyone could help me.
>
> > > > > > > > The biggest challenge I'm  having with this API is that it's hard
> > > for
> > > > > > > > me to picture how the tables are laid out so I know which URI to
> > > > > query
> > > > > > > > to get the parts of the contact that I'm interested in.
> > > > > > > > I found to get the email address for a contact I'm looking at I
> > > can
> > > > > > > > query the uri:ContactsContract.CommonDataKinds.Email.CONTENT_URI,
> > > > > > > > looking at rows of the contact id i'm interested in.
>
> > > > > > > > However to get the note from the same contact I can't use a
> > > similar
> > > > > > > > pattern, because there is no
> > > > > > > > ContactsContract.CommonDataKinds.Note.CONTENT_URI
> > > > > > > > The Note type exists in CommonDataKinds but it doesn't have an
> > > > > > > > associated CONTENT_URI.
>
> > > > > > > > I'm finding it very frustrating to use this API because every
> > > time I
> > > > > > > > go to try to pull out another piece of data from the contact, the
> > > > > > > > method to access it seems to change (as I can't find a consistent
> > > way
> > > > > > > > to get a given field from a contact). And the documentation never
> > > > > > > > describes how these keys, tables, and URIs are related. Basically
> > > the
> > > > > > > > ContactsContract documentation just gives you a giant list of
>
> ...
>
> read more »

--
You received this message because you are subscribed to the Google
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+unsubscribe@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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Audio Capture with Signal level indicator.

Hi

I want to capture audio and along with the audio I also want to show
the live signal strength of the audio on the screen.

Is there ant api that give me information regarding the the loudness
level (or at least some information indicating whether the user is
silent or speaking something) of the audio or should I implement my
own signal processing using the captured buffers and determine the
level.

Regards
gshetty

--
You received this message because you are subscribed to the Google
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Handling back button with Soft keypad

Hi

I have a simple edit control in my application and as expected the
soft keypad comes up on tapping it.

Now what I want to do is that when the user presses the back button,
the activity should quit immediately without the soft keypad going
down first.
On handling the key event in my activity i found that the first 'Back'
event is consumed by the keyboard and it does not even reach the
activity. However once the soft keypad goes down, the events can be
handled in my activity.

Is there any way to override this behavior so that the back button
first reaches my activity and I can quit immediately.

Regards
gshetty

--
You received this message because you are subscribed to the Google
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How Tab Pages switch when User Flick left/right?

I'm using tabs in one of my activities, and I'm not seeing this
behaviour. I'm coding for (and using) Android 1.5 currently, so maybe
it was added as a feature in 1.6 or 2.0? The other thing that might
play into it is, if you're using a TabActivity as base for your
activity. It may have this feature, and since I'm just using a regular
Activity as base, I suppose this could play into it.

But I don't really know.. I just know that I'm not seeing this
behaviour at all.

--
You received this message because you are subscribed to the Google
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How to debug Activity resurrection when process was killed by OS.

Hi,

I have activity "A" that launches phones Image Gallery for the user to
pick a picture. In some cases the OS decides there is not enough
memory and kills my process.

In A's onActivityResult() I start a thread that does some lengthy work
with the picture. This thread depends on A.blah field, that is set in
onCreate() (or should be).

According to this http://developer.android.com/guide/topics/fundamentals.html#actlife
when my process is killed the onCreate() is called and so A.blah
should be initialized and so my threads run() method that is invoked
from onActivityResult() should not get null reference, but it does.

Is there any way for me to debug this? I mean can I somehow force the
phone or emulator into killing my process so I can put the breakpoints
and see what's going on?

I can't reproduce it on my phone but my customers are experiencing the
problem.

Thank you!

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

[android-developers] Re: ADC2 Results Post

My app World of Bombs missed the cut
http://zeugame.blogspot.com/
received 3 mails to say i losed.

Good Round 2 to all of selected apps.

Croco


On Nov 5, 11:57 pm, jgostylo <jgost...@gmail.com> wrote:
> Congratulations Dan!  It looks like your app is pretty good.  I did
> not get to review any apps worth while but I assume there were some
> pretty good ones out there.
>
> My app The Great Land Grab ended up in the top 50%.  Interesting to
> see that there was a top 25% rating.  I believe I was also hurt by the
> fact that my app just did not work outside the US (no data to load).
> Nothing in the rules saying that it would not be judged outside the
> US, I just assumed it was a US only competition.  My friend said I did
> that because I am a xenophobe.  Well if I am then I probably deserve
> the loss ;).
>
> On Nov 5, 4:40 pm, Dan Sherman <impact...@gmail.com> wrote:
>
>
>
>
>
> > We just got ours :)
>
> > Congratulations! Your application 'ProjectINF ADC' was selected by Android
> > users as one of the top 20 in the Arcade category! We're excited that you
> > chose to participate in the ADC 2 and wish you luck in the final round as
> > your application is evaluated by users and a panel of judges.
>
> > We've got some screenshots over onhttp://www.chickenbrickstudios.com:)
>
> > - Dan
>
> > On Thu, Nov 5, 2009 at 5:21 PM, Maan Najjar <maan.naj...@gmail.com> wrote:
> > > I didn't get anything too ...
>
> > > On Thu, Nov 5, 2009 at 5:09 PM, f_heft <delphik...@gmail.com> wrote:
>
> > >> I didn't get a mail so far ... :(
> > >> Are these mails beeing send over the next few hours or did I somehow
> > >> miss it?
>
> > >> --
> > >> You received this message because you are subscribed to the Google
> > >> 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+unsubscribe@googlegroups.com<android-developers%2Bunsubscribe@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+unsubscribe@googlegroups.com<android-developers%2Bunsubscribe@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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: ADC2 Judging App FC

Yup, is happening to me. For something I'm actually interested in
too :(

On Nov 6, 5:37 pm, dadical <keyes...@gmail.com> wrote:
> Is anyone else seeing problems with the ADC2 judging app throwing a FC
> when trying to install manually?  It's a big miss, since the
> requirement to install manually happens VERY frequently.  Only way out
> is to skip and hope that the next app works.  The FC is actually being
> thrown from com.android.vending
>
> I'm on a G1, non-root, T-Mobile carrier, with 1.6 installed, EDGE,
> with WiFi enabled (and connected).

--
You received this message because you are subscribed to the Google
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Is your Android app on Archos Market ?

Today, Archos published a press release related to the story with
AndAppStore (http://appslib.com/press/index.html)
If I read correctly :
- AndAppStore and Archos discussed about a solution to managed a
database for an application market
- Archos decided to not work with Funky android for different reasons
that I don't know
- Archos based its appslib using a free format database (the format is
not the property of Funky Android)
- Archos uses links from others website in its database.dat ; where is
the problem ? If these different websites, don't request to Archos to
stop this using, why are you against this solution ? The external link
is clearly identified in the appslib.

Now, i don't know why I don't post my apps...

When neX.software talks about "whole pirated apps", I think we can't
talk of pirated apps...

So now, what do you think about appslib ?

Thanks for your feedbacks.

Arnaud
On 22 oct, 22:22, "nEx.Software" <email.nex.softw...@gmail.com> wrote:
> Sounds very shady... Somewhat reminiscent of the whole pirated apps
> thing on the Archos forum.
>
> On Oct 22, 1:17 pm, Al Sutton <a...@funkyandroid.com> wrote:
>
> > By hotlinking Tim means using a download URL from another application
> > directory in their own listings, so when a user uses the AppsLib
> > client and goes to download an app the download may actually come from
> > another sites servers.
>
> > AppsLib have some apps hotlinked to AndAppStore (without agreement),
> > and the way they've done it refers to specific versions of
> > applications which means there is no guarantee that the download will
> > be available to users when they click on them (because a developer may
> > have removed that version from public use at AndAppStore), and even if
> > the developer updates the app at AndAppStore any users using AppsLib
> > won't see the updates because of the way Diotasoft/Archos have done
> > things.
>
> > They also link out to SlideME without any agreement, and to GetJar. If
> > you want to see it for yourself you can download their releases file
> > fromhttp://files.appslib.com/db/Releases.dat, open it up in a file
> > editor, and search for andappstore , slideme, or getjar.
>
> > Al.
>
> > On Oct 22, 9:07 pm, strazzere <str...@gmail.com> wrote:
>
> > > In addition to what Al has said, it's been interesting to see that
> > > many, MANY applications as essentially hotlinked to other sites for
> > > downloading. Very few of the applications posted appear to be actually
> > > hosted on appslib servers.
>
> > > This to me is a concern for a few reasons. Has permission been grated
> > > for this to happen? How does this protect me against bad updates/or
> > > even get me updates? Is that why I can't access have the applications,
> > > and did that author even submit it comes into question...
>
> > > -Tim
>
> > > On Oct 22, 3:03 pm, Al Sutton <a...@funkyandroid.com> wrote:
>
> > > > Here is our account of what happened between us at AndAppStore and
> > > > Archos;
>
> > > > We worked with Archos for several weeks helping them design and
> > > > develop AppsLib, this included me personally travelling to Archoses
> > > > head office in Paris for meetings with Henri Crohas (Founder and CEO
> > > > of Archos), and other members of their senior management, as well as
> > > > various email and information exchanges. The relationship was such
> > > > that at one point I personally was in possession of a pre-release
> > > > Android Archos 5 for a few weeks before it was officially launched.
>
> > > > Very early on in the development a mutual NDA was signed after which
> > > > AndAppStore, at Archoses request, supplied proprietary information
> > > > about AndAppStores' client/server data exchange mechanisms, system
> > > > architecture, and provided a version of the AndAppStore client with a
> > > > customised user interface designed to work on the WVGA display of the
> > > > Archos 5. All of the information supplied to them was given in order
> > > > to allow them to develop their server to ensure it was compatible with
> > > > the customised AndAppStore client which we were told would be used as
> > > > the AppsLib client.
>
> > > > During our work with them we agreed the terms of an ongoing
> > > > relationship which would cover the cost of the consulting and
> > > > development work, and although the original deal was modified a few
> > > > times (by mutual agreement), a contract was drawn up by Archos which
> > > > we signed and returned it to them for countersigning. Archos then
> > > > refused to countersign their own contract, and thus the relationship
> > > > ended.
>
> > > > When AppsLib was released it came to light that Archos had asked a
> > > > third party, Diotasoft, to develop an almost functionally identical
> > > > client for them and that AppsLib used the same system architecture and
> > > > data exchange methods as AndAppStore, the details of which had been
> > > > supplied to Archos under the mutual NDA at a time when we were being
> > > > told we would be compensated via the terms of the ongoing relationship
> > > > which had since ended.
>
> > > > The extent of the use was that the Diotasoft/Archos AppsLib used
> > > > exactly file formats, data set names, relationships between data sets,
> > > > and methods of accessing the data as used in AndAppStore, and the
> > > > AndAppStore client could read, parse, and populate its' internal
> > > > database with data from AppsLib without modification.
>
> > > > The current situation is this; As of today we have received no payment
> > > > of any kind for the work we did, and the only invoice we have
> > > > submitted is now overdue and has not been paid, and so we are seeking
> > > > legal advice as to what options are open to us in relation to the
> > > > information must have redistributed to Diotasoft in order to allow
> > > > them to develop a client to our specifications and their development
> > > > of an almost identical client. With all this in mind we are also
> > > > examining the financial stability of Archos to determine whether or
> > > > not Archos would be able to pay any award made to us by the time any
> > > > legal action would be completed.
>
> > > > Hopefully you're all now able to make your decisions a little easier
> > > > as opposed to having to guess whats' going on.
>
> > > > Al.
> > > > --
>
> > > > * Looking for Android Apps? - Tryhttp://andappstore.com/*
>
> > > > ======
> > > > Funky Android Limited is registered in England & Wales with the
> > > > company number  6741909.
>
> > > > The views expressed in this email are those of the author and not
> > > > necessarily those of Funky Android Limited, it's associates, or it's
> > > > subsidiaries.
>
> > > > On Oct 22, 5:57 pm, Streets Of Boston <flyingdutc...@gmail.com> wrote:
>
> > > > > There could be plenty of reason's 'why'. Costs less, faster to market,
> > > > > etc.
> > > > > I hope, too, that all this is just a mis-understanding. But
> > > > > AndAppStore states that it has some good proof that parts of their
> > > > > software have been 'used' by Archos for the Archos Market.
>
> > > > > On Oct 22, 4:52 am, arnouf <arnaud.far...@gmail.com> wrote:
>
> > > > > > I'm not an Archos employee !
> > > > > > I think that this story is a little bit strange, because I don't think
> > > > > > that Archos did something like that if they want have a good place on
> > > > > > the android place...
>
> > > > > > Now, I can't confirm if Archos or AndAppStore are right but I don't
> > > > > > think why Archos should stole codes...
>
> > > > > > On 21 oct, 16:11, Streets Of Boston <flyingdutc...@gmail.com> wrote:
>
> > > > > > > Same here.
> > > > > > > If they indeed did that, then i won't put my app there.
>
> > > > > > > On Oct 20, 1:25 pm, niko20 <nikolatesl...@yahoo.com> wrote:
>
> > > > > > > > Hi,
>
> > > > > > > > Maybe I will wait until I find out if you really stole the code for
> > > > > > > > your app store from the andAppStore developers. At least that is the
> > > > > > > > current allegation.
>
> > > > > > > > -niko
>
> > > > > > > > On Oct 20, 3:55 am, arnouf <arnaud.far...@gmail.com> wrote:
>
> > > > > > > > > If you  have developed or if you are developing applications, and they
> > > > > > > > > are on the Android Market - Great! - But these apps are only
> > > > > > > > > available for devices that have contracts with Google.
>
> > > > > > > > > Archos, a major PMP manufacturer, launched its first device on 25th of
> > > > > > > > > September: the Archos 5 IT. Archos has a real community of fans who
> > > > > > > > > are waiting for applications for their devices. This device is the
> > > > > > > > > first of a long product line (the first Archos phone should be
> > > > > > > > > available soon too!).
>
> > > > > > > > > It's a new opportunity for your applications to find new fans! 
>
> > > > > > > > > You can post your apps, for free, on the Archos Market called Appslib
> > > > > > > > > (http://www.appslib.com).
>
> > > > > > > > > Today, only free applications are available for distribution on
> > > > > > > > > AppsLib, but Archos promises the possibility to distribute your paid
> > > > > > > > > apps soon !
>
> > > > > > > > > Don't wait : more applications, more users, more fans...and more
> > > > > > > > > revenue (soon)!
>
> > > > > > > > > Arnaud- Hide quoted text -
>
> > > > > > > > - Show quoted text -- 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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: ADC2 Results Post

Ah, didn't make it to the list of finalists. And as I thought the
delay in result was for Droid.
http://groups.google.com/group/android-developers/browse_thread/thread/513be079c1843510
Would have been nice to communicate the plans to the dev community
when you had one, rather than keeping them guessing till end.

Congratulations to selected 200 teams. There are many deserving apps
in that list, 50-60 atleast. Its going to be a stiff competition
ahead, so good luck to the finalists!

Pretty surprised that WorldTime, GooMemo isn't in that list, but good
to see OpenLoopz, ClapCard, EarthTime, PocketDJ and many more of my
fav' list.

I hope there isn't ADC3, else I'll definitely be tempted and will end
up here again. But, I think its time to watch out for competitions
from other OHA members soon.

Thanks ADC team for organising this! It was a great execution overall
and a wonderful experience.

--
You received this message because you are subscribed to the Google
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] ADC2 Judging App FC

Is anyone else seeing problems with the ADC2 judging app throwing a FC
when trying to install manually? It's a big miss, since the
requirement to install manually happens VERY frequently. Only way out
is to skip and hope that the next app works. The FC is actually being
thrown from com.android.vending

I'm on a G1, non-root, T-Mobile carrier, with 1.6 installed, EDGE,
with WiFi enabled (and connected).

--
You received this message because you are subscribed to the Google
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: problem reading from the Camera

Hamilton Lima (athanazio) wrote:
> Still with the issue ... :(
>
> tried to create a new project
> with the following code

<snip>

> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
>
> try {
> camera = Camera.open();
> SurfaceView original = (SurfaceView) findViewById(R.id.original);
> Log.i("camera", original.toString() );
> Log.i("camera", original.getHolder().toString() );
>
> camera.setPreviewDisplay(original.getHolder());
> camera.startPreview();
>

The SurfaceView will not be ready by this time. You need to register a
callback with the SurfaceHolder and wait for the surface to be ready.

Here is a sample application demonstrating the technique:

http://github.com/commonsguy/cw-advandroid/tree/master/Camera/Picture/

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

_Beginning Android_ from Apress Now Available!

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

[android-developers] Re: problem reading from the Camera

Still with the issue ... :(

tried to create a new project
with the following code
package com.athanazio.android;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.hardware.Camera;
import android.os.Bundle;
import android.util.Log;
import android.view.SurfaceView;
import android.view.View;
import android.widget.ImageView;

public class Camera2 extends Activity {

Camera camera;

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

try {
camera = Camera.open();
SurfaceView original = (SurfaceView) findViewById(R.id.original);
Log.i("camera", original.toString() );
Log.i("camera", original.getHolder().toString() );

camera.setPreviewDisplay(original.getHolder());
camera.startPreview();

} catch (Exception e) {
showMessage("error", "not able to use the camera " + e.getMessage
());
Log.e("camera", "not able to link with the camera", e);
}

}


void showMessage(CharSequence title, CharSequence message){
Builder builder = new AlertDialog.Builder(this);
builder.setTitle(title);
builder.setMessage(message);
builder.show();
}

protected void onDestroy() {
super.onDestroy();
if (camera != null) {
camera.stopPreview();
camera.release();
}
}
}

this is the manifest
---------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.athanazio.android"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/
app_name">
<activity android:name=".Camera2"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>
<uses-sdk android:minSdkVersion="3" />

<uses-permission android:name="android.permission.CAMERA" />

</manifest>

and this is the logcat
---------------------------------------------------------
11-06 15:25:06.996: ERROR/QualcommCameraHardware(34):
LINK_camera_set_thumbnail_properties returned 2
11-06 15:25:06.996: VERBOSE/QualcommCameraHardware(34): Setting JPEG-
image quality to 100
11-06 15:25:06.996: VERBOSE/QualcommCameraHardware(34):
initCameraParameters: X
11-06 15:25:06.996: VERBOSE/QualcommCameraHardware(34): setParameters:
X mCameraState=1
11-06 15:25:06.996: VERBOSE/QualcommCameraHardware(34):
createInstance: X created hardware=0x60e10
11-06 15:25:07.006: ERROR/MediaPlayer(34): Unable to to create media
player
11-06 15:25:07.006: ERROR/CameraService(34): Failed to load
CameraService sounds.
11-06 15:25:07.006: ERROR/MediaPlayer(34): Unable to to create media
player
11-06 15:25:07.006: ERROR/CameraService(34): Failed to load
CameraService sounds.
11-06 15:25:07.006: DEBUG/CameraService(34): Client X constructor
11-06 15:25:07.016: DEBUG/CameraService(34): Connect X
11-06 15:25:07.016: INFO/camera(758):
android.view.SurfaceView@4373c7f8
11-06 15:25:07.016: INFO/camera(758): android.view.SurfaceView
$2@4373cca8
11-06 15:25:07.016: ERROR/Camera(758): app passed NULL surface
11-06 15:25:07.096: ERROR/camera(758): not able to link with the
camera
11-06 15:25:07.096: ERROR/camera(758): java.io.IOException:
setPreviewDisplay failed
11-06 15:25:07.096: ERROR/camera(758): at
android.hardware.Camera.setPreviewDisplay(Native Method)
11-06 15:25:07.096: ERROR/camera(758): at
android.hardware.Camera.setPreviewDisplay(Camera.java:155)
11-06 15:25:07.096: ERROR/camera(758): at
com.athanazio.android.Camera2.onCreate(Camera2.java:27)
11-06 15:25:07.096: ERROR/camera(758): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1127)
11-06 15:25:07.096: ERROR/camera(758): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2231)
11-06 15:25:07.096: ERROR/camera(758): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
11-06 15:25:07.096: ERROR/camera(758): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
11-06 15:25:07.096: ERROR/camera(758): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
11-06 15:25:07.096: ERROR/camera(758): at
android.os.Handler.dispatchMessage(Handler.java:99)
11-06 15:25:07.096: ERROR/camera(758): at android.os.Looper.loop
(Looper.java:123)
11-06 15:25:07.096: ERROR/camera(758): at
android.app.ActivityThread.main(ActivityThread.java:3948)
11-06 15:25:07.096: ERROR/camera(758): at
java.lang.reflect.Method.invokeNative(Native Method)
11-06 15:25:07.096: ERROR/camera(758): at
java.lang.reflect.Method.invoke(Method.java:521)
11-06 15:25:07.096: ERROR/camera(758): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
11-06 15:25:07.096: ERROR/camera(758): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
11-06 15:25:07.096: ERROR/camera(758): at
dalvik.system.NativeStart.main(Native Method)
11-06 15:25:17.436: DEBUG/dalvikvm(120): GC freed 843 objects / 47520
bytes in 142ms

note that the logcat says that the app passed a null surface but
logging the surface and the holder we have
11-06 15:25:07.016: INFO/camera(758):
android.view.SurfaceView@4373c7f8
11-06 15:25:07.016: INFO/camera(758): android.view.SurfaceView
$2@4373cca8

what Im doing wrong ????
did I missed anything, now Im using the HTC Magic with 1.5 on it
any know bug that I should be aware of ?

thanks


On Nov 6, 2:14 pm, "Hamilton Lima (athanazio)"
<hamilton.l...@gmail.com> wrote:
> I have the same problem running on the HTC Magic
> look at the log
>
> 11-06 14:01:33.206: DEBUG/CameraService(34): Connect E from
> ICameraClient 0x3d270
> 11-06 14:01:33.206: DEBUG/CameraService(34): Client E constructor
> 11-06 14:01:33.206: VERBOSE/QualcommCameraHardware(34):
> openCameraHardware: call createInstance
> 11-06 14:01:33.216: VERBOSE/QualcommCameraHardware(34):
> createInstance: E
> 11-06 14:01:33.216: VERBOSE/QualcommCameraHardware(34): constructor EX
> 11-06 14:01:33.216: VERBOSE/QualcommCameraHardware(34): setParameters:
> E params = 0x40408be8
> 11-06 14:01:33.216: VERBOSE/QualcommCameraHardware(34): requested size
> 480 x 320
> 11-06 14:01:33.216: VERBOSE/QualcommCameraHardware(34): actual size
> 480 x 320
> 11-06 14:01:33.216: VERBOSE/QualcommCameraHardware(34):
> initCameraParameters: E
> 11-06 14:01:33.216: VERBOSE/QualcommCameraHardware(34): loading
> libqcamera
> 11-06 14:01:33.226: VERBOSE/QualcommCameraHardware(34): waiting for
> REX to initialize.
> 11-06 14:01:33.226: VERBOSE/QualcommCameraHardware(34): Received REX-
> ready signal.
> 11-06 14:01:33.226: VERBOSE/QualcommCameraHardware(34): REX is ready.
> 11-06 14:01:33.226: VERBOSE/QualcommCameraHardware(34): starting REX
> emulation
> 11-06 14:01:33.236: VERBOSE/QualcommCameraHardware(34): init camera:
> waiting for QCS_IDLE
> 11-06 14:01:33.556: VERBOSE/QualcommCameraHardware(34): STATE
> CAMERA_FUNC_START // STATUS 1
> 11-06 14:01:33.556: VERBOSE/QualcommCameraHardware(34): state
> transition QCS_INIT --> QCS_IDLE
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34): init camera:
> woke up
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34): init camera:
> initializing parameters
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34):
> initCameraParameters: set parm: CAMERA_PARM_PREVIEW_MODE, 0
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34):
> initCameraParameters: set parm: CAMERA_PARM_ENCODE_ROTATION, 0
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34):
> initCameraParameters: set parm: CAMERA_PARM_WB, 1
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34):
> initCameraParameters: set parm: CAMERA_PARM_EFFECT, 1
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34):
> initCameraParameters: set parm: CAMERA_PARM_ANTIBANDING, 3
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34):
> initCameraParameters: set parm: CAMERA_PARM_EXPOSURE_METERING, 0
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34):
> initCameraParameters: set parm: CAMERA_PARM_NIGHTSHOT_MODE, 0
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34):
> initCameraParameters: set parm: CAMERA_PARM_LUMA_ADAPTATION, 0
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34): Setting Zoom
> is 0
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34):
> initCameraParameters: set parm: CAMERA_PARM_ZOOM, 0
> 11-06 14:01:33.566: WARN/QualcommCameraHardware(34): mCameraState:1
> 11-06 14:01:33.566: WARN/QualcommCameraHardware(34): with call back
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34):
> initCameraParameters: set parm: CAMERA_PARM_CONTRAST, 5
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34):
> initCameraParameters: set parm: CAMERA_PARM_BRIGHTNESS, 5
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34):
> initCameraParameters: set parm: CAMERA_PARM_SATURATION, 5
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34):
> initCameraParameters: set parm: CAMERA_PARM_SHARPNESS, 15
> 11-06 14:01:33.566: INFO/QualcommCameraHardware(34): setting thumbnail
> dimensions to 512x384, quality 30
> 11-06 14:01:33.566: ERROR/QualcommCameraHardware(34):
> LINK_camera_set_thumbnail_properties returned 2
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34): Setting JPEG-
> image quality to 100
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34):
> initCameraParameters: X
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34): setParameters:
> X mCameraState=1
> 11-06 14:01:33.566: VERBOSE/QualcommCameraHardware(34):
> createInstance: X created hardware=0x52c78
> 11-06 14:01:33.576: ERROR/MediaPlayer(34): Unable to to create media
> player
> 11-06 14:01:33.576: ERROR/CameraService(34): Failed to load
> CameraService sounds.
> 11-06 14:01:33.576: ERROR/MediaPlayer(34): Unable to to create media
> player
> 11-06 14:01:33.576: ERROR/CameraService(34): Failed to load
> CameraService sounds.
> 11-06 14:01:33.576: DEBUG/CameraService(34): Client X constructor
> 11-06 14:01:33.576: DEBUG/CameraService(34): Connect X
> 11-06 14:01:33.686: ERROR/camera(466): not able to link with the
> camera
> 11-06 14:01:33.686: ERROR/camera(466): java.lang.NullPointerException
> 11-06 14:01:33.686: ERROR/camera(466):     at
> com.athanazio.android.camerabinaria.Main.onCreate(Main.java:29)
> 11-06 14:01:33.686: ERROR/camera(466):     at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
> 1127)
> 11-06 14:01:33.686: ERROR/camera(466):     at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> 2231)
> 11-06 14:01:33.686: ERROR/camera(466):     at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
> 2284)
> 11-06 14:01:33.686: ERROR/camera(466):     at
> android.app.ActivityThread.access$1800(ActivityThread.java:112)
> 11-06 14:01:33.686: ERROR/camera(466):     at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
> 11-06 14:01:33.686: ERROR/camera(466):     at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 11-06 14:01:33.686: ERROR/camera(466):     at android.os.Looper.loop
> (Looper.java:123)
> 11-06 14:01:33.686: ERROR/camera(466):     at
> android.app.ActivityThread.main(ActivityThread.java:3948)
> 11-06 14:01:33.686: ERROR/camera(466):     at
> java.lang.reflect.Method.invokeNative(Native Method)
> 11-06 14:01:33.686: ERROR/camera(466):     at
> java.lang.reflect.Method.invoke(Method.java:521)
> 11-06 14:01:33.686: ERROR/camera(466):     at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
> (ZygoteInit.java:782)
> 11-06 14:01:33.686: ERROR/camera(466):     at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
> 11-06 14:01:33.686: ERROR/camera(466):     at
> dalvik.system.NativeStart.main(Native Method)
> 11-06 14:01:39.026: DEBUG/dalvikvm(310): GC freed 1650 objects /
> 107888 bytes in 122ms
>
> the error happens when I try to do this
> camera.setPreviewDisplay(original.getHolder());
>
> On Nov 5, 12:34 am, "Hamilton Lima (athanazio)"
>
> <hamilton.l...@gmail.com> wrote:
> > Hello all ! My app will show the current image from the camera and
> > bellow the binary version of the image black and white, and will write
> > some different algorithms make the binary image.
>
> > I'm having and error when I try to read from the camera:
> > 11-05 02:27:15.357: ERROR/camera(736): not able to link with the
> > camera
>
> > and after that in my app I have the following
> > 11-05 02:27:15.357: ERROR/camera(736): java.lang.NullPointerException
> > 11-05 02:27:15.357: ERROR/camera(736):     at
> > com.athanazio.android.camerabinaria.Main.onCreate(Main.java:29)
> > 11-05 02:27:15.357: ERROR/camera(736):     at
> > android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
> > 1123)
> > 11-05 02:27:15.357: ERROR/camera(736):     at
> > android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> > 2231)
> > 11-05 02:27:15.357: ERROR/camera(736):     at
> > android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
> > 2284)
> > 11-05 02:27:15.357: ERROR/camera(736):     at
> > android.app.ActivityThread.access$1800(ActivityThread.java:112)
> > 11-05 02:27:15.357: ERROR/camera(736):     at
> > android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
> > 11-05 02:27:15.357: ERROR/camera(736):     at
> > android.os.Handler.dispatchMessage(Handler.java:99)
> > 11-05 02:27:15.357: ERROR/camera(736):     at android.os.Looper.loop
> > (Looper.java:123)
> > 11-05 02:27:15.357: ERROR/camera(736):     at
> > android.app.ActivityThread.main(ActivityThread.java:3948)
> > 11-05 02:27:15.357: ERROR/camera(736):     at
> > java.lang.reflect.Method.invokeNative(Native Method)
> > 11-05 02:27:15.357: ERROR/camera(736):     at
> > java.lang.reflect.Method.invoke(Method.java:521)
> > 11-05 02:27:15.357: ERROR/camera(736):     at
> > com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
> > (ZygoteInit.java:782)
> > 11-05 02:27:15.357: ERROR/camera(736):     at
> > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
> > 11-05 02:27:15.357: ERROR/camera(736):     at
> > dalvik.system.NativeStart.main(Native Method)
>
> > I noticed this in the LogCat before the problem that I had
> > 11-05 02:27:14.937: ERROR/MediaPlayer(554): Unable to to create media
> > player
> > 11-05 02:27:14.947: ERROR/CameraService(554): Failed to load
> > CameraService sounds.
> > 11-05 02:27:14.957: ERROR/MediaPlayer(554): Unable to to create media
> > player
> > 11-05 02:27:14.977: ERROR/CameraService(554): Failed to load
> > CameraService sounds.
>
> > this is my current code
> > package com.athanazio.android.camerabinaria;
>
> > import java.io.IOException;
>
> > import android.app.Activity;
> > import android.app.AlertDialog;
> > import android.app.AlertDialog.Builder;
> > import android.graphics.Bitmap;
> > import android.graphics.BitmapFactory;
> > import android.graphics.Canvas;
> > import android.graphics.PixelFormat;
> > import android.hardware.Camera;
> > import android.hardware.Camera.Parameters;
> > import android.hardware.Camera.PreviewCallback;
> > import android.os.Bundle;
> > import android.util.Log;
> > import android.view.SurfaceView;
>
> > public class Main extends Activity {
>
> >         Camera camera;
>
> >         public void onCreate(Bundle savedInstanceState) {
> >                 super.onCreate(savedInstanceState);
>
> >                 try {
> >                         camera = Camera.open();
> >                         SurfaceView original = (SurfaceView) findViewById(R.id.original);
> >                         camera.setPreviewDisplay(original.getHolder());
> >              
>
> ...
>
> read more »

--
You received this message because you are subscribed to the Google
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Gisele Bundchen Wearing Almost Nothing In GQ Magazine

Gisele Bundchen Wearing Almost Nothing In GQ Magazine

Gisele Bundchen Wearing Almost Nothing In GQ Magazine
Supermodels Gisele Bundchen and Adriana Lima Pregnant!

Supermodels Gisele Bundchen and Adriana Lima Pregnant!
Gisele Bundchen Rampage Promo Video

Gisele Bundchen Rampage Promo Video
Gisele Bxfcndchen - London Fog F/W 09/10 - Behind the Scenes

Gisele Bxfcndchen - London Fog F/W 09/10 - Behind the Scenes

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

Mischa Barton at Late Show

Mischa Barton at Late Show

Mischa Barton at Late Show
Mischa Barton love Making

Mischa Barton love Making
Mischa Barton On Gok Fashion Fix

Mischa Barton On Gok Fashion Fix
Mischa Barton killed Marissa

Mischa Barton killed Marissa

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

[android-developers] Re: Red square on android Google map

I had a similar problem using CyanogenMod 4.1.11.1
On any map application it used to display a blank square on the bottom
left.
Flashed a 4.2.1 and the square is gone.


On Nov 6, 2:45 pm, TreKing <treking...@gmail.com> wrote:
> Isn't that where the Google logo is supposed to show up? Maybe that
> got corrupted somehow?
>
> On Nov 5, 9:50 pm, Matthieu Cornillault <m...@netsurf.org> wrote:
>
> > Hi Dave
>
> > Thanks for the idea. I tried it out but still get this red square....
> > When the page loads it displays the grid, the red square, and the  
> > loads the satellite map (while keeping this red box visible).
>
> > Thanks
> > Matt
>
> > On Nov 5, 2009, at 6:58 PM, davemac wrote:
>
> > > My guess would be it's the LinearLayout but I don't know why. Try
> > > removing that and see if it helps. I don't think you need it.
>
> > > - dave
>
> > > On Nov 5, 2:18 pm, Matthieu Cornillault <m...@netsurf.org> wrote:
> > >> Hello,
>
> > >> I have written a simple map application using the google API. I have
> > >> the apikey set and the map displays properly on the android phone.
> > >> However, there is always a red square on the bottom left of the map,
> > >> that I don't know how to get rid off.
> > >> Here is the URL of the snapshot:http://picasaweb.google.com/mcornill/Screenshots#5399362615931619762
> > >> The java code is pasted below.
> > >> Any help is appreciated.
> > >> Thanks
>
> > >> Matt
>
> > >> import android.*;
> > >> import android.content.Intent;
> > >> import android.graphics.Bitmap;
> > >> import android.graphics.BitmapFactory;
> > >> import android.graphics.Canvas;
> > >> import android.graphics.Point;
> > >> import android.location.Address;
> > >> import android.location.Geocoder;
> > >> import android.view.*;
> > >> import android.widget.LinearLayout;
> > >> import android.widget.Toast;
> > >> import com.google.android.maps.*;
> > >> import com.google.android.maps.MapView.LayoutParams;
> > >> import android.os.Bundle;
> > >> import java.io.IOException;
> > >> import java.util.List;
> > >> import java.util.Locale;
> > >> public class MapsActivity extends MapActivity
> > >> {
> > >>    static MapView mapView;
> > >>    MapController mc;
> > >>    GeoPoint p;
>
> > >>    /** Called when the activity is first created. */
> > >>    @Override
> > >>    public void onCreate(Bundle savedInstanceState)
> > >>    {
> > >>        super.onCreate(savedInstanceState);
> > >>        setContentView(R.layout.main);
> > >>        // Allow zooming
> > >>        mapView = (MapView) findViewById(R.id.mapView);
> > >>        mapView.setSatellite(true);
> > >>        mapView.setBuiltInZoomControls(true);
> > >>        mc = mapView.getController();
> > >>        Geocoder geoCoder = new Geocoder(this, Locale.getDefault());
> > >>        try {
> > >>            List<Address> addresses = geoCoder.getFromLocationName(
> > >>                "Palo Alto, CA", 5);
> > >>            String add = "";
> > >>            if (addresses.size() > 0) {
> > >>                p = new GeoPoint(
> > >>                        (int) (addresses.get(0).getLatitude() * 1E6),
> > >>                        (int) (addresses.get(0).getLongitude() *
> > >> 1E6));
> > >>            }
> > >>        } catch (IOException e) {
> > >>            e.printStackTrace();
> > >>        }
> > >>        mc.animateTo(p);
> > >>        mc.setZoom(17);
> > >>        mapView.invalidate();
> > >>    }
> > >>    @Override
> > >>    protected boolean isRouteDisplayed() {
> > >>        return false;
> > >>    }
>
> > >> }
>
> > >> and here is main.xml:
> > >> <?xml version="1.0" encoding="utf-8"?>
> > >> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
> > >> android"
> > >>    android:layout_width="fill_parent"
> > >>    android:layout_height="fill_parent">
>
> > >>    <com.google.android.maps.MapView
> > >>        android:id="@+id/mapView"
> > >>        android:layout_width="fill_parent"
> > >>        android:layout_height="fill_parent"
> > >>        android:enabled="true"
> > >>        android:clickable="true"
> > >>        android:apiKey="0oWLKpz0iuwLIE5KcYgcqCL0TPkzQOeWEOiUWOg"
> > >>        />
>
> > >>    <LinearLayout android:id="@+id/zoom"
> > >>        android:layout_width="wrap_content"
> > >>        android:layout_height="wrap_content"
> > >>        android:layout_alignParentBottom="true"
> > >>        android:layout_centerHorizontal="true"
> > >>        />
> > >> </RelativeLayout>
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > 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+unsubscribe@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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: finishActivity doesnt work

Thanks ALL.

Just tested it, and yes finishActivity only works in the activity which starts another.

Here's what I did to resolve my problem,

Activity B uses startActivityForResult(intentC, 100) to start activity C, and overrides onActivityResult(...) to catch the result from acitvity C, finish() B itself when gets the exact requestCode and resultCode from activity C.

Bob

On Thu, Nov 5, 2009 at 6:51 PM, Dianne Hackborn <hackbod@android.com> wrote:
Your first comment was correct -- finishActivity lets B finish C if B was the one that used startActivityForResult() to start C.  The requestCode has no meaning outside the context of B.


On Thu, Nov 5, 2009 at 3:04 PM, PJ <pjbarnes@gmail.com> wrote:
Hmm, I went back and read the Javadoc for finishActivity(), and it's
not clear whether activities should be allowed to use finishActivity()
for activities that it didn't start.  I can interpret it both ways.
So, you may be right; maybe it should work.

But at the very least, maybe you could try the different approach
above.  /shrug

I hope you let us know how it turns out, because I've only used finish
(), and not finishActivity().



On Nov 5, 4:54 pm, PJ <pjbar...@gmail.com> wrote:
> Check out this discussion, it sounds similar to what you want to
> accomplish:http://groups.google.com/group/android-developers/browse_thread/threa...
>
> Specifically, check out FLAG_ACTIVITY_CLEAR_TOP at:http://developer.android.com/reference/android/content/Intent.html#FL...
>
> Hope this helps!
> -- PJ
>
> On Nov 5, 4:48 pm, PJ <pjbar...@gmail.com> wrote:
>
>
>
> > finishActivity() is intended to be used to force-finish an activity,
> > *** from the same activity that started it ***.
> > So, if you want to force-finish Activity B, then I think Main Activity
> > is the only one that can do it via finishActivity(), because Main
> > Activity is the one that started it.
>
> > However, I think there's a way for Activity C to terminate and to go
> > back directly to Main Activity and to ask Main Activity to destroy all
> > activities "above" it (B).  Let me see if I can find that...
>
> > -- PJ
>
> > On Nov 5, 2:58 pm, Bob Cai <caibo...@gmail.com> wrote:
>
> > > Hello,
>
> > > In main Activity, I called startActivityForResult(intentB, 100) to start a
> > > new activity B, then in B, I called startActivity(intentC) to start another
> > > activity C. Lastly I wanted to call finishActivity(100) in C to close
> > > activity B, but seemed it was not successfully destoried(I can use BACK key
> > > to see it's still there.).
>
> > > Anyone can give advice of this?
>
> > > Thanks,
> > > Bob- Hide quoted text -
>
> > - Show quoted text -- 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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



--
Dianne Hackborn
Android framework engineer
hackbod@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+unsubscribe@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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Customize MapView or use geo: uri

Hi,

My goal is to display a map of businesses around my location that
belong to an association. I'm wondering if I can do this by using the
geo: uri method and then somehow annotating the result displayed by
Google Maps or is it necessary to query maps.google.com for a kml file
and then mash it up with my data to create a MapView.

If the best approach is the latter then I'll be curious if there are
any tools or tutorial to give me a running start.

Thanks!

Mark

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

[android-developers] Re: ADC2 Results Post

Sorry about the multiple Screebl posts for those of you that receive
email digests. Seems that Google Groups doesn't remove posts from
digests even after they've been deleted from the group before the
digest ships. Learn something every day...

On Nov 5, 9:05 pm, dadical <keyes...@gmail.com> wrote:
> Screebl's in the final round in the Productivity/Tools category.
> Looks like all of my conspiracy theories about what's been happening
> behind the Google blast door have been false :).  I'm pleasantly
> surprised to say the least...
>
> http://keyeslabs.com/joomla/index.php/projects/screebl
>
> On Nov 5, 3:28 pm, GodsMoon <godsm...@gmail.com> wrote:
>
>
>
> > Since the Android Challenge Group seems to be closed I'll post here.
> > What results did you get from Google?- 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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Links in WebView & context menu?

Hi, 

  is there any way to launch a context menu on the links in a WebView that knows about the links it is launched upon? I would like to launch a context menu on links that I can then open in the actual Android browser or send the link by email etc.

Cheers,
Mariano

--
You received this message because you are subscribed to the Google
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Can I fling between multiple listviews?

perhaps there is a possible solution along the lines of placing a
transparent view on top of the listviews, and have it somehow process
the events AND pass them down to the listviews? It seems somewhat...
wrong, though.

Or am I missing something really obvious?

--
You received this message because you are subscribed to the Google
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Time To Lift Dev Phone Purchase Limitations

Is it possible to connect 2 or more android phones through adhoc
network either wifi or bluetooth, I mean can a application do that.
I thought it is still an open issue.

:)
Vinesh

On Oct 30, 8:29 am, Disconnect <dc.disconn...@gmail.com> wrote:
> You can do ad-hoc deployment to as many devices as you want. So far,
> all retail devices allow for installation of any app you want. That is
> one of the big differences between android and iphone.
>
> On Thu, Oct 29, 2009 at 1:21 PM, Madjack <jack.fro...@gmail.com> wrote:
>
> > With the new Android devices coming out, will Google lift the
> > restriction on buying one developer device?
>
> > For instance, as I understand it, I can't currently test SDK 2.0 apps
> > on the unlocked G1 phone I originally bought.
>
> > I believe the iPhone Developer Program allows a development account to
> > do ad-hoc app deployment to 100 devices.
>
> > Isn't it time to open up the very narrow unlocked device limit?
>
> > jack

--
You received this message because you are subscribed to the Google
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Preference and type

With CheckBoxPreference and EditTextPreference, there are only boolean
and String preferences.
EditTextPreference support input filter, but always save as String.
I think we need other save type like : int, float, double, etc ...

A native DialogPreference with slide-bar could be great too.

--
You received this message because you are subscribed to the Google
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Upgrade Dev Phone to 2.0

To have this phone (G1) in Italy I have handled friends in the U.S.
and I spent a disproportionate amount (phone $ 300 + shipping & taxes
€ 200) and I waited about two months with a bock at the Customs
(border).

Now I have a Dev Phone 1 in the hand an I is not compatible with the
Android 2.0??
It means that Google will change me for free, the devphone 1 to next
devphone 2?
I must buy here in italy a non devphone 2.0?

Please I'm tired and bored by the problems give me a solution.

Dr.Luiji

--
You received this message because you are subscribed to the Google
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Working with the new ContactContracts API

Privet Dmitri,

I have been searching for the second day any info about what Sync
Adapter is and any info that could help me to understand if i need to
implement it.
We are writing an application that syncs contacts. I just try to
understand if Sync Adapter will be any helpful.
And Google didn't provide any sources of 2.0 sdk yet, and
documentation of APIs is also very poor.

On Nov 5, 6:39 am, Dmitri Plotnikov <dplotni...@google.com> wrote:
> Raw contacts can have group memberships.  A GroupMembership is a row in the
> Data table.  If you want to add a membership find the group you need and add
> a row to the Data table with mimetype GroupMembership.CONTENT_ITEM_TYPE and
> the id of the group:
>
> values.put(GroupMembership.RAW_CONTACT_ID, rawContactId);
> values.put(GroupMembership.MIMETYPE, GroupMembership.CONTENT_ITEM_TYPE);
> values.put(GroupMembership.GROUP_ROW_ID, groupId);
> resolver.insert(Data.CONTENT_URI, values);*
>
> *If you are writing a sync adapter, you may find it easier to use
> server-side group ID instead of a row ID:
> values.put(GroupMembership.GROUP_SOURCE_ID, "blahblah");
>
> Groups do not affect aggregation and are not affected by aggregation.
>
> Cheers,
> - Dmitri
>
> On Wed, Nov 4, 2009 at 7:28 PM, Yao <cicikaka2...@gmail.com> wrote:
> > Hi Dmitri,
>
> > Would you please help point out how's new group structure? Something
> > similar as groupmembership table in previous relese. Thanks a lot in
> > advance!
>
> > On Thu, Nov 5, 2009 at 10:47 AM, Dmitri Plotnikov <dplotni...@google.com>wrote:
>
> >> Hi Jake,
>
> >> The database structure is actually extremely straightforward:
>
> >> "Contacts" represents an aggregated contact
> >> "RawContacts" represents a contact as it was inserted by the sync adapter.
> >>  RawContact has a CONTACT_ID field that binds it to a Contact.
> >> "Data" represents everything about a RawContact: emails, phone numbers,
> >> notes, birthday, high school graduation year, you name it.  Data has a
> >> RAW_CONTACT_ID field that binds it a  RawContact.  The other important field
> >> is MIMETYPE.  That's what determines the kind of data stored in a Data row.
> >>  Everything else is just convenience API.
>
> >> So here's the most common way of inserting a data row:
>
> >> values.put(Data.RAW_CONTACT_ID, rawContactId);
> >> values.put(Data.MIMETYPE, Note.CONTENT_ITEM_TYPE);
> >>  values.put(Note.NOTE, "Blah blah blah");
> >> resolver.insert(Data.CONTENT_URI, values);
>
> >> I hope this helps.
>
> >> - Dmitri
>
> >> On Wed, Nov 4, 2009 at 6:11 PM, jak. <koda...@gmail.com> wrote:
>
> >>> Thank you Dmitri,
>
> >>> Your response was very helpful. Along with that, and the sample you
> >>> posted on another thread about using both Contact Apis from one app,
> >>> I've gotten most of the way there. It is much appreciated.
>
> >>> I'm still however having some problems that I'm hard pressed to find a
> >>> solution for.
> >>> I'd be grateful if anyone could help me.
>
> >>> The biggest challenge I'm  having with this API is that it's hard for
> >>> me to picture how the tables are laid out so I know which URI to query
> >>> to get the parts of the contact that I'm interested in.
> >>> I found to get the email address for a contact I'm looking at I can
> >>> query the uri:ContactsContract.CommonDataKinds.Email.CONTENT_URI,
> >>> looking at rows of the contact id i'm interested in.
>
> >>> However to get the note from the same contact I can't use a similar
> >>> pattern, because there is no
> >>> ContactsContract.CommonDataKinds.Note.CONTENT_URI
> >>> The Note type exists in CommonDataKinds but it doesn't have an
> >>> associated CONTENT_URI.
>
> >>> I'm finding it very frustrating to use this API because every time I
> >>> go to try to pull out another piece of data from the contact, the
> >>> method to access it seems to change (as I can't find a consistent way
> >>> to get a given field from a contact). And the documentation never
> >>> describes how these keys, tables, and URIs are related. Basically the
> >>> ContactsContract documentation just gives you a giant list of Objects
> >>> containing constants that describe indexes into some database that is
> >>> basically a black box without some basic documentation.
>
> >>> I'm I the only one that finds this frustrating?
>
> >>> Thanks again for your help.
>
> >>> -Jake
>
> >>> On Nov 2, 5:24 pm, Dmitri Plotnikov <dplotni...@google.com> wrote:
> >>> > You can always delegate contact creation to the Contacts app using the
> >>> > ContactsContract.Intents.UI.Insert intent with extras. This will show
> >>> the
> >>> > edit UI.
>
> >>> > If you want to explicitly create the contact by yourself, that's now a
> >>> bit
> >>> > tricky because Android 2.0 support multiple accounts.
>
> >>> > First of all, you will need to figure out which account you want to
> >>> create
> >>> > the contact in. Get a list of all available accounts from
> >>> AccountManager:
>
> >>> > AccountManager am = AccountManager.get(getContext());
> >>> > Account[] accounts = am.getAccounts();
>
> >>> > Also, get a list of all sync adapters and find the ones that support
> >>> > contacts:
>
> >>> > SyncAdapterType[] syncs
> >>> > = ContentResolver.getContentService().getSyncAdapterTypes();
>
> >>> > for (SyncAdapterType sync : syncs) {
> >>> >      if (ContactsContract.AUTHORITY.equals(sync.authority) &&
> >>> > sync.supportsUploading()) {
> >>> >           contactAccountTypes.add(sync.accountType);
> >>> >      }
>
> >>> > }
>
> >>> > Now you have a list of all accounts and a list of account types that
> >>> support
> >>> > contacts.  So here's your account list:
>
> >>> > for (Account acct: accounts) {
> >>> >    if (contactAccountTypes.contains(acct.type)) {
> >>> >       contactAccounts.add(account);
> >>> >    }
>
> >>> > }
>
> >>> > If the contactAccounts list contains nothing - use accountType = null
> >>> and
> >>> > accountName = null
> >>> > If it contains exactly one account, use it.
> >>> > If it contains multiple accounts, build a dialog and ask the user which
> >>> > account to use.
>
> >>> > From here on it gets easier.
>
> >>> > Let's start with a more traditional method.  Insert a raw contact
> >>> first:
>
> >>> > ContentValues values = new ContentValues();
> >>> > values.put(RawContacts.ACCOUNT_TYPE, accountType);
> >>> > values.put(RawContacts.ACCOUNT_NAME, accountName);
> >>> > Uri rawContactUri =
> >>> getContentResolver().insert(RawContacts.CONTENT_URI,
> >>> > values);
> >>> > long rawContactId = ContentUris.parseId(rawContactUri);
>
> >>> > Then insert the name:
>
> >>> > values.clear();
> >>> > values.put(Data.RAW_CONTACT_ID, rawContactId);
> >>> > values.put(Data.MIMETYPE, StructuredName.CONTENT_ITEM_TYPE);
> >>> > values.put(StructuredName.DISPLAY_NAME, "Some Body");
> >>> > getContentResolver().insert(Data.CONTENT_URI, values);
>
> >>> > You are done.
>
> >>> > Now here's a much better way to do the same.  Use the
> >>> > new ContentProviderOperation API, which will ensure that the raw
> >>> contact and
> >>> > its name are inserted at the same time.
>
> >>> > ArrayList<ContentProviderOperation> ops = Lists.newArrayList();
> >>> > ops.add(ContentProviderOperation.newInsert(RawContacts.CONTENT_URI)
> >>> >         .withValue(RawContacts.ACCOUNT_TYPE, accountType)
> >>> >         .withValue(RawContacts.ACCOUNT_NAME, accountName)
> >>> >         .build());
>
> >>> > ops.add(ContentProviderOperation.newInsert(Data.CONTENT_URI)
> >>> >         .withValueBackReference(Data.RAW_CONTACT_ID, 0)
> >>> >         .withValue(Data.MIMETYPE, StructuredName.CONTENT_ITEM_TYPE)
> >>> >         .withValue(StructuredName.DISPLAY_NAME, "Some Body")
> >>> >         .build());
>
> >>> > getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops);
>
> >>> > I hope this helps.
> >>> > - Dmitri
>
> >>> > On Mon, Nov 2, 2009 at 4:23 PM, jak. <koda...@gmail.com> wrote:
> >>> > > Hello,
>
> >>> > > I'm currently working on porting our Android app to 2.0 but I'm
> >>> having
> >>> > > a rather hard time figuring out what is required to interact with the
> >>> > > new Contacts API.
> >>> > > I'm using reflection to decide whether the new API is available, if
> >>> it
> >>> > > is I attempt to use the new features, otherwise I fall back to our
> >>> old
> >>> > > methods.
>
> >>> > > However, I'm having a hard time finding analogs to the old
> >>> > > functionality in the new API.
> >>> > > For example in the past I was adding contacts to the database from an
> >>> > > external text source by creating a ContentValues object, filling it
> >>> > > with information on the contact and then adding it with a call to:
> >>> > > Contacts.People.createPersonInMyContactsGroup(...);
>
> >>> > > i.e.:
> >>> > > ...
>
> >>> > > ContentValues personValues = new ContentValues();
> >>> > > personValues.put(Contacts.People.NAME, "Some Body");
> >>> > > Uri personUri = Contacts.People.createPersonInMyContactsGroup
> >>> > > (curContext().getContentResolver(), personValues);
>
> >>> > > ...
> >>> > > How can I achieve the same goal in the new API?
>
> >>> > > I appreciate all the hard work going into improving the APIs but I
> >>> > > must admit I'm a bit frustrated by the lack of documentation and
> >>> > > examples.
> >>> > > I realize we have plenty of Javadocs on developer.android.com to
> >>> > > reference, but those only really show us what the new interfaces are.
> >>> > > I'm having a really hard time finding any discussion in terms of how
> >>> > > the new API is intended to be used.
>
> >>> > > Any help would be greatly appreciated!
> >>> > > 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+unsubscribe@googlegroups.com<android-developers%2Bunsubscribe@googlegroups.com><android-developers%2Bunsubs
> >>> cribe@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
>
> ...
>
> read more »

--
You received this message because you are subscribed to the Google
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en