SAN FRANCISCO – The next iPhone comes out June 24 and will have a higher-resolution screen, longer battery life and thinner design.

CEO Steve Jobs opened Apple Inc.’s annual conference for software developers Monday by demonstrating the iPhone 4, which will cost $199 or $299 in the United States with a two-year AT&T contract, depending on the capacity. The iPhone 3GS, which debuted last year, will still be available, for $99.

Some of the mystery surrounding Apple’s latest creation was punctured in April, when tech blog Gizmodo bought a lost iPhone prototype for $5,000 and posted pictures of the unit. Apple demanded it back, and authorities have been investigating whether a Gizmodo editor broke any laws.

“Stop me if you’ve already seen this,” Jobs said Monday as he started his demo.

The iPhone 4 is sleeker and more advanced than the original iPhone that came out in 2007. Like the iPhone 3GS, it comes in black or white, although it has a more angular look. Its front and back are covered with glass, and it is rimmed with stainless steel that acts as part of the phone’s antenna.

It is about three-eighths of an inch thick; the iPhone 3GS is nearly half an inch. It can shoot high-definition video, and has a gyroscope in addition to other sensors, to enable more advanced motion-sensing applications such as games and mapping services.

The display on the iPhone remains 3.5 inches diagonally, but it can show four times as many pixels — the individual colored dots that make up an image — as the previous screen.

One of the most noticeable changes is the iPhone’s new camera on the front that can be used for videoconferencing, in addition to a 5-megapixel camera and a flash on the back.

For now, the videoconferencing function, FaceTime, works only if both parties to the call have an iPhone 4 and are connected over Wi-Fi rather than a cell phone network. Jobs indicated that FaceTime will eventually work over cellular networks, saying Apple needs to “work a little bit” with wireless providers to make it “ready for the future.”

The battery on the new iPhone will allow up to seven hours of talk time — an improvement over five hours on the last model.

The new phone will run the latest version of Apple’s mobile software, now called iOS4, which Apple unveiled in April to offer features such as the ability to operate more than one program at a time. Older iPhones and iPod Touch devices will be able to get iOS4 as a free download June 21, although not all features will work on them.

Apple is trying to tighten the links between the iPhone and its iPad tablet, which came out April 3. It is releasing a version of its iBooks e-reading application for the iPhone, which means people could buy an e-book from Apple on either device and read it on either one as well.

Michael Gartenberg, a partner at analyst firm Altimeter Group, said the iPhone upgrade puts pressure on smart-phone makers that use Google’s Android operating software. Android has gained popularity as major phone makers such as Motorola Inc. have relied on the software for iPhone rivals such as the Droid.

“I think Apple knows how to teach people about things they don’t yet know they want,” he said.