2014-10-17 84 views
3

我的編譯器顯示此消息...taskstackbuilder爲API 14

呼叫所需的API級別16(當前分鐘是14)

的問題是.. 「這段代碼是好的運行在api 14還是不行?「 因爲我沒有設備來測試這個API版本,因爲AVD沒有GPS(要求) 我是否必須實現支持庫?

注意

它完美的API 16以上

TaskStackBuilder

PendingIntent contentIntent = TaskStackBuilder.create(this) 
      // add all of DetailsActivity's parents to the stack, 
      // followed by DetailsActivity itself 
      .addParentStack(Activity_TrackingMode.class) 
      .addNextIntent(new Intent(this, Activity_TrackingMode.class)) 
      .getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT); 

AndroidManifest

<activity android:name=".Activity_TrackingMode" 
       android:label="@string/app_name" 
       android:screenOrientation="portrait" 
       android:parentActivityName=".Activity_Screen1"> 
     <!-- Parent activity meta-data to support 4.0 and lower --> 
     <meta-data 
       android:name="android.support.PARENT_ACTIVITY" 
       android:value=".Activity_Screen1" /> 
     <intent-filter> 
      <category android:name="android.intent.category.DEFAULT"/> 
     </intent-filter> 
    </activity> 

回答