Android Development - Snippets: Unterschied zwischen den Versionen
| (40 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
| − | == | + | == Android Cheat Sheet == |
| − | + | [[Android - Cheat Sheet]] | |
| − | + | == Activities == | |
| − | + | === Android - Neue Activity anlegen und starten === | |
| − | + | [[Android - Neue Activity]] | |
| − | |||
| − | |||
| − | + | == Layouts == | |
| − | + | Lock Portrait or Landscape | |
| − | |||
| − | + | fullscreen - requestwindowfeature | |
| − | === | + | === Handle Orientation === |
| − | + | [[Android - Handle Orientation]] | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | == Views == | |
| − | + | === Vertical Seek Bar === | |
| − | + | [[Android - Vertical Seek Bar]] | |
| − | |||
| − | |||
| − | |||
| − | + | == Events == | |
| − | + | [[Android - OnClickListener]] | |
| − | == | + | == Graphic and Animation == |
| − | + | Bitmap - ressource und input stream | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | Sprites | |
| − | |||
| − | |||
| − | + | == Sound == | |
| − | + | === Unterstützte Formate === | |
| + | * http://developer.android.com/guide/appendix/media-formats.html | ||
| + | === Links === | ||
| + | * http://stackoverflow.com/questions/4855874/are-there-any-built-in-default-sounds-that-can-be-utilized-in-an-app | ||
| + | * http://alucard1990.hubpages.com/hub/How-to-Make-a-Simple-Media-Player-for-Android | ||
| + | * http://stackoverflow.com/questions/3747139/how-can-i-show-a-mediacontroller-while-playing-audio-in-android/5265629#5265629 | ||
| − | + | === Möglichkeiten zur Sound-Ausgabe === | |
| − | + | ====SoundPool==== | |
| − | + | ||
| − | + | ====MediaPlayer==== | |
| − | + | [[Android - Media Player]] | |
| − | + | ||
| − | + | http://developer.android.com/reference/android/media/MediaPlayer.html | |
| − | + | ||
| − | === | + | Generate Sound (Midi-Files + PCM Generation mit AudioTrack) |
| − | + | [[Android - rttl Sound File]] | |
| − | + | * http://www.speakingcode.com/2012/01/01/playing-with-android-audiotrack-to-generate-sounds/ | |
| − | + | ||
| − | + | System Sounds | |
| + | |||
| + | === Fortgeschrittene Techniken === | ||
| + | * http://www.martinhoeller.net/2012/01/13/developing-a-musical-instrument-app-for-android/ | ||
| + | |||
| + | * http://docs.gstreamer.com/display/GstSDK/Android+tutorials | ||
| + | |||
| + | * http://www.brokenteapotstudios.com/android-game-development-blog/2011/10/playing-a-wav-pcm-sample-with-audiotrack.html | ||
| + | |||
| + | == Threads == | ||
| + | * [[Java - Threads]] | ||
| + | * [[Android - Threads]] | ||
| + | * [[Java - Timer und TimerTask]] | ||
| + | * [[Android - Thread Priority]] | ||
| + | |||
| + | == Files, Dateimanagment == | ||
| + | [[Android - Dateimanagement]] | ||
| + | === Textdatei erzeugen, speichern, lesen === | ||
| + | === Bild erzeugen und speichern === | ||
| + | http://stackoverflow.com/questions/10278919/android-writing-reading-picture-to-internal-storage?rq=1 | ||
| + | |||
| + | [[Android - Bild erzeugen und speichern]] | ||
| + | |||
| + | === Zugriff auf Ressourcen === | ||
| + | * http://stackoverflow.com/questions/8340445/how-can-i-specify-the-resource-to-get-from-r-res-drawable-dynamically | ||
| + | Beispiel Speicherkarte: | ||
| + | File.DirRootExternal & "/Music", "titelx.mp3" | ||
| + | |||
| + | |||
| + | ==== Ressourcen Pfad herausfinden ==== | ||
| + | Ist das richtig ??? | ||
| + | Eigentlich muß die Ressource ID in den Filenamen umgewandelt werden. | ||
| + | |||
| + | Using Resource Name | ||
| + | |||
| + | Syntax: | ||
| + | |||
| + | android.resource://[package]/[res type]/[res name] | ||
| + | |||
| + | Example : If icon.png image file is available in res/drawable folder you can get path like : | ||
| + | |||
| + | String PATH="android.resource://com.my.package/drawable/icon"; | ||
| + | |||
| + | Using Resource Id | ||
| + | |||
| + | Syntax : | ||
| + | android.resource://[package]/[resource_id] | ||
| + | |||
| + | Example : If icon.png image file is available in res/drawable folder you can get path: | ||
| + | |||
| + | String PATH="android.resource://com.my.package/" + R.drawable.icon; | ||
| + | |||
| + | This were the examples to get the URI of any image file stored in drawable folder. | ||
| + | |||
| + | Similarly you can get URIs of res/raw folder also. | ||
| + | |||
| + | |||
| + | ??? | ||
| + | |||
| + | == Gestures - Gesten == | ||
| + | [[Android Development - Gesten]] | ||
| + | |||
| + | == GPS, Geolocation und Maps == | ||
| + | [[Android Location API]] | ||
Aktuelle Version vom 10. Oktober 2013, 14:50 Uhr
Android Cheat Sheet[Bearbeiten]
Activities[Bearbeiten]
Android - Neue Activity anlegen und starten[Bearbeiten]
Layouts[Bearbeiten]
Lock Portrait or Landscape
fullscreen - requestwindowfeature
Handle Orientation[Bearbeiten]
Views[Bearbeiten]
Vertical Seek Bar[Bearbeiten]
Events[Bearbeiten]
Graphic and Animation[Bearbeiten]
Bitmap - ressource und input stream
Sprites
Sound[Bearbeiten]
Unterstützte Formate[Bearbeiten]
Links[Bearbeiten]
- http://stackoverflow.com/questions/4855874/are-there-any-built-in-default-sounds-that-can-be-utilized-in-an-app
- http://alucard1990.hubpages.com/hub/How-to-Make-a-Simple-Media-Player-for-Android
- http://stackoverflow.com/questions/3747139/how-can-i-show-a-mediacontroller-while-playing-audio-in-android/5265629#5265629
Möglichkeiten zur Sound-Ausgabe[Bearbeiten]
SoundPool[Bearbeiten]
MediaPlayer[Bearbeiten]
http://developer.android.com/reference/android/media/MediaPlayer.html
Generate Sound (Midi-Files + PCM Generation mit AudioTrack) Android - rttl Sound File
System Sounds
Fortgeschrittene Techniken[Bearbeiten]
Threads[Bearbeiten]
Files, Dateimanagment[Bearbeiten]
Textdatei erzeugen, speichern, lesen[Bearbeiten]
Bild erzeugen und speichern[Bearbeiten]
http://stackoverflow.com/questions/10278919/android-writing-reading-picture-to-internal-storage?rq=1
Android - Bild erzeugen und speichern
Zugriff auf Ressourcen[Bearbeiten]
Beispiel Speicherkarte:
File.DirRootExternal & "/Music", "titelx.mp3"
Ressourcen Pfad herausfinden[Bearbeiten]
Ist das richtig ??? Eigentlich muß die Ressource ID in den Filenamen umgewandelt werden.
Using Resource Name
Syntax:
android.resource://[package]/[res type]/[res name]
Example : If icon.png image file is available in res/drawable folder you can get path like :
String PATH="android.resource://com.my.package/drawable/icon";
Using Resource Id
Syntax :
android.resource://[package]/[resource_id]
Example : If icon.png image file is available in res/drawable folder you can get path:
String PATH="android.resource://com.my.package/" + R.drawable.icon;
This were the examples to get the URI of any image file stored in drawable folder.
Similarly you can get URIs of res/raw folder also.
???