锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲欧美日韩久久精品,亚洲日韩精品无码一区二区三区,香蕉视频在线观看亚洲http://www.tkk7.com/lincode/archive/2012/05/29/379418.htmllincodelincodeTue, 29 May 2012 03:07:00 GMThttp://www.tkk7.com/lincode/archive/2012/05/29/379418.htmlhttp://www.tkk7.com/lincode/comments/379418.htmlhttp://www.tkk7.com/lincode/archive/2012/05/29/379418.html#Feedback0http://www.tkk7.com/lincode/comments/commentRss/379418.htmlhttp://www.tkk7.com/lincode/services/trackbacks/379418.html1 Launch Keychain Access from your local Mac and from the login keychain, filter by the Certificates category. You will see an expandable option called “Apple Development Push Services”
2 Right click on “Apple Development Push Services” > Export “Apple Development Push Services ID123″. Save this as apns-dev-cert.p12 file somewhere you can access it. There is no need to enter a password.
3 The next command generates the cert in Mac’s Terminal for PEM format (Privacy Enhanced Mail Security Certificate):
openssl pkcs12 -in apns-dev-cert.p12 -out apns-dev-cert.pem -nodes -clcerts


lincode 2012-05-29 11:07 鍙戣〃璇勮
]]>
[iOS] 寮曠敤澶栭儴闈欐佸簱鏃訛紝鐩綍鏂規硶鏃犳硶鍔犺澆闂http://www.tkk7.com/lincode/archive/2012/04/23/376373.htmllincodelincodeMon, 23 Apr 2012 06:56:00 GMThttp://www.tkk7.com/lincode/archive/2012/04/23/376373.htmlhttp://www.tkk7.com/lincode/comments/376373.htmlhttp://www.tkk7.com/lincode/archive/2012/04/23/376373.html#Feedback0http://www.tkk7.com/lincode/comments/commentRss/376373.htmlhttp://www.tkk7.com/lincode/services/trackbacks/376373.html榪欎釜 bug 鍦?xcode 4.3 浠ヤ笅浼氬嚭鐜幫紝4.3 浠ュ悗宸茬粡淇浜嗐?br />瑙e喅鏂規硶涓猴細鎵懼埌 target 鐨勫浘鏍囷紝鏇存敼鍏?Other Linker Flags 涓猴細 -all_load 鎴?-force_load
-force_load錛屽悗璺熼殢涓涓枃浠朵綅緗紝鍙互鏇寸簿紜湴鍔犺澆鎵闇鏂囦歡銆?br /> 
鑻規灉鐨勮В閲婁負 錛?http://developer.apple.com/library/mac/#qa/qa1490/_index.html

綆鍗曠偣璇村氨鏄紝Objective-C 鐨勫姩鎬佺壒鎬т嬌寰楅渶瑕侊紝涓洪摼鎺ュ櫒娣誨姞涓涓爣絳撅紙璁劇疆 Other Linker Flags 涓?-ObjC錛夋潵瑙e喅閫氳繃 Category 鍚戠被娣誨姞鏂規硶鐨勯棶棰樸?br />浣嗚繖涓爣絳?錛峅bjC 鍦?64 浣?鍜?iOS 涓湁闂錛岄渶瑕佷嬌鐢?-all_load 鎴?-force_load銆?br />
鎬葷粨濡備笅錛?br />濡傛灉錛岀涓夊簱涓病鏈?category錛孫ther Linker Flags 鏃犻渶璁劇疆
濡傛灉錛岀涓夋柟搴撲腑鏈?category錛岄渶瑕佽緗負 -ObjC
濡傛灉錛屾煇浜?Xcode 鐗堟湰涓紝鍑虹幇闂錛屼慨鏀硅緗負 -all_load

lincode 2012-04-23 14:56 鍙戣〃璇勮
]]>
[iOS] 闃呰 Crash Report http://www.tkk7.com/lincode/archive/2012/03/18/372131.htmllincodelincodeSun, 18 Mar 2012 05:56:00 GMThttp://www.tkk7.com/lincode/archive/2012/03/18/372131.htmlhttp://www.tkk7.com/lincode/comments/372131.htmlhttp://www.tkk7.com/lincode/archive/2012/03/18/372131.html#Feedback0http://www.tkk7.com/lincode/comments/commentRss/372131.htmlhttp://www.tkk7.com/lincode/services/trackbacks/372131.html鑾峰緱 Crash Report錛?/strong>
1 itunesConnect 鐨勫悗鍙頒細鎻愪緵涓涓?Crash report 琛紱
2 鎶婁竴鍙版墦寮浜嗗紑鍙戞ā寮忕殑鏈哄櫒鎺ュ叆 Mac錛孹code 鐨?Organizer 涓兘鏌ョ湅榪欏彴璁懼鐨?Crash Report錛?br />3 鑻ヤ嬌鐢ㄤ簡 Umeng.com, Bugsense.com 涔嬬被鐨勫伐鍏楓?br />
闃呰 Crash Report:
榪欎箣鍓嶉渶瑕佷竴涓悕涓?AppName.app.dSYM 鐨勬枃浠躲俋code 涓紝Archive 涓涓」鐩箣鍚庯紝鍙互鍦?Organizer 鐨?Archives 鍒嗛〉涓紝鎵懼埌鎵鏈夐」鐩殑 Archvie 鏂囦歡銆?br />鍙抽敭鐐瑰嚮涓涓紝 Show Package Content錛屽氨鑳界湅鍒頒竴涓被浼?AppName錛?錛?9錛?2.app.PM.xcarchive  鐨勬枃浠訛紝show in finder 榪欎釜鏂囦歡錛屽氨鑳芥壘鍒?.dSYM 鏂囦歡銆?br />
鍦?Ternimal 涓墽琛岋紝鑻ユ槸 鏉ヨ嚜浜?iphone 3G 鐨勬満鍣紝灝遍渶瑕佷嬌鐢?armv6 浠f浛 armv7.

 atos -o AppName.app.dSYM/Contents/Resources/DWARF/AppName  -arch armv7 0x0000b82

榪欐牱灝辮兘鐪嬪埌錛屽湴鍧瀵瑰簲鐨勭被錛屽嚱鏁幫紝浠g爜琛屾暟銆傝繖涓懡浠ゅ彧鑳借В鏋愬嚭瀹㈡埛浠g爜鐨勪綅緗傝嫢鏄敊璇爢鏍堜腑鐨勭郴緇熻皟鐢紝鏄棤娉曠炕璇戝嚭鏉ョ殑銆?/div>

