inactive contact google contacts api - google-contacts-api

Good day. I apologize in advance - my English is terrible. (This is translator).
I have a problem while working with Google Contacts API.
I try to create a contact:
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:gd="http://schemas.google.com/g/2005">
<atom:category scheme="http://schemas.google.com/g/2005#kind"
term="http://schemas.google.com/contact/2008#contact"/>
<gd:name>
<gd:givenName>Sergey</gd:givenName>
<gd:familyName>Serov</gd:familyName>
<gd:fullName>Sergey Serov</gd:fullName>
</gd:name>
<atom:content type="text">Notes</atom:content>
<gd:phoneNumber rel="http://schemas.google.com/g/2005#work"
primary="true">
+79130968888
</gd:phoneNumber>
</atom:entry>
Contact was successfully created. But I can not use it.
Contact is not active. It does not synchronize with the phone.
I do not see it in my contact list (Web Interface)
I find it can only be through the "search".
If I change via the web interface 1 letter and save - contact becomes active.
Something wrong with my query?
Thanks

Everything works well.
Add this line to the query :
<gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/MyMail#gmail.com/base/6" />

Related

Google contact api returns Invalid XML Document error

While adding contacts using google contacts api, I have been getting status code 400, with Invalid XML Document error.
If I remove the following line the add contact api succeeds. However, this behaviour is not what I want. I would like to add it to the base group 6.
<gContact:groupMembershipInfo deleted="false"
href="http://www.google.com/m8/feeds/groups/binthi123#gmail.com/base/6"/>
The following is the body of the add new contact api post request:
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom" xmlns:gd="http://schemas.google.com/g/2005">
<atom:category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact" />
<gd:name>
<gd:givenName>1234567890</gd:givenName>
</gd:name>
<gd:phoneNumber rel="http://schemas.google.com/g/2005#mobile" primary="true">
${phone_number}
</gd:phoneNumber>
<gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/binthi123#gmail.com/base/6" />
</atom:entry>
I solved the problem changing the tag <gContact:groupMembershipInfo>in <gd:groupMembershipInfo> , so any tag with <gContact> no longer works but only with <gd:>, this only when you create new contact if you update there isn't any problem
Our team ran into a variant of this problem where the Contacts API was returning "Invalid JSON" 400 error when posting a new contact (via XML). The problem was related to us setting the alt=json parameter; apparently there is a bug on Google's end that gets invoked if you ask for a JSON response from that method.

Google map and firebase don't work together

UPDATE: This is the code that kills functionality of firebase. If I try to download from firebase a couple of seconds after this code (waiting with await Task.Delay, no other code running), it starts sending the code -13000, httpResult = 0 exception. The same request earlier works. Map works.
GoogleMapFragment gmf = new GoogleMapFragment(context, this);
FragmentTransaction ft = activity.FragmentManager.BeginTransaction();
ft.Add(mapLayout.Id, gmf, "my_fragment");
ft.Commit();
I wanted to have google map on layout in the same activity where I work with firebase. Map works, but somehow it interferes with firebase, which work only before creating Google map. Any ideas what can cause this?
Update 2: If I download small file before initializing google maps, I can later use firebase, so I 'solved' the issue in a little dirty way but at least I can continue working. After this 'fix' I get following error in the output but file is downloaded anyway. I must continue digging, for now I hope the worst is over...
error getting token java.util.concurrent.ExecutionException: com.google.firebase.FirebaseApiNotAvailableException: firebase-auth is not linked, please fall back to unauthenticated mode.
Old version of question:
I checked all possible answers here on SO for my question, but nothing brought me to right way. There's quite obvious output telling me that something is wrong, but I have no idea how to solve the issue. There's an answer in this question that one of possible reasons for HttpResult = 0 is that google play version on phone isn't actual enough. I used the method recommended for check and I have Google Play services 11.5.18 installed on phone. I have Xamarin.Firebase.Storage 42.1021.1 (10.2.1) installed and using Visual Studio 2015. Quite often I had to clean and rebuild and it sometimes worked, but not this time. In android properties I have Compile using android version 7.1 Nougat. I created firebase account just recently, not knowing much about this, added it in google console to existing project (as I already use google maps), filled sha1 code the same way I did with maps. Added google-services.json and set it's build action on GoogleServiceJson. No more actions I know about.
Here is my code, I tried various ways to download, upload, but this one seems to be good example:
FirebaseApp fba=FirebaseApp.InitializeApp(context);
firebaseStorage = FirebaseStorage.Instance;
firebaseStorageReference = firebaseStorage.GetReferenceFromUrl("gs://alien-chess.appspot.com");
firebaseStorageReference=firebaseStorageReference.Child("settings.dat");
byte[] bytes = new byte[1000];
firebaseStorageReference.PutBytes(bytes).AddOnFailureListener(new FirebaseFailureListener(this));
Here is my manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="AlienChessAndroid.AlienChessAndroid" android:versionCode="1" android:versionName="1.0" android:installLocation="preferExternal">
<uses-sdk android:minSdkVersion="19" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application android:label="Alien Chess" android:icon="#drawable/Alien" android:largeHeap="true">
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
</application>
And here are what I think are important parts from the output window
Failed to retrieve remote module version: V2 version check failed
Local module descriptor class for com.google.android.gms.firebasestorage not found.
Considering local module com.google.android.gms.firebasestorage:0 and remote module com.google.android.gms.firebasestorage:0
NetworkRequestFactoryProxy failed with a RemoteException:
com.google.android.gms.dynamite.DynamiteModule$zza: No acceptable module found. Local version is 0 and remote version is 0.
....
Unable to create a network request from metadata
android.os.RemoteException
....
StorageException has occurred.
An unknown error occurred, please check the HTTP result code and inner exception for server response.
Code: -13000 HttpResult: 0
There isn't much c# sources for visual studio and I can't read that easily recommendations for android studio as they are quite different for unskilled programmers.
Any ideas what other things should I check?

