Get the user's gps location in distriqt native maps ane on android - air-native-extension

I'm using the distriqt native maps ane (Adobe Air for mobile native extension)
Is it possible to get the user location (Latitude & Longitude) on android?
On iOS i'm using NativeMapEvent.USER_LOCATION_UPDATE to get it but this is not possible on android & can't use Adobe's GeolocationEvent.UPDATE since it's buggy & doesn't work all the times, sometimes you need to restart the device to make it work :s

Related

Copyright not available Nokia Location API (OVI Maps)

I have made a simple J2ME application using Location API to show maps on my application, when I run it on Nokia Mobile it is working fine but When I try to run it on Samsung mobile I got that error
Copyright not available
could anyone please help in that
I'm using the code in this tutorial
http://www.developer.nokia.com/Community/Wiki/How_to_calculate_and_show_a_route_with_Java_ME_Location_API
it is working fine in Nokia C2 but it is not working for any Samsung mobile and produce the previous error
The Nokia Maps API for Java has been designed to work on any Java ME device, without making it specific to Nokia phones. Given the wide range of Java ME phones out there it is likely you have come across some sort of unforseen compatibility issue. (Obviously the majority of testing has occurred on Nokia phones)
The "Copyright not available" message states in full that:
An error occurred while trying to download the copyrights.Please check
your internet settings.
The downloading of copyright information via http is the very first thing to be done when initialising a MapCanvas, since Nokia itself is obliged to display the copyrights on its maps where the map data has been bought in from third parties.
My guess is that either the Samsung device you are testing with is not correctly configured to connect to the Internet (maybe there is no SIM card?) or alternatively the Samsung firmware is misinterpreting the URL for downloading the copyrights as invalid.
The misinterpreted URL issue has also been observed using the Sun WTK, and the workaround (shown below) is to use the Map servers hosted in China for non-compliant SDKs as the URLs are formatted slightly differently and the devices are generally more forgiving.
// Due to an issue with the hostnames that are used it is not possible to use
// international maps at this stage on the WTK emulators. Most devices and the
// Nokia emulators do not suffer from this limitation.
if ("SunMicrosystems_wtk".equals(
System.getProperty("microedition.platform"))) {
ApplicationContext.getInstance().setChina(true);
}
Obviously you''l need to use the correct values for System.getProperty("microedition.platform") to get this to work.

External Accessory Framework EAAccessoryManager connectedAccessories returns only 1 accessory on iOS 4.2 when there should be more

Calling the connectedAccessories method on the EAAccessoryManager returns a list with only a single accessory (seemly randomly chosen from the available connected accessories in the Bluetooth screen) when running on iOS 4.2 using an iPhone 3GS.
In retrospect - on iOS 5.0 on an iPhone 4 the method returns the correct list of accessories (currently tested up to 2). According to the documentation iOS 4.0 should return a list of accessories however it fails to mention if this can contain more than one item. (Apparently in iOS 3.0 only one device WAS supported).
The EAAccessoryDidConnectNotification notification is also only fired once for the randomly chosen accessory when running on iOS 4.0; Disabling the accessory results in the appropriate EAAccessoryDidDisconnectNotificiation for that accessory. Re enabling the accessory doesn't result in any further notifications without returning to the bluetooth settings menu and re connecting the device (but that's another annoying issue). Visiting the bluetooth connection screen reveals the originally connected accessory no disconnected and my second accessory connected but further calls to the "connectedAccessories" method still returns an empty list.
Viewing the console logs from the phone I can see the bluetooth system connecting and monitoring both devices but somewhere along the line this isn't been presented via the External Accessory Framework.
If anyone has any helpful info on this issue that'd be great -- it seems there's only a small number of iOS developers that have even worked with this framework so finding anything other than copies of the original apple documentation is rather difficult :-D.
To summarise:
Is it possible to detect multiple accessories from iOS and connect and open sessions for multiple devices. I've found this is possible in iOS 5.0 on iPhone 4.
Many thanks,
Chris

Midlet doesnt respond to touch in older touch screen phone

I am very new to j2me. I have developed a basic SMS Banking app. My app works in most phones which are touch and non touch devices (Samsung duos, Monte, Nokia 6120c …, Sony Ericson w300). But when I installed it in a Samsung SGH-D980 it installs and starts fine. But the list element which is the first screen after my loading splash screen does not respond to the touch. I have developed the app using Net beans 7.0.1 and uses CLDC 1.0 and MIDP 2.0. I have tried the defaultfxtouchphone emulator and works fine on it too. My problem is why does it work on some touch phones but not in the above mentioned touch phone. thank you,
The fact that touch events are available to MIDlet at any other phones means nothing in your case.
MIDP specification (JSR 118) does not force implementation to make touch (pointer) events available to MIDlets even for touch device. According to data provided at club-java page, this is exactly the case for SGH-D980:
Touch screen or mouse (hasPointerEvents()) No
Stylus motion events (HasPointerMotionEvents()) No
As soon as device allows to work with your list in non-touch fashion (you wrote nothing that says it ain't so), there is no problem - you just have to live with that.
of course not passing touch events to MIDlets when these are available natively means that MIDP implementation on this device sucks. But that's a different story

Need Emulator (240x400 and 360x640) j2me

I developed the game in j2me. I need emulator for screen 240x400 touch and 360x640 touch. Where should i get ?
Download any of the manufacturers custom SDKs (SonyEricsson, Nokia, LG, Motorola )and find a device with your resolution
PS: It may be difficult as many of them moved to Android or other technologies

J2ME nokia s40 development

I am using S40 SDK to develop my application.My application requires to communicate with files stored on memory card.But I am helpless that how to put the files on memory card in SDK ?
I am using Eclipse IDE for developing application.
I believe <SDK installation directory>\bin\Storage\<instance identifier> is where the files are stored by the emulator.. Instance identifier is visible in the title area of the emulator application. It is a number that looks like a phone number.
You want to put files on the memory card within your application? You need to read about JSR75 FileConnection.
Check the following links to get more info:
FileConnection API
File Connection Using J2ME api JSR 75
Getting Started with the FileConnection APIs
One more info: Make sure your device supports the FileConnection API.

Resources