How to get the texture of the attached skp file?

I exported the attached skp file as obj format, I found there is a texture file named Ekran_Resmi_2016_07_28_20_51_46.png. but when I write code to get this texture, I got nothing about texture. The code is just like,

SUUVHelperRef   uv_helper = SU_INVALID;
SUMaterialRef materialRef = SU_INVALID;
SUTextureRef textureRef = SU_INVALID;
bool    hasFrontTexture = false, hasBackTexture = false;

if (SU_ERROR_NONE == SUFaceGetFrontMaterial (pFace, &materialRef) && materialRef.ptr)
    hasFrontTexture = SUMaterialGetTexture(materialRef, &textureRef) == SU_ERROR_NONE;
if (SU_ERROR_NONE == SUFaceGetBackMaterial (pFace, &materialRef) && materialRef.ptr)
    hasBackTexture = SUMaterialGetTexture(materialRef, &textureRef) == SU_ERROR_NONE;

bool    isTexture = (hasFrontTexture | hasBackTexture) | (0 != textureHandle);

if (isTexture)
    SUFaceGetUVHelper (pFace, hasFrontTexture, hasBackTexture, m_pTextureWriter, &uv_helper);

There is neither front nor back texture. How could I get the texture with SketchUp API?
simple.skp (3.0 MB)

The material is applied to a component, and the face only inherits it from it’s parents. As you traverse the model you need to keep track of the materials of the parent instance in order to resolve the material for the face.

I exported simple.skp to xml. Please find the attachment.
simple.xml.txt (3.3 MB)
I found that the texture file Ekran_Resmi_2016_07_28_20_51_46.png didn’t attach to any face. Would you please tell me how the texture apply to the faces of the mesh? Which API’s we could use? Thanks!

As you traverse the model, you need to keep track of the parent groups/components transformation and materials. If the group/component have a material then you need to downcast it to a drawing element and then keep track of the material. (SUDrawingElementGetMaterial). When you encounter a face with no material applied it’ll be using the material of the closest parent group/component.