Tutorial 3: Android and GDK (Glass Development Kit)
The Glass Class at HIT Lab NZ
Learn how to program and develop for Google Glass.
https://www.youtube.com/watch?v=BRpedu1PRf8&list=PLsIGb72j1WOlLFoJqkhyugDv-juTEAtas
http://arforglass.org
http://www.hitlabnz.org
Presentation about new concepts and features that came with Android Studio.
Advantages over eclipse.
Explanation about Gradle.
Productivity with Android Studio.
Shotcuts migration from Eclipse.
Android - From Zero to Hero @ DEVit 2017Ivo Neskovic
The workshop deals with the design and implementation of applications for mobile devices using the Android operating system. Participants work at all stages of the development life-cycle from inception to deployment, whilst considering usability and device capabilities for a mobile application capable of meeting a functional specification. Participants are introduced to the programming environment for application development and have a hands-on approach to programming using the appropriate programming languages.
Getting started with android dev and test perspectiveGunjan Kumar
The presentation covers basic intro to Android, how to get started with development, including instructions on setup, common UI usages like menus, dialogs; details on services like Sensors, Location and Google Maps
It also covers ideas on how to test including details on shell and installation instructions without using Eclipse
Presentation about new concepts and features that came with Android Studio.
Advantages over eclipse.
Explanation about Gradle.
Productivity with Android Studio.
Shotcuts migration from Eclipse.
Android - From Zero to Hero @ DEVit 2017Ivo Neskovic
The workshop deals with the design and implementation of applications for mobile devices using the Android operating system. Participants work at all stages of the development life-cycle from inception to deployment, whilst considering usability and device capabilities for a mobile application capable of meeting a functional specification. Participants are introduced to the programming environment for application development and have a hands-on approach to programming using the appropriate programming languages.
Getting started with android dev and test perspectiveGunjan Kumar
The presentation covers basic intro to Android, how to get started with development, including instructions on setup, common UI usages like menus, dialogs; details on services like Sensors, Location and Google Maps
It also covers ideas on how to test including details on shell and installation instructions without using Eclipse
This presentation discusses how to create Glassware using the Mirror API, the GDK, and HTML5, along with a discussion of Live Cards and Immersions.
Various demos are presented, and you will see a quadcopter launched, along with the code.
Arcadian Learning is an Industrial Training Company with 50 years of Industry Expertise on Planning, Implementation and Operation of the Networks Offering six months Industrial Training program on Cloud Computing, Telecom, Big Data and Application Development.
The Era of Internet of thing mobile application development more effective and useful and also provide Android Training, iPhone Training and PhoneGap Training.
http://www.arcadianlearning.com/application-web-development.html
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Welcome to the first live UiPath Community Day Dubai! Join us for this unique occasion to meet our local and global UiPath Community and leaders. You will get a full view of the MEA region's automation landscape and the AI Powered automation technology capabilities of UiPath. Also, hosted by our local partners Marc Ellis, you will enjoy a half-day packed with industry insights and automation peers networking.
📕 Curious on our agenda? Wait no more!
10:00 Welcome note - UiPath Community in Dubai
Lovely Sinha, UiPath Community Chapter Leader, UiPath MVPx3, Hyper-automation Consultant, First Abu Dhabi Bank
10:20 A UiPath cross-region MEA overview
Ashraf El Zarka, VP and Managing Director MEA, UiPath
10:35: Customer Success Journey
Deepthi Deepak, Head of Intelligent Automation CoE, First Abu Dhabi Bank
11:15 The UiPath approach to GenAI with our three principles: improve accuracy, supercharge productivity, and automate more
Boris Krumrey, Global VP, Automation Innovation, UiPath
12:15 To discover how Marc Ellis leverages tech-driven solutions in recruitment and managed services.
Brendan Lingam, Director of Sales and Business Development, Marc Ellis
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Securing your Kubernetes cluster_ a step-by-step guide to success !
The Glass Class - Tutorial 3 - Android and GDK
1. The Glass Class: Android & GDK
July 7th – 11th 2014
Mark Billinghurst, Gun Lee
HIT Lab NZ
University of Canterbury
2. An Introduction to
Glassware Development
GDK
Gun Lee
* Images in the slides are from variety of sources,
including http://developer.android.com and http://developers.google.com/glass
3. Glassware Development
Mirror API
Server programming, online/web application
Static cards / timeline management
GDK
Android programming, Java (+ C/C++)
Live cards & Immersions
https://developers.google.com/glass/
4. GDK
Glass Development Kit
Android 4.4.2 + Glass specific APIs
Use standard Android Development Tools
5. GDK
GDK add-on features
Timeline and cards
Menu and UI
Touch pad and gesture
Media (sound, camera and voice input)
6. Dev. Env. Setup
JDK (1.6 or above, using 1.7 for the tutorial)
http://www.oracle.com/technetwork/java/javase/downl
oads/index.html
ADT Bundle (Eclipse + Android SDK)
http://developer.android.com/sdk/index.html
With Android SDK Manager (select Window>Android
SDK Manager from Eclipse menu) install:
- Tools > Android Build-tools (latest version)
- Android 4.4.2 (API19) SDK Platform, Google APIs, Glass
Development Kit Preview
- Extras > Google USB Driver (only for Windows Platform)
8. Android App Components
Activity
A single screen with a user interface.
Most widely used main component.
Service
Performs operations in the background
without a user interface.
Content provider
Manages a shared set of app data.
Broadcast receiver
Responds to system-wide broadcast announcements.
9. Activities & Back Stack
An app usually consists of multiple activities that
are loosely bound to each other.
An app launches with the "main" activity
An activity can start another activity.
Navigation between activities managed in Back Stack
10. Intent and Activity
An Intent is a messaging object used to request
an action from another app component.
Start an Activity or Service, or broadcast.
Target component can be either
explicit(class name) or implicit (intent filter)
Can carry extra information (key-value pairs)
http://developer.android.com/guide/components/intents-filters.html
13. Create an Android App Project
In Eclipse
File > New > (Other > Android>)
Android Application Project
Fill in the Application name, Project name, and
Java package namespace to use
Choose SDK API 19: Android 4.4.2 for all SDK
settings
Minimum Required SDK might need to be lower
version (API 15) to match your device
Use default values for the rest
14. Anatomy of an Android App Project
Android App Project
AndroidManifest.xml
- Package name, version, SDK ver., app settings &
permissions, app components (activities)
src (source folder)
- Java classes organized in namespaces
res (resource folder)
- layout, drawable, menu, values, raw, xml
gen (generated Java files)
- res identifier classes
assets (other raw assets)
15. Live Demo
- Creating a new Android App Project
- Anatomy of an Android App Project
16. User Interface Layout
Views
Draw on screen + Handle events = UI elements
(labels, input controls, ...)
Group views with layouts
LinearLayout, RelativeLayout, ...
Layout parameters
XML+GUI (res/layout) or Java code
http://developer.android.com/guide/topics/ui/overview.html
17. Handling UI Events
XML android:onClick attribute designates
the name of a public method in your
Activity to handle the click event
public void yourHanlderMethod(View v)
<Button
…
android:text=“Send"
android:onClick=“sendMessage" />
public void sendMessage(View v) {
// Do something on button click
}
res/layout/layout.xml MyActivity.java
http://developer.android.com/guide/topics/ui/controls/button.html
18. Toast
Provides simple feedback about an
operation in a small popup.
Brief notification message
Customizable view
Toast.makeText(this,
“Message sent.", Toast.LENGTH_SHORT).show();
// Toast with custom view
Toast toast = new Toast(getApplicationContext());
toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
toast.setDuration(Toast.LENGTH_LONG);
toast.setView(viewWithLayout);
toast.show();
http://developer.android.com/guide/topics/ui/notifiers/toasts.html
20. Handling views in runtime
Programmatically referencing to views (UI
elements) in an Activity
View findViewById(int resId)
Listeners = Java interface
Button button = (Button)findViewById(R.id.button_reset);
button.setOnClickListener(
new View.OnClickListener() {
public void onClick(View v) {
// Do something in response to button click
}
}
);
http://developer.android.com/guide/topics/ui/controls/button.html
http://developer.android.com/guide/topics/ui/ui-events.html
21. Menu
Fill in the options menu items at creation
onCreateOptionsMenu(Menu menu)
Default implementation loads xml resource in
res/menu/main.xml
Override callback method in the Activity
onOptionsItemSelected(MenuItem item)
item.getItemId() gives resource id of the item
http://developer.android.com/guide/topics/ui/menus.html
26. More Information
User Interface
http://developer.android.com/guide/topics/ui
Animation and Graphics
http://developer.android.com/guide/topics/graphics
Data Storage
http://developer.android.com/training/basics/data-storage
http://developer.android.com/guide/topics/data
Media and Camera
http://developer.android.com/guide/topics/media
Location and Sensors
http://developer.android.com/guide/topics/sensors
Connectivity and Networking
http://developer.android.com/guide/topics/connectivity
http://developer.android.com/reference/java/net/package-summary.html
34. Live Cards vs. Immersions
Live cards display frequently updated
information to the left of the Glass clock.
Integrate rich content into the timeline
Simple text/images to full-blown 3D graphics
Immersions let you build a user
experience outside of the timeline.
Build interactive experiences
Extra control, less user input constraints
38. Develop with GDK
Android 4.4.2 (API 19) SDK and GDK Preview
from the Android SDK Manager.
Project settings:
Minimum and Target SDK Versions: 19
Compile with: GDK Preview
Theme: None (allows the Glass theme to be applied.)
GDK samples
File > New Project > Android Sample Project
On Glass, turn on USB debugging
Settings > Device Info > Turn on debug
39. Hello World - Immersion
App/Activity without theme
Allows the Glass theme to be applied.
Add voice trigger for launching
Touch input and Menu
Voice recognition for text input
41. Voice Trigger for Launching
Add intent filter your main Acivitiy in
AndroidManifest.xml
Add xml/voice_trigger.xml to res folder
Can use additional follow up voice recognition
prompt if needed
<?xml version="1.0" encoding="utf-8"?>
<trigger keyword="hello world" />
<uses-permission android:name="com.google.android.glass.permission.DEVELOPMENT" />
…
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data android:name="com.google.android.glass.VoiceTrigger“
android:resource="@xml/voice_trigger" />
https://developers.google.com/glass/develop/gdk/input/voice
42. Official Voice Triggers on MyGlass
listen to
take a note
post an update
show a compass
start a run
start a bike ride
find a recipe
record a recipe
check me in
start a stopwatch
start a timer
start a round of golf
translate this
learn a song
tune an instrument
play a game
start a workout
https://developers.google.com/glass/develop/gdk/input/voice
43. Live Demo
- Apply Glass Theme (remove Theme)
- Add Voice Trigger for Launching
44. Touch Input as Key Input
Touch input translated as DPAD key input
Tap => KEYCODE_DPAD_CENTER
Swipe down => KEYCODE_BACK
Camera button => KEYCODE_CAMERA
https://developers.google.com/glass/develop/gdk/input/touch
@Override
public boolean onKeyDown(int keycode, KeyEvent event) {
if (keycode == KeyEvent.KEYCODE_DPAD_CENTER) {
// user tapped touchpad, do something
return true;
}
…
return false;
}
45. Touch Input
onGenericMotionEvent(MotionEvent e)
https://developers.google.com/glass/develop/gdk/input/touch
@Override
public boolean onGenericMotionEvent(MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
break;
case MotionEvent.ACTION_MOVE:
break;
case MotionEvent.ACTION_UP:
break;
}
return super.onGenericMotionEvent(event);
}
46. Touch gestures
GDK provides GestureDetector for Glass
com.google.android.glass.touchpad.GestureDetector
- NOT android.view.GestureDetector
BaseListener, FingerListener, ScrollListener,
TwoFingerScrollListener
Pass MotionEvent from onGenericMotionEvent()
gestureDetector.onMotionEvent(event);
https://developers.google.com/glass/develop/gdk/input/touch
https://developers.google.com/glass/develop/gdk/reference/com/google/android/glass/touchpad/GestureDetector
48. Menu
Open options menu on tap
openOptionsMenu()
Add 50x50 pixel icons in the menu
resource XML
android:icon="@drawable/icon"
- https://developers.google.com/glass/tools-
downloads/menu_icons.zip
Show/hide/update menu items if needed
onPrepareOptionsMenu()
https://developers.google.com/glass/develop/gdk/ui/immersion-menus
50. Voice Input
Start activity for result with system action
Customize prompt with intent extra
Recognized strings returned in intent data
of onActivityResult()
https://developers.google.com/glass/develop/gdk/input/voice
intentData.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
http://developer.android.com/reference/android/speech/RecognizerIntent.html
intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
startActivityForResult(intent, 0);
intent.putExtra(RecognizerIntent.EXTRA_PROMPT,
"What is your name?");
52. Hello World - Immersion ++
Play Sounds & Text-to-speech
Take a picture with camera
Card based info page
53. Playing Sounds & TTS
Glass system sounds
Text-to-speech
Create/destroy TTS in onCreate/onDestroy()
https://developers.google.com/glass/develop/gdk/reference/com/google/android/glass/media/Sounds
AudioManager am =
(AudioManager) getSystemService(Context.AUDIO_SERVICE);
am.playSoundEffect(Sounds.ERROR);
// DISALLOWED, DISMISSED, ERROR, SELECTED, SUCCESS, TAP
TextToSpeech tts = new TextToSpeech(context, ttsOnInitListener);
…
tts.speak(“Hello world!”, TextToSpeech.QUEUE_FLUSH, null);
tts.shutdown();
http://developer.android.com/reference/android/speech/tts/TextToSpeech.html
54. Playing Custom Sounds
Put sound files in res/raw
Load sounds to SoundPool object to play
soundPool = new SoundPool(MAX_STREAM,
AudioManager.STREAM_MUSIC, 0);
int soundOneID = soundPool.load(context, R.raw.sound1, 1);
int soundTwoID = soundPool.load(context, R.raw.sound2, 1);
…
soundPool. play(int soundID, float leftVolume, float rightVolume,
int priority, int loop, float rate)
http://developer.android.com/reference/android/media/SoundPool.html
56. Camera
Calling the Glass built-in camera activity
with startActivityForResult() and Action
Intent, returned with file path to
image/video through Intent extra data.
Low level access to camera with the
Android Camera API.
http://developer.android.com/reference/androi
d/hardware/Camera.html
https://developers.google.com/glass/develop/gdk/media-camera/camera
57. Camera with Action Intent
https://developers.google.com/glass/develop/gdk/media-camera/camera
private void takePicture() {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, TAKE_PICTURE);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == TAKE_PICTURE && resultCode == RESULT_OK) {
String picturePath =
data.getStringExtra(Intents.EXTRA_PICTURE_FILE_PATH);
// smaller picture available with EXTRA_THUMBNAIL_FILE_PATH
processPictureWhenReady(picturePath); // file might not be ready for a while
}
super.onActivityResult(requestCode, resultCode, data);
}
59. Using Cards as Views
Create a Card object then call getView()
Card card = new Card(this);
card.setText("The HIT Lab NZ");
card.setFootnote("http://www.hitlabnz.org");
card.setImageLayout(ImageLayout.LEFT);
card.addImage(R.drawable.hitlabnz);
setContentView(card.getView());
https://developers.google.com/glass/develop/gdk/ui/theme-widgets
61. Scrolling Cards in Activity
Set a CardScrollView as the content view
Use a custom class extending the
CardScrollAdapter class to populate the
CardScrollView
https://developers.google.com/glass/develop/gdk/ui/theme-widgets
https://developers.google.com/glass/develop/gdk/reference/com/google/android/glass/widget/package-summary
CardScrollView cardScrollView = new CardScrollView(this);
cardScrollView.setAdapter(new InfoCardScrollAdapter());
cardScrollView.activate();
setContentView(cardScrollView);
62. Scrolling Cards in Activity
In your custom CardScrollAdapter class
Create a list of cards
Implement abstract methods in your custom
CardScrollAdapter class
- int getCount() => return the number of cards (items)
- Object getItem(int position) => return the card at the position
- View getView(int position, View convertView, ViewGroup
parentView) => return the view of the card at the position
- int getPosition(Object item) => find and return the position of
the given item (card) in the list. (return -1 for error)
https://developers.google.com/glass/develop/gdk/ui/theme-widgets
https://developers.google.com/glass/develop/gdk/reference/com/google/android/glass/widget/package-summary