[Q] Develop a pattern recognition app - Java for Android App Development

I want to develop an app that can be trained to recognise certain characters. It's some sort of a word recognition app but for single characters. The problem with this is that i cannot find an appropriate input method even tough I've been struggling for two days to make it work using some sort of a GridLayout wich contains buttons. The problem with this method seems to be that i can't resize the buttons or remove the space between them. LinearLayout doesn't seem to be a good option either, since I can't swipe over the buttons and mark the letter.
THE ACTUAL PROBLEM:
I want to use an input similar to the picture i attached. That would be the letter A.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
.
The user will swipe over the matrix and leave a trail colored in blue. Then the matrix should be translated into the phone's memory to a binary matrix with 0 and 1 values.
RESTRICTIONS:
I want to tackle this problem programmatically.
The matrix will be 64x64
I use Android Studio.
---XML would be the easiest way to go, but a 64x64 matrix is pretty hard to create this way.
---API level does not matter at all. I just want this app to run on CM12 phone.
**After creating this app, I'll use a jpg picture of a character for input and refine the processing algorithms. I just need the algorithm to work for this 64x64 binary matrix first**
THE ACTUAL QUESTION:
How do I create the input matrix so it would be swipe-friendly and not bad looking ?

I think if you would like to use the button method you described above, you can call setOnTouchListener() on the buttons. The onTouch method is called when the user touches or swipes over the button so you could put your coloring code in there. But i dont know if a matrix of 64x64 buttons looks nice, that is the other problem
But basically you can as well use other views instead of the buttons because every view has the option to call an onTouchListener
--------------------
Phone: Nexus 4
OS: rooted Lollipop LRX21T
Bootloader: unlocked
Recovery: TWRP 2.8.2.0

Related

[new release] VJBaseHue

Guys n Gals,
I've knocked together a small program further to ZeBoxx's request.
It's used to set the colour of the soft keys etc, by command line/shortcuts/launchers.
eg VJBaseHue.exe 187
will give you a nice purple colour
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
On my website.
V
really a cool proggy
I am currently testing code by code...I've tried to key in 3 different conbination code...doesn't seem to work though... now am testing the color coding.
Zack, I don't understand. You mean you're trying to find the right hue code by code? The colour wheel on my website might help you, or basically load up any art program, screengrab your theme, and use the colour picker to find the colour your want. Even the standard Windows Colour Picker in MSPaint will show the hue you need.
Post some screenshots in your VGA themes thread if you have any luck :wink:
V
I think I got it now :wink:
guess I must be dreaming lol.I was looking for dark blue and not realise that hue does not come with such colors lol...
Thanks Vijay am doing some minor test wiht my themes I'll post some screen shots soon :wink:
I was looking at VJBaseHue trying to figure out how to get the two bars 100% black (still no luck) when I found something else. Modifying the SHColor value has an effect on the tray above the soft keys. Normally it is an ugly line across the today screen that forces up the scroll bar at the same time, the icons like wirelles use the space. After randomly modifying SHColor the line dissapeared and so did the scroll bar. Also the icons moved down and to the right to be in the corner taking up less space. It seems strange that a colour setting can change the whole layout of the today screen, do yo know the reason for this VJ?
I don't know offhand Odeean, I imagine it might be some kinda buffer overflow etc..
Let me know what values you use, and if I ever get the WinMob source in my hands, I'll have a look!
V
Don't worry, I can't copy/paste from my reg editors and the value is too long to be bothered reading and typing I also have not been able to repeat what happened, I only now seem to be able to make it do the opposite. When I have no tray, modifing it brings it back.

[App] Push v0.01 (aka new Pocket Gforce)

Hi all on the last week some friends ask me to make some simple apps using the Accelerometer from HTC and other. I'm still up my neck whit work but some simple app's came true. So heres one...
Gforce Push v0.01
This one is really simple but me and my friends enjoy driving whit it all the time.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Atm all he does is...
First put your devise in landscape mode (it will return to normal in the end)
Prevents backlight Dim and Standby (it will return to normal in the end)
show Total (x/y) Gforce in the big Blue center label
show Total (x/y) Gforce in the bar on the right (scale can be selected on the options menu)
show direction of Gforce(or movement if you invert x/y in the options menu)
show update rate on the red label
show other debug stuff on the green label (x, y , angle and battery)
atm Auto Calibrate is not working reasonably well so don't use it.
How to use it....
I dint make a instaler so yoiu have to copy the files to your devise manually and the open
"Push" folder must be put in the device memory root!!!
To go to options just touch the label "Options"
to go back to main just touch the label "Main"
to manually calibrate click the right button on the Dpad
to close the app click the center button on the Dpad
Skins...
All image's can be change but for the moment don't use different sizes
To do list...
Make config file to save preferences and path for the "img" folder.
Put Auto Calibrate more reliable
Release v0.01
http://rjsmsampaio.googlepages.com/Pushv0.01.rar
Thats it for 3 days of work.
Plz do comment.
Hi Ikari, I have downloaded your application. I'll tell you my experience after I tested it on my HTC phone.
Maybe I didn't test it in the right way, the arrow didn't point to the right direction that the phone was moving or accelerating. Nice arrows though.

Flash Pimp Clock

