Source code for the G1 multitouch proof-of-concept posted - G1 Android Development

Anyone interested in exploring how the device tracks the two fingers can grab the source and play with it.
http://www.ryebrye.com/blog/2008/11/30/g1-multitouch-proof-of-concept-soure-code-posted/

RyeBrye said:
Anyone interested in exploring how the device tracks the two fingers can grab the source and play with it.
http://www.ryebrye.com/blog/2008/11/30/g1-multitouch-proof-of-concept-soure-code-posted/
Click to expand...
Click to collapse
It looks like the stuff you uncommented is just debug code, and the driver is still in fact reporting 2 finger tracking:
Code:
if (z) {
input_report_abs(ts->input_dev, ABS_X, pos[0][0]);
input_report_abs(ts->input_dev, ABS_Y, pos[0][1]);
}
input_report_abs(ts->input_dev, ABS_PRESSURE, z);
input_report_abs(ts->input_dev, ABS_TOOL_WIDTH, w);
input_report_key(ts->input_dev, BTN_TOUCH, finger);
finger2_pressed = finger > 1 && finger != 7;
input_report_key(ts->input_dev, BTN_2, finger2_pressed);
if (finger2_pressed) {
input_report_abs(ts->input_dev, ABS_HAT0X, pos[1][0]);
input_report_abs(ts->input_dev, ABS_HAT0Y, pos[1][1]);
}
pos[1][0] and pos[1][1] is the position of finger 2, and pos[0][0] and pos[0][1] is the position of finger 1.
They are populated in the loop:
Code:
int p = buf[base + 1];
...
pos[f][a] = p;
My guess is that the C++ framework code and Java code need to be tweaked to handle multitouch (with no changes to the driver at all). I'm not too familiar with the code. Have you figured out how the input_report_abs gets handled?

apple's software pattents
I am afraid this is becoming *ALSO* a legal issue now :
http://www.newlc.com/en/multitouch-feature-any-screen#comment-50240

Way to dig up a 3 month old thread and post a completely irrelevant news article in it.

LPChris said:
Way to dig up a 3 month old thread and post a completely irrelevant news article in it.
Click to expand...
Click to collapse
relax. next time, just move on to the next thread it won't hurt anybody.
and it is relevant, sorta.

Related

Wanting to develop for WM haivng some problems

