Supporting rotation sensors in Symbian across multiple devices in one executable - symbian

I'm puzzling my head as to how some application appear to support the couple of Rotational Sensor APIs for Symbian, specifically the Sensor API and the Sensor Framework (both the 5th ed. and the 3rd ed. FP2 backport).
For example, I believe that Gravity will support rotation in N95 and also newer models from the same binary (could be wrong there...).
If I use the Sensor Framework then my app will not install on an N95 (it gives me a System Error -1), whereas if I use the Sensor API (RRSensor) then it will only install on an N95 and no other phones. This is most likely due to the available libraries on those devices.
I am trying to find some way of abstracting things such that I can use exactly the same binary for all devices. The only alternative I can see is trying to use ECOM plugins and then installing the relevant library using conditionals in my PKG file.
Does anyone know of a better/easier way?

If you need to use different APIs, I suggest making multiple DLLs that implement the same interface and selectively install them to device depending on device ID. SIS files allow that.

Related

Minimal WebRTC for native application without audio and video

I am interested in designing a WebRTC/libjingle that uses DataChannels but does not use the audio and video capability. The audio and video capability adds a lot of dependencies that are large and difficult to cross compile. Is there a minimal subset of the WebRTC build that will separate out just the code necessary for initializing DTLS DataChannels with all the sdp/stun/turn etc while remaining compatible with the browser implementations?
AFAIK there is not such minimal, scaled-down, data-channel only version of libjingle (or OpenWebRTC for that matter). IMHO such a version looks just too project-specific and not general enough for the libjingle developers to be interested in it and maintain it.
The audio/video capabilites do add quite a lot of dependencies. However cross-compiling them for android or iOS is relatively easy. After all one just needs to compile them. There is no need for them to actually work. If one just uses the data channel then the audio/video capabilities will never even be initialized.
Although the audio/video capabilities cannot be completely compiled-out, they can be "curbed". If you look at the the webrtc-source-code/build/common.gypi you will find a variable called build_vp9 that is 1 by default. If you set it to 0 then some video related dependencies will be remove. In the .gyp and .gypi files there are a lot of flags and I am sure that if you tweak them then you'll be able to remove even more unnecessary dependencies.
If you're interested in building webrtc for Raspberry PI or other embedded platforms not based on Android or iOS I would suggest you use OpenWebRTC because it has much better support for these environments and is somewhat easier to cross-compile (you wouldn't have to deal with gyp and ninja).
This is what you need
http://www.meshcommander.com/webrtc
A minimal datachannel WebRTC implementation in c, needs openssl for dtls.
pros
extremely lite.
straight forward cross compilation
cons
no ice trickle support as of now

what is difference between PDK and SDK?

means sdk and pdk contains code or executable and libraries.
but what are the things which are present in one but not in other?
PDK = Product / Platform Development Kit.
SDK = Software Development Kit.
The PDK contains more or less everything which is needed for creating the firmware for a device: sources and/or binaries of OS components, and lots of tools...
The SDK contains a subset of these components, things which are required for creating software for an already existing device.
They are not precise technical terms and are probably used variably by marketing departments. You should not be selecting a product in whether it is called an PDK or SDK but rather on the functionality it provides.
What some may rather grandly refer to as an SDK or PDK others might perhaps more transparently simply refer to as a library. I would expect an SDK or PDK perhaps to include extensive documentation, examples, and support tools perhaps however.

unity platform for apps

I am considering making a small app for desktop pc's. I would mainly like to have support for mac and for ubuntu (linux) and I wouldn't mind support for windows as well. An easy way seems to develop an app using Unity, but it is more known to be an engine for games.
To my simple logic, there should be no reason why an app cannot be built with Unity. A platform that features the ability to create massive laser marine gunbattles should be capable of rending pretty buttons and a user interface. The plus side is that with unity you can port to all platforms that I would like this app to run on as well.
Am I making a bad assumption? Are there any people that have done such things? The app I would like to make might be open source, does the Unity platform limit me in any way here?
You are correct in your reasoning that it is possible to make a normal app with Unity, but this of course is not what Unity was intended for. It is geared towards rendering and updating scenes (including physics, game logic, etc.). If you do not need the notion of scenes in your app, then you will add additional complexity to your development and run-time overhead that you would not normally need.
Another drawback is that you will need to abide by Unity's licensing with your app which may or may not be an issue for you (https://store.unity3d.com - See links at the very bottom for other special licenses, such as for gambling).
Since you mentioned Unity specifically, it uses Mono for some of its run-time support across platforms. Perhaps you want to consider using just Mono and associated tools instead (http://www.mono-project.com).

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

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.

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.