lincode 2012-03-18 13:56 鍙戣〃璇勮
]]>[iOS] 鍦板潃鍙嶅悜瑙f瀽http://www.tkk7.com/lincode/archive/2012/01/12/368424.htmllincodelincodeThu, 12 Jan 2012 13:27:00 GMThttp://www.tkk7.com/lincode/archive/2012/01/12/368424.htmlhttp://www.tkk7.com/lincode/comments/368424.htmlhttp://www.tkk7.com/lincode/archive/2012/01/12/368424.html#Feedback0http://www.tkk7.com/lincode/comments/commentRss/368424.htmlhttp://www.tkk7.com/lincode/services/trackbacks/368424.htmlGoogle map 涔熸彁渚涗簡涓涓被浼肩殑鏈嶅姟錛屾槸璁塊棶涓涓?google map 鐨?api錛岃繖閲岃瘯鍥懼皝瑁呬簡 google map 鐨勬湇鍔°備嬌浣跨敤 apple 鍜?google 鐨勬湇鍔$殑鎺ュ彛鍩烘湰涓鑷達紝鏇挎崲璧鋒潵寰堝鏄撱侴oogle map 鐨勮繖涓湇鍔″湪涓浗鐨勭姸鎬佹瘮 apple 紼嶅井濂戒竴浜涳紝浣嗕篃鏈変笉紼沖畾鐨勬椂鍊欍傛垜鐚滄兂錛宎pple 涔熻鏄嬌鐢?google 鐨勬湇鍔″皝瑁呬簡鑷繁鐨?nbsp;MKReverseGeocoder銆傝嫢鏄姝わ紝榪欓噷鐨勫皾璇曚篃灝辨病鏈変粈涔堟剰涔変簡銆?br />
DOUHttpRequest 鏄 ASIHTTPRequest 鐨勪竴涓畝鍗曞皝瑁呫傝繖浜涗唬鐮佸彲浠?緇ф壙鑷?nbsp;MKReverseGeocoder銆傝繖鏍鳳紝浣跨敤鏂規硶灝卞拰 MKReverseGeocoder 涓鏍蜂簡銆?br />
static NSString* kGeoServerUrl = @"http://maps.google.com/maps/api/geocode/json?latlng=%f,%f&sensor=true&language=en";
static NSString* kLatitudeUserInfoKey = @"latitudeUserInfoKey";
static NSString* kLongitudeUserInfoKey = @"longitudeUserInfoKey";

//
// It's tje solution for replacing MKReverseGeocoder that has problem in China.
//
- (void)startedReverseGeoderWithLatitude:(double)latitude longitude:(double)longitude {
  NSString *url = [NSString stringWithFormat:kGeoServerUrl, latitude, longitude];
  DOUHttpRequest *req = [DOUHttpRequest requestWithURL:[NSURL URLWithString:url] target:self];
  
  NSNumber *lat = [NSNumber numberWithDouble:latitude];
  NSNumber *lon = [NSNumber numberWithDouble:longitude];
  req.userInfo = [NSDictionary dictionaryWithObjectsAndKeys:lat, kLatitudeUserInfoKey, lon, kLongitudeUserInfoKey, nil];
  
  DOUService *service = [DOUService sharedInstance];  
  [service addRequest:req];
}


- (NSDictionary *)addressDictionary:(NSObject *)obj {
  
  NSArray* ary = nil;
  if (IS_INSTANCE_OF(obj, NSDictionary)) {
    NSObject* data = [(NSDictionary*)obj objectForKey:@"results"];
    if (IS_INSTANCE_OF(data, NSArray)) {
      ary = (NSArray*)data;
      NSDictionary *dic = [ary objectAtIndex:0];
      
      NSArray *addressComps = [dic objectForKey:@"address_components"];
      
      //NSString *streetNumber = @"";
      NSString *route = @"";
      NSString *locality = @"";
      NSString *country = @"";
      for (NSDictionary *comp in addressComps) {
        NSArray *types = [comp objectForKey:@"types"];
        NSString *type = [types objectAtIndex:0];
        
//        if ([type isEqualToString:@"street_number"]) {
//          streetNumber = [comp objectForKey:@"long_name"];
//        }
        
        if ([type isEqualToString:@"route"]) {
          route = [comp objectForKey:@"long_name"];
        }
        
        if ([type isEqualToString:@"locality"]) {
          locality = [comp objectForKey:@"long_name"];
        }
        
        if ([type isEqualToString:@"country"]) {
          country = [comp objectForKey:@"long_name"];
        }        
      }
      
      NSDictionary *addressDic = [NSDictionary dictionaryWithObjectsAndKeys:route, kABPersonAddressStreetKey,
                                  locality, kABPersonAddressCityKey,                                        
                                  country, kABPersonAddressCountryKey, nil];
      return addressDic;
    }
  }
  return nil;
}


- (void)requestFinished:(DOUHttpRequest *)req {
  NSError *error = [req error];
  if (!error) {
    DebugLog(@"str:%@", [req responseString]);
    
    NSObject *obj = [[req responseString] JSONValue];
    NSDictionary *addressDic = [self addressDictionary:obj];
    
    CLLocationCoordinate2D coordinate;
    coordinate.latitude = [[req.userInfo objectForKey:kLatitudeUserInfoKey] doubleValue];
    coordinate.longitude = [[req.userInfo objectForKey:kLongitudeUserInfoKey] doubleValue]; 
    MKPlacemark *placemark = [[[MKPlacemark alloc] initWithCoordinate:coordinate 
                                                   addressDictionary:addressDic] autorelease];
    [self reverseGeocoder:nil didFindPlacemark:placemark];
  }
}

- (void)requestFailed:(DOUHttpRequest *)req { 
  [self reverseGeocoder:nil didFailWithError:[req error]];
}


#pragma mark - MKReverseGeocoderDelegate

static NSString * const AppleLanguagesKey = @"AppleLanguages";

- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark {

  NSArray *array = [[NSUserDefaults standardUserDefaults] objectForKey:AppleLanguagesKey];
  NSString *currentLanguage = [array objectAtIndex:0];
  
  // set current language as english
  [[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:@"zh-Hans", nil] 
                                            forKey:AppleLanguagesKey];
  NSString *local = [placemark.locality lowercaseString];
 
  [AppContext sharedInstance].currentCityUid = local;
  
  // reset current language
  [[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:currentLanguage, nil] 
                                            forKey:AppleLanguagesKey];
}

- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error {
  TraceLog(@"reverseGeocoder :%@", [error localizedDescription]);  
}


lincode 2012-01-12 21:27 鍙戣〃璇勮
]]>
OAuth 鍩烘湰姒傚康http://www.tkk7.com/lincode/archive/2011/10/27/362182.htmllincodelincodeThu, 27 Oct 2011 10:15:00 GMThttp://www.tkk7.com/lincode/archive/2011/10/27/362182.htmlhttp://www.tkk7.com/lincode/comments/362182.htmlhttp://www.tkk7.com/lincode/archive/2011/10/27/362182.html#Feedback0http://www.tkk7.com/lincode/comments/commentRss/362182.htmlhttp://www.tkk7.com/lincode/services/trackbacks/362182.html
瀹氫箟

OAuth錛堝紑鏀炬巿鏉冿級鏄竴涓?a class="new" title="寮鏀炬爣鍑? style="text-decoration: none; color: #ba0000; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">寮鏀炬爣鍑?/a>錛屽厑璁哥敤鎴瘋絎笁鏂瑰簲鐢ㄨ闂鐢ㄦ埛鍦ㄦ煇涓緗戠珯涓婂瓨鍌ㄧ殑縐佸瘑鐨勮祫婧愶紙濡傜収鐗囷紝瑙嗛錛岃仈緋諱漢鍒楄〃錛夛紝鑰屾棤闇灝嗙敤鎴峰悕鍜屽瘑鐮佹彁渚涚粰絎笁鏂瑰簲鐢ㄣ?/p>

OAuth鍏佽鐢ㄦ埛鎻愪緵涓涓護鐗岋紝鑰屼笉鏄敤鎴峰悕鍜屽瘑鐮佹潵璁塊棶浠栦滑瀛樻斁鍦ㄧ壒瀹氭湇鍔℃彁渚涜呯殑鏁版嵁銆傛瘡涓涓護鐗屾巿鏉冧竴涓壒瀹氱殑緗戠珯錛堜緥濡傦紝瑙嗛緙栬緫緗戠珯)鍦ㄧ壒瀹氱殑鏃舵錛堜緥濡傦紝鎺ヤ笅鏉ョ殑2灝忔椂鍐咃級鍐呰闂壒瀹氱殑璧勬簮錛堜緥濡備粎浠呮槸鏌愪竴鐩稿唽涓殑瑙嗛錛夈傝繖鏍鳳紝OAuth鍏佽鐢ㄦ埛鎺堟潈絎笁鏂圭綉绔欒闂粬浠瓨鍌ㄥ湪鍙﹀鐨勬湇鍔℃彁渚涜呬笂鐨勪俊鎭紝鑰屼笉闇瑕佸垎浜粬浠殑璁塊棶璁稿彲鎴栦粬浠暟鎹殑鎵鏈夊唴瀹廣?/p>