Hi I want to make an application using location, I found this tutorial
http://msdn.microsoft.com/en-us/library/dd938890.aspx#RetrievingLocationInformationthroughGPS
which looks very helpful but because I am new to visual studio I am having some problems.
1) is the article it says "This article includes complete sample code." but I cant find a download for all the code.
2) he only mentions referencing Microsoft.WindowsMobile.Samples.Location.dll which I have done but the class LatLong is still unknown
3) I made a sample program without the LatLong class just to experiment I get the following error on my device
"Microsoft.WindowsMobile.Samples.Location, Version=1.0.3448.25673, Culture=neutral, PublicKeyToken=null, or one of its dependencies, was not found
any idea what this means?
4) Could all my problems be because I am using visual studio 2005 and not 2008? I found a code project that looked really helpful but when trying to open it it says that it cant because it is from a newer version of the software, anything that can be done?
5) I find MSDN confusing for finding out what to reference to add a class for example this is the page for the LatLong class http://msdn.microsoft.com/en-us/library/cc514548.aspx
with the java online info the first thing you always see is where the class is found but it seems to be missing for this class. Other basig classes appear similar to java.
below is my sample code its basically taken from the article but I have commented out the references to LatLong and put in checks instead
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.WindowsMobile.Samples.Location;
namespace DeviceApplication3
{
public partial class Form1 : Form
{
private Gps gps;
int count = 0;
public Form1()
{
InitializeComponent();
gps = new Gps();
gps.Open();
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = (getGpsString());
}
private string getGpsString()
{
GpsPosition position = gps.GetPosition();
/*LatLong location = new LatLong();
if (position.LatitudeValid)
location.Latitude = position.Latitude;
if (position.LongitudeValid)
location.Longitude = position.Longitude;
if (position.HeadingValid)
location.Heading = position.Heading;*/
StringBuilder sb = new StringBuilder();
sb.Append("\n");
sb.Append("Latitude = ");
if (position.LatitudeValid)
{
sb.Append(position.Latitude.ToString() + "\n");
}
else
{
sb.Append("Not found yet\n");
}
sb.Append("Longitude = ");
if (position.LongitudeValid)
{
sb.Append(position.Longitude.ToString() + "\n");
}
else
{
sb.Append("Not found yet\n");
}
sb.Append("Heading = ");
if (position.HeadingValid)
{
sb.Append(position.Heading.ToString() + "\n");
}
else
{
sb.Append("Not found yet\n");
}
return sb.ToString();
}
}
}
Microsoft.WindowsMobile.Samples.Location.dll
is this file located in bin\debug and or \bin\release
?
and does it only give runtime errors or also compile time ?
no it compiles fine, can you see anything wrong with my code? The weird thing is the form comes up using the emulator but not on the device. Could it be because I have a custom rom that seems to have compact framework 3.5? I would assume it would be back compatible?
How have you deployed it to the device? Have you copied the .exe and the Location.dll?
one thing you could also test was if you could disable the stuff in the gps
and just run a program without it to verify that it's not missing net3.5's fault
heliosdev said:
How have you deployed it to the device? Have you copied the .exe and the Location.dll?
Click to expand...
Click to collapse
Hi thanks for this I didnt copy over the dll I'm very silly.
So what do you guys think about loading projects ment for vs 2008 in 2005 is this impossible ? or can i convert them somehow?
sure it's only the project and solution files which differ
add the cs files manualy and it should work fine
Use the same name to create the new project in vs2005 to have the same namespace.
You'll have to do some manual changes if the code uses c#3.0 .net 3.5 features.
Thanks guys your awesome,
very random and off topic but since your programming kings ill ask anyway,
I think I want to eventually work in the gaming industry, I'm close(3months) to finishing my MSc CompSci conversion course and I am looking for jobs, its quite aparent that most games companys don't want unexperienced people so do you guys have any ideas of places to apply for that will give the the necessary experience? btw I have no taught experience with C++ which I think is my biggest dissadvantage, I do know C and java quite well though and as you can tell just starting to play with C#.
your help is always appreciated.
well, continue with general programming (object oriented programming, ui development, database, network,...). There are so many different fields in software development!
For example take a look at the chapters of the books in the game programming gems series to see what (not only) gaming companies are working on. In general for beginning there is a lot of information online where you'll find tons of tutorials.
Try to get a profound base in programming.
Starting with your gps application, develop a gui, save/load the positions (database), visualize the points...
heliosdev said:
well, continue with general programming (object oriented programming, ui development, database, network,...). There are so many different fields in software development!
For example take a look at the chapters of the books in the game programming gems series to see what (not only) gaming companies are working on. In general for beginning there is a lot of information online where you'll find tons of tutorials.
Try to get a profound base in programming.
Starting with your gps application, develop a gui, save/load the positions (database), visualize the points...
Click to expand...
Click to collapse
Hi sorry for the late reply I upgraded to windows 7 last night to try and improve my rubbish laptop, seems to be a bit better btw,
anyway just want to say thanks for the advice. also my app will use google maps yahoo zonetag and windows live earth (or bing maps if thats what there calling it now) I think for some of thoes services I will need to pay to realease my app to the public even if its free but what about testers would I be able to give it to say 10 people?

[SDK]HD2MultitouchSDK

