Quack-Ware.com Free Software & Tutorials

28Dec/110

GIFDroid – The Free Video to GIF Converter for Android

market.android.com GIFDroid is a free video to GIF converter. Record a video or select a video from the gallery and easily choose a video interval and individual frames. Features: - Convert videos on the fly or select previously created videos. - Choose specific video intervals - Adjust preferences such as frames per second, frame delay, and GIF dimensions. - Choose specific frames to create a perfect GIF - Built in sharing features to show your GIF to everyone! Created by QuackWare www.Quack-Ware.com

18Dec/112

Install Google Wallet on Samsung Galaxy Nexus (4.0.2) Stock NO ROOT

Well as I was browsing reddit I came across this thread which links to an xda-developers post giving a download link to an apk on how to install Google Wallet on a stock Samsung Galaxy Nexus Device. Right now the Google Wallet application is listed as incompatible in the Android Marketplace for my new Galaxy Nexus but using this method I was able to get it working (Installed correctly both on Wifi and 3G).I will give you my experience and instructions on how to install below.

1) Enable installing of apps from Unknown Sources (In the security section of settings)
2) Install some sort of app that enables you to install 3rd party apps on your phone (Not sure if this is needed, I used Astro File Manager for this task).
3) Download the .apk file to your phone here: http://www.megaupload.com/?d=GQ6YS0KM
4) Install the .apk file using whatever method you want.
5) Enjoy your Google Wallet and free $10

Note: I ran into a few problems (Google wallet has stopped error) which I simply fixed by force closing Google Wallet and then clearing the cache. Interestingly when I did this I had to "re-activate" my google account even though it was already activated with Google Wallet and I received another confirmation email. This is most likely some sort of bug.

After further testing, I uninstalled the Google Wallet .apk and reinstalled it. I also ended up having to get another $10 Google pre-paid card. I am not sure if this is a bug or if you spend your $10 and uninstall and reinstall you will have another $10. I have yet to actually purchase anything using the app but from reading other user responses I assume it works correctly.

Have fun!

11Oct/114

Include FFMpeg in Android and grab a frame from a 3gp video.

Thought I would write about the recent pain I experienced in trying to get FFMpeg into Android and subsequently grab a frame from a video. Hopefully this tutorial will help out a bunch of people, so anyway here we go.

 

The first thing you are going to want to get is JavaCV (Website here) and follow the EXACT instructions under "Quick Start for OpenCV"

 

If you followed the instructions you should have 2 jar files in your build path along with a large amount of .so files in your libs/armeabi folder. Now the class you are going to be looking at is called "FFMpegFrameGrabber" (Code here). Here is some sample code to give you a general idea of how to grab a frame from your video.

//Path is the path to your .3gp or whatever file on your sdcard
FrameGrabber f = new FFMpegFrameGrabber(path);
f.start();
IplImage _image = f.grab();
//We need to convert from 3 channels to 4 channels so that we can convert
//from IplImage to Bitmap
IplImage image = IplImage.create(return_image.width() ,return_image.height(),IPL_DEPTH_8U,4);
//source, dest, code
cvCvtColor(_image,image,CV_BGR2RGBA);
int width = image.width();
int height = image.height();
Bitmap b = Bitmap.createBitmap(width,height, Config.ARGB_8888);
//Make sure you use getByteBuffer()!
b.copyPixelsFromBuffer(image.getByteBuffer());
//MAKE SURE YOU DO NOT CALL stop() BEFORE YOU CREATE A BITMAP FROM IMAGE
f.stop();

You might see an error about cvCvtColor, in which case you need to add the following in your import statements:

import static com.googlecode.javacv.cpp.opencv_imgproc.*;

Now you can display your new bitmap in whichever way you want.

Tagged as: , , 4 Comments
6Aug/111

Some Trouble with Tabs

So while working on my most recent Android project CrowdSource (expect more information about how to download it and what it is later) I decided to implement some tabbing stuff to make the user interface better to deal with. Following a few tutorials online (developer.android.com) and (Custom Android Tabs) I kept encountering a very annoying force close whenever I would select another tab other then my starting one.

