Few companies better understand the difficulties of doing business in Indonesia than BlackBerry maker Research In Motion.
The government has had the Canada-based company jumping through hoops for most of the past year, repeatedly threatening to shut down its services unless it met a list of demands not required of its competitors.
For RIM, trouble in Indonesia is particularly painful as the country is the world's fastest-growing major BlackBerry market, according to industry statistics.
Subscriptions are expected to almost double from five million to 9.7 million by 2015, RIM says, as sales elsewhere tumble.
Demand is driven by Indonesia's burgeoning middle class, drawn to the BlackBerry for affordable access to the Internet and widely used BlackBerry Messenger texting service.
Indonesia, Southeast Asia's most-populous nation of around 240 million people, is also the region's biggest economy and is forecast to have grown 6.5 percent in 2011.
Indonesians are some of the world's most active users of social network sites. Of 41 countries surveyed, it had the highest percentage of Internet users accessing Twitter in June 2010, or more than 20 percent of its 45 million online population, online research firm comScore said.
Other major smartphone markets, such as the United States, are cooling on the BlackBerry, turning instead to Appleâs iPhone and Googleâs Android device, pushing RIM shares down around 75 percent last year.
"Indonesia is a very important market for RIM," the firm's Asia-Pacific managing director Gregory Wade told AFP.
"We have millions of BlackBerry fans and subscribers throughout Indonesia. So itâs our belief that no one loves Indonesia more than RIM."
But the government has so far returned little of the affection.
Instead, it has antagonised the company in a long-running row that could put off other foreign investors eyeing a largely untapped mobile phone and Internet market.
The communications and information technology ministry has forced RIM to build dozens of customer service centres in Indonesia, block access to pornography on its devices and help law enforcement agencies intercept encrypted data shared on BlackBerrys.
In January, the ministry officially requested RIM build a network aggregator, or data centre, somewhere in the region to lower costs to Indonesian carriers that provide BlackBerry data services.
Locating the centre in Indonesia could have given the government greater access to potentially sensitive BlackBerry data, analysts said.
But RIM chose Singapore for the centre, prompting communications and information technology minister Tifatul Sembiring to warn laws would soon be crafted to force telecoms companies to set up base in Indonesia.
Sembiring denies the new rules are aimed specifically at RIM.
"If we pass the law, RIM will have to set up the centre in Indonesia. We may excuse smaller companies, but all large telecommunication companies will have to do the same," he told AFP.
Such threats are nothing new to RIM.
When the company announced it would open a new factory in Malaysia, Indonesia's industry minister recommended parliament slap an extra tax on "such goods" as the BlackBerry "so that people would choose to invest here instead."
"It's strange the government would treat RIM that way," said Rama Mamuaya of technology blog DailySocial.
"RIM invests a lot in training developers in Indonesia, so a lot of people are making money from designing BlackBerry apps.
"I donât blame any of these companies for not wanting to do business in Indonesia. Why would RIM want to open a factory or build infrastructure here after the government has made things so difficult?"
Tech companies are increasingly locating in Singapore, which topped the World Bank's survey on the ease of doing business for 2012. Indonesia slipped three rungs to 129, out of 183.
But the man who has perhaps learnt the toughest lessons on working in Indonesia is RIM's outgoing country president Andrew Cobham.
Cobham, who narrowly escaped a hotel bombing in 2009, was recently named a suspect by police after a BlackBerry promotional event in November descended into chaos.
Scores of BlackBerry fans were injured -- many knocked unconscious -- when 5,000 people surged through barriers at a Jakarta mall as a half-price sale on new phones began.
Exactly why the government has targeted RIM is unclear. Google is gaining ground in Indonesia with millions now using its Android phones, but it has managed to stay on the government's good side.
And it appears that RIM is also tiring of playing the ministry's punch bag.
"Above and beyond everything, we just ask that any regulations applied to us be applied to all smartphone manufacturers so we can continue to operate on a level playing field," Wade said.
"The country is a prime market where we want to invest and grow our business."