博主介绍:本人专注于Android/java/数据库/微信小程序技术领域的开发,以及有好几年的计算机毕业设计方面的实战开发经验和技术积累;尤其是在安卓(Android)的app的开发和微信小程序的开发,很是熟悉和了解;本人也是多年的Android开发人员;希望我发布的此篇文件可以帮助到您;
🍅文章末尾获取源码下载方式🍅
1.研究现状
在飞速发展的今天这个社会,智能手机已经得到普及,一切事物都能和手机上的APP相关联,借助APP能够更大的提高办事效率。对我国当前的宠物APP市场现状进行了分析,发现宠物类APP较其他APP更少,可能在于社会对宠物这个集体关注度不是很高。就成都市而言,目前有100万只以上的流浪猫,而且这个数字有增长趋势,其他类型的流浪动物更不计其数。更重要的原因在于社会对流浪动物没有采取合适的管理,可能原因是不能找到合适的领养人群。如何能有效减缓流浪动物的数量,也是国内外社会的一个很严肃的问题。
2.课题目的
本宠物类APP的设计旨在通过对用户开放宠物领养功能,满足想领养宠物的用户的愿望以及减轻提供领养宠物用户的喂养压力。此APP不仅能够领养宠物,更重要的一点是领养和被领养双方都能沟通交流甚至整个领养用户这个大群体都有沟通,相互交流经验是促进宠物领养这类社会活动的有效促进措施。
3.课题意义
其意义在于减缓社会的流浪动物缺少管理的压力,加大社会对宠物领养的重视以及促及宠物领养相关领域的发展,优势在于能更快的获取到自己想要的相关信息,以及更好的处理领养退领等处理。
4.设计功能
(1):管理员模块(对注册用户的发布信息进行管理以及对用户帐户的管理)
(2):用户信息模块(用户管理自己的帐户信息)
(3):宠物信息展示模块(对用户发布出的领养信息进行展示和推送)
(4):用户绑定宠物模块(领养方与被领养方的关联处理)
(5):意见交流模块(用户之间的交流平台)
(6):宠物周边模块(与宠物相关的一些活动,领养后的宠物情况追踪等)
(7):主要功能:
(8):用户登录注册、宠物信息浏览、信息查询及其搜索、诚信度判别、用户个人记录、宠(9):物收养信息、用户意见反馈、退领、升级VIP等功能。
1:客户端使用Android stuido进行开发;
2:服务端后台使用Myeclipse2014进行开发;
3:mysql数据库进行数据存储;
4:需要jdk1.7以上
5:使用雷电模拟器或者Androidstuio自带的模拟器进行运行
总体设计逻辑和思路:
1:先设计数据库表文件
2:写服务端jsp页面以及写api接口给客户端提供数据
3:完成后台服务端的数据交互,也就是jsp页面数据的存储和显示
4:进行客户端页面的开发;
5:进行客户端对api接口的调用,也就是获取数据库的数据以及在客户端进行显示移动端:
1:使用android原生控件以及xml布局文件来完成界面的显示
2:使用java代码完成功能的数据和逻辑交互
3:使用http网络请求完成数据的请求;
4:使用json数据解析完成客户端数据的回调和显示服务端后台:
1:使用mysql完成数据的存储
2:使用jdbc完成数据库和代码的逻辑交互
3:使用jsp完成网页数据的显示
4:使用java代码完成api接口的编写以及以及数据的回调
public class MyLingYangActivity extends BaseActivity implements PetListner {// 标题
private TextView mTvTitle;
// 返回
private ImageView mIvBack;
private TextView mIvStu;
private ListView mListMessage;
private Listlist_result = new ArrayList ();
private String state;
private LinearLayout mllNomessage;
AdoptListAdapter orderListAdapter;@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_listview);
initWidget();
initData();
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.mIvBack:
finish();
break;
}
}@Override
public void initWidget() {
mIvStu = (TextView) findViewById(R.id.mIvStu);
mIvStu.setText("添加");
mIvStu.setVisibility(View.GONE);
mllNomessage = (LinearLayout) findViewById(R.id.mllNomessage);
mListMessage = (ListView) findViewById(R.id.mListMessage);mIvBack = (ImageView) findViewById(R.id.mIvBack);
mTvTitle = (TextView) findViewById(R.id.mTvTitle);
state = this.getIntent().getStringExtra("state");
mTvTitle.setText("我的领养");
mIvBack.setVisibility(View.VISIBLE);
mIvBack.setOnClickListener(this);
mIvStu.setOnClickListener(this);
}@Override
public void initData() {
MessageAction(true);
mListMessage.setOnItemClickListener(new OnItemClickListener() {@Override
public void onItemClick(AdapterView> arg0, View arg1, int pos, long arg3) {
}
});
}private void MessageAction(boolean isShow) {
AjaxParams params = new AjaxParams();
params.put("action_flag", "listMesageLingYang");
params.put("adoptUserId", MemberUserUtils.getUid(this));
httpPost(Consts.URL + Consts.APP.MessageAction, params, Consts.actionId.resultFlag, isShow, "正在加载...");
}private void updateLingYangState(boolean isShow, AdoptModel adoptModel, String adoptPetState) {
AjaxParams params = new AjaxParams();
params.put("action_flag", "deleteLingYang");
params.put("adoptId", adoptModel.getAdoptId() + "");
httpPost(Consts.URL + Consts.APP.MessageAction, params, Consts.actionId.resultCode, isShow, "正在加载...");
}@Override
protected void callBackSuccess(ResponseEntry entry, int actionId) {
super.callBackSuccess(entry, actionId);switch (actionId) {
case Consts.actionId.resultFlag:
if (null != entry.getData() && !TextUtils.isEmpty(entry.getData())) {String jsonMsg = entry.getData().substring(1, entry.getData().length() - 1);
if (null != jsonMsg && !TextUtils.isEmpty(jsonMsg)) {
list_result = mGson.fromJson(entry.getData(), new TypeToken>() {
}.getType());
orderListAdapter = new AdoptListAdapter(MyLingYangActivity.this, list_result,MyLingYangActivity.this);
mListMessage.setAdapter(orderListAdapter);
} else {
mllNomessage.setVisibility(View.VISIBLE);
}
}
break;
case Consts.actionId.resultCode:
CustomToast.showToast(this, entry.getRepMsg());
list_result.remove(choicePos);
orderListAdapter.notifyDataSetChanged();
break;
default:
break;
}}
@Override
public void setOk(int pos, AdoptModel adoptModel) {}
private int choicePos;
private int choiceState;
@Override
public void setNo(int pos, AdoptModel adoptModel) {choicePos = pos;
choiceState = 1;
updateLingYangState(false, adoptModel, "3");
}
}
public class CreatPetActivity extends BaseActivity implements ImageItemClickListner {
// 标题
private TextView mTvTitle;
// 返回
private ImageView mIvBack;
GridLayout grid_instructor;
HorizontalScrollView horizontalscrollview;
private ArrayListimageItems = new ArrayList ();
private SelectedImageAdapter selectedImageAdapter;private File imgPath;
public LoadingDialog mdialog;
private ListmListImage = new ArrayList ();
private int imgPosFlag = 0;
private String picPath = null;
private EditText post_title;
private EditText post_content;
// 图片上传表示位
private int imageFlagNumber = 0;
private int ctposNumber = 0;private EditText metName;
private EditText metPhone;
private EditText metYear;
private EditText metMessage;
private Button mSubmit;@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_creat_pet);
initWidget();
initData();
}@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.mIvBack:
finish();
break;
case R.id.mSubmit:
mdialog.show();
imageFlagNumber = 0;
UploadFileTask uploadFileTask = new UploadFileTask(this);
uploadFileTask.execute(mListImage.get(imageFlagNumber));break;
}
}@Override
public void initWidget() {metYear = (EditText) findViewById(R.id.metYear);
metPhone = (EditText) findViewById(R.id.metPhone);
metMessage = (EditText) findViewById(R.id.metMessage);
metName = (EditText) findViewById(R.id.metName);
mdialog = new LoadingDialog(this, "上传图片...");
mSubmit = (Button) findViewById(R.id.mSubmit);
grid_instructor = (GridLayout) findViewById(R.id.grid_instructor);
horizontalscrollview = (HorizontalScrollView) findViewById(R.id.horizontalscrollview);
mIvBack = (ImageView) findViewById(R.id.mIvBack);
mTvTitle = (TextView) findViewById(R.id.mTvTitle);
mTvTitle.setText("发布宠物信息");
mIvBack.setVisibility(View.VISIBLE);
mIvBack.setOnClickListener(this);
mSubmit.setOnClickListener(this);metName.setText("宠物宝宝");
metPhone.setText("15249246666");
metYear.setText("3年");
metMessage.setText("很可爱,很听话,也很乖!");}
@Override
public void initData() {ImageLoader.getInstance().init(ImageLoaderConfiguration.createDefault(this));
initSelectedGridView();}
private void initSelectedGridView() {
selectedImageAdapter = new SelectedImageAdapter(this, imageItems);
SelectImageItem addItem = new SelectImageItem();
addItem.setSid(100);// 添加的图标
imageItems.add(addItem);
selectedImageAdapter.notifyDataSetChanged();
grid_instructor.setGridAdapter(selectedImageAdapter, CreatPetActivity.this);}
@Override
public void imageItemClick(int position, SelectImageItem imageItem) {
if (imageItem != null) {
int sid = imageItem.getSid();
if (sid == 100) {if (CreatPetActivity.this.getIntent().getIntExtra("photo_message", 0) == 1) {
goCameraActivity();
} else {
// 添加图片
Intent intentImages = new Intent(CreatPetActivity.this, SelectImagesActivity.class);
intentImages.putExtra("image_count", imageItems.size());
intentImages.putExtra("max_count", "9");
startActivityForResult(intentImages, 1);
}
} else {
Intent intentPicture = new Intent(CreatPetActivity.this, ShowCreatePicturesActivity.class);
intentPicture.putExtra("position", position);
intentPicture.putExtra("piction_path", imageItems);
startActivityForResult(intentPicture, 3);
}
}
}private void addNewItemWithPre(String cameraPath) {
int count = selectedImageAdapter.getCount();
if (count > 0) {
int selectCount = count - 1;
SelectImageItem item = new SelectImageItem();
item.setUrl(cameraPath);
imageItems.add(selectCount, item);
}
}private void scrollgridView() {
final int count = selectedImageAdapter.getCount();
if (count > 1) {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
horizontalscrollview.smoothScrollTo(2000, 0);
}
}, 500);
}
}@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);if (requestCode == 5) {
Log.d("camera", "" + (data == null));
if (mCameraFile == null || !mCameraFile.exists()) {
return;
}
imgPath = mCameraFile;
mListImage.add(mCameraFile.getAbsolutePath());
addNewItemWithPre(mCameraFile.getAbsolutePath());
}if (requestCode == 1) {
if (data != null) {if (0 == data.getIntExtra("action", -1)) {
String cameraPath = data.getStringExtra("camera_path");
addNewItemWithPre(cameraPath);} else if (1 == data.getIntExtra("action", -1)) {
ArrayListcharSequences = data.getCharSequenceArrayListExtra("images");
for (CharSequence ss : charSequences) {
Log.e("pony_log", "image:" + ss.toString());
picPath = ss.toString();
mListImage.add(ss.toString());
addNewItemWithPre(ss.toString());
}
}
selectedImageAdapter.notifyDataSetChanged();
scrollgridView();
}
}if (requestCode == 3) {
if (data != null) {
@SuppressWarnings("unchecked")
ArrayListimgUrls = (ArrayList ) data.getSerializableExtra("data");
if (imgUrls != null && imgUrls.size() > 0) {
imageItems.clear();
imageItems.addAll(imgUrls);
selectedImageAdapter.notifyDataSetChanged();
scrollgridView();
}
}
}
grid_instructor.setGridAdapter(selectedImageAdapter, CreatPetActivity.this);
}private Uri mOutPutFileUri;
private File mCameraFile;// 去拍照
private void goCameraActivity() {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
// dailyyoga_camera文件夹
File parentFile = new File(Environment.getExternalStorageDirectory().toString() + "/dailyyoga_camera");
if (!parentFile.exists()) {
parentFile.mkdirs();
}
mCameraFile = new File(parentFile + "/" + System.currentTimeMillis() + ".jpg");
mOutPutFileUri = Uri.fromFile(mCameraFile);
intent.putExtra(MediaStore.EXTRA_OUTPUT, mOutPutFileUri);
startActivityForResult(intent, 5);
}String createTome;
private void createTopicPost(boolean isShow) {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm");// 设置日期格式
createTome = df.format(new Date());
//对图片路径的处理
String imagePath = "";
for (int i = 0; i < mListImage.size(); i++) {
String[] arrPath = mListImage.get(i).split("\\/");
imagePath = arrPath[arrPath.length - 1] +","+imagePath;
}AjaxParams params = new AjaxParams();
params.put("action_flag", "addPetMessage");
params.put("petName", metName.getText().toString());
params.put("petPhone",metPhone.getText().toString());
params.put("petYear",metYear.getText().toString());
params.put("petMessage", metMessage.getText().toString());
params.put("petImg", imagePath.substring(0, imagePath.length()-1));
params.put("petUserId", MemberUserUtils.getUid(this));
params.put("petUserName", MemberUserUtils.getName(this));
httpPost(Consts.URL + Consts.APP.MessageAction, params, Consts.actionId.resultCode, isShow, "正在上传...");}
@Override
protected void callBackSuccess(ResponseEntry entry, int actionId) {
super.callBackSuccess(entry, actionId);
switch (actionId) {case Consts.actionId.resultCode:
mdialog.dismiss();
PetSendObservable.getInstance().notifyStepChange("ok");
// ToastUtil.show(CreatPetActivity.this, "发布成功");
CustomToast.showToast(CreatPetActivity.this, "发布成功");
//
// String imagePath = "";
// for (int i = 0; i < mListImage.size(); i++) {
// String[] arrPath = mListImage.get(i).split("\\/");
// imagePath = arrPath[arrPath.length - 1] + "," + imagePath;
// }//
// HouseModel houseModel = new HouseModel();
// houseModel.setHouseMoney(metMoney.getText().toString());
// houseModel.setHouseName(metName.getText().toString());
// houseModel.setHousePhone(metPhone.getText().toString());
// houseModel.setHouseMessage(metMessage.getText().toString());
// houseModel.setUserId(MemberUserUtils.getUid(this));
// houseModel.setHouseImage(imagePath.substring(0, imagePath.length() - 1));
// houseModel.setHouseCategory(list_result.get(ctposNumber).getTypeId()+"");
// houseModel.setHouseCreatime(createTome);
// houseModel.setHouseId( entry.getRepMsg());
// houseModel.setTypeName(mbtnCt.getText().toString());
// HouseObservable.getInstance().notifyStepChange(houseModel);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
finish();
}
}, 2000);
break;
}
}@Override
protected void callBackAllFailure(String strMsg, int actionId) {
super.callBackAllFailure(strMsg, actionId);
mdialog.dismiss();
ToastUtil.show(CreatPetActivity.this, strMsg);}
public class UploadFileTask extends AsyncTask
{
/**
* 可变长的输入参数,与AsyncTask.exucute()对应
*/
private Activity context = null;public UploadFileTask(Activity ctx) {
this.context = ctx;}
@Override
protected void onPostExecute(String result) {
imageFlagNumber++;
if (UploadUtils.SUCCESS.equalsIgnoreCase(result)) {
if (imageFlagNumber < mListImage.size()) {
UploadFileTask uploadFileTask = new UploadFileTask(CreatPetActivity.this);
uploadFileTask.execute(mListImage.get(imageFlagNumber));
} else if (imageFlagNumber == mListImage.size()) {
// 返回HTML页面的内容
createTopicPost(true);
}
} else {
ToastUtil.show(CreatPetActivity.this, " 图片上传失败");
}
}@Override
protected void onPreExecute() {
}@Override
protected void onCancelled() {
super.onCancelled();
}@Override
protected String doInBackground(String... params) {
File file = new File(params[0]);
return UploadUtils.uploadFile(file, Consts.URL + Consts.APP.MessageAction+"?action_flag=addPetMessage");
}@Override
protected void onProgressUpdate(Void... values) {
}}
}
毕业设计-基于android的租房信息发布平台的APP_信息发布app源码_Android毕业设计源码的博客-CSDN博客
毕业设计-基于android选课系统的设计与实现_android学生选课系统_Android毕业设计源码的博客-CSDN博客
毕业设计之校园一卡通管理系统的设计与实现_一卡通管理系统实现_Android毕业设计源码的博客-CSDN博客
基于Android的校园二手闲置物品交易系统设计与实现_基于android的二手交易平台_Android毕业设计源码的博客-CSDN博客
基于androidstudio校园快递APP系统的设计与实现_android studio论文_Android毕业设计源码的博客-CSDN博客
基于android的商城购物定制APP_安卓开发购物app_Android毕业设计源码的博客-CSDN博客
更多毕业设计可以浏览我的个人主页哦!
大家点赞、收藏、关注、评论啦 、查看👇🏻👇🏻👇🏻获取联系方式👇🏻👇🏻👇🏻
1:V信搜索“毕业设计小码哥”,也可以关注下方公众号,然后点击菜单栏“源码说明-源码下载”
2:点击小程序下面截图
3:选择Android就可以看到下载源码