fix: 定时推送(未完成)
This commit is contained in:
parent
94526a9054
commit
fd1be59439
@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion '29.0.2'
|
||||
// ndkVersion '23.0.7123448'
|
||||
ndkVersion '23.0.7123448'
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.navinfo.outdoor"
|
||||
|
@ -55,7 +55,7 @@ import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
import com.navinfo.outdoor.bean.GetPhoneBean;
|
||||
import com.navinfo.outdoor.bean.JobSearchBean;
|
||||
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
||||
import com.navinfo.outdoor.bean.MessageNoticeBean;
|
||||
import com.navinfo.outdoor.bean.UserBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
@ -144,7 +144,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
});
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* bitmapDescriptor1
|
||||
*/
|
||||
@ -192,33 +191,38 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initMessageNotice() {
|
||||
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.MESSAGE_INFO_PUSH)
|
||||
.params(new HttpParams("type", messageType + ""))
|
||||
.cls(TaskPrefectureBean.class)
|
||||
.cls(MessageNoticeBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<GetPhoneBean>() {
|
||||
.getRequest(new Callback<MessageNoticeBean>() {
|
||||
@Override
|
||||
public void onSuccess(GetPhoneBean getPhoneBean, int id) {
|
||||
if (getPhoneBean.getCode() == 200) {
|
||||
String code = getPhoneBean.getBody().getCode();
|
||||
Integer telLength = getPhoneBean.getBody().getTelLength();
|
||||
Constant.CODE = code;
|
||||
Constant.TelLength = telLength;
|
||||
public void onSuccess(MessageNoticeBean messageNoticeBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (messageNoticeBean.getCode() == 200) {
|
||||
if (messageType == 0) {
|
||||
ivMassNotification.setVisibility(View.GONE);
|
||||
} else if (messageType == 1) {
|
||||
ivMassNotification.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), getPhoneBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getActivity(), messageNoticeBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
@ -329,7 +333,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
treasureMap.getLayoutParams().height = widthHeight[1];
|
||||
|
||||
//消息通知:
|
||||
|
||||
handler.sendEmptyMessageDelayed(0x101,10000);
|
||||
|
||||
}
|
||||
|
||||
|
@ -5,11 +5,18 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<!-- android:lines="1"-->
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/cb_filter"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_form"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="260dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginLeft="35dp"
|
||||
android:text="测试彼此"
|
||||
android:textColor="#333"
|
||||
android:textSize="15sp"
|
||||
@ -20,7 +27,7 @@
|
||||
android:id="@+id/tv_form"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginLeft="35dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/underline"
|
||||
android:padding="5dp"
|
||||
|
Loading…
x
Reference in New Issue
Block a user