璁よ瘉鍜屾巿鏉冭繃紼?/strong>

鍦ㄨ璇佸拰鎺堟潈鐨勮繃紼嬩腑娑夊強鐨勪笁鏂瑰寘鎷細

  • 鏈嶅姟鎻愪緵鏂?/strong>錛岀敤鎴蜂嬌鐢ㄦ湇鍔℃彁渚涙柟鏉ュ瓨鍌ㄥ彈淇濇姢鐨勮祫婧愶紝濡傜収鐗囷紝瑙嗛錛岃仈緋諱漢鍒楄〃銆?/li>
  • 鐢ㄦ埛錛屽瓨鏀懼湪鏈嶅姟鎻愪緵鏂圭殑鍙椾繚鎶ょ殑璧勬簮鐨勬嫢鏈夎呫?/li>
  • 瀹㈡埛绔?/strong>錛岃璁塊棶鏈嶅姟鎻愪緵鏂硅祫婧愮殑絎笁鏂瑰簲鐢紝閫氬父鏄綉绔欙紝濡傛彁渚涚収鐗囨墦鍗版湇鍔$殑緗戠珯銆傚湪璁よ瘉榪囩▼涔嬪墠錛屽鎴風瑕佸悜鏈嶅姟鎻愪緵鑰呯敵璇峰鎴風鏍囪瘑銆?/li>

浣跨敤OAuth榪涜璁よ瘉鍜屾巿鏉冪殑榪囩▼濡備笅鎵紺?

  1. 鐢ㄦ埛璁塊棶瀹㈡埛绔?/strong>鐨勭綉绔欙紝鎯蟲搷浣滅敤鎴峰瓨鏀懼湪鏈嶅姟鎻愪緵鏂?/strong>鐨勮祫婧愩?/li>
  2. 瀹㈡埛绔?/strong>鍚?strong>鏈嶅姟鎻愪緵鏂?/strong>璇鋒眰涓涓復鏃朵護鐗屻?/li>
  3. 鏈嶅姟鎻愪緵鏂?/strong>楠岃瘉瀹㈡埛绔?/strong>鐨勮韓浠藉悗錛屾巿浜堜竴涓復鏃朵護鐗屻?/li>
  4. 瀹㈡埛绔?/strong>鑾峰緱涓存椂浠ょ墝鍚庯紝灝嗙敤鎴峰紩瀵艱嚦鏈嶅姟鎻愪緵鏂?/strong>鐨勬巿鏉冮〉闈㈣姹傜敤鎴鋒巿鏉冦傚湪榪欎釜榪囩▼涓皢涓存椂浠ょ墝鍜屽鎴風鐨?a title="鍥炶皟鍑芥暟" style="text-decoration: none; color: #0645ad; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">鍥炶皟榪炴帴鍙戦佺粰鏈嶅姟鎻愪緵鏂?/strong>銆?/li>
  5. 鐢ㄦ埛鍦?strong>鏈嶅姟鎻愪緵鏂?/strong>鐨勭綉欏典笂杈撳叆鐢ㄦ埛鍚嶅拰瀵嗙爜錛岀劧鍚庢巿鏉冭瀹㈡埛绔?/strong>璁塊棶鎵璇鋒眰鐨勮祫婧愩?/li>
  6. 鎺堟潈鎴愬姛鍚庯紝鏈嶅姟鎻愪緵鏂?/strong>寮曞鐢ㄦ埛榪斿洖瀹㈡埛绔?/strong>鐨勭綉欏點?/li>
  7. 瀹㈡埛绔?/strong>鏍規嵁涓存椂浠ょ墝浠?strong>鏈嶅姟鎻愪緵鏂?/strong>閭i噷鑾峰彇璁塊棶浠ょ墝銆?/li>
  8. 鏈嶅姟鎻愪緵鏂?/strong>鏍規嵁涓存椂浠ょ墝鍜?strong>鐢ㄦ埛鐨勬巿鏉冩儏鍐墊巿浜?strong>瀹㈡埛绔?/strong>璁塊棶浠ょ墝銆?/li>
  9. 瀹㈡埛绔?/strong>浣跨敤鑾峰彇鐨勮闂護鐗岃闂瓨鏀懼湪鏈嶅姟鎻愪緵鏂?/strong>涓婄殑鍙椾繚鎶ょ殑璧勬簮銆?/li>


OAuth 2.0

OAuth 2.0鏄疧Auth鍗忚鐨勪笅涓鐗堟湰錛屼絾涓嶅悜鍚庡吋瀹筄Auth 1.0銆?OAuth 2.0鍏蟲敞瀹㈡埛绔紑鍙戣呯殑綆鏄撴э紝鍚屾椂涓篧eb搴旂敤錛屾闈㈠簲鐢ㄥ拰鎵嬫満錛屽拰璧峰眳瀹よ澶囨彁渚涗笓闂ㄧ殑璁よ瘉嫻佺▼銆傝鑼冭繕鍦↖ETF OAuth宸ヤ綔緇勭殑寮鍙戜腑 錛屾寜鐓?a class="new" title="Eran Hammer-Lahav" style="text-decoration: none; color: #ba0000; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: initial initial; ">Eran Hammer-Lahav鐨勮娉曪紝OAuth灝嗕簬2010騫存湯瀹屾垚銆?/p>

Facebook鐨勬柊鐨凣raph API鍙敮鎸丱Auth 2.0錛孏oogle鍦?font class="Apple-style-span" color="#0645ad">2011騫?鏈?/span>浜﹀浣圙oogle API灝峅Auth 2.0鐨勬敮鎻淬?/p>

lincode 2011-10-27 18:15 鍙戣〃璇勮
]]>
錛昏漿錛絉ESTful 鐞嗚Вhttp://www.tkk7.com/lincode/archive/2011/10/27/362180.htmllincodelincodeThu, 27 Oct 2011 10:02:00 GMThttp://www.tkk7.com/lincode/archive/2011/10/27/362180.htmlhttp://www.tkk7.com/lincode/comments/362180.htmlhttp://www.tkk7.com/lincode/archive/2011/10/27/362180.html#Feedback0http://www.tkk7.com/lincode/comments/commentRss/362180.htmlhttp://www.tkk7.com/lincode/services/trackbacks/362180.html

鍚嶇О

REST錛屽嵆Representational State Transfer鐨勭緝鍐欍傛垜瀵硅繖涓瘝緇勭殑緲昏瘧鏄?琛ㄧ幇灞傜姸鎬佽漿鍖?銆?/p>

濡傛灉涓涓灦鏋勭鍚圧EST鍘熷垯錛屽氨縐板畠涓篟ESTful鏋舵瀯銆?/p>

瑕佺悊瑙ESTful鏋舵瀯錛屾渶濂界殑鏂規硶灝辨槸鍘葷悊瑙epresentational State Transfer榪欎釜璇嶇粍鍒板簳鏄粈涔堟剰鎬濓紝瀹冪殑姣忎竴涓瘝浠h〃浜嗕粈涔堟兜涔夈?/strong>濡傛灉浣犳妸榪欎釜鍚嶇О鎼炴噦浜嗭紝涔熷氨涓嶉毦浣撲細REST鏄竴縐嶄粈涔堟牱鐨勮璁°?/p>

璧勬簮錛圧esources錛?/strong>