Paypal payment pro PayPal express order not sending confirmation email in Magento

I have a very long standing issue with PayPal Payments Pro in magento. If a customer places an order using PayPal express they don't receive the order email. If a customer pays with card they get it with no problems.
I have spent a lot of time investigating this with no joy at all. I am wondering if other people have had the same issue and if anyone has managed to solve it. I am running magento community 1.9.2.
The IPN seems to be working properly, and there are no orders in the email que.
Any help would be gratefully appreciated.
PayPal Payment Pro not send confirmation email facility.But you can achieve it by creating observer after payment receive.
You may use event checkout_onepage_controller_success_action. This can be used if your order success.
There is another event sales_order_payment_pay. This can be used if your order success. It may also use in your case.
1 ) Make custom config.xml for call observer file
The config.xml defines your module and declares your event listener for a given event (checkout_onepage_controller_success_action is sent when onepage checkout process is complete, sales_order_payment_pay is sent when the payment has been confirmed).
<?xml version="1.0"?>
<config>
<modules>
<Namespace_Modulename>
<version>0.1.0</version>
</Namespace_Modulename>
</modules>
<frontend>
<events>
<sales_order_payment_pay>
<observers>
<Namespace_Modulename_Customevent>
<type>singleton</type>
<class>Namespace_Modulename_Model_Observer</class>
<method>customFunction</method>
</Namespace_Modulename_Customevent>
</observers>
</sales_order_payment_pay>
</events>
</frontend>
</config>
2 ) create observer.php file inside your module/Model directory and paste this code
<?php
class Namespace_Modulename_Model_Observer
{
public function customFunction(Varien_Event_Observer $observer)
{
$order_id = $observer->getData('order_ids');
$order = Mage::getModel('sales/order')->load($order_id);
//your code here
}
}
Hope It's helpful for you.

EWS Partial sync soap request returns organizer name as appointment subject

I am currently working on a project where the system, which is a node.js web server subscribes to push notification for changes in the resource calendars of an Exchange server. We followed the MSDN documentation to subscribe and communicate with the Exchange server using SOAP requests.
We used SOAP request below to fetch the changes and store them in the local database of the web server. The '+roomCalId' and '+syncState+' values are replaced with room calendar Id and its corresponding sync state which are stored previously in the database when subscribing.
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<t:RequestServerVersion Version="Exchange2013"></t:RequestServerVersion>
<t:TimeZoneContext>
<t:TimeZoneDefinition Name="UTC" Id="UTC"></t:TimeZoneDefinition>
</t:TimeZoneContext>
<t:ExchangeImpersonation>
<t:ConnectingSID>
<t:PrimarySmtpAddress>+roomCalId+</t:PrimarySmtpAddress>
</t:ConnectingSID>
</t:ExchangeImpersonation>
</soap:Header>
<soap:Body>
<m:SyncFolderItems>
<m:ItemShape>
<t:BaseShape>AllProperties</t:BaseShape>
</m:ItemShape>
<m:SyncFolderId>
<t:DistinguishedFolderId Id="calendar" />
</m:SyncFolderId>
<m:SyncState>+syncState+</m:SyncState>
<m:MaxChangesReturned>500</m:MaxChangesReturned>
<m:SyncScope>NormalItems</m:SyncScope>
</m:SyncFolderItems>
</soap:Body>
</soap:Envelope>
The process worked perfectly without any problems for the first few calendars. However, for newly created room calendars, the soap request above returns the organizer's name as appointment title instead of the actual title. Is there a reason why this might be happening?
Thats is a default setting on Room mailboxes where the Organiser name is used to replace the Subject of a Meeting. This is done for security reasons as most people have access to Meeting rooms but generally people like HR might not want people to see the subject of the meeting (eg meeting to talk about downsizing etc). You can change this setting using the Set-CalendarProcessing cmdlet https://technet.microsoft.com/en-us/library/dd335046(v=exchg.160).aspx and the AddOrganizerToSubject parameter

