Перевод с английского
<<  Apple на wwdc 2012 Open Access Free-Open Software, Open Data, Creative Commons Wikipedia: Commonalities and Distinctions  >>
Recap: Android Handler
Recap: Android Handler
Recap: Inter-Process Communications (IPC)
Recap: Inter-Process Communications (IPC)
Explicit Intent
Explicit Intent
Intent Filter
Intent Filter
Intent Filter
Intent Filter
Intent Filter
Intent Filter
Content Provider
Content Provider
Broadcast Intents
Broadcast Intents
Broadcast Intents
Broadcast Intents
Broadcast Intents
Broadcast Intents
Real Example App: iMDb
Real Example App: iMDb
Vulnerability: Eavedropping
Vulnerability: Eavedropping
Vulnerability: Spoofing
Vulnerability: Spoofing
Vulnerability: Permission re-Delegation
Vulnerability: Permission re-Delegation
Vulnerability: Permission re-Delegation
Vulnerability: Permission re-Delegation
Permission System
Permission System
Permission System
Permission System
Accessing Data in the Cloud
Accessing Data in the Cloud
Картинки из презентации «На зоопарк фон» к уроку английского языка на тему «Перевод с английского»

Автор: Yang Richard Yang. Чтобы познакомиться с картинкой полного размера, нажмите на её эскиз. Чтобы можно было использовать все картинки для урока английского языка, скачайте бесплатно презентацию «На зоопарк фон.ppt» со всеми картинками в zip-архиве размером 1170 КБ.

На зоопарк фон

