Showing posts with label Mobile. Show all posts
Showing posts with label Mobile. Show all posts

Tuesday, September 30, 2014

Android information and devlopment resources

The Android javadoc is great reference material:
http://developer.android.com/reference/packages.html

The Android Application components another important resource: 
http://developer.android.com/guide/components/index.html

The Android Welcome page
http://developer.android.com/about/index.html

The Android Open Source Project
http://source.android.com/


Linux Kernel: Standard services - Provides infrastructure mechanisms to manage mobile device resources
 •  Security
•  Memory, process, & thread management
 • Network & File I/O
 • Device driver framework (pluggable devices)
Android specific includes power management, Android Shared memory, low memory killer, Binder (Inter Process communication) , alarm driver, debugger, logger
http://en.wikipedia.org/wiki/Android_(operating_system)#Linux_kernel


Native System Libraries (C/C++ Native DK) core performance sensitive activities on device
System C library - (std os system calls such as process/thread creation, memory allocation, mathemetical) bionic libc
• Surface Manager  - (updating the display) display management
• Media Framework  - (playback) audio/video streaming
• FreeType  - library for rendering fonts
• Webkit - (rendering and display web pages ) web browser engine
• OpenGL ES, SGL - graphics engines
• SQLite - relational database engine
• SSL  - secure sockets layer
http://developer.android.com/tools/sdk/ndk/index.html

Runtime (part of System libraries layer)
Davlik virtual machine executes the android apps, code written in java compiled into series of bytecode files , Davlik dx program transforms java classes into single Dex bytecode file  (classes.dex). File packaged with other resources and installed on device. Dalvik VM executes the Dex Bytecode file when invoked on device.
Dalvik VM designed to be resource constrained environment with slower cpu, less memory, limited battery life
http://en.wikipedia.org/wiki/Dalvik_(software)
Core Libraries
• Core Java classes (building blocks)
• android.* (application lifecycle)
• java.*, javax.* (data structures, concurrency, I/O)
• junit.* (unit testing)
• org.*  (internet/ web services)
org.json.*, org.xml.*
http://en.wikipedia.org/wiki/Comparison_of_Java_and_Android_API

Application Framework - reusable software that many applications will need
Package Manager  - Manages application packages on device such as info about apps
Window Manager  - Manages top-level window’s look & behavior (notification bar, main application window, sub-menus/dialogs)
View System  - common user interface elements such as Tabs, Lists, grids, text boxes, buttons, textview
Resource Manager - Manages non-compiled code resources: strings, graphics, & layout filesContent Providers  - Inter-application data sharing (i.e. databases)
Activity Manager - Application lifecycle & common navigation stack
Telephony Manager - State of telephony services
Location Manager - Access to system location services
Notification Manager - Notify users when events occur
https://sites.google.com/site/io/inside-the-android-application-framework

Application - built in apps. Can substitute apps.
Home, Contacts, Phone, Browser, Email

Activity : Represents a single screen with a user interface (view user interface) - see Activity class
activity lifecycle or http://developer.android.com/reference/android/app/Activity.html
- Can be started by creating an Intent object & passing it to startActivity()
- Parameters can be passed as “extras” to the Intent used to start the Service
- Apps can have multiple Activities

Service -operation in background, can bind to other services or Activities. For performing long-running operations or to access remote resources. Extends the Service class.
Started Service – Often performs a single operation & usually doesn’t return a result to the caller directly
Bound Service – Offers a client-server interface that allows components to interact with the Service
http://developer.android.com/guide/components/services.html

Content Provider - Manages a shared set of application data , Never accessed directly,
but via a Content Resolver
Consistent access to data (i.e. Rest, Crud operations)
Data store backing options like SQLite, Web, File systems
Can consume data from other content providers
Extends the ContentProvider class
http://developer.android.com/guide/topics/providers/content-providers.html

Broadcast Receiver - A component that responds to system-wide Intent broadcast announcements
- Supports complex Intent filtering
- delivered asynchronously to all receivers
Extends BroadcastReceiver class
http://developer.android.com/reference/android/content/BroadcastReceiver.html

