GDK picture intent gets stuck on Tap to accept - google-glass

Today the picture function on my Glass app stopped working. It was fine yesterday, but now it gets stuck on the Tap to Accept Picture. I think it may have something to do with the new (to me at least) way it handles pictures as well as the viewfinder. What I can find on the glass developers site is deprecated and doesn't work. My hope/belief is that the new idea is for the intent to go to the viewfinder and then take the picture. I'd prefer to still use the glass method, but I am aware of the android API camera method. Here's the code
startActivityForResult(new Intent(MediaStore.ACTION_IMAGE_CAPTURE), REQUEST_PIC);
and in onActivityResult
switch(requestCode)
{
case REQUEST_PIC:
String picturePath = data.getStringExtra(Intents.EXTRA_PICTURE_FILE_PATH);
processPictureWhenReady(picturePath);
break;
}

I have got the same problem since upgraded to XE18.3. Instead of spending time to look for a workaround, I've implemented the preview mode with SurfaceView. You could access the camera directly with Camera.Open(), the sample codes can be found at: (search for "camerasample.zip" in the page)
https://code.google.com/p/google-glass-api/issues/detail?id=351
Hope this helps.

This is a problem being experienced after the XE18.3 update. It has been logged in the google-glass-api issue tracker here.
You can try downgrading the firmware as mentioned in the comments, but be sure to note that doing that voids your warranty.

I have the same issue happening to me as well, however if you plug Glass into your computer that is running Eclipse and the adb is running the Intent will complete successfully. This is not a solution but hopefully it'll keep you from getting behind in work until there is an answer available.

Related

Can't use the Virtual Stick even though isVirtualStickControlModeAvailable returns true

I am having a problem with the virtual sticks, the following is the problem.
The Virtual sticks fire the notification, the listener sends the proper values to the roll, pitch, yaw and throttle, the isVirtualStickControlModeAvailable method from the sdk returns true, when it returns true I use the command from the flight controller send which returns the completion error nil, which means I can not do anything else from there, actually I do not need to do anything else. The virtual Sticks are working in a timer as the sample simulator from DJI.
What can I do in my app?
- Take off
- Land
- Give control back and forward to the RC
None of the list above brings me errors, including the process of the virtualStick.
What else did I try?
- Run the sample simulator app from DJI, linked above.
- Run the sample app on Android
- Run using the Bridge APP (Thats how i know the values are being passed correctly, even though i added labels on screen to debug without the Bridge APP)
- Update firmware from the aircraft and RC to the latest
- Sample simulator IOS
- Went back to previous working commits and branches on git
None of the things I have tried above worked.
Curious Stuf:
- The virtual Sticks worked fine till Yesterday, and before yesterday, in many diferent branches and commits in multiple branches.
- Reseting the Remote control, Executing Manual Linking and Linking through the DJI Official APP, and clearing the cache, memory sdcard made it work on Simulator Assistent DJI (Latest version) with a lot of interference, in the Sample apps on Android and IOS, and on my Swift 3 application. Then it had some interference, I tested outside on the real Aircraft, it was working beautifully.
- Today, the same thing happens. Already did the whole testing above mentioned, the Android sample apps, IOS Sample Apps, the Simulator, Bridge, My application, Reset remote etc. And it does not work.
I would be really glad if someone could point me out the problem.
On this thread I explain partially the problem and what I have tried. http://forum.dev.dji.com/forum.php?mod=viewthread&tid=32729
Already sent an email to DJI support, still no answer.
Aircraft: Phanton 4.
I have found the problem, it was the aircraft, I could get hands in a new aircraft, just pluged to the new RC linked to the new Aircraft, it worked with no problem.
Then I tested the new RC linking to the old aircraft, It did not work, then the Old RC with linked to the new Aircraft, it worked.
Glad you found the fix.
It might be worth it to update the firmware of the old aircraft.
You can do so using the DJIGo app or DJI Assistant software for desktop.

DroneKit mission not sent to drone

