Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

taskstackbuilder for api 14

My compiler show this message...

Call required API level 16 (current min is 14)

The question is.. "Is this code is okay to run in api 14 or not??" because I have no device to test this API version since AVD doesn't have GPS (Requirement) Do I have to implement support library or not??

NOTE

It works perfectly on API 16 and above

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>
like image 359
Jongz Puangput Avatar asked May 10 '26 04:05

Jongz Puangput


1 Answers

You have to use android.support.v4.app.TaskStackBuider

http://developer.android.com/reference/android/support/v4/app/TaskStackBuilder.html

to run on API 14

like image 139
JoaoBiriba Avatar answered May 11 '26 17:05

JoaoBiriba



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!