2015-01-29 1 views
0

pusch 알림을 구문 분석 1.8.2 사용하고 상태 표시 줄에 notyfication 표시 문제가 있습니다. 모든이 내 매니페스트Android 구문 푸시 notyfication 상태 표시 줄에 메시지 표시 없음

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.example.sklep.parse5000" > 

    <uses-sdk android:minSdkVersion="16" 
       android:targetSdkVersion="16" 
       android:maxSdkVersion="21" /> 

    <uses-permission android:name="android.permission.INTERNET" /> 
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
    <uses-permission android:name="android.permission.WAKE_LOCK" /> 
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> 
    <uses-permission android:name="android.permission.VIBRATE" /> 
    <uses-permission android:name="android.permission.GET_ACCOUNTS" /> 
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> 

    <!-- 
     IMPORTANT: Change "com.parse.tutorials.pushnotifications.permission.C2D_MESSAGE" in the lines below 
     to match your app's package name + ".permission.C2D_MESSAGE". 
    --> 
    <permission android:protectionLevel="signature" 
     android:name="com.example.sklep.parse5000.permission.C2D_MESSAGE" /> 
    <uses-permission android:name="com.example.sklep.parse5000.permission.C2D_MESSAGE" /> 

    <application 
     android:allowBackup="true" 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" 
     android:theme="@style/AppTheme" 
     android:name="com.example.sklep.parse5000.parseApplication"> 
     <activity 
      android:name=".MainActivity" 
      android:label="@string/app_name" > 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 




     <service android:name="com.parse.PushService" /> 
     <receiver android:name="com.parse.ParseBroadcastReceiver"> 
      <intent-filter> 
       <action android:name="android.intent.action.BOOT_COMPLETED" /> 
       <action android:name="android.intent.action.USER_PRESENT" /> 
      </intent-filter> 
     </receiver> 
     <receiver android:name="com.parse.GcmBroadcastReceiver" 
      android:permission="com.google.android.c2dm.permission.SEND"> 
      <intent-filter> 
       <action android:name="com.google.android.c2dm.intent.RECEIVE" /> 
       <action android:name="com.google.android.c2dm.intent.REGISTRATION" /> 

       <!-- 
        IMPORTANT: Change "com.parse.tutorials.pushnotifications" to match your app's package name. 
       --> 
       <category android:name="com.example.sklep.parse5000" /> 
      </intent-filter> 
     </receiver> 
     <receiver android:name="com.parse.ParsePushBroadcastReceiver" android:exported="false"> 
      <intent-filter> 
       <action android:name="com.parse.push.intent.RECEIVE" /> 
       <action android:name="com.parse.push.intent.DELETE" /> 
       <action android:name="com.parse.push.intent.OPEN" /> 
      </intent-filter> 
     </receiver> 

     <!-- replace @drawable/push_icon with your push icon identifier --> 
     <meta-data android:name="com.parse.push.notification_icon" android:resource="@drawable/ic_launcher"/> 

    </application> 

</manifest> 

입니다 상태 표시 줄

에 미세하지만 캔트 쇼 메시지를 일이 내 응용 프로그램 클래스입니다 :

package com.example.sklep.parse5000; 

import android.app.Application; 
import android.util.Log; 

import com.parse.Parse; 
import com.parse.ParseException; 
import com.parse.ParsePush; 
import com.parse.SaveCallback; 

public class parseApplication extends Application 
{ 
    @Override 
    public void onCreate() 
    { 
     super.onCreate(); 
     Parse.initialize(this, "OZjHkd8P7C5QH7Pvug750Jpk03VSvdqP8eiIhw4H", "JfiCdqs89jOe0A33ulnu2sEvJ67z9DtWTUZeApLQ"); 
     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); 
       } 
      } 
     }); 
    } 

MainActivity가 비어 있습니다. nothig, 그냥 빈 프로젝트를 추가합니다. 이 상태 표시 줄에 저를 도와주세요

로그

