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

  • SEARCH
  • Home
  • 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 9169309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:51:05+00:00 2026-06-17T15:51:05+00:00

I built a camera app. My problem is that I want to continue the

  • 0

I built a camera app. My problem is that I want to continue the logical naming the default camera app uses.

EG: The camera app produces files such as:

IMG_20130104_033852
IMG_20130104_033853

If these are the only contents of my /camera folder, I should theoretically name my photo IMG_20130104_033854. Should I look for the image with the “biggest” name and add a number or is there a better solution for this problem?

  • 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-06-17T15:51:07+00:00Added an answer on June 17, 2026 at 3:51 pm

    I would suggest building the name up until the point you get to the last sequence of numbers, and then you could look for the biggest number and add one to it if you feel like it.

    So for instance, based off of today’s date, you could build the IMG_20130121_ part. You could do File [] fList = f.listFiles();, where f is pointing to the /camera/ directory. From there, you could check the files by doing fileName.startsWith("IMG_20130121_") in an IF statement.
    From there, do a substring to grab the string-numbers after the last underscore (_), convert to Integer, and loop through until you finish comparing all the Integers.

    I did this for folder names. A standalone cd burning device creates folders that start with ezb_, followed by a number. I can paste my looping code tomorrow if this info wasn’t enough.

    As a sidenote, if you were to start your own naming algorithm after IMG_20130121_, like adding an s or something, you’d still have to either keep track or look for the biggest number. You might as well just implement something like what I tried to explain. Let me know if I need to clarify!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've written an app that uses some of the user's camera roll images, and
I have built a custom camera app that saves pictures to a specific folder
I am building an Android app that uses the phone's camera feature. I know
I'm currently developing an app which uses the built-in Camera. I call this snippet
I want to ask whether the built-in camera to take photos and change the
I built a linear layout inside of a dialog , the problem here that
I am trying to create an app that makes use of the camera on
I have some app ideas that I want to release for free (with ads).
I have recently built an application that shows you a camera preview on screen.
I've been making an app that makes use of the camera using phonegap. When

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.