开发者

Android extras bundle returning zero instead of actual long value?

开发者 https://www.devze.com 2023-02-18 00:58 出处:网络
This was working before, but now the .getLong method is returning a zero. public class TaskerDBadapter

This was working before, but now the .getLong method is returning a zero.

    public class TaskerDBadapter 
{       
    public static final String KEY_ROWID = "_id";
}


Bundle extras = getIntent().getExtras();
    if (extras != null) 
    {
        rowId = extras.getLong(TaskerDBadapter.KEY_ROWID);
  开发者_开发问答  }

When clearly that key has the value 14. If I inspect extras, I see the following:

Bundle[{_id=14, StartDate=3/17/2011, Pattern=Once, Description=Test}]

What gives?


Somewhere the code changed after testing this piece of it previously, and I startedputting it in the bundle as an int, apparently. Found after using extras.getInt(x) evaluated with the proper value.

0

精彩评论

暂无评论...
验证码 换一张
取 消