How to access device settings on a Sony Ericsson mobile phone? - api

Edited on April 29th, content changed
Hello everyone,
I recently bought a Sony Ericsson mobile phone and I would like to add a missing feature myself. In fact I cannot actually disable Internet connection in an easy way when roaming, which cost me a lot of money last time I moved away ... So I would like to develop a little application that would just replace the actual Internet configuration with a fake configuration to avoid auto-connections.
So what I would like to know is how can I access programmatically to my phone settings? I know that Sony Ericsson provides a SDK to run Java applications on its customised JVM. So what I am actually looking for is to know if they extended the J2ME functionality to fit their devices requirements.
This is not well documented so I am asking this question with the hope that someone here already had experience with development targeted for Sony Ericsson devices.
Thanks.
NB: This is a Sony Ericsson Elm which is based on the Sony Ericsson OS with SE Java Platform 8.5.
Edit: I accepted QuickRecipesOnSymbianOS answer as it gave me a clue on the only feature that could have helped me, but which is unfornatunately missing. The Sony Ericsson Java Platform is the only API I could use to develop real programs on my phone. But the JP-8.5 does not implement the JSR-307 package which could help me in managing APN. Thanks everyone for your help.

Well, I hope you got the great Vivaz phone, not the Satio.
In order to learn about Symbian OS C++, first go to the Foundation website.
Relevant plug: the latest introduction to Symbian OS C++ in book form is Quick Recipes on Symbian OS
For now, you won't find a better way than Symbian OS C++ to manipulate your handset access points.
JavaME simply doesn't have the correct APIs for this, at least not until JSR-307 is implemented.
I believe Qt isn't integrated quite tightly enough just yet either but that should change soon enough. Keep an eye on it.
Extending the Symbian Python runtime to do what you want would require some Symbian OS C++ anyway.

Yes you will need to use Symbian C++ to modify the CommDB, which holds the list of connections. It is quite painful to work with it directly, but there are some utility classes that can help you out. Take a look at CApSelect, CApDataHandler and CApAccessPointItem, all in the developer library.
And yes, these will work on all modern Symbian handsets, independent of brand.

Note: My answer below assumed it was about a symbian device. Since it was actually a J2me device none of the below applies
The easiest way to achieve what you want to do is probably to just remove all the "destinations" when you want to prevent auto connections. Otherwise the device will test each destination in turn until it finds one that works.
You can also set up your destinations so that they are not allowed to be used automatically. This setting must be done individually for each destination.
You can also group your destinations and set one of the groups to the default. If you set the default to an empty group you should not get any automatic connections.
Note that I have not tested any of these methods myself. When I roam I turn off automatic updates in the apps that use them. Some apps can even detect when you are roaming and avoid auto connects.
There are S60 apps available that improves the connection management of vanilla S60, but I do not know if any of them can help you with your problem.
If you are dead set on doing the programming yourself you have to use the C++ SDK for Symbian S60 available from Forum Nokia. Java ME does not allow you to manipulate the destinations of the device.