I'm trying to create simple mission using Drone-Kit android.
Mission myMission = new Mission();
myMission.clear();
Takeoff to = new Takeoff();
ReturnToLaunch rtl = new ReturnToLaunch();
//set Altitude in meters
rtl.setReturnAltitude(2);
to.setTakeoffAltitude(2);
myMission.addMissionItem(to);
myMission.addMissionItem(rtl);
MissionApi.getApi(this.drone).setMission(myMission,true);
The problem is that sometimes it works, and sometimes it's doesn't...
I don't know why it not working... I'm not getting any errors in the code.
I'm listening to the
AttributeEvent.MISSION_UPDATED
AttributeEvent.MISSION_SENT
AttributeEvent.MISSION_RECEIVED
but only the AttributeEvent.MISSION_UPDATED is fired when I run the code.
And even if its fired, this doesn't mean that the mission updated correctly.
I'm checking the mission with Mission Planer.
I just don't understand why it is working sometimes and sometimes not.
I did make sure that the drone connected to the app.
Also I made sure that the drone is OK and arm-able.
I really stuck here... and any help will be appreciated.
I have not tried dronekit-android before but I think it is better to open an issue here.
The source code for android project has not been updated for more than two years!
In general,there is a protocol to upload/download a mission. It is not easy to implement but you can implement it. I did that in c++. You should always check the acknowledgment from the drone before going in the next step. Check the protocol here.
I will answer my question, in case someone have the same problem.
I have contacted the developers, and it seems that I'm not the only one who have this BUG.
It seems that when you add ReturnToLaunch to Mission something happening in the API and the mission is not sent to the drone. As soon as I removed ReturnToLaunch object from the Mission all worked properly.
Work-Around: To overcome the issue, I am putting the drone in RTL mode, when the Mission is done.

Qt Console with Bash

I am writing a program using the Qt framework. I would like the user to be able to have access to a console/terminal from within the application itself.
In other words, the user should be greeted with a "BASH" prompt when they start the program.
I have looked into QTermWidget, but there doesn't seem to be too much documentation on it and it doesn't seem to be up to date either.
I've looked at QConsole, but it only seems to be able to run TCL/Python consoles.
How would I be able to embed a terminal into my application?
There is really not much tutorial needed for QTermWidget, although there is one here.
The purpose of the widget is that it does not require any complication. The code would be something like this without the extra settings:
QTermWidget *console = new QTermWidget();
QMainWindow *mainWindow = new QMainWindow();
mainWindow->setCentralWidget(console);
It is also not necessarily true that it is not up-to-date. It was recently updated to build against Qt 5 properly. If you lack anything, please use the issue tracker on github.
It should be more or less in mature and "complete" state, that is why you may not see heavy progress. It is just a widget after all, not a big framework.
You could try QProcess. This is not strictly "embedding" a terminal in your app, but it it really easy to use, you can kick off a terminal that is owned by your app. You can even connect (with signals / slots) to its output and interact with it in a limited fashion... depends on what you need.
Here is the doc with some simple examples: http://qt-project.org/doc/qt-5/QProcess.html
I am not at my Qt-PC today so I don't have an "interacting" example for you, but if you think this is a way for you to go then I can dig that out...

Qt Creator Performance Problems

Everyone's raved about how awesome Qt is and I would really love to use it. However, after downloading it and trying to build a little Hello World app, the performance of the Qt Creator slogged to the point of being unusable.
The main problem is when I switch from "Edit" (code-view) to "Design" (form-view), it takes roughly 30-45 seconds for the form to draw every single time I do this. Here is a video of this happening.
Hitting CTRL-R to run my application takes 30-45 seconds to display my application.
If anyone has had these issues, please post a suggestion! I would really love to use Qt.
UPDATE: After closing Qt Creator, I notice that Hg Workbench (Mercurial) takes between 1-2 minutes to open (where it's regularly instant).
I'd suggest you to run the application i.e., qtcreator from a command prompt. Since qDebug will be printing out crucial information about the actions going on, you might have a chance to understand what exactly is causing the slowdown.
Just in case., try the new QtCreator2.5.1 which runs well. Even if this doesn't work, probably there should be something wrong with the OS. Check for any programs that are running in the background which can be choking on the processor.

QML Qt openUrlExternally

I've just discovered strange behavior when using this code
Qt.openUrlExternally(someurl);
I would like to let my users open facebook sharer url,
but I cannot use this code, as it does nothing.
Tested on S60 5th and Symbian^3 devices (C5, C7, 5230, N8)
So please tell me (if you know)
1) Is there any BUG about this component/behavior ? (I searched and didn't found anything)
2) How can i make C++ component to do the same thing ?` (If it is solution)
Thanks
Edit
I found example for creating C++ components with methods accessible to QML, right here: http://doc.qt.io/qt-4.8/qt-declarative-cppextensions-referenceexamples-methods-example.html
Final Edit
Discussion led to making a bug report, could be found on : https://bugreports.qt.io/browse/QTBUG-19201
Thanks everybody
Qt.openUrlExternally("http://www.stackoverflow.com/"); opens the native browser for me.
The only problem I have found with it is, if the browser is already running on the handset (in the background), it will not be brought in to the foreground, and therefore looks as though it has had no effect.
Try adding this to your .pro file
# Needed for bringing browser from background to foreground using QDesktopServices: https://bugreports.qt.io/browse/QTBUG-8336
TARGET.CAPABILITY += SwEvent
And it should bring the browser to the foreground.