小编Din*_*inu的帖子

在Realm android中更新语句

我应该如何在android中使用realm DB更新已存在的值?

我一直在尝试更新它,但它只是添加为新值而不是覆盖它

android realm

19
推荐指数
2
解决办法
3万
查看次数

Google云端消息传递 - 示例服务器

我需要一个Google云端消息传递示例应用程序.使用示例服务器来测试我的应用程序.谁可以帮我这个事?

我需要一个示例服务器来测试我的代码我已经编写了代码,但我不知道它会工作与否.我不知道服务器端编码所以任何人都可以帮助我.这是我的代码

意向服务

package com.example.pushnotificationsample;

import android.content.Context;

public class GCMIntentService extends GCMBaseIntentService {

protected GCMIntentService(String senderId) {
    super(senderId);
    // TODO Auto-generated constructor stub
}

@Override
protected void onError(Context arg0, String arg1) {
    // TODO Auto-generated method stub
}

@Override
protected void onMessage(Context arg0, Intent msgIntent) {
    // TODO Auto-generated method stub
    Log.d("GCM", "RECIEVED A MESSAGE");
  //        String msg=msgIntent.getStringExtra("Message");
    Log.d("GCM", msgIntent.toString());
    // Get the data from intent and send to notificaion bar

}

@Override
protected void onRegistered(Context arg0, String arg1) { …
Run Code Online (Sandbox Code Playgroud)

android android-c2dm google-cloud-messaging

11
推荐指数
3
解决办法
1万
查看次数

如何在realm android中截断所有表

嗨我试图在用户注销时截断android中的所有表.我只使用领域默认路径.

realm = Realm.getInstance(getApplicationContext());

public void clearDB() {
    Realm.deleteRealmFile(instance);
}
Run Code Online (Sandbox Code Playgroud)

android realm

7
推荐指数
3
解决办法
1万
查看次数