Skip to content

Commit

Permalink
Update Android v428,iOS v374
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshLipan committed Aug 2, 2021
1 parent 4da8d00 commit 3836c38
Show file tree
Hide file tree
Showing 31 changed files with 1,902 additions and 195 deletions.
Binary file removed android/libs/jpush-android-4.1.2.jar
Binary file not shown.
Binary file added android/libs/jpush-android-4.2.8.jar
Binary file not shown.
9 changes: 5 additions & 4 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>

<application>
<activity
Expand All @@ -36,7 +37,7 @@
<activity
android:name="cn.jpush.android.ui.PushActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:exported="true"
android:theme="@android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="cn.jpush.android.ui.PushActivity" />
Expand All @@ -46,17 +47,17 @@
</intent-filter>
</activity>

<activity
<activity
android:name="cn.jpush.android.service.JNotifyActivity"
android:exported="false"
android:exported="true"
android:taskAffinity="jpush.custom"
android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="cn.jpush.android.intent.JNotifyActivity" />
<category android:name="android.intent.category.DEFAULT" /><!--Required SDK核心功能 since 4.2.2-->
<category android:name="${applicationId}" />
</intent-filter>
</activity>

<receiver
android:name=".receiver.JPushModuleReceiver"
android:enabled="true"
Expand Down
Binary file removed android/src/main/res/drawable-hdpi/ic_launcher.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file.
267 changes: 197 additions & 70 deletions android/src/main/res/layout-v21/push_notification.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
android:id="@+id/push_root_view"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="2dp"
android:paddingRight="8dp"
android:paddingLeft="8dp"
android:paddingBottom="4dp">
android:layout_height="wrap_content">

<FrameLayout
android:id="@+id/v21"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<FrameLayout
android:id="@+id/layout_version_2"
android:layout_width="0dp"
android:layout_height="0dp" />

<RelativeLayout
android:id="@+id/push_notification_style_default"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:visibility="gone">
<LinearLayout
android:id="@+id/push_notification_layout_lefttop"
android:layout_width="wrap_content"
Expand All @@ -31,7 +31,6 @@
android:id="@+id/push_notification_small_icon"
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_marginLeft="6dp"
android:scaleType="centerInside" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
Expand All @@ -49,8 +48,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:text="· "
android:textSize="20sp" />
android:textStyle="bold"
android:text="·"
android:textSize="16sp" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Time"
android:maxLines="1"
Expand All @@ -59,57 +59,69 @@
android:layout_height="wrap_content"
android:textSize="12sp" />
</LinearLayout>
<FrameLayout
android:id="@+id/push_notification_for_bottom_margin"
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:layout_height="0dp"/>
<ImageView
android:id="@+id/push_notification_banner_icon"
android:layout_width="match_parent"
android:layout_height="96dp"
android:layout_above="@+id/push_notification_for_bottom_margin"
android:layout_marginBottom="8dp"
android:visibility="gone"
android:scaleType="centerCrop" />
<LinearLayout
android:id="@+id/push_notification_main_layout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/push_notification_banner_icon"
android:gravity="center_vertical"
android:layout_marginRight="4dp"
android:layout_marginBottom="5dp"
android:layout_toLeftOf="@+id/push_notification_big_icon"
android:layout_below="@id/push_notification_layout_lefttop">
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_sub_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:maxLines="1"
android:ellipsize="end"
android:textSize="13sp"
android:visibility="gone" />

<TextView
style="@android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:maxLines="2"
android:textSize="13sp" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_content_one_line"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:textSize="13sp"
android:maxLines="1"
android:visibility="gone" />
</LinearLayout>
<ImageView
android:id="@+id/push_notification_big_icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="8dp"
android:layout_alignTop="@+id/push_notification_main_layout"
android:layout_alignBottom="@+id/push_notification_main_layout"
android:scaleType="centerInside" />

