GPRS on iPhone Simulator - cocoa-touch

I want to activate/enable GPRS on the iPhone programmatically. What are the APIs I can look into? There is no "Network" option in the settings application on the simulator so do I need to test out the application on the device itself?

Using the SDK, you can't "activate" any sort of network access. Simply try to connect to the remote server.
If the device can connect, it will. If it cannot, you need to detect this and display a warning to the user.
Apple's sample code has plenty of examples on how to detect if a network is active.

The Simulator always connects through the host Mac's internet connection. If you are asking how to test GPRS performance on the simulator then you should buy a USB GPRS radio and test rhrough that. You could also use the built in ipfw to throttle network bandwidth to the simulator and simulate GPRS bandwidth (note that latency would still be that of your hows connection). Throttled provides an easier UI than bare ipfw: http://www.intrarts.com/throttled.html
As August says, you can't switch the network on and off from code however, you can test the connection and suggest the user goes and switches on the connection.
There is good sample code from Apple for testing the connection availability and type: http://developer.apple.com/iphone/library/samplecode/Reachability/index.html

Related

Bluetooth Low Energy device to trigger webservice call

I am looking for a software or easy to use library where I can connect to a BLE device (simple button, like key finder) that could trigger http request upon click.
I already have rest api available on my local network. I need to be able to call it from the device. It can be software for android or windows. Anyone has ideas?

React-Native simulate device is disconnected

Turning genymotion (or device) wifi causes app be unable to connect to app bundle and goes to show the red error in react-native. So how can I simulate app behavior when is disconnected from the internet (and also developing to have a good react (I mean it's not just about testing, also developing))?
There are only 4 states possible:
connected with good connection (have access to remote servers)
connected with poor connection (loss percentage is high)
connected with zero connection (have not access to remote servers - 100% loss)
not connected
Simulations way depends on which situation you need and where your app is running (device:iOS, Android?, simulator: mac, windows?)
On iOS you have Developer menu in the preferences and Network Link Conditioner in.
On Mac you can install Network link conditioner by this
I`m sure android has some tool for it.
Can`t say something about windows, sorry

Android tablet pc with a Nokia phone 3G data connection

This is technical question to check the possibilities of the scenario. Is it possible to use Nokia phone's (Lumia, N9, symbain phone, S40) 3G data connection with a Android tablet pc?
Or any way to use phone's 3G data connection with tablet pc?
I have a unlimited data connection for my phone. But I don't use it that much. So I'm planning to use it with the tablet pc.
yep its possible easily if :
1. your tab is rooted
2. your tab supports usb host mode or otg mode (you could either check it on net or download usb host diagnostics) (just click start diagnostic)
procedure
Downoad ppp widget
configure your apn according to pc suite settings
then plug in your phone via usb on nokia pc suite mode
now wait 10s and click connect
you are now done
(pls switch your wifi off as ppp widget creates virual wifi for your tab)
any inquiries contsct rld0989#gmail.com (don't be rest less I only check my gmail once a day)
Yes, it's possible to use your phone as a modem, connected to the tablet via a USB cable, as long as you have
(1) an APN from your network operator to make a data connection via their network, and
(2) suitable device drivers for the phone. On Windows, smartphones are plug and play, but I don't have any experience using them with Android.
On the tablet, you also need some software to control the modem - something like the Mobile Broadband Connect 3.0 application listed on here
You can write a simple connection app yourself using the Android Telephony Manager.
Alternatively, you could connect manually, using AT commands with a suitable AT command program (in Windows, it would be Hyperterminal). This thread describes a possible equivalent for Android.
Standard AT commands to make a data connection are described in the 3gpp TS27.007 specification.
There are a lot of variations for different manufacturers, but making a simple connect should be possible using the standard commands.

Can my iphone app communicate with a connected computer?

Preferably, this would be a computer connected via cable, but if there's a way to do it over wifi then this would also be useful. I'm wondering if it's possible to send messages between them?
Or if i had a mac app and an iPhone app, could I communicate between them over wifi or a usb connection, rather than using a server or something?
Connecting over WiFi is possible, cable connection however isn't possible (certainly not in the documented API) unless the phone is jailbroken.
For wifi you're just going to connect to a TCP/IP host/socket. Have a look at CocoaAsyncSocket. The computer would need to be hosting some sort of server software. This is how iTunes Remote and AirMouse work.
There are some "permitted" (non-cracked phone) ways to send data to the iPhone from a device that's physically plugged in. There are several barcode readers - like the Linēa-pro used in US Apple stores - and magstripe readers for credit cards (e.g., the Macally Quikswipe) that can send limited amounts of data to/from the iPhone.
If your computer is a small embedded device and your data requirements are meager, it may be possible.

How to detect that Symbian phone is being used as a modem?

I have a Nokia Symbian Series 60 3rd edition phone. I can use it as a GPRS / 3G modem either using Bluetooth, USB or IR.
Is there a way to programmatically detect when the phone is being used as a modem?
Please note I don't want to detect when a GPRS / 3G connection comes up (such as when you use the phone browser), but when a GPRS / 3G connection comes up that is the result of the phone being used as tethered modem via BT / IR / USB.
So the user has set up a dial up networking connection on their laptop, for instance, which uses the modem in the phone. They then launch that connection because they want to make a 3G wireless internet connection from their laptop via the phone. That's what I'd like to be able to detect from the phone.
I don't believe there's any public interface that you could use for this. You could probably use internal APIs to check what is creating the data connection, or more crudely check which processes are running when a data connection is created - probably quite easy to fool this method, depends why you want to know?
I can see network operators wanting to do this to block and/or charge extra for tethering usage. Easiest way to do that would be network side though, checking the browser UA header (also possible to fool, but not without harming your browsing experience a bit on the laptop).