Beta-Version is out!!
Multitouch for everyone!!!!
HD2Multitouch is for all who want to support multitouch on the HD2 in their apps like the Album-App does.
This is the really first version, so don't expect a perfect solution....
And it's free, so start developing....
Getting started:
Code:
public YourForm()
{
InitializeComponent();
bool doRestart;
multitouch = Multitouch.GetMultitouch(this, out doRestart);
if (doRestart)
{
MessageBox.Show("To activate the multitouch, the app will perform a restert now.", "Multitouch", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
Multitouch.PerformSoftReset();
this.Close();
return;
}
if (multitouch == null)
{
MessageBox.Show("Failed to initialize the multitouch.", "MultitouchDemo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
this.Close();
return;
}
multitouch.TouchDown += new EventHandler<MultitouchEventArgs>(multitouch_TouchDown);
multitouch.TouchUp += new EventHandler<MultitouchEventArgs>(multitouch_TouchUp);
multitouch.TouchMove += new EventHandler<MultitouchEventArgs>(multitouch_TouchMove);
multitouch.EnableEvents = true;
}
Please note (if you download the app you agree!):
The SDK is provided 'as is'
The developer does NOT give any warranty of any kind and can't be held for any damage or loss caused directly or indirectly by the SDK (just in case)
The developer does NOT guarantee any kind of support (but I'll try to help everyone )
You're not allowed to develope commercial apps with this sdk. Your app and the sdk MUST be sold free. For commercial prjects contact the developer.
You are not allowed to disassemble the SDK or reverse engineer it.
you are not allowed to post the attachement(s) below to any other website. you can always link to this tread.
If you are going to use it in your application, you MUST put a link in your application/offical website that reffers to this XDA thread.
The developer reserves the right to make this a paid SDK at any point of time.
The developer reserves the right to relocate this SDK to another website or even take it offline.
Reserved for futere posts...
Reserved. (the last one)
hi Dude...i am a very newbies for this and i own a hd2...
i had download the file and now how i suppost to do? where i should i put the file??
Thanks...
sorry for a stupid question...
Hey
I'm not sure what you're trying to get. The file you downloaded is a sdk (which means software development kit), so it's meant to use it in your own project, but if you aren't a developer, there's no need for the sdk on your hd2...
Cheers

[Guide] demystifying build.prop [Valid entries]

Tired of see so many "tweaks" that do not work, I decided to dig deeper.
Scavenging the entire Android source, I checked entries which are actually valid.
Note 1: Ignored the build.prop entries created by buildinfo.sh (default entries)
Note 2: I'll update/upgrade the topic gradually.
I accept all help, suggestions, observations, comments and so on.
Entries that DO NOT exist in the source:
(Again: I scaveged all Android source code)
ro.ril.disable.power.collapse
ro.mot.eri.losalert.delay
ro.config.hw_fast_dormancy
ro.config.hw_power_saving
windowsmgr.max_events_per_sec
persist.cust.tel.eons
ro.max.fling_velocity
ro.min.fling_velocity
ro.kernel.checkjni
dalvik.vm.verify-bytecode
debug.performance.tuning
video.accelerate.hw
ro.media.dec.jpeg.memcap
ro.config.nocheckin
profiler.force_disable_ulog
profiler.force_disable_err_rpt
ersist.sys.shutdown.mode
ro.HOME_APP_ADJ
Notes:
dalvik.vm.verify-bytecode
Previous version of the runtime supported the boolean
dalvik.vm.verify-bytecode property, but that has been
superceded by dalvik.vm.dexopt-flags.
ro.kernel.checkjni
The correct entry is ro.kernel.android.checkjni
ro.HOME_APP_ADJ
The interaction with this is been removed.
From google:
This is a process holding the home application -- we want to try
avoiding killing it, even if it would normally be in the background,
because the user interacts with it so much.
All ro.media.enc* entries
A more elegant alternative would be to edit /system/etc/media_profiles.xml
Valid entries on CyanogenMod and AOSP:
dalvik.vm.checkjni and ro.kernel.android.checkjni
platform_frameworks_base/core/jni/AndroidRuntime.cpp (480:489/466:475)
Code:
property_get("dalvik.vm.checkjni", propBuf, "");
if (strcmp(propBuf, "true") == 0) {
checkJni = true;
} else if (strcmp(propBuf, "false") != 0) {
/* property is neither true nor false; fall back on kernel parameter */
property_get("ro.kernel.android.checkjni", propBuf, "");
if (propBuf[0] == '1') {
checkJni = true;
}
}
wifi.supplicant_scan_interval
android_external_wpa_supplicant/wpa_supplicant.c (2459:2460)
Code:
if (property_get("wifi.supplicant_scan_interval", scan_prop, "5") != 0) {
wpa_s->scan_interval = (int)strtol(scan_prop, &endp, 0);
service.adb.tcp.port
platform_system_core/adb/adb.c (1366:1372/1350:1356)
Code:
// If one of these properties is set, also listen on that port
// If one of the properties isn't set and we couldn't listen on usb,
// listen on the default port.
property_get("service.adb.tcp.port", value, "");
if (!value[0]) {
property_get("persist.adb.tcp.port", value, "");
}
ro.sf.lcd_density and qemu.sf.lcd_density
platform_frameworks_base/core/java/android/util/DisplayMetrics.java (286:294)
Code:
private static int getDeviceDensity() {
// qemu.sf.lcd_density can be used to override ro.sf.lcd_density
// when running in the emulator, allowing for dynamic configurations.
// The reason for this is that ro.sf.lcd_density is write-once and is
// set by the init process when it parses build.prop before anything else.
return SystemProperties.getInt("qemu.sf.lcd_density",
SystemProperties.getInt("ro.sf.lcd_density", DENSITY_DEFAULT));
}
}
debug.sf.nobootanimation
platform_frameworks_base/cmds/bootanimation/bootanimation_main.cpp (45:49)
Code:
char value[PROPERTY_VALUE_MAX];
property_get("debug.sf.nobootanimation", value, "0");
int noBootAnimation = atoi(value);
ALOGI_IF(noBootAnimation, "boot animation disabled");
persist.adb.notify
Cyanogen: android_frameworks_base/services/java/com/android/server/usb/UsbDeviceManager.java (747:753)
Code:
if (mAdbEnabled && mConnected) {
if ("0".equals(SystemProperties.get("persist.adb.notify"))
|| Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.ADB_NOTIFY, 1) == 0)
return;
AOSP: android_frameworks_base/services/java/com/android/server/usb/UsbDeviceManager.java (714:715)
Code:
if (mAdbEnabled && mConnected) {
if ("0".equals(SystemProperties.get("persist.adb.notify"))) return;
net.rmnet0.dns* and net.dns*
This is ok for Wifi and 2G/3G conection
wifi.supplicant_scan_interval
android_external_wpa_supplicant/wpa_supplicant.c (2459:2460)
Code:
if (property_get("wifi.supplicant_scan_interval", scan_prop, "5") != 0) {
wpa_s->scan_interval = (int)strtol(scan_prop, &endp, 0);
Valid entries only on CyanogenMod:
persist.sys.purgeable_assets
android_frameworks_base/core/jni/android/graphics/BitmapFactory.cpp (632:634)
Code:
char value[PROPERTY_VALUE_MAX];
property_get("persist.sys.purgeable_assets", value, "0");
mPurgeableAssets = atoi(value) == 1;
persist.sys.use_dithering
android_packages_app_CMParts/src/com/cyanogenmod/cmparts/activities/PerformancesettingsActivity.java (102)
Code:
String useDithering = SystemProperties.get(USE_DITHERING_PERSIST_PROP, USE_DITHERING_DEFAULT);
persist.sys.jit-mode (Only "fast" and "portable" modes)
android_packages_app_CMParts/src/com/cyanogenmod/cmparts/activities/PerformancesettingsActivity.java (96:99)
Code:
mJitPref = (CheckBoxPreference) prefSet.findPreference(JIT_PREF);
String jitMode = SystemProperties.get(JIT_PERSIST_PROP,
SystemProperties.get(JIT_PROP, JIT_ENABLED));
mJitPref.setChecked(JIT_ENABLED.equals(jitMode));
pm.sleep_mode (Do not work on Non-MSM chipsets)
See sleep modes on device kernel in pm-data.c and pm.h
:highfive:
Some background info:
XLOUD, ClearAudio
If, and ONLY if your phone support xloud on stock ROM, is highly probable that this is ported for CyanogenMod and AOSP based roms, because these custom roms use proprietary drivers, firmwares, frameworks, app....
To enable, use this:
Code:
ro.semc.sound_effects_enabled=true
ro.semc.xloud.supported=true
persist.service.xloud.enable=1
The same is valid for ClearAudio. To enable use this:
Code:
ro.semc.sound_effects_enabled=true
ro.semc.clearaudio.supported=true
persist.service.clearaudio.enable=1
For ics 4.0 .4 ?
Sent from my MegaFon_SP-AI using xda premium
Ranisblogru said:
For ics 4.0 .4 ?
Sent from my MegaFon_SP-AI using xda premium
Click to expand...
Click to collapse
I'm looking at latest GIT tree of Android source code and latest CyanogenMod source code, so this topic is valid for latests releases (KK, JB, CM10.X, CM11), but may not be the same for earlier versions (to be sure I'm would have to look old commits...).
wow...I ve always wanted to do this resarch...but nerver had time
so all the "famous" build.prop tweaks are useless ????[
Crostantin said:
wow...I ve always wanted to do this resarch...but nerver had time
so all the "famous" build.prop tweaks are useless ????[
Click to expand...
Click to collapse
Yes they have been fake all the time, you might even get surprised when I tell you battery calibration is also totally bogus (it's for emulator only)
really?? I am surprise !!!!
You mean that i haven't to charge one for month from 0% to 100% and etc.......
If it's true a lot stuff I red about Lithium batteries make sense.....maybe
Most of the tweaks are useless, i totally agree!
Funny to see people "copy & paste" everything they see on the internet, just to "magically" make their phones faster...
Some interesting links regarding the topic:
First one...
Second one...
Take care
Wooaarr said:
Most of the tweaks are useless, i totally agree!
Funny to see people "copy & paste" everything they see on the internet, just to "magically" make their phones faster...
Some interesting links regarding the topic:
First one...
Second one...
Take care
Click to expand...
Click to collapse
what about 3G fast dormancy??
the tweak should be:
ro.rill.fast.dormancy.rule=0
...your opinion??
@LaraCraft304 great guide, might want to mention the fact that those cyanogenmod specific changes can be found in performance settings anyway so although the build.prop lines would work, there is no need to use them.
Your post looks eerily similar to Jeff Mixon's article.
http://www.jeffmixon.com/examining-build-prop-tweaks-for-android-ics-a-comprehensive-guide-part-1/
http://www.jeffmixon.com/examining-build-prop-tweaks-android-ics-comprehensive-guide-part-2/
And FYI, this is a Motorola build.prop tweak ("mot") that in fact works (or at least used to) on Motorola devices.
Code:
ro.mot.eri.losalert.delay
upndwn4par said:
Your post looks eerily similar to Jeff Mixon's article.
http://www.jeffmixon.com/examining-build-prop-tweaks-for-android-ics-a-comprehensive-guide-part-1/
http://www.jeffmixon.com/examining-build-prop-tweaks-android-ics-comprehensive-guide-part-2/
And FYI, this is a Motorola build.prop tweak ("mot") that in fact works (or at least used to) on Motorola devices.
Code:
ro.mot.eri.losalert.delay
Click to expand...
Click to collapse
But not quite, as "pm.sleep_mode" was debunked at that blog post. Atleast here it is stated that it does something for Qualcomm/MSM Devices.
@LaraCraft304 - Kudos to your work!
Does are only some "lines" some do really work like ones for ultra fast boot and deep sleep states
It depends on the device's chipset actually. It works on Qualcomms, Idk about exynos and nvidia
How about the Killjoy mod pack?
broodplank1337 said:
Yes they have been fake all the time, you might even get surprised when I tell you battery calibration is also totally bogus (it's for emulator only)
Click to expand...
Click to collapse
Haha..I've have that same debate for a while now with some friends. I agree 100% with you..But who am I a lowly Xda user with small thanks amount
yeah, I was surprised when I found out that lots of those tweaks were fake, I thought XDA folks knew better than that. I think the main reason people think they work is that to apply them you have to reboot your device, and EVERY device feels snappier after rebooting.
Please answer some of my questions related to build.prop and they are too many, can't be posted here. Located here: Please answer them!
http://forum.xda-developers.com/showthread.php?p=76239
Sent from my ST25i using XDA Premium 4 mobile app
Are you sure that the various APP_ADJ weren't implemented in Gingerbread? I remember seeing them in Samsung stock firmwares (although commented)...
In my opinion this is one of the most useful informative threads I have seen in a while.
I hope now everybody will realise that they have to be careful when reading the list of features of so many blazing fast and buttery smooth roms.
A lot of users and rom chefs use those build.prop tweaks just because everybody use them and because they have read tons of times that it improves the battery life, performance, etcetera. But the truth is that none of them checked or proved if those lines make a difference, so it's good to see that someone made research to prove that some of the most famouse buildprop tweaks are placebo effect.
I personally always wanted to understand what those "tweaks" exactly do and check if there is some kind of documentation that proves that it works before applying those changes to my phone. I wouldn't be surprised if the list of placebo effect tweaks gets bigger!
Sad part is that despite the build.prop tweaks being disproved, or rather most of them, it won't stop people from trying. Its the same as the Entropy generator thing we saw a while back. All these tweaks are pointless as if there was something you could change in terms of performance or battery then Google or the OEMs would have done it already.
Edit: should mention that when I was doing custom ROMs, the only tweaks I used where ones to the VM which I spent many countless hours investigating whether it improved or not, and the home screen lock (back when it did something).
hillbeast said:
......All these tweaks are pointless as if there was something you could change in terms of performance or battery then Google or the OEMs would have done it already.......
Click to expand...
Click to collapse
+10000000

[Q] Potential fix for Katkiss 4.3 on Asus SL101 slider

I am a new member, and cannot post directly to the Dev forums yet, so I am placing this here, in the hopes that someone can repost, or pass this on to timduru (or other involved devs)
From the KatKiss thread -- http://forum.xda-developers.com/showthread.php?p=47853666&highlight=sl101#post47853666
Quote:
Originally Posted by martyr2k6 View Post
Just wanted to point out that I am running this on my SL101 with ZERO hiccups...
...
Any chance there is a way to resolve the hardware keyboard locking issue or the USB port not working?
Keyboard should most likely be a matter of inverting the lid switch in the kernel.
But difficult to test without an SL101.
Click to expand...
Click to collapse
I develop for my arch linux box , and have built custom kernels for it, so i took a quick stab at looking through the source code for the katkernel for the tf101 - > https://github.com/timduru/tf101-katkernel/blob/c6199499470976a55973e566b0b804e4b4796b5c/drivers/acpi/dock.c, and it would appear that the lid switch section he is referring to is here:
Code:
static void dock_event(struct dock_station *ds, u32 event, int num)
{
struct device *dev = &ds->dock_device->dev;
char event_string[13];
char *envp[] = { event_string, NULL };
struct dock_dependent_device *dd;
if (num == UNDOCK_EVENT)
sprintf(event_string, "EVENT=undock");
else
sprintf(event_string, "EVENT=dock");
/*
* Indicate that the status of the dock station has
* changed.
*/
if (num == DOCK_EVENT)
kobject_uevent_env(&dev->kobj, KOBJ_CHANGE, envp);
list_for_each_entry(dd, &ds->hotplug_devices, hotplug_list)
if (dd->ops && dd->ops->uevent)
dd->ops->uevent(dd->handle, event, dd->context);
if (num != DOCK_EVENT)
kobject_uevent_env(&dev->kobj, KOBJ_CHANGE, envp);
}
If that is true, a simple edit like so should do the trick:
Code:
if (num == UNDOCK_EVENT)
sprintf(event_string, "EVENT=dock");
else
sprintf(event_string, "EVENT=undock");
However, I have not set up a development environment for the android before, and it seems like a fairly large learning curve to setup the linaro toolchain, download, change that source, compile, package and test the change. Especially since my unfamiliarity with android dev in general would increase the odds of it not working due to user error!
If someone (initial dev??) would make that change, and save a sl101-version of the kernel for testing, I would be glad to load it and report back.
If someone would rather hold my hand a little bit with setting up the toolchain and building and packaging the kernel, I'd be willing to try it myself.
Thanks for any help, either way! The ROM looks/works great on my sl101...except for the whole 'not able to open it' thing

Gear 2 SDK released

So Gear2 SDK has been released ..
http://tizenindonesia.blogspot.com/2014/03/samsung-rilis-tizen-sdk-for-wearable.html#.Uyci2NxdVzg
Could someone have a look for me how it is to make watchfaces with this thing...
@OpenMind_NL @motive or anyone else..
Please report back to me ....
Thank you in advance...
Martin Founder GearFaces.com
Jeshter2000 said:
So Gear2 SDK has been released ..
http://tizenindonesia.blogspot.com/2014/03/samsung-rilis-tizen-sdk-for-wearable.html#.Uyci2NxdVzg
Could someone have a look for me how it is to make watchfaces with this thing...
@OpenMind_NL @motiive or anyone else..
Please report back to me ....
Thank you in advance...
Martin Founder GearFaces.com
Click to expand...
Click to collapse
I don't talk or read Indonesian very well :cyclops: , but I downloaded the SDK andI noticed it is for Tizen OS and not Android.
Also, when I try to install the SDK (Windows7, 64bit) I get a message:
Cannot start Tizen SDK for Wearable Install Manager.
Cannot find repository. Please check you repository. (http://)
Did not try the Mac installer or the SDK image yet. Maybe later.
Jeshter2000 said:
So Gear2 SDK has been released ..
http://tizenindonesia.blogspot.com/2014/03/samsung-rilis-tizen-sdk-for-wearable.html#.Uyci2NxdVzg
Could someone have a look for me how it is to make watchfaces with this thing...
@OpenMind_NL @motive or anyone else..
Please report back to me ....
Thank you in advance...
Martin Founder GearFaces.com
Click to expand...
Click to collapse
I'll give a look soon.
Sent from my SAMSUNG-SM-N900A using XDA Premium HD app
Ok thanks boys!!
@OpenMind_NL and @motive this is in HTML 5, everything is possible I've been told on MWC...
Edit Im installing now
/*global window, document, tizen, setTimeout */
/*jslint plusplus: true*/
var canvas, context, clockRadius;
window.requestAnimationFrame = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function (callback) {
'use strict';
window.setTimeout(callback, 1000 / 60);
};
function renderDots() {
'use strict';
var dx = 0,
dy = 0,
i = 1,
angle = null;
context.save();
//Assigns the clock creation location in the middle of the canvas
context.translate(canvas.width / 2, canvas.height / 2);
//Assign the style of the number which will be applied to the clock plate
context.beginPath();
context.fillStyle = '#999999';
//Create 4 dots in a circle
for (i = 1; i <= 4; i++) {
angle = (i - 3) * (Math.PI * 2) / 4;
dx = clockRadius * 0.9 * Math.cos(angle);
dy = clockRadius * 0.9 * Math.sin(angle);
context.arc(dx, dy, 3, 0, 2 * Math.PI, false);
context.fill();
}
context.closePath();
//Render center dot
context.beginPath();
context.fillStyle = '#ff9000';
context.strokeStyle = '#fff';
context.lineWidth = 4;
context.arc(0, 0, 7, 0, 2 * Math.PI, false);
context.fill();
context.stroke();
context.closePath();
}
function renderNeedle(angle, radius) {
'use strict';
context.save();
context.rotate(angle);
context.beginPath();
context.lineWidth = 4;
context.strokeStyle = '#fff';
context.moveTo(6, 0);
context.lineTo(radius, 0);
context.closePath();
context.stroke();
context.closePath();
context.restore();
}
function renderHourNeedle(hour) {
'use strict';
var angle = null,
radius = null;
angle = (hour - 3) * (Math.PI * 2) / 12;
radius = clockRadius * 0.55;
renderNeedle(angle, radius);
}
function renderMinuteNeedle(minute) {
'use strict';
var angle = null,
radius = null;
angle = (minute - 15) * (Math.PI * 2) / 60;
radius = clockRadius * 0.75;
renderNeedle(angle, radius);
}
function watch() {
'use strict';
//Import the current time
//noinspection JSUnusedAssignment
var date = new Date(),
hours = date.getHours(),
minutes = date.getMinutes(),
seconds = date.getSeconds(),
hour = hours + minutes / 60,
minute = minutes + seconds / 60,
nextMove = 1000 - date.getMilliseconds();
//Erase the previous time
context.clearRect(0, 0, context.canvas.width, context.canvas.height);
renderDots();
renderHourNeedle(hour);
renderMinuteNeedle(minute);
context.restore();
setTimeout(function () {
window.requestAnimationFrame(watch);
}, nextMove);
}
window.onload = function () {
'use strict';
canvas = document.querySelector('canvas');
context = canvas.getContext('2d');
clockRadius = document.width / 2;
//Assigns the area that will use Canvas
canvas.width = document.width;
canvas.height = canvas.width;
//add eventListener for tizenhwkey
window.addEventListener('tizenhwkey', function (e) {
if (e.keyName == 'back') {
tizen.application.getCurrentApplication().exit();
}
});
window.requestAnimationFrame(watch);
};
This is a peace of code from a Sample clock LOL
Sent from my SM-N9005 using XDA Premium 4 mobile app
OpenMind_NL said:
Also, when I try to install the SDK (Windows7, 64bit) I get a message:
Cannot start Tizen SDK for Wearable Install Manager.
Cannot find repository. Please check you repository.
Click to expand...
Click to collapse
I'm having the same issue. No luck so far.
Strange I managed to get it installed
Sent from my SM-N9005 using XDA Premium 4 mobile app
Jeshter what you've pasted there is a HTML5 JS script...
The widgets on the net gear 2 are meant to be HTML5 rumor has it... You will 100% undoubtedly be able to make clock faces.. no problem at all.
No more XML tho... you will have alot more freedom also with CSS. I can hardly wait to get my grubby hands on a gear 2 to tear it down.
Think of it as a OS level zooper widget.. going to be epic.
Code:
//add eventListener for tizenhwkey
window.addEventListener('tizenhwkey', function (e) {
if (e.keyName == 'back') {
tizen.application.getCurrentApplication().exit();
}
});
That bit gets me excited !! Listening for hardware keys from HTML5.. epic.
"tizen.application." must be the prefix for a whole bunch of application specific variables/commands..
OmG OmG sooo cool!
Sent from my SM-N9005 using XDA Premium 4 mobile app
while we should be happy that SDK is already out, it's a terrible news for Gear 1 owners. it only proves that Gear was abandoned shortly after release.
hurdlejade said:
while we should be happy that SDK is already out, it's a terrible news for Gear 1 owners. it only proves that Gear was abandoned shortly after release.
Click to expand...
Click to collapse
This is not true!
Gear one will recieve Tizen aswell my friend..
Jeshter2000 said:
This is not true!
Gear one will recieve Tizen aswell my friend..
Click to expand...
Click to collapse
Care to elaborate?
raiu said:
Care to elaborate?
Click to expand...
Click to collapse
This was all over the news http://www.droid-life.com/2014/02/25/galaxy-gear-update-to-tizen/
But this will happen when the other Watches are available, not sooner....
Jeshter2000 said:
This was all over the news http://www.droid-life.com/2014/02/25/galaxy-gear-update-to-tizen/
But this will happen when the other Watches are available, not sooner....
Click to expand...
Click to collapse
I thought all that was just speculation.
raiu said:
I thought all that was just speculation.
Click to expand...
Click to collapse
No this will happen, only not sooner that the other watches will be available. I think May or even later ...
I just got confimation that they have start building new ROMS they are at XXABNC1 with building....
Jeshter2000 said:
No this will happen, only not sooner that the other watches will be available. I think May or even later ...
I just got confimation that they have start building new ROMS they are at XXABNC1 with building....
Click to expand...
Click to collapse
that doesn't make me any happier at all. i don't want to give up on my all android functionality. noone knows how fluid and how easy it will be to create apps for tizen. i want to stick to android. i don't want to downgrade my gear to tizen.
hurdlejade said:
that doesn't make me any happier at all. i don't want to give up on my all android functionality. noone knows how fluid and how easy it will be to create apps for tizen. i want to stick to android. i don't want to downgrade my gear to tizen.
Click to expand...
Click to collapse
I can Tell you that creating APPS for Tizen will be a lot easier than for android. Simply for the Fact that its HTML 5 and CSS like websitedeveloping.
So in mather of fact every webdesigner/developer could mak apps.
And trust me there are a lot of those people...
Martin
Ps : I think it is a good thing as there is an SDK available so there will be a lot more apps for this thing...
Jeshter2000 said:
I can Tell you that creating APPS for Tizen will be a lot easier than for android. Simply for the Fact that its HTML 5 and CSS like websitedeveloping.
So in mather of fact every webdesigner/developer could mak apps.
And trust me there are a lot of those people...
Martin
Ps : I think it is a good thing as there is an SDK available so there will be a lot more apps for this thing...
Click to expand...
Click to collapse
i heard a lot of good things about 'programming' in html5/css.. but i just don't find it realistic that suddenly, or within a reasonable amount of time - like few months - the developers of the apps i'm using will suddenly switch to tizen.
i will definetly wait few months before changing my OS to Tizen.
i just dont like samsung policy. their updates are constantly broken, and you can't simply do downgrade.
but it's the same with major windows software.. to properly use my Logitech devices, i have to use version from 2012, as any other version released after that has more glitches..
hurdlejade said:
but it's the same with major windows software.. to properly use my Logitech devices, i have to use version from 2012, as any other version released after that has more glitches..
Click to expand...
Click to collapse
this is due Logitech right not updating their drivers.....
This is going to be epic. Going to study up on css and html5.
Sent from my SAMSUNG-SM-N900A using XDA Premium HD app

Categories

Resources