Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7541031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:47:19+00:00 2026-05-30T07:47:19+00:00

void android.view.SurfaceHolder.setType(int type) public abstract void setType (int type) Since: API Level 1 This

  • 0

void android.view.SurfaceHolder.setType(int type)

public abstract void setType (int type) Since: API Level 1

This method is deprecated. this is ignored, this value is set
automatically when needed.

Sets the surface’s type.

http://developer.android.com/reference/android/view/SurfaceHolder.html

It says it’s set automatically but, without it my video doesn’t play. What’s going on here? Is there something that replaces it? I’m having a time getting video to play correctly on Android.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T07:47:20+00:00Added an answer on May 30, 2026 at 7:47 am

    The trick is in knowing when it was deprecated, which is kind of hard to determine from my experience. The documentation is always current for the latest API available, but you are probably not running this app on the latest API, if I had to guess. So you still have to use this method (typically with PUSH_BUFFERS) to make it work on older platforms.

    EDIT: it was deprecated in Android 3.0, which the docs now reflect.
    So we can use it like following:

    if(Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB)
        getHolder().setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

void (int a[]) { a[5] = 3; // this is wrong? } Can I
at android.hardware.Camera.native_setParameters(Native Method) at android.hardware.Camera.setParameters(Camera.java:647) at com.CameraApp.Preview.surfaceChanged(Preview.java:67) at android.view.SurfaceView.updateWindow(SurfaceView.java:538) at android.view.SurfaceView.dispatchDraw(SurfaceView.java:339) at android.view.ViewGroup.drawChild(ViewGroup.java:1638) at
This is the oncreate from my application. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
package com.ewebapps; import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; import android.view.View; public class Dot extends
void addNewNode (struct node *head, int n) { struct node* temp = (struct node*)
void some_func(int param = get_default_param_value());
void foo(void **Pointer); int main () { int *IntPtr; foo(&((void*)IntPtr)); } Why do I
void FileManager::CloseFile(File * const file) { for (int i = 0; i < MAX_OPEN_FILES;
- (void)applicationDidFinishLaunching:(UIApplication *)application { // Create the navigation and view controllers RootViewController *rootViewController =
So I'm trying to build a tabs view for an Android app, and for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.