Intents - messages (i.e. events) that link application components together
http://developer.android.com/guide/components/intents-filters.html

https://sites.google.com/site/io/anatomy--physiology-of-an-android


ADT Bundle:
latest android platform
eclipse and ADT plugin
latest image for emulator
additional dev tools
http://developer.android.com/sdk/index.html

Emulator:
network/speed latencies
battery power
location coordinates

telnet localhost port# (i.e. 5554)

slow network:
network speed edge
network speed full
power capacity 5

power status not-charging

geo fix 0.0 40.0

sms send 3015555555 "msg"

call port number other emulator
http://developer.android.com/tools/devices/emulator.html

Davlik debug Monitor service (DDMS) perspective

- file explorer
- logcat
- button in ddms to start and stop profiling at debug tracept

Open perspective -> Hierarchy view





http://developer.android.com/guide/index.html
http://developer.android.com/training/index.html
http://www.androiddevtools.com/
http://www.dre.vanderbilt.edu/~schmidt/cs282/
http://www.cs.swarthmore.edu/~aviv/classes/s13/cs71/
http://www.cs.odu.edu/~cs495/
http://www.vogella.com/tutorials/android.html
http://www.cs.unibo.it/projects/android/2013/index.html#links
http://liisp.uncc.edu/mbapps/
http://www.stanford.edu/class/cs193a/
http://cs76.tv/2012/spring/
https://www.youtube.com/watch?v=RNaOWBBvAGo



Thursday, December 19, 2013

The Javascript vs Native facts

http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/

"But the real elephant in the room here is that in all these articles on this subject, rarely does anyone actually quantify how slow JS is or provide any sort of actually useful standard of comparison. (You know… slow relative to what?) To correct this, I will develop, in this article, not just one useful equivalency for JavaScript performance–but three of them. So I’m not only going to argue the “traditional hymns” of “wa wa JS is slow for arbitrary case”, but I’m going to quantify exactly how slow it is, and compare it to a wide variety"...

Saturday, August 24, 2013

Android introduction at RTP Software symposium

Based on Harmony

Oracle bought Java for lawsuits but didn't work out as Google was very careful. Suit scaled down to 7 claims. Google essentially won lawsuit.

Dalvic virtual machine

With iPhone you can make more money on apps where with Andriod it's "Internet of things" where apple is more hardware company, as google is more service company where they want Android on any type of device

Google dashboard shows the state of user base analytics

Development platform changed in 3.2 honeycomb

Ice cream sandwich 4.03, 4.04

Jelly bean 4.1, 4.2

Key lime pie 5.0

http://developer.android.com/index.html

ADT platform based on eclipse moving to android Studio with IntelliJ

Google dashboard - 14 day period

Moving from ANT to gradle (early release of the plugin)

Xavier Ducrohet eclipse plugin spoke at google I/o

http://commonsware.com/Android/ by Mark Murphy

SDK, API by google built on top of SDK

Tools -> Dowload  -> Downlaod the SDK
SDK Manager

Need emulator or connected device

Droid AT screen tool
AVD

Haxm Android emulator

Activity is like a view
Intents are events
http://developer.android.com/guide/topics/ui/index.html
TextView is a label

relative lyout, linear layout

ListView http://developer.android.com/guide/topics/ui/layout/listview.html

http://www.springsource.org/spring-android

Android R

Postman - chrome extension http://www.getpostman.com/

http://www.amazon.com/Android-Programming-Ranch-Guide-Guides/dp/0321804333


https://github.com/kousen/icndb

https://code.google.com/p/google-gson/ - deep query

http://stackoverflow.com/questions/3280051/how-to-enable-logcat-console-in-eclipse-for-android

create, start, on resume, running
pause (can go to resumeor stop), destroy

log.d (TAG,STRING)

rotate - ctrl f11

back button does a destroy

http://developer.android.com/guide/components/processes-and-threads.html