8000 GitHub - mirioeggmann/appquest: App Quest 2016 - Android
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Apr 5, 2021. It is now read-only.

mirioeggmann/appquest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

App Quest

HSR

App Quest 2016 - Android

About

The App Quest is an event of the HSR where you can learn or practice programming apps for android or ios. In 12 weeks you have to program 5 applications and in the end of the event you can use them to win the Treasure Hunt and earn some cool stuff.

General

Team MeIsTeam
Team members Mirio Eggmann, Timon Borter
Employer PostFinance AG
Coach Rafael Krucker
Organizer Mirko Stocker
Operating System Android
Required Apps AppQuest Logbuch, Barcode Scanner

Apps

Apps will be public when the AppQuest 2016 is over.

Given code snippets

ZXing Barcode Scanner

private static final int SCAN_QR_CODE_REQUEST_CODE = 0;

@Override
public boolean onCreateOptionsMenu(Menu menu) {
	MenuItem menuItem = menu.add("Log");
	menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {

		@Override
		public boolean onMenuItemClick(MenuItem item) {
			Intent intent = new Intent("com.google.zxing.client.android.SCAN");
			intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
			startActivityForResult(intent, SCAN_QR_CODE_REQUEST_CODE);
			return false;
		}
	});

	return super.onCreateOptionsMenu(menu);
}

@Override
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
	if (requestCode == SCAN_QR_CODE_REQUEST_CODE) {
		if (resultCode == RESULT_OK) {
			String logMsg = intent.getStringExtra("SCAN_RESULT");
			// Weiterverarbeitung..
		}
	}
}

Logbuch

private void log(String qrCode) {
	Intent intent = new Intent("ch.appquest.intent.LOG");

	if (getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY).isEmpty()) {
		Toast.makeText(this, "Logbook App not Installed", Toast.LENGTH_LONG).show();
		return;
	}

	// Achtung, je nach App wird etwas anderes eingetragen
	String logmessage = ...
	intent.putExtra("ch.appquest.logmessage", logmessage);

	startActivity(intent);
}

License

MIT License

About

App Quest 2016 - Android

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0