UPS surepost API

I am trying to integrate UPS SurePost API in PHP to get the Rates for SurePost services.
I have no idea where to get the API from and how to integrate it.
Any help would be greatly appreciated.
Thanks
Jayesh Vaya's answer is correct, but here is further detail. There are 4 separate service codes for SurePost rates.
92: UPS SurePost Less than 1LB
93: UPS SurePost 1LB or greater
94: UPS SurePost BPM
95: UPS SurePost Media Mail
When shipping with service code 92, the unit of measure of the package weight must be in ounces instead of pounds, rounded to the tens decimal place.
I found that the ounces unit of measure code was "OZS".
Note that your account with UPS must be enabled to ship with SurePost. The documentation for the SurePost Web Services API is available upon request from your UPS account executive.
Here is the UPS documentation for using their API:
Rating Service API
I hope this helps anyone who wasn't sure how to start, like I was yesterday! :)
Service Code 93 Is for Surepost
<AccessLicenseNumber>xxxx</AccessLicenseNumber>
<UserId>xxxx</UserId>
<Password>xxxx</Password>
</AccessRequest>
<RatingServiceSelectionRequest>
<Request>
<TransactionReference>
<CustomerContext>Bare Bones Rate Request</CustomerContext>
<XpciVersion>1.0001</XpciVersion>
</TransactionReference>
<RequestAction>Rate</RequestAction>
<RequestOption>Rate</RequestOption>
</Request>
<PickupType>
<Code>02</Code>
</PickupType>
<Shipment>
<Shipper>
<Address>
<PostalCode>123456</PostalCode>
<CountryCode>US</CountryCode>
</Address>
<ShipperNumber>123456</ShipperNumber>
</Shipper>
<ShipTo>
<Address>
<PostalCode>123123</PostalCode>
<StateProvinceCode>AL</StateProvinceCode>
<CountryCode>US</CountryCode>
</Address>
</ShipTo>
<ShipFrom>
<Address>
<PostalCode>123123</PostalCode>
<StateProvinceCode>123</StateProvinceCode>
<CountryCode>US</CountryCode>
</Address>
</ShipFrom>
<Service>
<Code>93</Code>
</Service>
<Package>
<PackagingType>
<Code>02</Code>
</PackagingType>
<Description>Rate Shopping</Description>
<Dimensions><UnitOfMeasurement><Code>IN</Code></UnitOfMeasurement><Length>20</Length><Width>10</Width><Height>10</Height></Dimensions>
<PackageWeight><UnitOfMeasurement>
<Code>LBS</Code>
</UnitOfMeasurement>
<Weight>20.20</Weight>
</PackageWeight>
</Package>
<RateInformation><NegotiatedRatesIndicator/></RateInformation></Shipment></RatingServiceSelectionRequest>
Update 2021
It is interesting that SurePost is out of the list of service codes in the official docs.
So the only info about the service code of this method is this topic.
Thanks for that!
🙌
The mentioned 9x codes are working now.
And yes, you need to switch from the Shop request option to the Rate to fetch rates for a needed code with additional Service block (example for the JSON API:
"Service": {
"Code": "93",
"Description": ""
}
To ship packages via UPS SurePost service, you must first have a UPS Account along with a UPS Developer Account to gain access to their XML API.
https://www.ups.com/upsdeveloperkit
The example by #ayesh is the format of the xml payload you would send with your request for Rates, which with the correct SERVICE CODES, will return SurePost specific rates (if available to your ShipTo destination).
But ...
SurePost is not normally available to low volume UPS shippers and probably wouldn't be available to new shippers (not until enough volume is determined by UPS). SurePost must be added to an existing UPS account, which is done by contacting UPS and filling out additional applications.
Hope that helps!