> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Use the camera

> Let players take a profile photo in PixelGames.

export const AiPrompt = ({children}) => {
  return <CodeBlock className="relative block font-sans whitespace-pre-wrap break-words">
      <div className="pr-7">
        {children}
      </div>
    </CodeBlock>;
};

export const cameraPrompt = "Let players set a profile photo for the leaderboard using their camera or photo library.";

<AiPrompt>
  {cameraPrompt}
</AiPrompt>

Adds a button on the player's profile that opens the camera or photo library, whichever they
prefer.

<Frame caption="The native action sheet for changing a PixelGames profile photo.">
  <img src="https://mintcdn.com/replit/WuaQIOfW5oxRlxex/images/pixelgames/mobile/native-action-sheet.png?fit=max&auto=format&n=WuaQIOfW5oxRlxex&q=85&s=776916fcff3a32b3415a6cccfd683310" alt="Native iOS action sheet with Take a photo, Choose from library, and Pick a pixel avatar options" data-path="images/pixelgames/mobile/native-action-sheet.png" width="1516" height="418" data-path="images/pixelgames/mobile/native-action-sheet.png" />
</Frame>

On iOS, the system prompt appears once. If declined, PixelGames can only ask again by sending
the player to **Settings → PixelGames → Camera**. On Android, the runtime permission dialog
can reappear on the next attempt, until the player checks "Don't ask again".

## What's next

<CardGroup cols={2}>
  <Card title="Access contacts" icon="address-book" href="/build/mobile-contacts">
    Let players see which friends are playing.
  </Card>

  <Card title="Store images in your mobile app" icon="image" href="/build/mobile-store-images">
    Save the photo in App Storage.
  </Card>
</CardGroup>

## Related

* [Use iOS native components](/build/mobile-native-components)
