just wondering if anyone has managed physically to use an Android tablet to control an external screen via and HDMI cable. The Android tablet should have the Presentation APIs, so a version > 4.2m and an HDMI (or mini HDMI) port.
https://developer.android.com/reference/android/app/Presentation.html
So far we have tested with a tablet that has Android v5.1.1 and a mini HDMI port, but as soon as we connect the external monitor, the tablet monitor shuts off (but it is still responsive to touch) and all the output goes to the external monitor.
The tablet is a HannsPad Titan2 13.3 inches.
So we are still stuck on the physical setup. It this does not work at least with mirroring, how can we be expected to start tinkering with the presentation API?
So we are looking for confirmation from other coders that the setup is at least physically been done and tested at least once..
Thanks
W
as soon as we connect the external monitor, the tablet monitor shuts off (but it is still responsive to touch) and all the output goes to the external monitor
That was an incompatible and unfortunate choice made by your device manufacturer. The screen should remain on. You might rummage through Settings to see if there is a way to configure this behavior, or contact the device manufacturer for support.
The tablet is a HannsPad Titan2 13.3 inches.
Buy a better brand next time.
It this does not work at least with mirroring, how can we be expected to start tinkering with the presentation API?
Buy a different tablet. Note that (micro-)HDMI connectors seem to be less common, though some tablets might also support MHL or SlimPort.
Or, in Settings > Developer options, choose "Simulate secondary display" to give yourself a floating window that serves as a fake external display that Presentation can drive (except perhaps on Android O). For development purposes, this works for light testing.
So we are looking for confirmation from other coders that the setup is at least physically been done and tested at least once.
I have never used that tablet. However, the Presentation APIs work just fine. For example, I was just updating my CWAC-Presentation library yesterday, and part of that testing included trying my demo app on a Nexus 10 connected to a micro-projector via its micro-HDMI connector.
Related
After a user opens my application I don't want them to be able to get out. So when they press the home or back button it doesn't let them exit the app. I know there are ways using a service to keep the app always running in the background, but I don't even want them to even exit.
Is this even possible, if so how? Without having to hack the kernel.
I know this sounds odd, but it is not for a commercial app, but for my lab, it will never be on GooglePlay. The tablets will be given to little kids and they will take a test on it, so I can't have them using youtube or anything else.
Related post: Android, How to make the task of the app unclosable? Only closable by task killing
The answer by CommonWare seems to indicate that kernel hacking is the only way, but is it?
Also I am using Android L.
there is no official support yet - there will be support with android L via the Task locking API
The L Developer Preview introduces a new task locking API that lets
you temporarily restrict users from leaving your app or being
interrupted by notifications. This could be used, for example, if you
are developing an education app to support high stakes assessment
requirements on Android. Once your app activates this mode, users will
not be able to see notifications, access other apps, or return to the
Home screen, until your app exits the mode.
https://developer.android.com/preview/api-overview.html
EDIT: as you said you use L this got obsolete - but I leave it here as a hint for others
said that - you are also able to get this kind of work without root today if you have to ( e.g. kiosk mode app on a certain hardware ). It is not simple - and no solution that works for all devices - but if you need it you can get it work with tricks like:
- reacting on home-screen intent ( and setting it as default )
- when you go to background - bring your self foreground again
- ..
It seems google has some thing called COSU for setting up single-purpose devices
Android 5.0 Lollipop introduced two new ways to configure Android
devices for a single purpose:
With app pinning, the device user can temporarily pin specific apps to the screen.
With lock task mode, a user can’t escape the app and the Home and Recents buttons are hidden. Additionally, lock task mode gives the IT
administrator a more robust way to manage COSU devices, as discussed
below.
and
As an IT administrator, you can configure Android 6.0 Marshmallow and
later devices as corporate-owned, single-use (COSU) devices. These are
Android devices used for a single purpose, such as digital signage,
ticket printing, point of sale, or inventory management. To use
Android devices as COSU devices, you need to develop Android apps that
your customers can manage.
from here
and there is a code lab for it here
for earlier versions of android here i founded How-To Create a Working Kiosk Mode in Android which shows some hacks for disabling buttons and restarting the application after boot and lock. note that most of these hacks, don't work on android 6 and later
If an Android device were connected to a computer via USB charger, would it be possible to launch a java GUI on the computer from the device (i.e. by pressing a button in an android app)?
Also, would this be a platform dependency nightmare?
Possible yes, not easy though and there may be some platform issues.
You would already need to have something running on the destination computer which detected the message from Android and then launched the GUI.
In fact the simplest way to do that may be to ignore the USB and just do the whole thing over the network.
You can't just run arbitrary code on the computer by plugging the phone in though, if you think about it that would be a massive security hole!
Idea: create a remote control for your android phone.
Why: I like listening music on my phone in a dock station with speakers connected. Now sometimes I want to turn the volume up/down, change the song, etc. So I need to unlock the phone, locate app that is playing music (Music player, internet radio app, etc.). Sometimes I manage to undock the phone or just mess something up and generally this s*cks.
So I would like to control my phone (on a data connection, not wifi) from the laptop (on wifi).
I had investigated couple of approaches and would like to get some recommendations on them:
Use XMPP. This is nice as there a lots of free XMPP services I can use. Two libraries (both based on smack) that I tried work just fine (Flow aSmack port and Beem smack port). I could automatically create new user on device and present some id/password combination that I (user) would enter on a desktop side to link both devices.
Use JXTA. Should be the next real deal but could be an overkill. I would imagine running a rendezvous&relay server somewhere (need to get hosting to work around firewall/NAT) and creating a peer group protected with password. Use device unique id and password (withing group) to link to the desktop application. (A great eBook explaining p2p and JXTA can be downloaded from here).
Use C2DM. Could be the answer, but notification delivery sometimes can take more then couple of seconds to deliver and there would be no feedback mechanism.
So far first solutions looks like a lot easier choice. Create custom extension or just create chat between both endpoints and use that for relaying commands/messages. But I wonder if I would be abusing XMPP system?
JXTA sounds great, but from all the reading I done it is apparent that it is designed for group communication and service sharing and not a solution for connecting two endpoints.
What do you guys think? I welcome all suggestions too.
UPDATE I do not want to remote to a phone and interactively control it. I want to establish a connection (socket connection) between laptop and phone even if both of them are on different networks secured behind firewalls, routers. With this I could define a protocol to issue commands to the phone (lower volume, mute, start app, etc.).
UPDATE 2 I'm giving JXTA a shot. It is a nice solution but lack of documentation is a bit of a downer. Got VPS FreeBSD server to test RDV/relay side of things. I keep updating this question further as it may be helpful for others.
UPDATE 3 Some more reading:
How to make two android devices to communicate through TCP
Connection between two computers without opening ports using a third computer
UPDATE 4
So far I did not have enough time to further continue my project. I did find an interesting project. At the moment project owners are re-writing their library, you can track their progress here.
why do not you try installing VNC server on machine and then use VNC client on laptop to access mobile
Mobile Shell (Mosh) maybe just the tool you are looking for. I have been looking for a good project to use Mosh, your idea seems pretty interesting :)
Where I work we have several touchscreens next to each machine, press, laser, etc. I was wondering if it was smart/possible to take advantage of the android or the java me sdk's to perhaps use their advanced pointing gestures?
What are the touch screen currently running on? Most likely they are proprietary software. If they are running on Java or as a second display to a running PC, then you may be able to harness this. In the factory I worked at, all the screens were coded in embedded C - general standard for machine operating touch screens.
You may be out of luck - especially since the screens are not running Android.
My new project is to build an application to use the cell phone camera as the main camera from my PC.
How can I do this kind of stuff?
I thought of using bluetooth, but how my PC define the cell phone as the main camera?
Best reguards.
Depending on the camera phone and its features, you can do it. For my Bluetooth efforts, I've been using A7 hardware and a .NET library Blue Tools from Franson.
I've been able to:
pair devices in code
send/push images to the phone (probably the reverse would work, but I didn't try)
discover devices automagically
serial comm
network com
install as a network driver
Well on the Bluetooth side of things you might need a program running on you phone to forward the images. Or you might find that there's a Bluetooth program already running and providing that service, for instance the Bluetooth BASIC IMAGING PROFILE (BIP) (1) profile includes the usage scenario: "Use of a mobile phone to control the shutter of a digital still camera and immediately examine the result on the phone’s screen. In the present scenario, any other portable imaging device could play the role of the mobile phone."
So first you need to find if the phone supports BIP. You could for instance use the SdpBrowser sample application in my 32feet.NET .NET Bluetooth library to see what services the phone is advertising. Otherwise perhaps its documentation will tell you. You'd then have to find out whether the BIP service on your phone supports that scenario.
On the PC side you might need some driver level software to allow any application to use the remote camera. You might start by just allowing your own application alone to use the camera.