Skip to content

Instantly share code, notes, and snippets.

View misto's full-sized avatar

Mirko Stocker misto

  • OST – Ostschweizer Fachhochschule
  • Switzerland
View GitHub Profile
dependencies {
...
implementation 'com.journeyapps:zxing-android-embedded:4.0.2'
}
import com.journeyapps.barcodescanner.CaptureActivity;
public class MyCaptureActivity extends CaptureActivity { }
@misto
misto / MyActivity.java
Last active August 11, 2016 12:47
Scan and Decode QR-Code
public void takeQrCodePicture() {
IntentIntegrator integrator = new IntentIntegrator(this);
integrator.setCaptureActivity(MyCaptureActivity.class);
integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES);
integrator.setOrientationLocked(false);
integrator.addExtra(Intents.Scan.BARCODE_IMAGE_ENABLED, true);
integrator.initiateScan();
}
@Override
@misto
misto / search-menu-plugin.xml
Created March 16, 2016 07:57
Adding an entry to Eclipse's Search Menu
<extension point="org.eclipse.ui.actionSets">
<actionSet
description="Scaps Search Actions"
id="org.scala-search.actionSet"
label="Scaps Search Actions"
visible="true">
<menu
label="Search"
path="navigate"

Scala

Build

Eclipse

Keybase proof

I hereby claim:

  • I am misto on github.
  • I am misto (https://keybase.io/misto) on keybase.
  • I have a public key whose fingerprint is 5D1F E697 A21D F974 76B7 B8A2 8201 C199 A362 981A

To claim this, I am signing this object:

@misto
misto / osm.java
Last active November 4, 2017 11:17
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Context ctx = getApplicationContext();
Configuration.getInstance().load(ctx, PreferenceManager.getDefaultSharedPreferences(ctx));
setContentView(R.layout.activity_main);
map = findViewById(R.id.map);
map.setTileSource(TileSourceFactory.MAPNIK);
map.setMaxZoomLevel(20);
overloaded method value tuple with alternatives: [A1(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in
method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method
tuple), A2(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method
tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple),
A3(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in
method tuple)(in method tuple), A4(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in
method tuple)(in method tuple), A5(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in method tuple)(in
method tuple)(in met
Uri uri = /*URI an der die Kamera-App das Foto abgelegt hat*/
Intent intent = new Intent("com.android.camera.action.CROP");
intent.setDataAndType(uri, "image/*");
package ch.appquest.imagepuzzle;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.util.DisplayMetrics;