iPad Camera Connection kit? - cocoa-touch

Does anyone know if it is possible to access the iPad's camera connection kit? I would like to read the files off the connected mass storage device. Would this be possible or is this something that only Apple can do in their apps.
Thanks

I know this is an old question, but google brought me here so I thought I'd add this link for the next person to come along.
The good news is this. USB drives do mount properly and show up in the system as /dev/disk2s1. Yay. You can even add more drives via a hub. The iPad supports both FAT and HFS+ drives.
The bad news is this. As iPhone developer Dustin Howett discovered,
that mount point is sandboxed away from normal developer use. You
cannot read from or write to that disk using standard iPhone SDK
applications.

Related

Android Emulator connect external storage Device while running

I have an App that needs to detect, if a USB Storage device is getting mounted. Can i simulate the mounting of an USB Storage Device while the Emulator is already running? This way i can debug the behavior of my app.
As i know, for registering the mounting and unmounting of the USB Storage Device i can use the StorageVolumeCallback(). What do i have to do to write a simple .txt File to that attached USB Storage Device?
Im having trubble to create a StorageManager inside my ViewModel because i do not have access to the Context.
Im thankful for any Tipp related to USB Storage Management at all.
Info:
API Version: 31
IDE: Android Studio
Language: Kotlin
Edit:
So i do not necessarily need to have a external usb drive mounted at startup. If its possible with adb it would be great if i could just forward a usb Pendrive to the running emulator when i need it. Something like adb connectUsbDevice -deviceid=****,vendorid=***
There isn't a .NET library I'm aware of which can do this. However, please refer to this post where the brilliant answer shows how to do this interfacing with the Win 32 API.
How do I disable a system device programmatically?
You'll need a combination of this, and a WMI query to find an attached PnP device of type storage. As a clue:
using (var searcher = new ManagementObjectSearcher(#"SELECT * FROM Win32_USBHub"))
{
collection = searcher.Get();
}
Change Win32_USBHub to the correct class if this isn't giving you what you're looking for.
EDIT: Be warned. If you're disabling storage devices, make sure they're not in use. That's what the "Safely remove USB" option is for in Windows.
Another option, if you don't need to emulate this in code, use a real USB storage device inserted in the system and use PowerShell to get, disable, and enable the device.
The Cmdlets you'll need are:
Get-PnpDevice
Disable-PnpDevice
Enable-PnpDevice

How to detect a docked device in cocoa

I've been searching all over the web and have found solutions to mounted device detection from within a Cocoa App using the NSWorkspace notification system. However this notification doesn't seem to be triggered when an Apple device is docked.
I specifically want my OSX App to detect docked iPads/iPhones, be able asses whether the iOS version of my App is installed and then synchronise files. I realise that the easiest way to do this is using iCloud, but I do not as yet have a developer membership with Apple and would like the option to be able to synchronise files without the internet.
An iTunes like system would be ideal. Any ideas.
Thanks in advance.
Apple don't provide any official APIs for doing what you ask.
Unofficially, you can try the stuff here: https://bitbucket.org/tristero/ipodaccessframework
You can definitely use it to determine whether a particular app is installed (by looking for a match for its bundle-id) and you can read/write files to/fro a particular apps document directory.
Disclaimer: this one is mine. There are definitely other libraries around that achieve similar results.

Accessing iPhone data from a Mac OS X application?

Is there a class library or an Objective-C framework which could permit me to access my iPhone data from a Mac OS X application?
For example, if I develop an application to edit pictures, I would like access to my iPhone pictures from this application without using iTunes. I connect my iPhone as USB device and pictures are displayed into the application.
Apple doesn't support this mode for (recent) iDevices. There are some apps (mainly on Windows) which can sort of do this kind of thing, but I don't think you're going to find any libraries to make it simple. You may want to check the jailbreaking sites. They might provide better information.

Making a sencha touch app work offline?

I've tried using the download from the sencha website
http://www.sencha.com/learn/Tutorial:Taking_Sencha_Touch_Apps_Offline
when uploaded to my server and viewed on my ipad offline the app just says you need to be connected to the internet or words to that effect. Any ideas how to fix this or does anybody have a working offline example?
Not strictly related to the point, but you could take a look at PhoneGap (http://www.phonegap.com/) if you're looking for a more complete offline solution, at the price of a higher complexity and app store issues.
I found it quite well done and it offers a greater flexibility wrt offline storage and native access.

Newbie question on Flash video players, products/SDKs, and API

I'm a C programmer and a total newbie to Flash/video/web world. Don't know where/how to start, and so would greatly appreciate your initial help.
Question
If I need to host flash videos off of my website (instead of embedding YouTube links on my webpages),
AND
If I need to provide player API like YouTube's that can be used, say, for supporting chromeless player versions customizable via this custom API of mine...
THEN
What do I need to do essentially...?
Write a custom Flash video player?
If yes, how? I mean, using which Adobe products / tools / SDKs / language(s)?
Is there anything free/opensource available for doing this? Especially, for Linux platform?
Write a new browser (firefox) plugin for users visiting my site?
Not sure how my custom Flash video player will get to the user visiting my site for the first time?
Any books, resources that cover this problem well?
Does the Flash content need to hosted off of a Windows server only?
Currently lost. Thanks in advance,
/SD
Flash has video playback support built-in, so all you need to do is use the Flash authoring environment or Flex to compile a .SWF file that uses the video API, with some buttons to stop and start the stream, volume, seeking, anything else you want your player to do.
Many people have already done this for you, in a way you can easily use from simple HTML. See eg. OSFLV, Flowplayer, JW...
Write a new browser (firefox) plugin for users visiting my site? Does the Flash content need to hosted off of a Windows server only?
Lord no! Flash video would never have taken off if it was just another custom-server+custom-plugin piece of unpleasantness. Though special streaming servers are possible, for the most part it's just an FLV file sitting on a web server.
(FLV is the video format supported by the Flash video playing functions. There are many, many tools you can use to convert other formats to it; I use Avidemux.)
If you are planning to use a "Progressive Download" approach, then your FLV files can be hosted on a Windows or a Linux box. Be aware that:
it is no as efficient as true
streaming.
you may not use it for live events
nor only for stored video files.
it cannot automatically detect the
end user's connection speed.
it is not possible to jump ahead to
another part while it's downloaded.
the video file will be saved on the
end user's computer.
If you are planning to use a "Streaming" approach then you can either buy and use Adobe's solution (Flash Media Server, available on both Windows and Linux box) or sign up for a hosted solution. On this page you will find recommended providers by Adobe. I personally have been using Influxis's hosting with success for a couple of years already.
You can also write your own streaming server but that would be a lot of hard work. If you are interested in that, I would recommend you have a look a Red5 which is an open source Flash Server written in Java.