I am tryig to pass a longArray between two activities through bundle. I have a longArray named "sensIds", but when i pass this array in bundle.pulongArray, its giving an error "The method putLongArray(String, long[]) in the type Bundle is not applicable for the arguments (String, Long[])". here is my code:
Long[] sens_ids = new Long[getSym.length];
for (int i = 0; i < getSym.length; i++) {
sens_checked_ids[i] = Long.valueOf(getSym[i]);
}
Bundle mybundle = new Bundle();
mybundle.putLongArray("sens ids", sens_ids);
Intent final_intent = new Intent(DetailActivity.this,FinalActivity.class);
final_intent.putExtras(mybundle);
startActivity(final_intent);
Can anyone tell what am i doing wrong here? Thanks in advance
0 comments:
Post a Comment