当前位置: 首页>>代码示例>>Java>>正文


Java PushService.setDefaultPushCallback方法代码示例

本文整理汇总了Java中com.parse.PushService.setDefaultPushCallback方法的典型用法代码示例。如果您正苦于以下问题:Java PushService.setDefaultPushCallback方法的具体用法?Java PushService.setDefaultPushCallback怎么用?Java PushService.setDefaultPushCallback使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.parse.PushService的用法示例。


在下文中一共展示了PushService.setDefaultPushCallback方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.parse.PushService; //导入方法依赖的package包/类
@Override public void onCreate() {
  super.onCreate();

  Parse.initialize(this, "aTAL8FkWWQRG2bsilzCzwQpVMY2YCK8skFryZIFa", "vLefUWhxBk12E8X4oighFYt25iGnMYRTUP58RDJg");
  ParseFacebookUtils.initialize(getString(R.string.app_id));
  PushService.setDefaultPushCallback(this, ViewActivity.class);
  ParseInstallation.getCurrentInstallation().saveInBackground();

  if (BuildConfig.DEBUG) {
    Timber.plant(new DebugTree());
  } else {
    // TODO Crashlytics.start(this);
    // TODO Timber.plant(new CrashlyticsTree());
  }

  applicationGraph = ObjectGraph.create(getModules().toArray());
}
 
开发者ID:kamoljan,项目名称:Nefete,代码行数:18,代码来源:NefeteApp.java

示例2: onCreate

import com.parse.PushService; //导入方法依赖的package包/类
@Override
public void onCreate() {
  super.onCreate();

  // Add your initialization code here
  Parse.initialize(this, getString(R.string.parse_app_id),
      getString(R.string.parse_client_key));

  ParseACL defaultACL = new ParseACL();

  // If you would like all objects to be private by default, remove this line.
  defaultACL.setPublicReadAccess(true);

  ParseACL.setDefaultACL(defaultACL, true);

  // Specify a Activity to handle all pushes by default.
  PushService.setDefaultPushCallback(this, MainActivity.class);
  
  // Save the current installation.
  ParseInstallation.getCurrentInstallation().saveInBackground();  
}
 
开发者ID:ixu,项目名称:wallet,代码行数:22,代码来源:WalletApplication.java

示例3: onCreate

import com.parse.PushService; //导入方法依赖的package包/类
@Override
public void onCreate() {
	super.onCreate();

	// Add your initialization code here
	Parse.initialize(this, "0805cw8bWmLdhkfsYyx6qw3j6mAueM6kw3fJAqmX", "W0UgYdjieM8SkJWGAMqD8LBo62XB04Ajh8F0W0As");

	//push code, wants the application and the activity to display when selected
	PushService.setDefaultPushCallback(this, Buttons.class);
	ParseInstallation.getCurrentInstallation().saveInBackground();

	//enables anonymous users if no user is signed in
	ParseUser.enableAutomaticUser();
	ParseACL defaultACL = new ParseACL();
    
	// If you would like all objects to be private by default, remove this line.
	defaultACL.setPublicReadAccess(true);
	
	ParseACL.setDefaultACL(defaultACL, true);
}
 
开发者ID:SDSMT-CSC,项目名称:CS492-FA13,代码行数:21,代码来源:ParseApplication.java

示例4: onCreate

import com.parse.PushService; //导入方法依赖的package包/类
@Override
public void onCreate() { 
	super.onCreate();
	 
	Parse.initialize(this, "PsOttCLwKheePLzmK04aQKCuPvDPoVp1jticfIzj", "lRI1N7DNqhLIGxkx1B2hkpLKg67B5a7U0fbXS9qQ");

    
    //PushService.setDefaultPushCallback(this, MainActivity.class);
    PushService.setDefaultPushCallback(this, MainActivity.class, 
    		R.drawable.ic_stat_ic_launcher);
    ParseInstallation.getCurrentInstallation().saveInBackground();
}
 
开发者ID:NagabhushanS,项目名称:AmazingFriends,代码行数:13,代码来源:AmazingFriendsApplication.java

示例5: onCreate

import com.parse.PushService; //导入方法依赖的package包/类
@Override
 public void onCreate() {
   super.onCreate();

// Initialize the Parse SDK.
Parse.initialize(this, "YOUR_APP_ID", "YOUR_CLIENT_KEY"); 

// Specify an Activity to handle all pushes by default.
PushService.setDefaultPushCallback(this, MainActivity.class);
 }
 