Loved the original idea from here:
http://www.tokyoflash.com/en/watches/pimp/p2pusher/
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Its basicly a different visual clock, to read the hours see the left vertical columns and for the minutes see the right 5-rows columns.
The PDF on the site above explains it better...
To use:
---------
- 5 colors to choose from, just press the bottom bar to change colors.
- If you prefer a 12-hour clock, simply click the left numbers after 13h.
- Exit with enter (keypad) or by pressing the top-right area.
- See the "normal" digital clock and date by pressing anywhere else on the screen.
Notes:
-------
- Needs FLASH 7, if it doesnt exit properly, you dont have it.
- Attached the CAB, already with the WM6.5 icon on install.
- Also added a separated swf file, to see it run on your NOKIA, PC or Throttle Launcher..
Enjoy.
Nice idea
Love it! thanks!
it would be cool if it can be a screensaver.
thanks twolf!
WQVGA issue omnia
just wondering if there's a way to make the excess screen on my omnia to default BLACK- then your app would be awesome
maybe even add function buttons - there's some promising update potential
awesome clock - would it be possible to simulate the look of a recessed L.E.D.?
looks good on my armband at the CLUB!!!
Great...very cool with the color options!
Sorry, the software I use for the EXE only allows VGA/QVGA, he doesnt even allow any extra options for the size or screen color.
Use flash pimp clock
I need a macromediaflash for use it. someone can help me?
found it
Yes, yes my first app for the htc diamond.
it`s fantastic........... I`m cry
Standalone app?
Just wondering... what is the program you are using for these standalone apps? I could probably use the same thing to make my own FlashGadgets play as standalones, which would make them work across a broader series of device platforms. Please check out my thread, and tell me what you think. http://forum.xda-developers.com/showthread.php?t=630985
Regards,
Unit ZER0

[TIP] Move your keyboard to the bottom

Hello
I was making one application that would resemble more Android-like design: keyboard on the bottom, the main soft keys above it.
Well that is not possible to do both system-wide, but one half of that is. To move your keyboard to the total bottom of the screen, just edit registry:
Code:
HKEY_CURRENT_USER\ControlPanel\Sip:
DefaultMenuBarHeight=dword:0
MenuBarHeight=dword:0
what happens after reboot is this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Advantages? Extra 64px (on WM6.5.3 and similar) of screen, no useless soft keys in these occasions.
Now, how do you hide the keyboard? Just, as on Android, press BACK key (on HD2 tested, TP2 and TD2 should work the same I suppose, but make backup first ).
Regards, OndraSter
Update: it seems that it doesn't work on all ROMs. I was using CRACIN's HD2 ROM, where it worked. I now flashed GTX Energy ROM and it doesn't work. Weird.
There is no DefaultMenuBarHeight in Sip there is only MenuBarHeight.
I'm using htc touch2. How can i do this? Thanks
This is dependant on the ROM and SIP itself. Try changing the MenuBarHeight itself if it isn't enough.
Btw, this won't work with any newer position fix - like ultrashot's uTask, since it tries to fix the keyboard too.
Heyi tried to change the MenuBarHeight and it was okey then but pressing back button make me go to the homescreen so it isn't for me. Thanks anyway dude great job.
Appearantly Touch 2 works different than Leo
You're right !
Having disabled Utask's position fix feature, I was able to move the SIP vertical position to anywhere I wanted !
The DefaultMenuBarHeight value can be manually added (I did), provided it has any actual effect.
Unfortunately, the Back button generally applies to the current app rather than to the keyboard, that sometimes even stays open (it actually depends on the app ! ), so it can't be used straight on.
But there are a lot of alternatives, such as remapping a hardware key with AEButton plus (now freeware), for instance.
This nice trick should probably be best used with a SIP featuring it's own closing button, such as FingerKeyboard (though it already has an option to overlap the softkeybar in landscape mode, and since it's fully customizable, you should be able to setup the vertical offset in portrait too, regardless of the actual registry values).

[Q] Play/Stop buttons to Ongoing Notifications

Hello Guys,
How can i add an ongoing notification with 2 or 3 buttons... play stop next !?
Something like this
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
...When i tap a button i want to do an url post.
android 4+
Thanks
Its actually very easy to just add an expandable button to the bottom of your notification (android 4.1+ only I believe):
Code:
Intent mIntent = new Intent();
mIntent.setClass(context, MyClass.class);
PendingIntent mPendingIntent = PendingIntent.getService(context, 0, mIntent, PendingIntent.FLAG_UPDATE_CURRENT);
mNotificationBuilder.addAction(R.drawable.icon, "Test", mPendingIntent);
This call will simply add a button at the bottom of the layout with a little icon called "icon" from your drawables, the text "Test" next to it, and when clicked on will take you to the class that you set as the pending intent.
you can add up to 3 of these (i believe, someone correct me if i'm wrong) per notification.
To get layouts that have buttons on the side (or anywhere other then just under the actual notification) is little trickier though. you'll have to create a layout and then use remote views to get the job done and I dont have an example for that! check out here at the bottom of the page though and it talks about using remote views a little bit. Just be careful with the layout that it will work for different screen sizes and devices!
as for an ongoing notification, here is what you want to call:
Code:
mNotificationBuilder.setOngoing(true)
its also a good idea to set priority for ongoing notifications in my opinion so that they appear where you want them to in the drawer.
Code:
mNotificationBuilder.setPriority(Notification.PRIORITY_MIN); // there are lots of options other then PRIORITY_MIN as well to check out
Hope that helps get you started!
@klinkdawg what you are describing are the action buttons which appear below the notification. In the Google Music app the play/stop buttons are embedded within a custom notification design. You can set a RemoveView with your layout with SetContent function:
http://developer.android.com/refere...er.html#setContent(android.widget.RemoteViews)
However all this good stuff is only available in API level 11+, and the notification with bigger content in API level 16+.

Categories

Resources