08-05 23:03:30.526: ERROR/AndroidRuntime(24650): FATAL EXCEPTION: main
08-05 23:03:30.526: ERROR/AndroidRuntime(24650): java.lang.NullPointerException
08-05 23:03:30.526: ERROR/AndroidRuntime(24650):     at android.widget.TabWidget.focusCurrentTab(TabWidget.java:367)
08-05 23:03:30.526: ERROR/AndroidRuntime(24650):     at android.widget.TabHost.setCurrentTab(TabHost.java:320)
08-05 23:03:30.526: ERROR/AndroidRuntime(24650):     at android.widget.TabHost$2.onTabSelectionChanged(TabHost.java:129)
08-05 23:03:30.526: ERROR/AndroidRuntime(24650):     at android.widget.TabWidget$TabClickListener.onClick(TabWidget.java:453)
08-05 23:03:30.526: ERROR/AndroidRuntime(24650):     at android.view.View.performClick(View.java:2408)
08-05 23:03:30.526: ERROR/AndroidRuntime(24650):     at android.view.View$PerformClick.run(View.java:8816)
08-05 23:03:30.526: ERROR/AndroidRuntime(24650):     at android.os.Handler.handleCallback(Handler.java:587)
08-05 23:03:30.526: ERROR/AndroidRuntime(24650):     at android.os.Handler.dispatchMessage(Handler.java:92)
08-05 23:03:30.526: ERROR/AndroidRuntime(24650):     at android.os.Looper.loop(Looper.java:123)
08-05 23:03:30.526: ERROR/AndroidRuntime(24650):     at android.app.ActivityThread.main(ActivityThread.java:4627)
08-05 23:03:30.526: ERROR/AndroidRuntime(24650):     at java.lang.reflect.Method.invokeNative(Native Method)
08-05 23:03:30.526: ERROR/AndroidRuntime(24650):     at java.lang.reflect.Method.invoke(Method.java:521)
08-05 23:03:30.526: ERROR/AndroidRuntime(24650):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
08-05 23:03:30.526: ERROR/AndroidRuntime(24650):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
08-05 23:03:30.526: ERROR/AndroidRuntime(24650):     at dalvik.system.NativeStart.main(Native Method)

After searching for a couple hours for a solution online I found none, and decided to create an entirely new tab project which used the most basic tabs (which of course worked). After adding more and more features a part at a time I found the culprit.

I had the following line

_tabHost.getTabWidget().setDividerDrawable(R.drawable.tab_divider);

Which I had added after my lines that added TabSpecs to my TabHost. BIG MISTAKE! This ended up causing the crash and causing me many hours of pain. Hopefully if anyone else is experiencing this crash they will find my post and not have to search their code for an answer.

29Jul/110

VideoToGIF – Android App From Scratch – #5 – Import Jars & Working with JMF

In this part of the series I import outside .jar files into my project, more specifically the Java Media Framework. I then begin to work with the jmf in order to convert my videos to GIF format. Source code: http://code.google.com/p/videotogif/

29Jul/112

Android Activity Lifecycle – Android Tutorial

In this tutorial I give a detailed discussion of the android activity lifecycle and a description of each part and its uses. More information can be found here: developer.android.com Download the source code here: www.quack-ware.com

25Jul/110

VideoToGIF – Android App From Scratch – #4 – Record Video & AlertDialog

Hello, In this video I show you how to open up the camera app using an intent and record a video which will then be saved to your phone. I also show you how to make a nice greeting for your user using an alertdialog. Source code: http://code.google.com/p/videotogif/

25Jul/110

VideotoGIF – Android App From Scratch – #2 – Setup SDCard & Get Video From Gallery

Hello, In this tutorial I teach you how to setup an AVD that supports an SDCard and import a video

25Jul/110

VideotoGIF – Android App From Scratch – #3 – Reading From SDCard; Open Camera Intent

Hello, In this tutorial I show you how to read the video file from the previous tutorial from the SDCard

25Jul/110

VideoToGif – Android App from Scratch – #1 – Layouts, Buttons, and other Stuff

Hello everyone, This is my first in a series of videos that creates an android application from scratch. This is