I'm trying to update a contact using the 'new' api. i've got the raw contact ID of the contact and the contact is linked to an account, but i cant find anywhere some sample code or working code that i can study and adapt.
Dunno wherever i have to 'query' the contact first for any info? And is the raw contact ID enough to 'update' a Contact?
At the moment I'm using the ContentProviderOperation.newUpdate(Data.CONTENT_URI) Is this the best way? and if so what else do i need to add to add details to the contact?
Also i have read somewhere that you have to use something along the lines of .withSelection(Data.CONTACT_ID = 123... etc but I'm not too sure..
Any help would be brilliant and Thanks in advance!
Take a look at this SO question. It shows how to update the work number using the new API. Sems to do what you want.
How to update contact number using Android
Related
Hello people,
I just learned java & it's basics. I really new to programming. I'm really ambitious to create my first project. My Application kind of used for ** grocery store** type. Please Understand.(I couldn't explain it)
Details:
It's just kind of Seller ledger book
It has all types of products prices & their other important details & which is updatable
It's design kind of Ms-Excel where default columns are generated
when a item is typed in respective column in the product name. The application retrieves that particular item & it fills in the details. ( main feature)
I'm sorry for very vague details.Well my take is
Java Swings for GU-Interface
I think I need database for my application
I clearly don't have enough knowledge but trying to implement this project only way I can motivate my self to learn. Internet is my only resource. Please Help me.. in anyway.. Thank you.
Considering you are new to programming, I would suggest create a CSV file and put details in there. When you start your program you can read the details from there. The format of File could be like:
ProductId,ProductName,Price,Description
P1,Soap,10,Cleaning
P2,Shampoo,50,Hair Wash
.....
and so on.
You will easily find ways to read a CSV file as in this link.
Here
How can i extract email id based on the website that i have got from Place Details using Google maps API.
I want to extract the generic email id from these place details or the website. I have attached a screen shot to show what i have. I am using open Refine.I am able to parse the phone number but can't parse email id's as its not present in these place details but i can see it on the website.
Thank you in advance.
This is the code i am using -
"https://maps.googleapis.com/maps/api/place/details/json?placeid=" + cells['PlaceID'].value + "&key=AIzaSyCSp-f-_FWHw8jfNFF9yd7mgUxaX-DZo8g"
According to the google maps places API this is not something that can be returned from the API. I believe that Google does not want its API to be used as a source for spamming companies. Based on that, I can't think of any legal option that would give you this email.
The only solution that I can think of would be to get the URL attribute from google maps API result and from then scrape the page and hope that there is a way to find the email address in the HTML code, but :
I don't think that google would present it in a easily scrappable way;
I believe it would go against terms of use of Google.
So to summarize I don't think there is an easy and legal solution to your question.
I'm writing a code for Amazon Alexa. And in the developer.amazon.com, we configure the intents, utterances etc... Here I need to get the question asked by the user.
I'm sure that this works using the intents but I will need the utterances. For eg:
GetTheData get me the user data
GetTheData get me user details
Here I'm able to get the GetTheData printed using intent.getName(), But i want to know if there is a way to get the content after the intent name i.e. get me the user data. I want to know this for my research purpose.
Please let me know how can I get this.
Thanks
No, unfortunately there is no way to get this information with the ASK/echo.
Your only solutions at this time would be to split that into one intent per utterance, or switch to google home (its SDK can give you the raw user text).
when we add any status in facebook, it auto shows your friends Name, if name is half then it complete, it also gives us place name . HOw? I want to implement in my app like that it will search automatic its name to whose we want to tag after few word. plz help
Use > AutoCompleteTextView
it shows completion suggestions automatically while the user is typing.
Look here
https://github.com/linkedin/Spyglass
read all documentation, every thing is here
Can someone tell me how to make a contact on a android phone 'non editable', I've seen it done with Facebook contacts but i dont know how to do it my self. Is there a value i have to put with a contact when inserting it into the contacts database? Or a option within the AccountManager?
Thanks in advance... :)
[Edit]
I've found out that the SYnc Provider has to be 'read-only'. Anyone know how to do this?
In your sync adapter's xml file (e.g. syncadapter.xml), define android:supportsUploading="false". This will make the sync adapter "read-only" (i.e. the phone won't be able to upload changes), which is what you are looking for.