REST鐨勫悕縐?琛ㄧ幇灞傜姸鎬佽漿鍖?涓紝鐪佺暐浜嗕富璇?琛ㄧ幇灞?鍏跺疄鎸囩殑鏄?璧勬簮"錛圧esources錛夌殑"琛ㄧ幇灞?銆?/p>

鎵璋?璧勬簮"錛屽氨鏄綉緇滀笂鐨勪竴涓疄浣擄紝鎴栬呰鏄綉緇滀笂鐨勪竴涓叿浣撲俊鎭?/strong>瀹冨彲浠ユ槸涓孌墊枃鏈佷竴寮犲浘鐗囥佷竴棣栨瓕鏇層佷竴縐嶆湇鍔★紝鎬諱箣灝辨槸涓涓叿浣撶殑瀹炲湪銆備綘鍙互鐢ㄤ竴涓猆RI錛堢粺涓璧勬簮瀹氫綅絎︼級鎸囧悜瀹冿紝姣忕璧勬簮瀵瑰簲涓涓壒瀹氱殑URI銆傝鑾峰彇榪欎釜璧勬簮錛岃闂畠鐨刄RI灝卞彲浠ワ紝鍥犳URI灝辨垚浜嗘瘡涓涓祫婧愮殑鍦板潃鎴栫嫭涓鏃犱簩鐨勮瘑鍒銆?/p>

鎵璋?涓婄綉"錛屽氨鏄笌浜掕仈緗戜笂涓緋誨垪鐨?璧勬簮"浜掑姩錛岃皟鐢ㄥ畠鐨刄RI銆?/p>

琛ㄧ幇灞傦紙Representation錛?/strong>

"璧勬簮"鏄竴縐嶄俊鎭疄浣擄紝瀹冨彲浠ユ湁澶氱澶栧湪琛ㄧ幇褰㈠紡銆?strong style="font-weight: 800; ">鎴戜滑鎶?璧勬簮"鍏蜂綋鍛堢幇鍑烘潵鐨勫艦寮忥紝鍙仛瀹冪殑"琛ㄧ幇灞?錛圧epresentation錛夈?/strong>

姣斿錛屾枃鏈彲浠ョ敤txt鏍煎紡琛ㄧ幇錛屼篃鍙互鐢℉TML鏍煎紡銆乆ML鏍煎紡銆丣SON鏍煎紡琛ㄧ幇錛岀敋鑷沖彲浠ラ噰鐢ㄤ簩榪涘埗鏍煎紡錛涘浘鐗囧彲浠ョ敤JPG鏍煎紡琛ㄧ幇錛屼篃鍙互鐢≒NG鏍煎紡琛ㄧ幇銆?/p>

URI鍙唬琛ㄨ祫婧愮殑瀹炰綋錛屼笉浠h〃瀹冪殑褰㈠紡銆備弗鏍煎湴璇達紝鏈変簺緗戝潃鏈鍚庣殑".html"鍚庣紑鍚嶆槸涓嶅繀瑕佺殑錛屽洜涓鴻繖涓悗緙鍚嶈〃紺烘牸寮忥紝灞炰簬"琛ㄧ幇灞?鑼冪暣錛岃孶RI搴旇鍙唬琛?璧勬簮"鐨勪綅緗傚畠鐨勫叿浣撹〃鐜板艦寮忥紝搴旇鍦℉TTP璇鋒眰鐨勫ご淇℃伅涓敤Accept鍜孋ontent-Type瀛楁鎸囧畾錛岃繖涓や釜瀛楁鎵嶆槸瀵?琛ㄧ幇灞?鐨勬弿榪般?/p>

鐘舵佽漿鍖栵紙State Transfer錛?/strong>

璁塊棶涓涓綉绔欙紝灝變唬琛ㄤ簡瀹㈡埛绔拰鏈嶅姟鍣ㄧ殑涓涓簰鍔ㄨ繃紼嬨傚湪榪欎釜榪囩▼涓紝鍔垮繀娑夊強鍒版暟鎹拰鐘舵佺殑鍙樺寲銆?/p>

浜掕仈緗戦氫俊鍗忚HTTP鍗忚錛屾槸涓涓棤鐘舵佸崗璁傝繖鎰忓懗鐫錛屾墍鏈夌殑鐘舵侀兘淇濆瓨鍦ㄦ湇鍔″櫒绔傚洜姝わ紝濡傛灉瀹㈡埛绔兂瑕佹搷浣滄湇鍔″櫒錛屽繀欏婚氳繃鏌愮鎵嬫錛岃鏈嶅姟鍣ㄧ鍙戠敓"鐘舵佽漿鍖?錛圫tate Transfer錛夈傝岃繖縐嶈漿鍖栨槸寤虹珛鍦ㄨ〃鐜板眰涔嬩笂鐨勶紝鎵浠ュ氨鏄?琛ㄧ幇灞傜姸鎬佽漿鍖?銆?/strong>

瀹㈡埛绔敤鍒扮殑鎵嬫錛屽彧鑳芥槸HTTP鍗忚銆傚叿浣撴潵璇達紝灝辨槸HTTP鍗忚閲岄潰錛屽洓涓〃紺烘搷浣滄柟寮忕殑鍔ㄨ瘝錛欸ET銆丳OST銆丳UT銆丏ELETE銆傚畠浠垎鍒搴斿洓縐嶅熀鏈搷浣滐細GET鐢ㄦ潵鑾峰彇璧勬簮錛孭OST鐢ㄦ潵鏂板緩璧勬簮錛堜篃鍙互鐢ㄤ簬鏇存柊璧勬簮錛夛紝PUT鐢ㄦ潵鏇存柊璧勬簮錛孌ELETE鐢ㄦ潵鍒犻櫎璧勬簮銆?/strong>

緇艱堪

緇煎悎涓婇潰鐨勮В閲婏紝鎴戜滑鎬葷粨涓涓嬩粈涔堟槸RESTful鏋舵瀯錛?/p>

銆銆錛?錛夋瘡涓涓猆RI浠h〃涓縐嶈祫婧愶紱

銆銆錛?錛夊鎴風鍜屾湇鍔″櫒涔嬮棿錛屼紶閫掕繖縐嶈祫婧愮殑鏌愮琛ㄧ幇灞傦紱

銆銆錛?錛夊鎴風閫氳繃鍥涗釜HTTP鍔ㄨ瘝錛屽鏈嶅姟鍣ㄧ璧勬簮榪涜鎿嶄綔錛屽疄鐜?琛ㄧ幇灞傜姸鎬佽漿鍖?銆?/p>

璇尯

RESTful鏋舵瀯鏈変竴浜涘吀鍨嬬殑璁捐璇尯銆?/p>

鏈甯歌鐨勪竴縐嶈璁¢敊璇紝灝辨槸URI鍖呭惈鍔ㄨ瘝銆?/strong>鍥犱負"璧勬簮"琛ㄧず涓縐嶅疄浣擄紝鎵浠ュ簲璇ユ槸鍚嶈瘝錛孶RI涓嶅簲璇ユ湁鍔ㄨ瘝錛屽姩璇嶅簲璇ユ斁鍦℉TTP鍗忚涓?/p>

涓句緥鏉ヨ錛屾煇涓猆RI鏄?posts/show/1錛屽叾涓璼how鏄姩璇嶏紝榪欎釜URI灝辮璁¢敊浜嗭紝姝g‘鐨勫啓娉曞簲璇ユ槸/posts/1錛岀劧鍚庣敤GET鏂規硶琛ㄧずshow銆?/p>