<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_sub_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:layout_below="@id/push_notification_layout_lefttop"
android:layout_toLeftOf="@+id/push_notification_big_icon"
android:layout_marginLeft="6dp"
android:layout_marginRight="4dp"
android:maxLines="1"
android:textSize="13sp"
android:visibility="gone" />

<TextView
style="@android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="4dp"
android:layout_below="@id/push_notification_sub_title"
android:layout_toLeftOf="@+id/push_notification_big_icon"
android:layout_marginLeft="6dp"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:maxLines="2"
android:textSize="13sp" />
<TextView
style="@android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_content_one_line"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="4dp"
android:layout_toLeftOf="@+id/push_notification_big_icon"
android:layout_below="@id/push_notification_sub_title"
android:ellipsize="end"
android:layout_marginLeft="6dp"
android:layout_marginTop="1dp"
android:textSize="13sp"
android:maxLines="1"
android:visibility="gone" />
</RelativeLayout>

<RelativeLayout
Expand All @@ -125,45 +137,160 @@
android:layout_centerVertical="true"
android:scaleType="centerInside" />
<LinearLayout
android:layout_marginLeft="6dp"
android:id="@+id/push_notification_style_1_main_layout"
android:layout_toRightOf="@+id/push_notification_style_1_big_icon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:orientation="vertical">
<RelativeLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
style="@android:style/TextAppearance.Material.Notification.Time"
android:id="@+id/push_notification_style_1_date"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:textSize="12sp" />
android:layout_height="wrap_content"
android:id="@+id/push_notification_layout_time"
android:gravity="center_vertical"
android:weightSum="1"
android:orientation="horizontal">
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_style_1_title"
android:layout_alignParentLeft="true"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/push_notification_style_1_date"
android:maxLines="1"
android:layout_marginRight="8dp"
android:textSize="12sp"
android:textStyle="bold" />
</RelativeLayout>
<TextView
style="@android:style/TextAppearance.Material.Notification.Time"
android:id="@+id/push_notification_style_1_date"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="right"
android:textSize="12sp" />
<TextView android:id="@+id/push_notification_null"
android:layout_width="24dp"
android:visibility="gone"
android:layout_height="20dp"/>
</LinearLayout>

<TextView
style="@android:style/TextAppearance.Material.Notification.Info"
android:id="@+id/push_notification_style_1_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="4dp"
android:ellipsize="end"
android:layout_marginTop="1dp"
android:maxLines="2"
android:maxLines="1"
android:textSize="13sp" />
</LinearLayout>
<ImageView
android:id="@+id/push_notification_style_1_banner_icon"
android:layout_width="match_parent"
android:layout_height="96dp"
android:layout_alignParentBottom="true"
android:visibility="gone"
android:layout_below="@id/push_notification_style_1_main_layout"
android:scaleType="centerInside" />
</RelativeLayout>
<FrameLayout
android:id="@+id/push_notification_banner_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/push_notification_banner_img"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:visibility="gone" />
</FrameLayout>

<RelativeLayout
android:id="@+id/push_notification_header_neg_fb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:visibility="gone">
<ImageView android:id="@+id/push_notification_header_expand"
android:layout_marginRight="2dp"
android:layout_marginTop="2dp"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:scaleType="centerInside"
android:background="#08000000"
android:src="@drawable/jpush_ic_action_close"
android:visibility="visible"/>
<LinearLayout
android:id="@+id/push_notification_fb_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:layout_below="@id/push_notification_header_expand"
android:orientation="horizontal"
android:visibility="invisible"
android:gravity="center">
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_fb_content_no_like1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="不感兴趣"/>
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_fb_content_no_like2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="重复收到"/>
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_fb_content_no_like3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="内容低质"/>
<TextView
style="@android:style/TextAppearance.Material.Notification.Title"
android:id="@+id/push_notification_fb_content_no_like4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0f000000"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="14sp"
android:gravity="center"
android:maxLines="1"
android:layout_margin="5dp"
android:text="内容不宜"/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
Loading

0 comments on commit 3836c38

Please sign in to comment.