매니페스트에
01-29 22:10:00.383 16797-16797/com.example.sklep.parse5000 W/IInputConnectionWrapper﹕ getExtractedText on inactive InputConnection 
01-29 22:12:55.647 16797-16797/com.example.sklep.parse5000 E/SpannableStringBuilder﹕ SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length 
01-29 22:12:55.647 16797-16797/com.example.sklep.parse5000 E/SpannableStringBuilder﹕ SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length 
01-29 22:13:14.297 17783-17787/com.example.sklep.parse5000 D/dalvikvm﹕ GC_CONCURRENT freed 274K, 15% free 9539K/11143K, paused 19ms+2ms, total 44ms 
01-29 22:13:14.387 17783-17783/com.example.sklep.parse5000 I/dalvikvm﹕ Could not find method android.view.ViewGroup.onNestedScrollAccepted, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onNestedScrollAccepted 
01-29 22:13:14.387 17783-17783/com.example.sklep.parse5000 W/dalvikvm﹕ VFY: unable to resolve virtual method 11516: Landroid/view/ViewGroup;.onNestedScrollAccepted (Landroid/view/View;Landroid/view/View;I)V 
01-29 22:13:14.387 17783-17783/com.example.sklep.parse5000 D/dalvikvm﹕ VFY: replacing opcode 0x6f at 0x0000 
01-29 22:13:14.387 17783-17783/com.example.sklep.parse5000 I/dalvikvm﹕ Could not find method android.view.ViewGroup.onStopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onStopNestedScroll 
01-29 22:13:14.387 17783-17783/com.example.sklep.parse5000 W/dalvikvm﹕ VFY: unable to resolve virtual method 11522: Landroid/view/ViewGroup;.onStopNestedScroll (Landroid/view/View;)V 
01-29 22:13:14.387 17783-17783/com.example.sklep.parse5000 D/dalvikvm﹕ VFY: replacing opcode 0x6f at 0x0000 
01-29 22:13:14.387 17783-17783/com.example.sklep.parse5000 I/dalvikvm﹕ Could not find method android.support.v7.internal.widget.ActionBarOverlayLayout.stopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.setHideOnContentScrollEnabled 
01-29 22:13:14.387 17783-17783/com.example.sklep.parse5000 W/dalvikvm﹕ VFY: unable to resolve virtual method 9187: Landroid/support/v7/internal/widget/ActionBarOverlayLayout;.stopNestedScroll()V 
01-29 22:13:14.387 17783-17783/com.example.sklep.parse5000 D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x000e 
01-29 22:13:14.422 17783-17783/com.example.sklep.parse5000 I/dalvikvm﹕ Could not find method android.view.ViewGroup.onRtlPropertiesChanged, referenced from method android.support.v7.widget.Toolbar.onRtlPropertiesChanged 
01-29 22:13:14.422 17783-17783/com.example.sklep.parse5000 W/dalvikvm﹕ VFY: unable to resolve virtual method 11519: Landroid/view/ViewGroup;.onRtlPropertiesChanged (I)V 
01-29 22:13:14.422 17783-17783/com.example.sklep.parse5000 D/dalvikvm﹕ VFY: replacing opcode 0x6f at 0x0007 
01-29 22:13:14.427 17783-17783/com.example.sklep.parse5000 I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.internal.widget.TintTypedArray.getChangingConfigurations 
01-29 22:13:14.427 17783-17783/com.example.sklep.parse5000 W/dalvikvm﹕ VFY: unable to resolve virtual method 417: Landroid/content/res/TypedArray;.getChangingConfigurations()I 
01-29 22:13:14.427 17783-17783/com.example.sklep.parse5000 D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002 
01-29 22:13:14.427 17783-17783/com.example.sklep.parse5000 I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.internal.widget.TintTypedArray.getType 
01-29 22:13:14.432 17783-17783/com.example.sklep.parse5000 W/dalvikvm﹕ VFY: unable to resolve virtual method 439: Landroid/content/res/TypedArray;.getType (I)I 
01-29 22:13:14.432 17783-17783/com.example.sklep.parse5000 D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002 
01-29 22:13:14.612 17783-17783/com.example.sklep.parse5000 D/libEGL﹕ loaded /system/lib/egl/libEGL_mali.so 
01-29 22:13:14.617 17783-17783/com.example.sklep.parse5000 D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_mali.so 
01-29 22:13:14.622 17783-17783/com.example.sklep.parse5000 D/libEGL﹕ loaded /system/lib/egl/libGLESv2_mali.so 
01-29 22:13:14.627 17783-17783/com.example.sklep.parse5000 D/﹕ Device driver API match 
    Device driver API version: 10 
    User space API version: 10 