濡傛灉鏌愪簺鍔ㄤ綔鏄疕TTP鍔ㄨ瘝琛ㄧず涓嶄簡鐨勶紝浣犲氨搴旇鎶婂姩浣滃仛鎴愪竴縐嶈祫婧愩傛瘮濡傜綉涓婃眹嬈撅紝浠庤處鎴?鍚戣處鎴?姹囨500鍏冿紝閿欒鐨刄RI鏄細

銆銆POST /accounts/1/transfer/500/to/2

姝g‘鐨勫啓娉曟槸鎶婂姩璇峵ransfer鏀規垚鍚嶈瘝transaction錛岃祫婧愪笉鑳芥槸鍔ㄨ瘝錛屼絾鏄彲浠ユ槸涓縐嶆湇鍔★細

銆銆POST /transaction HTTP/1.1
銆銆Host: 127.0.0.1
銆銆
銆銆from=1&to=2&amount=500.00

鍙︿竴涓璁¤鍖猴紝灝辨槸鍦║RI涓姞鍏ョ増鏈彿錛?/p>

銆銆http://www.example.com/app/1.0/foo

銆銆http://www.example.com/app/1.1/foo

銆銆http://www.example.com/app/2.0/foo

鍥犱負涓嶅悓鐨勭増鏈紝鍙互鐞嗚В鎴愬悓涓縐嶈祫婧愮殑涓嶅悓琛ㄧ幇褰㈠紡錛屾墍浠ュ簲璇ラ噰鐢ㄥ悓涓涓猆RI銆傜増鏈彿鍙互鍦℉TTP璇鋒眰澶翠俊鎭殑Accept瀛楁涓繘琛屽尯鍒嗭紙鍙傝Versioning REST Services錛夛細

銆銆Accept: vnd.example-com.foo+json; version=1.0

銆銆Accept: vnd.example-com.foo+json; version=1.1

銆銆Accept: vnd.example-com.foo+json; version=2.0


鍘熷笘錛歨ttp://www.ruanyifeng.com/blog/2011/09/restful.html

lincode 2011-10-27 18:02 鍙戣〃璇勮
]]>
[android] PhoneGap 鍦?android 涓嬬殑瀹炵幇鍘熺悊http://www.tkk7.com/lincode/archive/2011/09/20/359014.htmllincodelincodeTue, 20 Sep 2011 02:20:00 GMThttp://www.tkk7.com/lincode/archive/2011/09/20/359014.htmlhttp://www.tkk7.com/lincode/comments/359014.htmlhttp://www.tkk7.com/lincode/archive/2011/09/20/359014.html#Feedback1http://www.tkk7.com/lincode/comments/commentRss/359014.htmlhttp://www.tkk7.com/lincode/services/trackbacks/359014.htmlPhoneGap 鏄竴涓Щ鍔ㄥ紑鍙戞鏋躲傞氳繃 PhoneGap錛屽紑鍙戣呭彲浠ヤ嬌鐢?JavaScript 璋冪敤鎵嬫満鐨勫師鐢熷姛鑳斤紝渚嬪錛岃幏鍙栫粡綰害錛岃鎵嬫満鎸姩絳夈?br />涓婚〉 http://www.phonegap.com/ 銆?br />婧愮爜 https://github.com/phonegap/phonegap-android 銆?br />
PhoneGap 鍦ㄦ棭鏈燂紝搴旇鏄嬌鐢?WebView 鐨?addJavaScriptInterface 鏂規硶錛屾潵涓?JS 鎻愪緵璋冪敤鍘熺敓鍔熻兘鍙兘銆俛ddJavaScriptInterface 錛屽彲浠ュ皢涓涓?Java 瀵硅薄緇戝畾鍒頒竴涓?JS 瀵硅薄銆傛槸鐨勶紝JS瀵硅薄鍙互璋冪敤 Java鏂規硶銆備絾鍦?PhoneGap 1.0.0 榪欎釜鐗堟湰涓紝PhoneGap 鏀瑰彉浜嗘柟娉曘?br />
浠ユ尟鍔ㄥ姛鑳戒負渚嬶紝鎴戜滑鍙互鐪嬩竴涓嬬▼搴忚皟鐢ㄧ殑嫻佺▼錛?br />
1 鍦?JS 涓紝鍚姩鍛戒護

main.js / navigator.notification.vibrate(0);

notification.js / Notification.vibrate.vibrate 涓墽琛屼簡 PhoneGap.exec(null, null, "Notification", "vibrate", [mills]);

phonegap.js / PhoneGap.exc 涓墽琛屼簡 var r = prompt(PhoneGap.stringify(args), "gap:"+PhoneGap.stringify([service, action, callbackId, true]));

榪欐椂錛學ebView 灝變細浼佸浘寮瑰嚭涓涓獥鍙c傝繖鏃朵嬌鐢?android 鎻愪緵鐨?nbsp;WebChromeClient 鐨?nbsp;API 灝卞彲浠ユ埅鑾?WebView 鐨勮繖涓姩浣?銆?br />
2 JAVA 涓紝澶勭悊鍛戒護
WebView 鐨?WebChromClient 瀹炵幇浜嗕笅闈㈣繖涓嚱鏁幫細

public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult result)

鍦?onJsPrompt 涓墽琛屼簡 String r = pluginManager.exec(service, action, callbackId, message, async);

PlugManager 浼氭牴鎹敹鍒板弬鏁幫紝灝嗗懡浠ゅ垎鍙戠粰鐗瑰畾鐨?Plugin銆傝繖涓緥瀛愪腑錛屾帴鏀剁殑 plugin 鏄細Notification銆?br />钀藉疄鍒?Notification 鐨?exec 鍑芥暟錛氫細鎵ц榪欎竴琛岋細 this.vibrate(args.getLong(0));

鎸姩鐨勫疄鐜頒負錛?br />

 

 public void vibrate(long time){
        
// Start the vibration, 0 defaults to half a second.
        if (time == 0) {
time 
= 500;
}
        Vibrator vibrator 
= (Vibrator) this.ctx.getSystemService(Context.VIBRATOR_SERVICE);
        vibrator.vibrate(time);
}

 


3 Java 澶勭悊瀹屽悗鐨勬暟鎹紝闇瑕佺粰 JS 涓涓弽棣堬細
榪欓噷 PhoneGap 浣跨敤浜嗕竴涓湪瀹㈡埛绔湰鍦板疄鐜扮殑 XHRServer錛屽叿浣撳埌浠g爜涓氨鏄竴涓狫AVA 綾?CallbackServer銆?br />
鍒嗕袱涓儴鍒嗕粙緇嶅叾琛屼負錛?br />鏈湴 XHRServer錛?br />鎬濇兂鏄紝鍚庡彴姣忔墽琛屽畬涓涓懡浠わ紝閮戒細灝嗙粨鏋滃瓨鍦?CallbackServer 涓殑涓涓摼琛ㄤ腑錛屽叿浣撲負CallbackServr鐨?private LinkedList<String> javascript;
榪欎釜緇撴灉鍏跺疄鏄竴孌靛瓧絎︿覆琛ㄧず鐨?JS 鍑芥暟璋冪敤銆備緥濡傛嫻嬬綉緇滆皟鐢ㄧ殑緇撴灉涓猴細PhoneGap.callbackSuccess('Network Status1',{status:1,message:"wifi",keepCallback:true});
 XHRServer 鐨勮涓哄緢綆鍗曪紝鍙鏈夎姹傛潵錛屽氨鎶婇摼琛ㄤ腑鐨勬渶鍏堣繘鏉ョ殑鎻愬嚭鏉ワ紝榪斿洖緇欏鎴風銆傛病鏈夎姹傛潵錛屽垯 10縐掗挓榪斿洖涓涓┖鐨勫洖澶嶏紝浠ョ淮鎸乆HRServer銆?div>
