Can't send invitation using linkedin-j library - android

I am trying to send Linkedin Invitation from Android app. (I am having all permissions including Send invitation or Message(w_message)). I can send message successfully but I can't send Invitation.
I am preparing CommunicationsApiClient object named com_cliClient and tried to send the invitation either by Person or by Id.. I am not getting any error in calling below methods but the invitation is not being sent.
Some piece of code:
com_cliClient.sendInviteToPerson(p2, "hello", "Invitation...");
com_cliClient.sendInviteById(id, "hello","Invitation",authHeader);
I am using linkedin-j-android.jar for Android Application.

Related

Message Access Profile

I'm trying to send and receive message through bluetooth using MAP bluetooth profile.How to implement Message Access Profile(MAP) in android?
Please share some reference link.

Push notification for android app by GCM

I am working on android app for events reminder , this app only display event as list and details about it .. some event's date is change .
I need to push notification to remind a user about event date
I'am Confused when read about Google Cloud Messaging ( GCM )
Is it necessary to request from the user to enter name or email through the application ? I don't need that !
where can I write a new notification "message" to send it ?
Thank you ,
The requirement is simple.
You need to generate gcm token from each of your client.
Client A installs your application and upon launch/login(wherever it fits in your business logic) you will try to generate this gcm token(let us say 10000 is the generated token) . And you need to send this token to your server to store for using it in future communication. when you want to communicate with this client A, you need to tell gcm server,
Hey Gcm server, send mobile with gcm token 10000 the following message "Event time updated"
So if client b installs, it will generate its gcm token and send it to server in same way.
In case you have user login or some way where each user can be identified uniquely, it is recommended to store it along with user details. (along with name, unique id, etc... )
If you do not have login, you can still send token to server and store but what you loose out is the cases where You want to send update to Client A but not B.
Coming to code point of it.
Client code:
For generating gcm token:
https://github.com/googlesamples/google-services/tree/master/android/gcm
after you generate you need to send this token to server
Server code:
server receives the token and stores.
When you want to send a particular message in later point of time, you can send json data or plain message to client.
For example, Following is the python example.
import gcm
response = gcm.json_request(registration_ids=reg_ids, data=in_data, delay_while_idle=False)
Hope this helps.

How to send Google Talk (XMPP) messages with only gmail Adress?

i searched this but i couldn't find any solution ...
I want to develop an application in android , in this application you have a friend list. i want to you can send messages with XMPP to your friends, and get messages with XMPP through Google Talk Server . For be able to do this, i created a instance application about sending Google Talk (Xmpp) messages between two Android devices with this link and this link. i used asmack.jar for this and now i can send messages between 2 device. But Problem is this ;
i have two gmail addresses , for example foo#gmail.com and bar#gmail.com .
for chat between 2 devices and send message from first one to second recipient , i have to write "bar#gmail.com/Smack014GAB5B....." as recipent address . if i only write "bar#gmail.com" as recipient , i can't send it ...
Question is , how can i send message to recipient without "Smack014GAB5B..." extension after "/" ?
Any help would be great ...

how to send data in android application to web service once user received successful msg

I have message said successful in android application once user receives data.
How to write code to send information 'User-key` from android application to web service once user received a successful message. I got stuck on this one. Please help me out, I need HTTP-post code.
I am new to Android..Thanks!!

Is that possible to send a message with Name of sender in android GCM.?

I have developed an android application which can send and receive push messages using Android GCM. Suppose if I am sending a push message to "xyz" device from "aaa" device I am getting a push messages succesfully, but what I need is that parallelly I wanted to display the name of the device which has sent a message with respect to the body of GCM message.
Ex:
xyz:
hi test
Please suggest me on this. Thanks in advance
Regards
Anand
You can send anything in the GCM message. If you want to send the name of the sender alongwith the message, you first need to get the name of the user and save it in a variable. Then add that name with the message in the GCM message. To differentiate the name and message part of the push notification, you can encode the GCM message in a JSON format and then send it to the other user. Then you can decode the message using JSON decoder.

Categories

Resources