开发者ID:tamzi,项目名称:sophia,代码行数:11,代码来源:Application.java

示例6: onCreate

import com.parse.PushService; //导入方法依赖的package包/类
@Override
@SuppressWarnings("deprecation")
public void onCreate() {
	  Parse.initialize(this, "8FttRlqaAUPabxXzuLeTMbmgAA389L7oVbFaSqjj", "6sFwktakiPYSDg1NKzgP18yanSjlB9CQKFGUOShs");
	  // Also in this method, specify a default Activity to handle push notifications
	  PushService.setDefaultPushCallback(this, Notification.class);
	// PushService.subscribe(this, "Everyone", Notification.class);
	
	  ParseInstallation.getCurrentInstallation().saveInBackground();
	  ParseObject.registerSubclass(Message.class);
			  
    // ParsePush.subscribeInBackground("Giants");

	  ParseUser user = new ParseUser();			 
	  user.setUsername("caip");
	  user.setPassword("piacpiac");
	  user.setEmail("[email protected]");
	  
	  ParseUser user_2 = new ParseUser();		  
	  user_2.setUsername("professor");
	  user_2.setPassword("prof_iprj");
	  user_2.setEmail("[email protected]");
	  
		 		    
	 user.signUpInBackground(new SignUpCallback() {
	    @Override
		public void done(ParseException e) {
	      if (e == null) {
	        // Hooray! Let them use the app now.
	      } else {
	        // Sign up didn't succeed. Look at the ParseException
	        // to figure out what went wrong
	      }
	    }
	  });
	  
	}
 
开发者ID:Paulocajr,项目名称:IPRJapp,代码行数:38,代码来源:My_Application.java

示例7: onCreate

import com.parse.PushService; //导入方法依赖的package包/类
@Override
public void onCreate() {
	super.onCreate();
	ParseObject.registerSubclass(Post.class);
	// Add your initialization code here
	 Parse.initialize(this, "9p1jgEiWtixYQzIYbrh3oiY2rA9aNuCnOQYOhQ4i", "UETquOw1dDTAD0uUQ3jpf8iW9uVLQ5fGfddkFgdK");

 PushService.setDefaultPushCallback(this,PostListActivity.class);
	
}
 
开发者ID:nikhil-bhat,项目名称:class_board_app,代码行数:11,代码来源:ParseApplication.java

示例8: onCreate

import com.parse.PushService; //导入方法依赖的package包/类
@Override
public void onCreate() {
	super.onCreate();
	Parse.initialize(this, Keys.applicationId, Keys.clientKey);
	PushService.setDefaultPushCallback(this, MainActivity.class);
	ParseInstallation.getCurrentInstallation().saveInBackground();
}
 
开发者ID:FoamyGuy,项目名称:ParseNotificationExample,代码行数:8,代码来源:ParseApplication.java

示例9: onCreate

import com.parse.PushService; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    Parse.initialize(this, getString(R.string.parse_app_id), getString(R.string.parse_client_key));

    PushService.setDefaultPushCallback(this, InboxActivity.class);
    ParseFacebookUtils.initialize(getString(R.string.fb_app_id));
}
 
开发者ID:cat-chat,项目名称:cat-chat-android,代码行数:10,代码来源:CatChatApplication.java

示例10: onCreate

import com.parse.PushService; //导入方法依赖的package包/类
@Override
public void onCreate() { 
	super.onCreate();
    Parse.initialize(this, 
    	"5W9RXHhz1FYThSlwE5I7OPwBzCDkQEHUDog0MAR7", 
    	"8MvV9aqRhMPJgN1zMIT1PHdst9HylXznJnWKRIwL");
    
    //PushService.setDefaultPushCallback(this, MainActivity.class);
    PushService.setDefaultPushCallback(this, MainActivity.class, 
    		R.drawable.ic_stat_ic_launcher);
    ParseInstallation.getCurrentInstallation().saveInBackground();
}
 
开发者ID:treehouse,项目名称:android-ribbit-design,代码行数:13,代码来源:RibbitApplication.java

示例11: onCreate