The Elm device should have (I haven't verified this) the access point API originally designed by Nokia. Not sure whether you can use it for the purpose you want though. The J2me developer guidelines available from developer.sonyericsson.com should have all the information you need.

Related

Applying Non-Standard Power Assertions & Creating Virtual HIDs

I've got a big ask here, but I am hoping someone might be able to help me. If there's another site you think this should be posted on, please let me know.
I'm the developer of the free app Amphetamine for macOS and I'm hoping to add a new feature to the app - keeping a Mac awake while in closed-display (clamshell) mode while not having a keyboard/mouse/power adapter/display connected to the Mac. I get requests to add this feature on an almost daily basis.
I've been working on a solution (and it's mostly ready) which uses a non-App Store helper app that must be download and installed separately. I could still go with that solution, but I want to explore one more option before pushing the separate app solution out to the world.
An Amphetamine user tipped me off that another app, AntiSleep can keep a Mac awake while in closed-display mode, while not meeting Apple's requirements. I've tested this claim, and it's true. After doing a bit of digging into how AntiSleep might be accomplishing this, I've come up with 2 possible theories so far (though there may be more to it):
In addition to the standard power assertion types, it looks like AntiSleep is using (a) private framework(s) to apply non-standard power assertions. The following non-standard power assertion types are active when AntiSleep is keeping a Mac awake: DenySystemSleep, UserIsActive, RequiresDisplayAudio, & InternalPreventDisplaySleep. I haven't been able to find much information on these power assertion types beyond what appears in IOPMLibPrivate.h. I'm not familiar at all with using private frameworks, but I assume I could theoretically add the IOPMLibPrivate header file to a project and then create these power assertion types. I understand that would likely result in an App Store review rejection for Amphetamine, of course. What about non-App Store apps? Would Apple notarize an app using this? Beyond that, could someone help me confirm that the only way to apply these non-standard power assertions is to use a private framework?
I suspect that AntiSleep may also be creating a virtual keyboard and mouse. Certainly, the idea of creating a virtual keyboard and mouse to get around Apple's requirement of having a keyboard and mouse connected to the Mac when using closed-display mode is an intriguing idea. After doing some searching, I found foohid. However, I ran into all kinds of errors trying to add and use the foohid files in a test project. Would someone be willing to take a look at the foohid project and help me understand whether it is theoretically possible to include this functionality in an App Store compatible app? I'm not asking for code help with that (yet). I'd just like some help determining whether it might be possible to do.
Thank you in advance for taking a look.
Would Apple notarize an app using this?
I haven't seen any issues with notarising code that uses private APIs. Currently, Apple only seems to use notarisation for scanning for inclusion of known malware.
Would someone be willing to take a look at the foohid project and help me understand whether it is theoretically possible to include this functionality in an App Store compatible app?
Taking a quick glance at the code of that project, it's clear it implements a kernel extension (kext). Those are not allowed on the App Store.
However, since macOS 10.15 Catalina, there's a new way to write HID drivers, using DriverKit. The idea is that the APIs are very similar to the kernel APIs, although I suspect it'll be a rewrite of the kext as a DriverKit driver, rather than a simple port.
DriverKit drivers are permitted to be included in App Store apps.
I don't know if a DriverKit based HID driver will solve your specific power management issue.
If you go with a DriverKit solution, this will only work on 10.15+.
I suspect that AntiSleep may also be creating a virtual keyboard and mouse.
I haven't looked at AntiSleep, but I do know that in addition to writing an outright HID driver, it's possible to generate HID events using user space APIs such as IOHIDPostEvent(). I don't know if those are allowed on the App Store, but as far as I'm aware, IOKitLib is generally fine.
It's possible you might be able to implement your virtual input device using those.

Camera compatibility

I have an usb-camera with its drivers and dll with some functions to use this camera in my solutions. I want to use it in any wide-spread applications, to be able just to choose and use it in Skype, for instance. So. I want to develop something that will allow me to use this device as usual web-camera.
I've heard something about such technologies as "Upper-Level Filter Drivers" and "user-mode DirectShow source filter". Looks like it something that can help.
So the question is: what technologies exist for such tasks? What technology should I choose to solve my problem if I have no skills of driver development?
Skype still uses DirectShow for video capture and user mode filter will do the job. Still Skype makes certain unreasonable assumptions that limit compatible source filters, such as if the developers stopped development/testing as soon as they had their favorite USB cam working and ignoring all other devices users might possibly want to attach.
One of the options you were suggested (in Russian - 1, 2) was to develop a kernel mode driver so that your device is visible to apps through standard WDM Video Capture Filter. This is possible and would work, though in my opinion it is a huge overkill.
Fitting custom source filter is not easy because Skype does not like a debugger attached, however driver development is really a completely different story.
The Skype Forum link you refer to is clearly misleading. The poster complains that Skype update broke compatibility with video sources. And response from admin is about audio devices, and is irrelevant.

Rapid application development for Nokia E5 (Symbian S60 v3)

I often need simple personal apps on my phone and I'd like to make them. I know some programming (C++, Delphi, some Java, MATLAB, Visual Basic). I don't have any idea about where to start, what can I do, how the issue of "app signing" can impact on this.
One app should help to manage links between book pages, basically it has to handle a small database in which I can add books (title, ID) and linked pages (couples of numbers). The database must be obviously persistent.
The other app should let me program a number of time counters. I don't need persistence between app startups.
I tried Qt Creator, but let alone some problems about installation, it looks like it's made for S60 v5. I don't know where to start. I used to make small utilities for my computer in Delphi, which saved me much time; now that I have a small portable PC like the E5, it could be very useful to have, for example, a portable random number generator, or similar simple apps for personal use.
Someone please give me a kick-start!
Update: I've managed to make the timers application in J2ME, it took a week of investigation (1-2 hours a day)
I did software development for Symbian C++ for more then 6 years. I stopped it something like a year ago when Nokia declared that it is going to kill it. Symbian did not became never popular between application developers because it is EXTREMLY complicated to start developing on it. It will take long-long weeks, maybe months to get running something own for the first time. And that time maybe there will be no new Symbian devices sold... you better invest your time in something that has more future.
Qt is good, qt is MUCH easier to start with and the knowledge you gain you can use also for software development for desktop (Windows, OS-X, linux crossplatform) and other embedded (linux) devices. In one word it has some future.
Qt applications run also on 3.2 devices, just you will have to install the Qt runtime on your phone. You also don't have to use the latest SDK but 1.1.2, this has support for older platforms.
If you want to develop only for your own, you can create a "developer certificate" for free that you can use to sign your applications - they will install only on your phones (you have to specify the IMEI of the phone). You can find more info about signing at http://www.symbiansigned.com.
Take a look here: http://www.developer.nokia.com/Community/Wiki/Category:Symbian
There's a lot of information regarding development options available for S60.
I suggest you take a closer look at J2ME, reasons being:
J2ME is a mature & thriving language with a lot of documentation and examples available.
The midlets (apps) you produce can also be installed on S40 devices. S40 is currently the world's most widely used mobile phone platform.