содержание презентации «На зоопарк фон.ppt»
Сл Текст Сл Текст
1Mobile Software Development Framework: 27<intent-filter> <action
Android IPC; Intro to Mobile Push android:name=“com.hotelapp.ACTION_BOOK&quo
Notification. 10/16/2012 Y. Richard Yang. ; /> <data
1. android:scheme=“hotel"
2Outline. Admin Android Inter-process android:host=“name”/>
communications Mobile push notification. </intent-filter> </activity>
2. 27.
3Admin. Schedule for the rest of 28A Design Template: Provider. @Override
semester. 3. public void onCreate(Bundle
4Recap: Event Handler Execution. Event savedInstanceState) {
handler (EH) executed by the main/UI super.onCreate(savedInstanceState);
thread’s Looper Slow EH blocks event setContentView(R.layout.main); Intent
processing Guidelines Notify user intent = getIntent(); // why am I called
Incremental update Short/non-blocking String action = intent.getAction(); Uri
handler, real processing offloaded to data = intent.getdata(); String hotelName
other thread. 4. = data.getPath(); // do the booking
5Recap: Background/UI Contention. setResult(RESULT_OK); finish(); }. 28.
Conflict with UI thread. public class 29A Design Template: Invoker. String
LoadingScreen extends Activity implements action = “com.hotelapp.ACTION_BOOK";
Runnable { @Override public void String hotel = “hotel://name/“ +
onCreate(Bundle savedInstanceState) { selectedHotel; Uri data =
super.onCreate(savedInstanceState); Uri.parse(hotel); Intent bookingIntent =
setContentView(R.layout.loading); // start new Intent(action, data);
a new thread to load Thread thread = new startActivityForResults(bookingIntent,
Thread(this); thread.start(); } public requestCode); 29.
void run(){ longRunningTask(); 30Outline. Admin Android Inter-process
setContentView(R.layout.main); } … }. 5. communications Intent data structure
6Recap: Android Handler. Background Explicit intent Implicit intent Content
thread sends msg through handler to UI provider as target of intent. 30.
thread, who processes the msg. 6. 31Content Provider. Enable uniformed API
7Recap: Fixing LoadingScreen. Conflict for sharing data across applications E.g.,
with UI thread. Conflict with UI thread. Address book, photo gallery Each provider
Conflict with UI thread. public class can expose its data as a simple table on a
LoadingScreen extends Activity implements database model Query, delete, update, and
Runnable { private Handler mHandler = new insert rows. 31.
Handler(); // UI handler @Override public 32Content Provider and Intent. Each
void onCreate(Bundle savedInstanceState) { content provider exposes a public URI that
super.onCreate(savedInstanceState); uniquely identifies its data set:
setContentView(R.layout.loading); // start android.provider.Contacts.Phones.CONTENT_U
a new thread to load Thread thread = new I
Thread(this); thread.start(); } public android.provider.Contacts.Photos.CONTENT_U
void run(){ longTask(); I
mHandler.post(mSetFinalViewTask); } android.provider.CallLog.Calls.CONTENT_URI
private Runnable mSetFinalViewTask = new android.provider.Calendar.CONTENT_URI A
Runnable() { public void run() { content consumer declares access
setContentView(R.layout.main); } }; }. 7. requirement <uses-permission
8Recap: Inter-Process Communications android:name="android.permission.READ
(IPC). Objective: reuse existing data and CONTACTS"/> 32.
services among Android components. 8. 33Content Consumer. private void
9Activity. Component. Service. pickContact() { // Create an intent to
Component. Broadcast Receiver. Component. "pick" a contact, as defined by
Recap: Inter-Process Communications (IPC). the content provider URI Intent intent =
startActivity(). startActivityForResult(). new Intent(Intent.ACTION_PICK,
startService(). bindService(). Contacts.CONTENT_URI);
broadcastIntent(). 9. startActivityForResult(intent,
10Recap: Intent Data Structure. Primary PICK_CONTACT_REQUEST); } @Override
pieces of info in an Intent Action: The protected void onActivityResult(int
general action to be performed requestCode, int resultCode, Intent data)
ACTION_VIEW, ACTION_DIAL, ACTION_EDIT, … { // If the request went well (OK) and the
Your own definition of strings Data: a URI request was PICK_CONTACT_REQUEST if
tel:123 content://contacts/people/1 (resultCode == Activity.RESULT_OK
http://zoo.cs.yale.edu/classes/cs434 && requestCode ==
hotel://name/Omni_New_Haven Other PICK_CONTACT_REQUEST) { // Perform a query
attributes Category Type (MIME type) to the contact's content provider for the
Component (class name) Extras (key-value contact's name Cursor cursor =
store). scheme. path. host. 10. getContentResolver().query(data.getData(),
11Explicit Intent. class: MapActivity. new String[] {Contacts.DISPLAY_NAME},
Map App. Yelp. To: MapActivity.class. Only null, null, null); if
the specified activity receives this (cursor.moveToFirst()) { // True if the
message. cursor is not empty int columnIndex =
http://developer.android.com/training/basi cursor.getColumnIndex(Contacts.DISPLAY_NAM
s/firstapp/starting-activity.html. 11. ); String name =
12Declare Activity in Manifest. Make cursor.getString(columnIndex); // Do
sure AndroidManifest.xml announces something with the selected contact's
activities that can be started. See name... } } }. 33.
IntentController. Shown in Launcher. 34Outline. Admin Android Inter-process
Announce class. <application communications Intent data structure
android:icon="@drawable/icon” Explicit intent Implicit intent Content
android:label="@string/app_name" provider as target of intent Broadcast
> <activity intent. 34.
android:name=".IntentController” 35Broadcast Intents. Multiple components
android:label="IntentController" may be interested in an event/update e.g.,
> <intent-filter> <action system event such as an incoming phone
android:name="android.intent.action.M call, battery level low, network cell
IN" /> <category changes receives notification by declaring
android:name="android.intent.category a broadcast receiver. 35.
LAUNCHER" /> 36Intent and Broadcast: Sender. Example:
</intent-filter> </activity> IntentController. String action =
<activity "edu.yale.cs434.RUN"; Intent
android:name=".TipCal" cs434BroadcastIntent = new Intent(action);
android:label="TipCal" > cs434BroadcastIntent.putExtra("messag
</activity> 12. ", "Wake up.");
13Intent Resolution: Explicit Intent. sendBroadcast(cs434BroadcastIntent); 36.
Context. class name. start activity. 37Intent and Broadcast: Receiver.
public class IntentController extends <uses-permission
Activity { /** Called when the activity is android:name="android.permission.READ
first created. */ @Override public void PHONE_STAT”> <receiver
onCreate(Bundle savedInstanceState) { android:name="MyPhoneReceiver”>
super.onCreate(savedInstanceState); <intent-filter> <action
setContentView(R.layout.intentcontroller); android:name="android.intent.action.P
// launch tip cal button Button tipBtn = ONE_STATE”> </action>
(Button) findViewById(R.id.tipButton); </intent-filter> </receiver>
tipBtn.setOnClickListener(new <receiver
View.OnClickListener() { @Override public android:name=".CS434BroadcastReceiver
void onClick(View v) { Intent tipIntent = quot; android:enabled="true">
new Intent(IntentController.this, <intent-filter> <action
TipCal.class); startActivity(tipIntent); } android:name="edu.yale.cs434.RUN"
}); 13. /> </intent-filter>
14StartActivity for Result: Caller. </receiver> 37.
private void startGame() { Intent 38Intent, Broadcast, Receiver,
launchGame = new Intent(this, Notification. public class
CoolGameA.class); // passing information CS434BroadcastReceiver extends
to launched activity BroadcastReceiver { public static final
launchGame.putExtra("userName", String CUSTOM_INTENT =
userName); "edu.yale.cs434.RUN"; // Display
launchGame.putExtra("userScore", an alert that we've received a message.
userScore); @Override public void onReceive(Context
startActivityForResult(launchGame, context, Intent intent) { if
PLAY_GAME); }. 14. (intent.getAction().equals(CUSTOM_INTENT))
15StartActivity for Result: Called. { String message =
public class CoolGameA extends Activity { (String)intent.getExtras().get("messa
private TextView tv2; int previousScore, e"); CharSequence text = "Got
score; String user; public void intent " + CUSTOM_INTENT + "
onCreate(Bundle savedInstanceState) { with " + message; int duration =
super.onCreate(savedInstanceState); Toast.LENGTH_SHORT; Toast mToast =
setContentView(R.layout.game); tv2 = Toast.makeText(context, text, duration);
(TextView) findViewById(R.id.game_text); mToast.show(); } // end of if } // end of
//Get the intent that started this onReceive }. 38.
activity to fetch passed info Intent i = 39Intent, Broadcast, Receiver,
getIntent(); //returns [] if not Notification. public class MyPhoneReceiver
initialized by calling activity user = extends BroadcastReceiver { @Override
i.getStringExtra("userName"); public void onReceive(Context context,
//returns -1 if not initialized by calling Intent intent) { Bundle extras =
activity previousScore = intent.getExtras(); if (extras != null) {
i.getIntExtra("userScore", -1); String state =
tv2.setText(user + ":" + extras.getString(TelephonyManager.EXTRA_ST
previousScore); doSessionWithInput(user, TE); if
previousScore); 15. (state.equals(TelephonyManager.EXTRA_STATE
16StartActivity for Result: Callee. RINGING)) { String phoneNumber =
//change values for an example of return extras.getString(TelephonyManager.EXTRA_IN
score = previousScore - 41; //setup button OMING_NUMBER); Toast.makeText(context,
listener Button startButton = (Button) "Incoming number: "+phoneNumber,
findViewById(R.id.end_game); Toast.LENGTH_LONG).show(); } // end of if
startButton.setOnClickListener(new } // end of if } // end of onReceive }.
View.OnClickListener() { public void 39.
onClick(View view) { //return information 40Discussion: Downside of Implicit
to calling activity Intent i = Intent. 40.
getIntent(); 41Real Example App: iMDb. 41.
i.putExtra("returnScore", 42Example App. IMDb App. Handles
score); i.putExtra("returnName", Actions: willUpdateShowtimes,
user); setResult(RESULT_OK, i); finish(); showtimesNoLocationError. Showtime Search.
} }); } }. 16. Results UI. Implicit Intent Action:
17StartActivity for Result: Caller. willUpdateShowtimes. 42.
private void startGame() { Intent 43Vulnerability: Eavedropping. IMDb App.
launchGame = new Intent(this, Eavesdropping App. Handles Action:
CoolGameA.class); // passing information willUpdateShowtimes,
to launched activity showtimesNoLocationError. Showtime Search.
launchGame.putExtra("userName", Malicious Receiver. Implicit Intent
userName); Action: willUpdateShowtimes. Sending
launchGame.putExtra("userScore", Implicit Intents makes communication
userScore); public. 43.
startActivityForResult(launchGame, 44Vulnerability: Spoofing. Malicious
PLAY_GAME); } @Override protected void Injection App. IMDb App. Handles Action:
onActivityResult(int requestCode, int willUpdateShowtimes,
resultCode, Intent data) { if (requestCode showtimesNoLocationError. Malicious
== PLAY_GAME && resultCode == Component. Results UI. Action:
RESULT_OK) { userName = showtimesNoLocationError. Receiving
data.getExtras().getString(”returnName&quo Implicit Intents makes the component
;); userScore = public. 44.
data.getExtras().getInt(“returnScore" 45Vulnerability: Man-in-the-Middle. IMDb
; // show it has changed App. Man-in-the-Middle App. Handles
tv.setText(userName + ":" + Action: willUpdateShowtimes,
userScore); } showtimesNoLocation Error. Handles Action:
super.onActivityResult(requestCode, willUpdateShowtimes,
resultCode, data); }. 17. showtimesNoLocationError. Showtime Search.
18Explicit Intent: Start Service. Results UI. Malicious Receiver. Action:
http://developer.android.com/guide/compone willUpdateShowtimes. Action:
ts/services.html. public class showtimesNoLocation Error. 45.
PlayMusicService extends Service { public 46Vulnerability: Spoofing. 46.
void onCreate() { super.onCreate(); } 47Vulnerability: Permission
public int onStartCommand(Intent intent, re-Delegation. Permission re-delegation
int flags, int startId) { play_music(); occurs when an application without a
return 1; } private void play_music() { permission gains additional privileges
while (true) { through another application. 47.
play_music_note(currentIndex); 48Permission System. Malware. Deputy.
currentIndex++; } } // end of play_music. toggleWifi(). toggleWifi(). Permission
18. System. API. 48.
19Discussion. Problem of explicit 49Permission Redelegation. Malware.
intent. 19. Malware. pressButton(0). Deputy.
20Outline. Admin Android Inter-process toggleWifi(). Permission System. API. 49.
communications Intent data structure 50Permission Redelegation: Reality
Explicit intent Implicit intent. 20. Check. Analyzed manifests of 5 system
21Intent Resolution: Implicit Intent. applications Built attacks using 5 of the
Intent does not specify exact class to run 16 system apps Found 15 attacks in the 5
Info in the Intent used by the system to applications. 50.
determine the best component, at run time, 51More Examples of Attack. DeskClock:
to handle the intent. 21. Start an internal service Tell it to
22Implicit Intents. Handles Action: infinitely vibrate with a WAKE_LOCK on
VIEW. Browser A. Yelp. Implicit Intent Phone: Trigger the “phone call answered”
Action: VIEW. 22. message receiver Phone call will be
23Implicit Intents. Handles Action: silenced, vibrate cancelled More details
VIEW. Browser A. Yelp. Handles Action: see schedule page links. 51.
VIEW. Browser B. Implicit Intent Action: 52More Info on IPC. Intent is a high
VIEW. 23. level abstraction For more details on
24Intent Filter. implementation of Intent, see a set of
http://developer.android.com/guide/topics/ slides on binder. 52.
ntents/intents-filters.html. Problem: how 53Progress So Far. Issue
to know what an Activity/Service can (responsiveness): slow UI is a sin
handle? Solution: Solution: event listener gives tasks to
Activities/Services/Receivers declare what background thread(s) Issue: Background
they can/want to receive in Intent filter. threads may need to update UI Solution:
24. Handler/AsyncTask so that one thread can
25Intent Filter: Example. delegate tasks to to another thread Issue
AndroidManifest.xml file for (composability): reusability is highly
com.android.browser. String action = desired Solution: Intent. 53.
"android.intent.action.VIEW"; 54Accessing Data in the Cloud.
Uri data = Challenge: How do you keep data on a
Uri.parse("http://www.google.com" device fresh? 54.
); Intent myIntent = new Intent(action, 55Progress So Far. Issue
data); startActivity(myIntent); (responsiveness): slow UI is a sin
<intent-filter> <action Solution: event listener gives tasks to
android:name="android.intent.action.V background thread(s) Issue: Background
EW" /> <category threads may need to update UI Solution:
android:name="android.intent.category Handler/AsyncTask so that one thread can
DEFAULT" /> <scheme delegate tasks to to another thread Issue
android:name="http" /> (composability): reusability is highly
<scheme android:name="https" desired Solution: Intent. 55.
/> <scheme 56Solution 1: Polling. Simple to
android:name="file" /> implement Device periodically asks server
</intent-filter> 25. for new data/update Appropriate for
26Implicit Start Activity. See content that changes constantly Stock
IntentController. action. data. public Quotes, News Headlines Problems? 56.
class IntentController extends Activity { 57Impact of Polling on Battery.
/** Called when the activity is first Baseline: ~5-8 mA Network: ~180-200 mA Tx
created. */ @Override public void more expensive than Rx Assume radio stays
onCreate(Bundle savedInstanceState) { on for 10 sec. Energy per poll: ~0.50 mAh
super.onCreate(savedInstanceState); 5 min frequency: ~144 mAh / day Droid 2
setContentView(R.layout.intentcontroller); total battery: 1400 mAh. Source: Android
// launch dial button Button dialBtn = development team at Google. 57.
(Button) findViewById(R.id.dialButton); 58Solution 2: Push Notification. Design
dialBtn.setOnClickListener(new issue: Who to push to client device?
View.OnClickListener() { @Override public Option 1: each app does it individually
void onClick(View v) { String action = Option 2: a shared push service. 58.
"android.intent.action.DIAL"; 59Push Service. A single persistent
String phno = "tel:4326400"; Uri connection from device to a cloud push
data = Uri.parse(phno); Intent dialIntent service provider Multiple application
= new Intent(action, data); providers push to the service provider
startActivity(tipIntent); } }); 26. Service provider pushes to a device using
27A Design Template: Provider. the persistent connection Two examples
<activity Apple Push Notification Service (APNS)
android:name=".Booking" Google Cloud Messaging (GCM). 59.
На зоопарк фон.ppt
cсылка на страницу

На зоопарк фон

другие презентации на тему «На зоопарк фон»

«Переводчик с английского на русский» - Минимизация работы по подвёрстке ПО. Проверка памяти переводов. Технические переводы. Software Translation Artwork Recording. Группа STAR была основана в 1984г. в городе Штейн-на-Рейне в Швейцарии. Терминологическая проверка. STAR Сегодня. Терминологическая проверка. Основные этапы. Методы. Плюсы: минимальная компьютерная подготовка переводчика.

«Переводчик с английского на русский» - Вычитка техническим редактором. Multilingual Information Management. STAR Сегодня. Подготовка к переводу. Импорт документа в программу работающую с памятью переводов. Выравнивание памяти переводов. Единообразие переводов сообщений в ПО и документации. Проверка соответствия пустого сегмента непустому.

«Художественный перевод» - Творю сам. Художественный вкус. Диалог с текстом. Ожидание. Stylistic devices. Тот, кто увидел вдруг тебя хоть раз, Отворотил свой взор, едва смиряя. Прогнозирование. Методы и приемы. That voice which calls to me. The phantom of the opera. Speaks my name. Мастерство художественного перевода. В свой мир манил.

«Перевод текстов» - Общая схема работы с PROMT Translation Suite. Падение эффективности при снижении «повторяемости». Высокая скорость перевода. Технология Машинного перевода (Machine Translation, MT). Преимущества. Перевод сегментов текста. Революция в индустрии перевода - уникальный продукт PROMT Translation Suite. Низкая скорость перевода.

«Переводчик с русского на английский» - Различия в информационной структуре предложений. Использование приема метонимии. Аллюзия как источник трудности. Метонимические отношения в сфере предиката и существительного. Перевод английского глагольного сказуемого подлежащим. Строение моноремы в английском языке. Метонимия в языке и метонимия как универсальный переводческий прием.

«Перевод слов на русский язык» - Пути заимствования английской лексики из других языков. Отличие лексической коннотации. Приложение: практическая часть. Изучить происхождение заимствованной лексики из других языков. Латинские заимствования: butter (лат. Несовпадение по объему значения лексических единиц в обоих языках. В данном предложение употреблены следующие интернациональные слова scenery и attraction.

Перевод с английского

13 презентаций о переводах с английского

Английский язык

29 тем