01-29 22:13:14.627 17783-17783/com.example.sklep.parse5000 D/﹕ mali: REVISION=Linux-r2p4-02rel0 BUILD_DATE=Thu Oct 25 08:43:05 KST 2012 
01-29 22:13:14.652 17783-17783/com.example.sklep.parse5000 D/OpenGLRenderer﹕ Enabling debug mode 0 
01-29 22:13:14.697 17783-17787/com.example.sklep.parse5000 D/dalvikvm﹕ GC_CONCURRENT freed 289K, 14% free 9755K/11335K, paused 13ms+2ms, total 35ms 
01-29 22:13:15.142 17783-17783/com.example.sklep.parse5000 D/com.parse.push﹕ successfully subscribed to the broadcast channel. 
01-29 22:13:18.382 17783-17787/com.example.sklep.parse5000 D/dalvikvm﹕ GC_CONCURRENT freed 385K, 15% free 9823K/11527K, paused 12ms+12ms, total 44ms 
01-29 22:13:25.717 17783-17783/com.example.sklep.parse5000 W/IInputConnectionWrapper﹕ getSelectedText on inactive InputConnection 
01-29 22:13:25.717 17783-17783/com.example.sklep.parse5000 W/IInputConnectionWrapper﹕ setComposingText on inactive InputConnection 
01-29 22:13:25.722 17783-17783/com.example.sklep.parse5000 W/IInputConnectionWrapper﹕ getExtractedText on inactive InputConnection 
01-29 22:13:33.982 17783-17783/com.example.sklep.parse5000 E/SpannableStringBuilder﹕ SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length 
01-29 22:13:33.982 17783-17783/com.example.sklep.parse5000 E/SpannableStringBuilder﹕ SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length 
01-29 22:14:21.462 17783-17783/com.example.sklep.parse5000 W/IInputConnectionWrapper﹕ getSelectedText on inactive InputConnection 
01-29 22:14:21.462 17783-17783/com.example.sklep.parse5000 W/IInputConnectionWrapper﹕ setComposingText on inactive InputConnection 
01-29 22:14:21.462 17783-17783/com.example.sklep.parse5000 W/IInputConnectionWrapper﹕ getExtractedText on inactive InputConnection 
01-29 22:14:21.462 17783-17783/com.example.sklep.parse5000 W/IInputConnectionWrapper﹕ getSelectedText on inactive InputConnection 
01-29 22:14:21.467 17783-17783/com.example.sklep.parse5000 W/IInputConnectionWrapper﹕ setComposingText on inactive InputConnection 
01-29 22:14:21.467 17783-17783/com.example.sklep.parse5000 W/IInputConnectionWrapper﹕ getExtractedText on inactive InputConnection 

답변

0

, 내가 응용 프로그램이 기본으로 SDK 버전 1을 사용하는 경우 귀하의 targetSdkVersion을 또는의 minSdkVersion을 볼 수 없습니다, 하지만, 구문 분석 푸시가 필요합니다 (진저 브레드). 따라서 푸시가 작동하지 않습니다. 여기

좀 더 정보입니다 -> http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

+0

푸시가 정상적으로 작동하지만 상태 표시 줄에 아무 것도 표시하지 않습니다. sdk versjon을 변경하면 아무 것도 변경되지 않습니다. – user3818006

+0

@ user3818006 구문 분석 웹 사이트를 통해 푸시를 보내시겠습니까? 업데이트 된 매니페스트와 로그 파일을 게시 할 수 있습니까? – Akil

+0

이제 아무 것도 작동하지 않습니다.이 https://parse.com/tutorials/android-push-notifications이 작동하지 않지만 유일한 문제는 바탕 화면의 위쪽 표시 줄에 notyfication이 표시됩니다. – user3818006

0

당신은 onPushOpened()

아래를 ParsePushBroadcastReceiver을 확장하고, 오버라이드 (override) 할 필요가
public class Receiver extends ParsePushBroadcastReceiver 
{ 
    @Override 
    public void onPushOpen(Context context, Intent intent) 
    {  

     Intent mIntent = new Intent(context, Activity.class); 
     mIntent.putExtras(intent.getExtras()); 
     mIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);  

     //if overriding onPushOpen, we have to manually track opened intent events 
     ParseAnalytics.trackAppOpenedInBackground(mIntent); 

     //start activity 
     context.startActivity(mIntent); 
    } 

    @Override 
    protected int getSmallIconId(Context context, Intent intent) 
    { 
     return R.drawable.push_notification_icon; 
    } 
} 

이 방송을 추가하는 것을 잊지 마십시오 수신기를 MANIFEST에 연결하십시오. 행운을 빕니다!

관련 문제