Giter VIP home page Giter VIP logo

pmcademo's Introduction

PMCADemo

An Android demo app for Sony cameras to test some features.

Installation

Install it here: sony-pmca.appspot.com/apps

Usage

  • The trash button is mapped to the back key
  • The app writes a log to the SD card (PMCADEMO/LOG.TXT)

The following options are available:

Camera

Displays the live view image and allows you to take a picture. The last settings are used. Mode dial changes are ignored.

  • Half-press the shutter button to focus
  • Fully press the shutter button to take a picture (it is saved on your SD card just as if you had taken it outside of Android)
  • Press the trash button to exit

Key events

Displays key events.

  • Press any key or disconnect the lens to log it on the screen
  • Press the trash button to exit

Properties

Displays some camera properties (Model, serial number, etc.)

  • Press the trash button to exit

Time

Displays the current time. The camera time zone is used.

  • Press the trash button to exit

Internet

Connects to one of the configured wifi networks and displays a web browser. A simple web server is started, too. Open the displayed URL on any client in the same network.

  • Use the up / down / left / right and enter keys to use the browser
  • Press the trash button to exit

Wifi settings

Opens the standard wifi settings.

  • Press the menu button to exit

Wifi direct

Enables the camera's wifi direct network and starts a simple web server. Connect a client to the wifi and open the displayed URL. WPS is currently not supported.

  • Press the trash button to exit

Display

Logs changes of the active display.

  • Press the enter button or use the eyepiece sensor to change displays
  • Press the trash button to exit

LEDs

Test some camera LEDs. The charging LED doesn't seem to be supported.

  • Half-press the shutter button to turn on the AF light
  • Press the enter button to flash the card LED in different speeds
  • Press the trash button to exit

Playback

Displays the images on your SD card.

  • Use the up / down keys to select an image
  • Press the enter button to display it
  • Press the trash button to exit

Install

Install new apps from your SD card. All .spk files under [SD card]/PMCADEMO are listed. You can download apps in spk format here.

  • Use the up / down keys to select a package
  • Press the enter button to install it
  • Press the trash button to exit

The Framework

This app uses several Sony custom APIs. See OpenMemories: Framework for more information.

pmcademo's People

Contributors

ma1co avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pmcademo's Issues

Autoload app after camera reset

The apps distributed via the PlayMemories Store are loaded right after the camera is started and need to be killed explicitely.
The Demo app is not automatically loaded after powerup. Any idea what needs to be done to change that behaviour?

Compiling and finally installing PMCADemo

Hi,

I'd like to use PMCA Demo for my own application as template. Now I have a problem: I can download and install Apps that are ready and prepared. And, I managed to compile PMCADemo on my linux computer. However, I cannot install my own compiled program onto the camera. After fiddling around for a (long!) while, I found that the signing-procedure is probably the issue.

The error message that I always receive from the pmca-gui.py app was quite confusing:

Traceback (most recent call last):
  File "./pmca-gui.py", line 76, in do
    installCommand(None, None, f)
  File "/home/andy/SonyNex/Sony-PMCA-RE/pmca/commands/usb.py", line 224, in installCommand
    installApp(device, host, apkFile, appPackage, outFile)
  File "/home/andy/SonyNex/Sony-PMCA-RE/pmca/commands/usb.py", line 72, in installApp
    raise Exception('Communication error %d: %s' % (result.code, result.message))
Exception: Communication error 100: Error completed

In case I use the original PMCADemo.apk file, it works to install onto the camera. When I re-sign the original apk-file, then I get the same error message as above. Is there any special thing that I need to consider when signing the apk?

Any hints would be a great help.

A short comment on what I intend to do: I would like to write a script that allows me an accurate timing with many different shutter settings for photographing the solar eclipse in August in USA.

bluetooth?

does anyone know if Bluetooth classic or BLE functions work on device? Goal is to broadcast focus and zoom position -- on that topic, does anyone know how to get those?

