How to receive parse push notifiactions on an android device using parse.com

前端 未结 4 2097
别那么骄傲
别那么骄傲 2021-01-06 03:38

How to intent from parse push notification. i f anybody implemented parse push please help.

Parse.initialize(Splash.this,\"id\",\"id\");
ParseInstallation.ge         


        
4条回答
  •  伪装坚强ぢ
    2021-01-06 04:28

    You can download complete code from here

    Add Google play service lib in dependency

    Initialize Parse in Application Class

       Parse.initialize(this, getResources().getString(R.string.applicationid), getResources().getString(R.string.clientkey));
    
    
        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);
                }
            }
        });
    

    Add Following Permissions in AndroidMainifest.xml

    
    
    
    
    
    
    
    
    
    
    
    
    

    Add following things also

        
            
                
                
            
        
        
            
                
                
    
                
                
            
        
        
            
                
                
                
            
        
    
        
        
    
        
        
    

提交回复
热议问题