Webview 浣滀負瀹㈡埛绔細
鍦?WebView 涓紝浼氭湁涓涓疆璇㈡満鍒訛紝榪欏彲浠ュ弬鑰?PhoneGap.JSCallack 鍜?nbsp;PhoneGap.JSCallbackPolling 涓や釜鍑芥暟鏉ヨ闂?XHRServer銆俋HRServer錛岃繑鍥炵殑緇撴灉灝辨槸 WebView 闇瑕佽皟鐢ㄧ殑 JS 鍑芥暟銆?鍦?JS 涓紝eval() 鍑芥暟錛屽皢榪斿洖鐨勭粨鏋滃彉涓轟竴涓彲浠ユ墽琛岀殑瀵硅薄錛屽湪 Webview 涓墽琛岋紝鍙互璁や負榪欏嵆鏄洖璋冨嚱鏁?Callback銆傝繖涔熸槸涓轟粈涔?PhoneGap 涓轟綍鍛藉悕 XHRServer 涓?CallbackServer 鐨勫師鍥犮?br />


lincode 2011-09-20 10:20 鍙戣〃璇勮
]]>
[android] dip錛宒p錛宲x錛宲t錛宻p 鐨勫尯鍒?/title><link>http://www.tkk7.com/lincode/archive/2011/09/16/358813.html</link><dc:creator>lincode</dc:creator><author>lincode</author><pubDate>Fri, 16 Sep 2011 09:58:00 GMT</pubDate><guid>http://www.tkk7.com/lincode/archive/2011/09/16/358813.html</guid><wfw:comment>http://www.tkk7.com/lincode/comments/358813.html</wfw:comment><comments>http://www.tkk7.com/lincode/archive/2011/09/16/358813.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.tkk7.com/lincode/comments/commentRss/358813.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/lincode/services/trackbacks/358813.html</trackback:ping><description><![CDATA[<span id="caek4ew" class="Apple-style-span" style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #ffffff; ">dip: device independent pixels(璁懼鐙珛鍍忕礌)銆備笉鍚岃澶囨湁涓嶅悓鐨勬樉紺烘晥鏋滐紝榪欎釜鍜岃澶囩‖浠舵湁鍏籌紝涓鑸垜浠負浜嗘敮鎸乄VGA銆丠VGA鍜孮VGA 鎺ㄨ崘浣跨敤榪欎釜錛屼笉渚濊禆鍍忕礌銆?nbsp;<br /><br /></span><span id="weqm848" class="Apple-style-span" style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #ffffff; ">dp:錛堜笌瀵嗗害鏃犲叧鐨勫儚绱狅級涓縐嶅熀浜庡睆騫曞瘑搴︾殑鎶借薄鍗曚綅銆傚湪姣忚嫳瀵?60鐐圭殑鏄劇ず鍣ㄤ笂錛?dp = 1px銆?nbsp;<br /></span><span id="kc8auuc" class="Apple-style-span" style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #ffffff; "><br /></span><span id="848kewe" class="Apple-style-span" style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #ffffff; ">px: pixels(鍍忕礌). 涓嶅悓璁懼鏄劇ず鏁堟灉鐩稿悓錛屼竴鑸垜浠琀VGA浠h〃320x480鍍忕礌錛岃繖涓敤鐨勬瘮杈冨銆?nbsp;<br /></span><span id="uk4k44g" class="Apple-style-span" style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #ffffff; "><br />pt: point(紓?錛屾槸涓涓爣鍑嗙殑闀垮害鍗曚綅錛?pt錛?/72鑻卞錛岀敤浜庡嵃鍒蜂笟錛岄潪甯哥畝鍗曟槗鐢紱 <br /><br />sp: scaled pixels(鏀懼ぇ鍍忕礌). 涓昏鐢ㄤ簬瀛椾綋鏄劇ずbest for textsize銆?nbsp;</span><img src ="http://www.tkk7.com/lincode/aggbug/358813.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/lincode/" target="_blank">lincode</a> 2011-09-16 17:58 <a href="http://www.tkk7.com/lincode/archive/2011/09/16/358813.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[android] Serializable 鍜?Parcelable 鍖哄埆http://www.tkk7.com/lincode/archive/2011/09/16/358805.htmllincodelincodeFri, 16 Sep 2011 08:16:00 GMThttp://www.tkk7.com/lincode/archive/2011/09/16/358805.htmlhttp://www.tkk7.com/lincode/comments/358805.htmlhttp://www.tkk7.com/lincode/archive/2011/09/16/358805.html#Feedback0http://www.tkk7.com/lincode/comments/commentRss/358805.htmlhttp://www.tkk7.com/lincode/services/trackbacks/358805.htmlandroid 涓?span class="Apple-style-span" style="background-color: #ffffff; ">鑷畾涔夌殑瀵硅薄搴忓垪鍖栫殑闂鏈変袱涓夋嫨涓涓槸Parcelable錛屽彟澶栦竴涓槸Serializable銆?/span>

涓 搴忓垪鍖栧師鍥狅細

1.姘鎬箙鎬т繚瀛樺璞★紝淇濆瓨瀵硅薄鐨勫瓧鑺傚簭鍒楀埌鏈湴鏂囦歡涓紱
2.閫氳繃搴忓垪鍖栧璞″湪緗戠粶涓紶閫掑璞★紱
3.閫氳繃搴忓垪鍖栧湪榪涚▼闂翠紶閫掑璞°?nbsp;

浜?鑷充簬閫夊彇鍝鍙弬鑰冧笅闈㈢殑鍘熷垯錛?/span>

1.鍦ㄤ嬌鐢ㄥ唴瀛樼殑鏃跺欙紝Parcelable 綾繪瘮Serializable鎬ц兘楂橈紝鎵浠ユ帹鑽愪嬌鐢≒arcelable綾匯?br style="line-height: 25px; " />2.Serializable鍦ㄥ簭鍒楀寲鐨勬椂鍊欎細浜х敓澶ч噺鐨勪復鏃跺彉閲忥紝浠庤屽紩璧烽綣佺殑GC銆?br style="line-height: 25px; " />3.Parcelable涓嶈兘浣跨敤鍦ㄨ灝嗘暟鎹瓨鍌ㄥ湪紓佺洏涓婄殑鎯呭喌錛屽洜涓篜arcelable涓嶈兘寰堝ソ鐨勪繚璇佹暟鎹殑鎸佺畫鎬у湪澶栫晫鏈夊彉鍖栫殑鎯呭喌涓嬨傚敖綆erializable鏁堢巼浣庣偣錛?涔熶笉鎻愬$敤錛屼絾鍦ㄨ繖縐嶆儏鍐典笅錛岃繕鏄緩璁綘鐢⊿erializable 銆?/span>


瀹炵幇錛?/strong>
1 Serializable 鐨勫疄鐜幫紝鍙渶瑕佺戶鎵? implements Serializable 鍗沖彲銆傝繖鍙槸緇欏璞℃墦浜嗕竴涓爣璁幫紝緋葷粺浼氳嚜鍔ㄥ皢鍏跺簭鍒楀寲銆?br />
2 Parcelabel 鐨勫疄鐜幫紝闇瑕佸湪綾諱腑娣誨姞涓涓潤鎬佹垚鍛樺彉閲?CREATOR錛岃繖涓彉閲忛渶瑕佺戶鎵?Parcelable.Creator 鎺ュ彛銆?br />
public class MyParcelable implements Parcelable {
     
private int mData;

     
public int describeContents() {
         
return 0;
     }

     
public void writeToParcel(Parcel out, int flags) {
         out.writeInt(mData);
     }

     
public static final Parcelable.Creator<MyParcelable> CREATOR
             
= new Parcelable.Creator<MyParcelable>() {
         
public MyParcelable createFromParcel(Parcel in) {
             
return new MyParcelable(in);
         }

         
public MyParcelable[] newArray(int size) {
             
return new MyParcelable[size];
         }
     };
     
     
private MyParcelable(Parcel in) {
         mData 
= in.readInt();
     }
 }

 

lincode 2011-09-16 16:16 鍙戣〃璇勮
]]>
[android] Activity 鐨勭敓鍛藉懆鏈?浠ュ強 妯睆绔栧睆鍒囨崲鏃?Activity 鐨勭姸鎬佸彉鍖?/title><link>http://www.tkk7.com/lincode/archive/2011/09/16/358768.html</link><dc:creator>lincode</dc:creator><author>lincode</author><pubDate>Fri, 16 Sep 2011 02:32:00 GMT</pubDate><guid>http://www.tkk7.com/lincode/archive/2011/09/16/358768.html</guid><wfw:comment>http://www.tkk7.com/lincode/comments/358768.html</wfw:comment><comments>http://www.tkk7.com/lincode/archive/2011/09/16/358768.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.tkk7.com/lincode/comments/commentRss/358768.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/lincode/services/trackbacks/358768.html</trackback:ping><description><![CDATA[<strong>鐢熷懡鍛ㄦ湡</strong><br /><span id="q48cgoo" class="Apple-style-span" style="font-family: Arial, Helvetica, simsun, u5b8bu4f53; line-height: 22px; background-color: #ffffff; ">Android 緋葷粺鍦ˋctivity 鐢熷懡鍛ㄦ湡涓姞鍏ヤ竴浜涢挬瀛愶紝鎴戜滑鍙互鍦ㄨ繖浜涚郴緇熼鐣欑殑閽╁瓙涓仛涓浜涗簨鎯呫?br />渚嬩婦浜?7 涓父鐢ㄧ殑閽╁瓙錛?br style="line-height: 22px; " /></span><span id="8k446aq" class="Apple-style-span" style="font-family: Arial, Helvetica, simsun, u5b8bu4f53; line-height: 22px; background-color: #ffffff; ">protected void onCreate(Bundle savedInstanceState)<br style="line-height: 22px; " /></span><span id="iqoq44a" class="Apple-style-span" style="font-family: Arial, Helvetica, simsun, u5b8bu4f53; line-height: 22px; background-color: #ffffff; ">protected void onStart()<br style="line-height: 22px; " /></span><span id="qgm886k" class="Apple-style-span" style="font-family: Arial, Helvetica, simsun, u5b8bu4f53; line-height: 22px; background-color: #ffffff; ">protected void onResume()<br style="line-height: 22px; " /></span><span id="we8acuk" class="Apple-style-span" style="font-family: Arial, Helvetica, simsun, u5b8bu4f53; line-height: 22px; background-color: #ffffff; ">protected void onPause()<br style="line-height: 22px; " /></span><span id="44uc8ak" class="Apple-style-span" style="font-family: Arial, Helvetica, simsun, u5b8bu4f53; line-height: 22px; background-color: #ffffff; ">protected void onStop()<br style="line-height: 22px; " /></span><span id="ee8c8m4" class="Apple-style-span" style="font-family: Arial, Helvetica, simsun, u5b8bu4f53; line-height: 22px; background-color: #ffffff; ">protected void onRestart()<br style="line-height: 22px; " /></span><span id="ww8i444" class="Apple-style-span" style="font-family: Arial, Helvetica, simsun, u5b8bu4f53; line-height: 22px; background-color: #ffffff; ">protected void onDestroy()<br /><br />綆瑕佽鏄庯細<br /></span><span id="8yo4gw4" class="Apple-style-span" style="font-family: Arial, Helvetica, simsun, u5b8bu4f53; line-height: 22px; background-color: #ffffff; ">onCreate(Bundle savedInstanceState)錛氬垱寤篴ctivity鏃惰皟鐢ㄣ傝緗湪璇ユ柟娉曚腑錛岃繕浠undle涓彲浠ユ彁鍑虹敤浜庡垱寤鴻 Activity 鎵闇鐨勪俊鎭?br style="line-height: 22px; " /></span><span id="k8u4uuw" class="Apple-style-span" style="font-family: Arial, Helvetica, simsun, u5b8bu4f53; line-height: 22px; background-color: #ffffff; ">onStart()錛歛ctivity鍙樹負鍦ㄥ睆騫曚笂瀵圭敤鎴峰彲瑙佹椂錛屽嵆鑾峰緱鐒︾偣鏃訛紝浼氳皟鐢ㄣ?br style="line-height: 22px; " /></span><span id="8y84s4i" class="Apple-style-span" style="font-family: Arial, Helvetica, simsun, u5b8bu4f53; line-height: 22px; background-color: #ffffff; ">onResume()錛歛ctivity寮濮嬩笌鐢ㄦ埛浜や簰鏃惰皟鐢紙鏃犺鏄惎鍔ㄨ繕鏄噸鏂板惎鍔ㄤ竴涓椿鍔紝璇ユ柟娉曟繪槸琚皟鐢ㄧ殑錛夈?br style="line-height: 22px; " /></span><span id="kio8iss" class="Apple-style-span" style="font-family: Arial, Helvetica, simsun, u5b8bu4f53; line-height: 22px; background-color: #ffffff; ">onPause()錛歛ctivity琚殏鍋滄垨鏀跺洖cpu鍜屽叾浠栬祫婧愭椂璋冪敤錛岃鏂規硶鐢ㄤ簬淇濆瓨媧誨姩鐘舵佺殑銆傘?br style="line-height: 22px; " /></span><span id="4mu4ow4" class="Apple-style-span" style="font-family: Arial, Helvetica, simsun, u5b8bu4f53; line-height: 22px; background-color: #ffffff; ">onStop()錛歛ctivity琚仠姝㈠茍杞負涓嶅彲瑙侀樁孌靛強鍚庣畫鐨勭敓鍛藉懆鏈熶簨浠舵椂錛屽嵆澶卞幓鐒︾偣鏃惰皟鐢ㄣ?br style="line-height: 22px; " /></span><span id="uus844e" class="Apple-style-span" style="font-family: Arial, Helvetica, simsun, u5b8bu4f53; line-height: 22px; background-color: #ffffff; ">onRestart()錛氶噸鏂板惎鍔╝ctivity鏃惰皟鐢ㄣ傝媧誨姩浠嶅湪鏍堜腑錛岃屼笉鏄惎鍔ㄦ柊鐨勬椿鍔ㄣ?br style="line-height: 22px; " /></span><span id="e8ec44g" class="Apple-style-span" style="font-family: Arial, Helvetica, simsun, u5b8bu4f53; line-height: 22px; background-color: #ffffff; ">onDestroy()錛歛ctivity琚畬鍏ㄤ粠緋葷粺鍐呭瓨涓Щ闄ゆ椂璋冪敤錛岃鏂規硶琚皟鐢ㄥ彲鑳芥槸鍥犱負鏈変漢鐩存帴璋冪敤 finish()鏂規硶 鎴栬呯郴緇熷喅瀹氬仠姝㈣媧誨姩浠ラ噴鏀捐祫婧愩?br /></span><br /><strong>妯珫灞忓垏鎹?/strong><br /><br />1 鍒囨崲鍒版í灞?br /><span id="w8com4i" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onSaveInstanceState<br /></span><span id="aqguuka" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onPause<br /></span><span id="wu84ka4" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onStop<br /></span><span id="g8uge4s" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onDestroy<br /></span><span id="qy4au44" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onCreate<br /></span><span id="8a4i8eg" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onStart<br /></span><span id="ema8cki" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onRestoreInstanceState<br /></span><span id="ueck4as" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onResume<br /><br /></span>2 鍒囨崲鍒扮珫灞忥紝閿姣佷簡涓ゆ<br /><span id="us44gow" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onSaveInstanceState<br /></span><span id="84oi4ss" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onPause<br /></span><span id="e6c4yyg" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onStop<br /></span><span id="weka44g" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onDestroy</span><span id="meqm8aq" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onCreate<br /></span><span id="8muw44s" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onStart<br /></span><span id="i4oi4gg" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onRestoreInstanceState<br /></span><span id="c4ykiii" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onResume<br /></span><span id="84qus4e" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onSaveInstanceState<br /></span><span id="mei44yg" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onPause<br /></span><span id="emy4cki" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onStop<br /></span><span id="84cwck4" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onDestroy<br /></span><span id="a8eiygw" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onCreate<br /></span><span id="cc4g44y" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onStart<br /></span><span id="csmi44e" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onRestoreInstanceState<br /></span><span id="48qu4o4" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #ffffff; ">onResume</span><br /><br /><span id="m84eca4" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #f5fafe; "><p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; ">3 淇敼AndroidManifest.xml錛屾妸璇ctivity娣誨姞 android:configChanges="orientation"錛屽垏妯睆錛屽彧閿姣佷竴嬈°?/p><p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; ">onSaveInstanceState<br />onPause<br />onStop<br />onDestroy<br />onCreate<br />onStart<br />onRestoreInstanceState<br />onResume</p></span>4 <span id="uu8ic4a" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #f5fafe; ">鍐嶅垏鍥炵珫灞忥紝鍙戠幇涓嶄細鍐嶆墦鍗扮浉鍚屼俊鎭紝浣嗗鎵撳嵃浜嗕竴琛宱nConfigChanged<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; ">onSaveInstanceState<br />onPause<br />onStop<br />onDestroy<br />onCreate<br />onStart<br />onRestoreInstanceState<br />onResume<br />onConfigurationChanged</p></span><span id="8e4mygg" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #f5fafe; "><p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; ">5 鏇存敼 android:configChanges="orientation" 鏀規垚 android:configChanges="orientation|keyboardHidden"錛屽垏妯睆錛屽氨鍙墦鍗皁nConfigChanged</p><p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; ">onConfigurationChanged</p><p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; ">6 鍒囧洖绔栧睆</p><p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; ">onConfigurationChanged<br />onConfigurationChanged</p></span><span id="ewiokkc" class="Apple-style-span" style="font-family: Arial, 瀹嬩綋; line-height: 26px; background-color: #f5fafe; "><p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; ">鎬葷粨錛?/p><p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; ">1銆佷笉璁劇疆Activity鐨刟ndroid:configChanges鏃訛紝鍒囧睆浼氶噸鏂拌皟鐢ㄥ悇涓敓鍛藉懆鏈燂紝鍒囨í灞忔椂浼氭墽琛屼竴嬈★紝鍒囩珫灞忔椂浼氭墽琛屼袱嬈?/p><p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; ">2銆佽緗瓵ctivity鐨刟ndroid:configChanges="orientation"鏃訛紝鍒囧睆榪樻槸浼氶噸鏂拌皟鐢ㄥ悇涓敓鍛藉懆鏈燂紝鍒囨í銆佺珫灞忔椂鍙細鎵ц涓嬈?/p><p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; ">3銆佽緗瓵ctivity鐨刟ndroid:configChanges="orientation|keyboardHidden"鏃訛紝鍒囧睆涓嶄細閲嶆柊璋冪敤鍚勪釜鐢熷懡鍛ㄦ湡錛屽彧浼氭墽琛宱nConfigurationChanged鏂規硶</p></span><br /><br /><br /><br /><img src ="http://www.tkk7.com/lincode/aggbug/358768.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/lincode/" target="_blank">lincode</a> 2011-09-16 10:32 <a href="http://www.tkk7.com/lincode/archive/2011/09/16/358768.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://583s.com" target="_blank">亚洲AV综合色区无码二区偷拍</a>| <a href="http://7778tv.com" target="_blank">亚洲真人无码永久在线</a>| <a href="http://pencilinside.com" target="_blank">亚洲精品视频专区</a>| <a href="http://sdsupuchem.com" target="_blank">久章草在线精品视频免费观看</a>| <a href="http://51jingpai.com" target="_blank">久久精品国产亚洲7777</a>| <a href="http://qmoread.com" target="_blank">国产人成网在线播放VA免费</a>| <a href="http://dxjz120.com" target="_blank">亚洲成人影院在线观看</a>| <a href="http://yanhx.com" target="_blank">一区二区3区免费视频</a>| <a href="http://yakonet.com" target="_blank">亚洲无码黄色网址</a>| <a href="http://quxx10.com" target="_blank">久久久久久免费一区二区三区</a>| <a href="http://hn-hshb.com" target="_blank">中文亚洲成a人片在线观看</a>| <a href="http://wwwbu610.com" target="_blank">一级做a毛片免费视频</a>| <a href="http://www99xyxy.com" target="_blank">国内精品久久久久久久亚洲</a>| <a href="http://zjdoukai.com" target="_blank">两个人日本免费完整版在线观看1</a>| <a href="http://kencery.com" target="_blank">亚洲精品美女久久777777</a>| <a href="http://hlyidc.com" target="_blank">久久一区二区三区免费播放</a>| <a href="http://simupiao.com" target="_blank">亚洲国产综合91精品麻豆</a>| <a href="http://4228970.com" target="_blank">久久精品熟女亚洲av麻豆 </a>| <a href="http://c7372.com" target="_blank">久久久久亚洲精品成人网小说</a>| <a href="http://xsjxp.com" target="_blank">两个人看的www免费视频</a>| <a href="http://www664660a.com" target="_blank">国产免费人成视频在线观看</a>| <a href="http://ystchem.com" target="_blank">午夜免费国产体验区免费的 </a>| <a href="http://820111com.com" target="_blank">日本免费一区尤物</a>| <a href="http://zjszbwzl.com" target="_blank">免费无码婬片aaa直播表情</a>| <a href="http://2h6m.com" target="_blank">国产精品亚洲а∨无码播放</a>| <a href="http://726kxw.com" target="_blank">免费国产黄网站在线观看视频</a>| <a href="http://shandonghj.com" target="_blank">不卡精品国产_亚洲人成在线 </a>| <a href="http://mangshigas.com" target="_blank">最近在线2018视频免费观看</a>| <a href="http://87fulitv.com" target="_blank">亚洲中文字幕精品久久</a>| <a href="http://czdlglass.com" target="_blank">亚洲Aⅴ无码一区二区二三区软件</a>| <a href="http://zhxydq.com" target="_blank">国产特黄一级一片免费</a>| <a href="http://www676617.com" target="_blank">亚洲综合激情六月婷婷在线观看</a>| <a href="http://www398ph.com" target="_blank">麻豆一区二区免费播放网站</a>| <a href="http://avxyz.com" target="_blank">污视频网站免费在线观看</a>| <a href="http://www003924.com" target="_blank">亚洲成AV人片在WWW色猫咪</a>| <a href="http://074g8.com" target="_blank">成人免费视频一区</a>| <a href="http://laosanqq.com" target="_blank">中国性猛交xxxxx免费看</a>| <a href="http://zz4466.com" target="_blank">亚洲一区二区三区91</a>| <a href="http://3atv66.com" target="_blank">久久99亚洲综合精品首页</a>| <a href="http://igao4.com" target="_blank">精品免费久久久久久久</a>| <a href="http://www827556.com" target="_blank">高h视频在线免费观看</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>