import com.parse.PushService; //导入方法依赖的package包/类
@Override
public void onCreate() {
	super.onCreate();
	// make sure to change the "#..#" with the actualy keys obtained from Parse.com after registration!
	Parse.initialize(this, "####################################", "#####################################");
       PushService.setDefaultPushCallback(this, MainActivity.class, R.drawable.ic_stat_ic_launcher);
       ParseInstallation.getCurrentInstallation().saveInBackground();
}
 
开发者ID:ldimitrov,项目名称:BurnMessenger,代码行数:9,代码来源:BurnMessengerApplication.java

示例12: onCreate

import com.parse.PushService; //导入方法依赖的package包/类
@Override public void onCreate() {
  super.onCreate();

  Parse.initialize(this, "ZT4hK5Z1U58TSxg2g5OjFjvX6tZiByYRVNRfLN5t", "Gx49K57B1FkE3BtjEPP2lrX47oL0ZrTdT5iltrRm");
  ParseFacebookUtils.initialize(getString(R.string.app_id));
  PushService.setDefaultPushCallback(this, ViewActivity.class);
  ParseInstallation.getCurrentInstallation().saveInBackground();

  if (BuildConfig.DEBUG) {
    Timber.plant(new DebugTree());
  } else {
    // TODO Crashlytics.start(this);
    // TODO Timber.plant(new CrashlyticsTree());
  }

  applicationGraph = ObjectGraph.create(getModules().toArray());
}
 
开发者ID:kamoljan,项目名称:ShopAfter,代码行数:18,代码来源:ShopAfterApp.java

示例13: initializeParse

import com.parse.PushService; //导入方法依赖的package包/类
private void initializeParse(){
	ParseObject.registerSubclass(User.class);
	ParseObject.registerSubclass(Request.class);
	ParseObject.registerSubclass(Rating.class);
	ParseObject.registerSubclass(Message.class);
	Parse.initialize(this, Constants.PARSE_APPLICATION_ID, Constants.PARSE_CLIENT_KEY);
	
	PushService.setDefaultPushCallback(this, MentorListActivity.class);
	ParseFacebookUtils.initialize(Constants.FACEBOOK_APP_ID);
	
	ParseACL defaultACL = new ParseACL();
	defaultACL.setPublicReadAccess(true);
	ParseACL.setDefaultACL(defaultACL, true);
}
 
开发者ID:WomenWhoCode,项目名称:MentorMe,代码行数:15,代码来源:MentorMeApp.java

示例14: onCreate

import com.parse.PushService; //导入方法依赖的package包/类
@Override
public void onCreate() {
	// TODO Auto-generated method stub
	super.onCreate();
	mContext = this;
	client = new OkHttpClient();
	Glide.get(this).register(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(client) );
	PushService.setDefaultPushCallback(this, MainActivity.class);
}
 
开发者ID:linggom,项目名称:Jahamanga,代码行数:10,代码来源:GlobalApplication.java

示例15: onCreate

import com.parse.PushService; //导入方法依赖的package包/类
@Override
public void onCreate() {
	super.onCreate();

	// Add your initialization code here
	Parse.initialize(this, "H71CQB2s5TvKZkUYPAvlnAOUFg953qcY8ipvcOpA",
			"gnzyfpH0w5mFsBOeReXXR4ZmKYw0UrsFfvbUFqJZ");
	// Also, specify a default Activity to handle push notifications in this
	// method as well
	PushService.setDefaultPushCallback(this, InitialPage.class);

	ParseUser.enableAutomaticUser();
	ParseACL defaultACL = new ParseACL();

	// If you would like all objects to be private by default, remove this
	// line.
	defaultACL.setPublicReadAccess(true);

	ParseACL.setDefaultACL(defaultACL, true);

	// Save the current Installation to Parse.
	ParseInstallation.getCurrentInstallation().saveInBackground();

	ParsePush.subscribeInBackground("", new SaveCallback() {
		@Override
		public void done(ParseException e) {
			if (e == null) {
				Log.d("com.parse.push",
						"successfully subscribed to the broadcast channel.");
			} else {
				Log.e("com.parse.push", "failed to subscribe for push", e);
			}
		}
	});
}
 
开发者ID:arturf1,项目名称:EatingClub,代码行数:36,代码来源:EatingClub.java


注:本文中的com.parse.PushService.setDefaultPushCallback方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。