मुझे Google क्लाउड मैसेजिंग के लिए नमूना एप्लिकेशन की आवश्यकता है। मेरे ऐप का परीक्षण करने के लिए नमूना सर्वर के साथ। क्या कोई इस पर मेरी मदद कर सकता है?Google क्लाउड मैसेजिंग - नमूना सर्वर
मुझे अपने कोड का परीक्षण करने के लिए नमूना सर्वर की आवश्यकता है, मैंने कोड पहले ही लिखा है लेकिन मुझे पता नहीं है कि यह काम करेगा या नहीं। मैं सर्वर साइड कोडिंग नहीं जानता, इसलिए कोई भी इस पर मेरी मदद कर सकता है। यहाँ मेरी कोड
आशय सेवा
package com.example.pushnotificationsample;
import android.content.Context;
public class GCMIntentService extends GCMBaseIntentService {
protected GCMIntentService(String senderId) {
super(senderId);
// TODO Auto-generated constructor stub
}
@Override
protected void onError(Context arg0, String arg1) {
// TODO Auto-generated method stub
}
@Override
protected void onMessage(Context arg0, Intent msgIntent) {
// TODO Auto-generated method stub
Log.d("GCM", "RECIEVED A MESSAGE");
// String msg=msgIntent.getStringExtra("Message");
Log.d("GCM", msgIntent.toString());
// Get the data from intent and send to notificaion bar
}
@Override
protected void onRegistered(Context arg0, String arg1) {
// TODO Auto-generated method stub
}
@Override
protected void onUnregistered(Context arg0, String arg1) {
// TODO Auto-generated method stub
}
}
मेरी मुख्य गतिविधि
package com.example.pushnotificationsample;
import android.app.Activity;
import com.google.android.gcm.GCMRegistrar;
import android.os.Bundle;
import android.util.Log;
public class MainActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
GCMRegistrar.checkDevice(this);
// GCMRegistrar.checkManifest(this);
final String regId = GCMRegistrar.getRegistrationId(this);
if (regId.equals("")) {
GCMRegistrar.register(this, "555817657362");
Log.v("Msg", "registered");
} else {
Log.v("Msg", "Already registered");
}
}
}
प्रिय अगर आपने "एसडीके प्रबंधक से जीसीएम पैकेज" डाउनलोड किया है तो क्लाइंट, सर्वर के लिए नमूने हैं। बस ** एंड्रॉइड-एसडीके/एक्स्ट्रा/गूगल/जीसीएम ** निर्देशिका –
टीएनएक्स बहुत परेशान – Dinu
@PareshMayani http://chat.stackoverflow.com/transcript/message/4508859#4508859 लेकिन एसडीके प्रबंधक में नहीं ढूंढ पा रहा है अतिरिक्त फ़ोल्डर – Khan