a6300 firmware update error, iso miscalibrated, aperture blocked and does not renew automatic lens focus motors.

My camera has an update error, it does not recognize the motorized focus of the lenses, the iso is out of calibration (I mean, I need high iso numbers for the image to be seen) and it does not let me change the aperture of the diaphragm, I suspect it is the plate but what could it be? It is an a6300 and it is in the latest firmware version, when I try to reinstall the firmware the sony software tells me that the update was blocked because it is in the latest version

Some issues

Playback activity not displaying for my Nex 6. This change solves the crash but not displaying any text data

            if (thumbnailData != null) {
                thumbnail = BitmapFactory.decodeByteArray(thumbnailData, 0, thumbnailData.length);
                if (thumbnail != null) {
                    ((ScalingBitmapView) view.findViewById(R.id.imageView)).setImageBitmap(thumbnail);
                }
            }

LOG.TXT
if (info.hasThumbnail()) will probably do the same help. The cause is a video file but not an image.
Could not see led blinking or turning on and off for it.
Application constantly hanging. It looks like i have no a single problem spot. It could hang any time. Even on the main screen.
Sometime camera switched to camera live view mode without controls or indicators event after battery replacement.

Customized app installing error

I have the following error when I try to install a new app based on the PMCADemo.

Using drivers Windows-MSC, Windows-MTP
Looking for Sony devices
Querying MTP device
Sony Corporation ILCE-6500 is a camera in app install mode
Starting task
Starting communication
Uploading 0%
Uploading 100%
Downloading 100%
Installing 0%
Traceback (most recent call last):
File "C:\projects\sony-pmca-re\pmca-gui.py", line 77, in do
File "C:\projects\sony-pmca-re\pmca\commands\usb.py", line 256, in installCommand
File "C:\projects\sony-pmca-re\pmca\commands\usb.py", line 76, in installApp
Exception: Communication error 100: Error Completed

I've already had similar problems when installing another app (issue #42), the error code was the same (Communication error 100) BUT error lines were not the same . Last one was on line 76 in do ( pmca-gui.py) and line 224 in installCommand (usb.py). This time lines are different as you can see. AND , most importantly , I already tried the solutions that worked for me the last time:
The reason of the bug last time was a dupplicate appId, so I unistalled old apps with the same id and it worked. This time I tried that also and I changed the appId in my app too. Even with that is not working this time, so I think its a different error. I'm working with the v0.16 version. The camera is a Sony a6500

no response to any key

Hello,
In advance lets congrat you for this good job.
I did upload your demo to my nex6 camera, but after initialization it not responde to any camera keys functions...
I also downloaded some sony apps, check their code and some could be patched in easy way, however would be nice to test/debug before install it on camera.
Regards

Memory limitations

Hi,
I'm working on a simple app that communicates (sends POST requests) to a remote server in order to apply complex image effects. At the moment, APIs require an image to be base64 encoded and sent as a part of a JSON payload.

Everything works perfectly in emulator but on a real device - I get OutOfMemoryError. The code is pretty simple and seems to consume around 20mb (I did a few tests using the same emulator).

File image = new File("/mnt/sdcard/DCIM/" + info.getFolder() + "/" + info.getFilename());
FileInputStream inputStream = new FileInputStream(image);
int size = inputStream.available();
byte[] buffer = new byte[size]; // 4MB
inputStream.read(buffer);
inputStream.close();

String base64Data = Base64.encodeToString(buffer, 0, buffer.length, Base64.DEFAULT); // 15MB

Stack trace from a device (Sony A6000) :

[ERROR] java.lang.RuntimeException: An error occured while executing doInBackground()
java.lang.RuntimeException: An error occured while executing doInBackground()
	at android.os.AsyncTask$3.done(AsyncTask.java:200)
	at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
	at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
	at java.lang.Thread.run(Thread.java:1019)
