I am making an app in which i am trying to get Notifications for Upcoming Facebook Friends Birthdays in Android
please someone help me on this, i have made everything i needed and now just want to add Notification functionality for upcoming birthdays.
public View getView(int position, View convertView, ViewGroup parent) { JSONObject jsonObject = null; try { jsonObject = jsonArray.getJSONObject(position); } catch (JSONException e) { } FriendItem friendItem; if (convertView == null) { convertView = mInflater.inflate(R.layout.listfb_friends, null); friendItem = new FriendItem(); convertView.setTag(friendItem); } else { friendItem = (FriendItem) convertView.getTag(); } friendItem.friendPicture = (ImageView) convertView .findViewById(R.id.picture); friendItem.friendName = (TextView) convertView .findViewById(R.id.name); friendItem.friendDob = (TextView) convertView .findViewById(R.id.dob); friendItem.friendLayout = (RelativeLayout) convertView .findViewById(R.id.friend_item); try { String uid = jsonObject.getString("uid"); String url = jsonObject.getString("pic_square"); friendItem.friendPicture.setImageBitmap(picturesGatherer.getPicture(uid, url)); } catch (JSONException e) { friendItem.friendName.setText(""); friendItem.friendDob.setText("Birthday Not Mentioned"); } try { friendItem.friendName.setText(jsonObject.getString("name")); friendItem.friendDob.setText(jsonObject.getString("birthday")); if(!(jsonObject.getString("birthday").equalsIgnoreCase("null"))) { friendItem.friendDob.setText(jsonObject.getString("birthday")); } else { friendItem.friendDob.setText("Birthday Not Added"); } } catch (JSONException e) { friendItem.friendName.setText(""); friendItem.friendDob.setText(""); } listofshit.put(position, friendItem); return convertView; }
Query to Fetch Records:
String query = "SELECT name, birthday, uid, pic_square FROM user WHERE uid in (SELECT uid2 FROM friend WHERE uid1=me())AND birthday_date >= '01/01' AND birthday_date <= '31/12' ORDER BY birthday_date";
original code you can find here:
https://github.com/chrtatu/FacebookFriendsList
grammy red carpet grammy award winners the band perry grammy awards whitney houston autopsy dobie gray bruce springsteen
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন