我试图实现Android应用程序的通知:我正在使用Dropbox API:https://www.dropbox.com/developers/apps。 我从来没有做过这样的事情,我已经读了一点关于我应该使用JSON请求?我还没有找到任何教程与Android的Dropbox API的通知相关。通知Dropbox API Android
我应该遵循哪些步骤等?
我试图实现Android应用程序的通知:我正在使用Dropbox API:https://www.dropbox.com/developers/apps。 我从来没有做过这样的事情,我已经读了一点关于我应该使用JSON请求?我还没有找到任何教程与Android的Dropbox API的通知相关。通知Dropbox API Android
我应该遵循哪些步骤等?
1.使用改变
呼叫/detal API定期的DropBox得到改变。
要调用API,Dropbox's Java Library可能有帮助。
您可以安排定期任务下面:
2.显示Notificasion
显示通知时相同的变化被happend。
这是official documents。
你好nshmura 感谢您的回应,关键是我不明白我应该打电话https://api.dropboxapi.com/1 /德尔塔我不熟悉管理网址在所有白衣方法后?我传递参数? 我应该先连接吗? –
@PierreColombo我建议你使用retrofit向dropbox API发布请求http://square.github.io/retrofit/。它很容易使用。 – nshmura
我对互联网上的json请求并不熟悉,我发现了关于模型的一些东西?我应该生成一个吗?我怎么可以传递参数到这个网址https://api.dropboxapi.com/1/delta? –
我尝试类似的东西:3类
public interface NotificationInterface {
@POST("1/delta");
Call<NotificationResponse> getNotificationResponse(@Body NotificationRequest request);
}
public class NotificationRequest {
private String cursor;
private String local;
//path_prefix won't be present
private String include_media_info;
}
public class NotificationResponse {
@SerializedName("entries")
@Expose
private String entries;
@SerializedName("reset")
@Expose
private String reser;
@SerializedName("cursor")
@Expose
private String cursor;
@SerializedName("has_more")
@Expose
private String has_more; }
我是在正确的道路?我尝试使用https://www.dropbox.com/developers-v1/core/docs#access-token和http://square.github.io/retrofit/按照你的建议得到通知:)
这个问题是帖子不能应用到1/delta!我的代码有什么问题?
感谢您的帮助!
你能告诉我更多关于你的应用程序吗?你想要建立什么? – nshmura
我可以通过Dropbox API在我的应用程序上下载文件。现在我想发送通知到智能手机,当我发布一个新的文件在我的Dropbox帐户 –