What do I need to have to be ready to write a Compact Framework application communicating with GPS?

Simply I am asked to write an application for a smart device (smart cell phone), which will get the GPS coordinates from the device itself.
I have no smart device at all. And I am kind of lost among questions like how can I check if the device have a gps by using the code, if it has how can I obtain them in a "standard" way, do I need to be using frameworks like GeoFrameWork?
So, may somebody list the must or most required things I need to have ready?
Geoframeworks GPS.NET is free these days and it's pretty comprehensive so there's no point reinventing the wheel. It's also friendly to beginners which helps. I strongly recommend downloading it and playing with some of the sample apps. It's a bit tricky if you don't have a physical device to play around with but it does have GPS emulation classes that you can use.
All you need is a copy of VS2008 Pro with the Smart Device SDK installed.

Quickest way to build a simple Symbian app?

I have a Symbian 9.1 handset, Nokia E65, based on Nokia S60 series UI. I'd like to build a simple, full screen, graphic application. It should be able to display some text and pictures and have a basic interaction from the keyboard. That's for me only, not to be deployed.
Now, what do you think is the quickest and most painless way to have it done?
I have the following skills:
- HTML, PHP, ASP.net, JS
- ASP.net and C#, Silverlight
- Java, but mostly for networking, not UI
- Some C++
I have downloaded the Nokia IDE, but it is scary at first sight :)
Any tutorial or example are welcome!
Edit:
In particular, two questions:
is there a possibility to make a stand-alone flash application for that handset?
how about the QT mobile version?
For your device, definitely use Python for S60. It is much easier to start with than Symbian's C++ SDK and in case you ever need more low level functionality than python gives you, you can write small modules in c++ and use them in your Python program.
For a simple application like the one you are describing, Python will do just fine. You don't even need any of Nokia's IDEs / tools on the PC, you can just write the code in any text editor, copy it to the phone and test it live.
As others have mentioned, other options include:
Symbian C++ SDK : As you have discovered the tools and not the most intuitive to work with, development is not straight forward either.
Nokia's WRT : Using javascript/css/html, but it is not available for your phone.
Qt : Not available for your phone.
Java Me : Probably your second best option, your code will be slightly larger but more protable. The tools are not as straight forward as with Python, but definitely not as complicated as with Symbian.
If you think you may like to do some further development on the Symbian platform in future, I'd strongly suggest looking at Qt. Unfortunately, however, you can't use it on your E65, since Qt requires S60 3.1 or higher. (The E65 runs S60 3.0).
Since Qt coding in done in C++, you also have access to native platform APIs if required. For most apps however, the (considerably more user-friendly) Qt APIs provide all the functionality you need.
Depending on your background, the learning curve may be steeper than using Java or Python, but the pay-off is that you get access to a very powerful toolkit. And of course, as long as you use only Qt APIs, your app should be easily portable to other Qt platforms if necessary.
Go for Java ME.
All the things you list in your post is possible to do in Java.
The Symbian SDK for C++ can be downloaded here.
NSBasic is another option.
Kindness,
Dan
May I suggest Python? For newer Symbian handsets I'd recommend Web Runtime (WRT), but it is not supported on good old E65.
I'm obviously biased but I would suggest getting the 2D graphics example code from the "Quick Recipes On Symbian OS" book:
If you know HTML and JS already, you should be able to write a Web widget for your Symbian device pretty easily, using the tools available through Forum Nokia. More info here:
http://www.forum.nokia.com/Technology_Topics/Web_Technologies/Web_Runtime/
These widgets are standalone full screen applications that use the device WebKit browser engine for rendering and UI. You can also use keyboard inputs and customize the softkeys if you wish.