开发者

Android extras bundle returning zero instead of actual long value?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