Caused by: java.lang.OutOfMemoryError
	at android.util.Base64.encode(Base64.java:534)
	at android.util.Base64.encodeToString(Base64.java:477)
	at com.github.ma1co.pmcademo.app.ImageAsyncTask.doInBackground(ImageAsyncTask.java:42)
	at com.github.ma1co.pmcademo.app.ImageAsyncTask.doInBackground(ImageAsyncTask.java:13)
	at android.os.AsyncTask$2.call(AsyncTask.java:185)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
	... 4 more

The system itself seems to have around 82Mb of RAM available, so what could cause the issue? I'm pretty new to a mobile developent, but does Android has a limitation per activity\background task?

I'm using Android 4.04 for the emulator.

clean hdmi

when selecting "camera" to get a clean hdmi, the gray title bar with white "camera" text is still displayed

full screen

Thanks for your app !!! I have Nex 5r which is not supporting clean hdmi output... but in PMCADemo app under Camera part I can get totaly clean hdmi output. Can you please remove Camera grey ''button'' on top of the camera preview and give us Nex 5r users totaly clean hdmi output. Please please.
Thank you very much !!!

Unable to compile sample

Could sombody help me with compilation?
I'm getting the following error during gradle build:

35 textView = (TextView) findViewById(R.id.logView);
36
37 wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
38 wifiDirectManager = (DirectManager) getSystemService(DirectManager.WIFI_DIRECT_SERVICE);

39
40 wifiStateReceiver = new BroadcastReceiver() {

SDK Problem

How can I create SDK 10 project in Android Studio Min SDK 14 is being created even though SDK 10 is installed.

Adding new functions to cameraActivity: FocusMagnification!

Hi,
Recently I am playing/testing this PMCADemo app and did some customization to "CameraActivity" in order to display current "Aperture, Iso and Shutterspeed" on top of surfaceView and get those controlled by dials with supported parameters. working great so far...
Other feature that would like to add is "manual focus maginification" and even checking camera functions for that, I cannot figure how would implement it to this app..
Question a) Which would be the best approach?? ..create a new layer on top of surfaceview and control the magnification or there is a simple use of the camera functions for that??
Question b) what about other information widgets like battery level,??
Thanks in advance

New name for PMCA open-source framework?

PMCA stands for PlayMemories Camera App

Sony might not like this project having the same name as the official app (confusion for consumers), and could send a C&D (cease and desist letter) to github

Could avoid this issue entirely by getting a new name (description could still be "xxx-name is an opensource framework that replicates Sony's PMCA, achieved via reverse-engineering Sony's PMCA framework)

Build framework as a 3rd-party lib

Pull the framework/ folder out, build it as a third party lib/jar

When other people write apps for PMCA, they'll just have to include that lib/jar in the build path, without having to copy the framework code.

(Optionally put that lib/jar in maven repository, so that it can be added as a maven/gradle/... dependency)

I can assist on this - Let me know if you want me to help

"marketplace" app (idea for future)

Currently, we need tethered-usb to install (maybe thru wifi as well?)

We should look at how/whether a (marketplace) app can download&install other apps. Can the app bypass the RSA/DSA key and simply execute the default android install function?(RSA/DSA key is same for all users?)

The marketplace app can simply be a QR code reader. The marketplace webpage can display a QR code (pointing to correct ?RSA/DSA-encrypted? spk/apk file) and install

That way, user doesn't have to scroll through a gigantic list of apps on the camera's marketplace app

Development status + Q's

How's it going? I see you've added more stuff to the demo app. How far are you from creating a more usable app?

Something that is missing is the ability to achieve bracked images in a continous faschion WITHOUT the camera dropping to 12-bit precision mode which it does for every continous modes for all Sony cameras available.

How hard/easy would it be to create a BASE + 1 EV, 2EV, 3EV, -1EV, -2EV, -3EV etc but do that in single shot mode (automatically) to prevent that 12-biit mode?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.