Related
[Problem] Android SQLIte Database Development, "getDatabase called recursively"
Morning, mates.
I'm having a serious problem right now and hope you can help.
I'm writing a tool for android that utilizes a database. Here' is what happens:
As soon as the first request is sent to the DatabaseHandler i wrote, the app crashes with an
02-24 10:45:54.636: E/AndroidRuntime(10845): java.lang.IllegalStateException: getDatabase called recursively
After some digging, that included decompiling the android.jar (only contains API stubs, yay) i've found, that the onCreate Method is called more often than it should. I suspect a problem in storing the database.
To confirm that i need to have a look at the current SQLiteOpenHelper.class which i cannot find anywhere.
I will share code as needed, but as it is a commercial project i cannot post it in public.
I'm grateful for every hint/clue/tip whatsoever, this is costing me sleep.
Max
International Nexus 6 Pushbullet Java Server channel
I can't setup Nexus 6 Pushbullet Channels outside US because is where I'm living now but I can share a Java program that will work at any country so you can setup your country channel.
Be aware:
The program will check the page where the server or computer is located.
If you use a VPN be careful because maybe the server will be checking a different country page.
The only restriction is that the Nexus 6 page has to be available.
If you share your channel please try to run the Pushbullet server 24/7 because people will be disappointed if the nexus appear and the server is not running.
How to setup:
Setup a Pushbullet account: https://www.pushbullet.com/
Create a new channel: https://www.pushbullet.com/my-channels
Find and save your api key also called acces token: https://www.pushbullet.com/account
Download the servernexus.jar file
Install the latest Java in your laptop, PC or Server.
Setup your java environment variables properly (help)
Open your terminal or cmd
Go to the path where your file is located
Run your servernexus.jar file as: java -jar servernexus.jar <api key> <channel tag> (help)
Example: java -jar servernexus.jar 11KJ45JH34NDWFN234N423 nexus6availabilityuk
If everything works well you will see a Pushbullet notification on your channel indicating that the server is running.
The refresh time is 5 seconds
US Nexus 6 Pushbullet channel
For those who are still waiting for it I prepared this Pushbullet channel for myself and it worked fine so if you want to use it go ahead I'll keep my server running until stock gets fluent.
The refresh time is 5 seconds
Channel: allnexus6availabilityus
Web: https://www.pushbullet.com/channel?tag=allnexus6availabilityus
International browser launcher Nexus 6
If you don't believe in Pushbullet notifications and you prefer something different I also prepared this nexus.jar file that will look for your desired device and if it's available will launch your browser into the device page when appears available.
The refresh time is 2 seconds
To use it you will need the latest Java installed on your computer and java path in your environment variables.
Then for N6 Blue 32Gb introduce: java -jar nexus.jar 0
For N6 White 32Gb introduce: java -jar nexus.jar 1
For N6 Blue 64Gb introduce: java -jar nexus.jar 2
For N6 White 64Gb introduce: java -jar nexus.jar 3
Hopefully will be usefull for somebody.
Worked great. Many thanks. Got the 34 gig midnight blue. Average stock available time was about 8 seconds.
geebee1932 said:
Worked great. Many thanks. Got the 34 gig midnight blue. Average stock available time was about 8 seconds.
Click to expand...
Click to collapse
You are very welcome Did you use the Pushbullet Channel or the Java file though?
I used Pushbullet. It was the first time using it.
Thanks! Hoping for some luck next week if not sooner. Using the channel.
geebee1932 said:
Worked great. Many thanks. Got the 34 gig midnight blue. Average stock available time was about 8 seconds.
Click to expand...
Click to collapse
Damn bro. Where'd you see the 34GB option? All I could do was the 32 or 64!
Can anybody do anything similar for the UK?
bigf00t said:
Can anybody do anything similar for the UK?
Click to expand...
Click to collapse
If you have a computer in UK that can be online 24/7 I can share you my program so you can setup your own channel if you want.
For anyone looking for a python script, I did this, based on another scrit. Sorry, I lost the original script to give credits
I don't use pushbullet, I use notify my android (https://play.google.com/store/apps/details?id=com.usk.app.notifymyandroid)
First, download the python lib to send notifications to NotifyMyAndroid
https://github.com/uskr/pynma
Download the zip and unpack it. Go to the extracted dir and create a file. ex: nexus632gbblue.py
Code:
#!/usr/bin/python
from urllib import urlopen
import logging
import pynma
#nma api key
nma = "your_nma_api_key"
#change to your desired model
urlnex = "https://play.google.com/store/devices/details?id=nexus_6_blue_32gb"
contents = urlopen(urlnex).read()
if contents.find("Add to cart") != -1: #Found magic button!
try:
p = pynma.PyNMA([nma])
# application, event, description, (opt) url, (opt) priority, (opt) batch mode
res = p.push("Nexus 6 Available", 'Nexus 6 - Blue 32gb ', 'Nexus 6 - Blue 32GB Available', urlnex, 2, batch_mode=False)
except Exception:
print logging.exception('')
To test:
chmod +x nexus632gbblue.py
python nexus632gbblue.py
edit: on crontab, to set update interval less than 1 minute:
You can change the script and put a while loop and a sleep on python script. It's just an example
Code:
* * * * * python nexus632gbblue.py
* * * * * sleep 10; python nexus632gbblue.py
* * * * * sleep 20; python nexus632gbblue.py
* * * * * sleep 30; python nexus632gbblue.py
* * * * * sleep 40; python nexus632gbblue.py
* * * * * sleep 50; python nexus632gbblue.py
Now, just put on your job scheduler and chose the update time
Thanks X, that channel has been very helpful in keeping me up to date with the stock.
Is there a script to automate the ordering? Like click Buy, Checkout, etc so I don't waste seconds fumbling for the button?
xbassols said:
If you have a computer in UK that can be online 24/7 I can share you my program so you can setup your own channel if you want.
Click to expand...
Click to collapse
Hi xbassols, If you could share the program that would be much appreciated. The uk play store is now showing the Nexus 6, all be it with "coming soon" but it would be good to get prepared.
Cheers,
Rochey
This works for specific country or just US?
Rochey13 said:
Hi xbassols, If you could share the program that would be much appreciated. The uk play store is now showing the Nexus 6, all be it with "coming soon" but it would be good to get prepared.
Cheers,
Rochey
Click to expand...
Click to collapse
I've updated the first page.
Seadra said:
This works for specific country or just US?
Click to expand...
Click to collapse
The channel only in US but the java files everywhere where the nexus 6 page exists
Hey, what text does this search for on the page and/or does it just detect changes between a previous version and the current version of the page? I ask as the UK site says "add to basket" when available rather than "add to cart" as the US does. Other than that, the pushbullet java server seems to be up and running well for me here - thanks!
GavinAshford said:
Hey, what text does this search for on the page and/or does it just detect changes between a previous version and the current version of the page? I ask as the UK site says "add to basket" when available rather than "add to cart" as the US does. Other than that, the pushbullet java server seems to be up and running well for me here - thanks!
Click to expand...
Click to collapse
Don't worry about that, it doesn't really search any visible text. It works monitoring the class name of some specific tags so can work at any country even if the page language is different and it's way more reliable than other programs that just search any difference in the webpage.
It will work properly if Google don't mess with the internal classes and that shouldn't happen.
If you intend to keep your pc running 24/7 or so, I think other users would appreciate having the opportunity to use your channel
BTW don't forget to subscribe to your own channel... For some weird reason it's not done automatically when you create the channel.
uknexus6stockcheck
Just managed to set this up on my mac mini which is on in the uk 24/7.
Updating Java was a pain as OS X wanted to keep using version 1.6. In the end I had to symlink the 1.8 java in /usr/bin/.
Seems to be working now. If I start the script I get a pushbullet notification saying that the "server is up and running" and I can see the poll every few seconds.
Thanks for the script and if anyone wants the channel name to use themselves subscribe to;
uknexus6stockcheck
Quick query, Does the script check for both colors and sizes? I'm assuming it will message when each comes available as there are no options. Just thought I'd check.
Thanks again for the java script and instructions - here's to hoping that I get a nexus 6 before a few of my friends! lol!
Yeah you're right, a quick compare of the page source US vs UK does indeed show the class names all match between both.
Unfortunately I doubt I'll be keeping my PC on 24/7 else I'd gladly share. No-one wants to be prematurely excited about a notification to then see its just the server starting again!
Thanks for the heads up, I had already noticed that I wasn't automatically subscribed to my own channel, I found it odd too.
could someone make a channel for the german playstore?
thanks in advance
Meh. I changed my mind. Not talented enough to set this up.
Now if someone could just make a .jar that monitors motorola.com's "Out of Stock" message for the Nexus 6 Buy page...
Hi folks,
I am a huge LifeLog fan, and I like all the more details this platform has over Google Fit. Last year, Sony had made the web API open. (REST + Oauth based).
https://developer.sony.com/develop/services/lifelog-api/
I had just started working on an app for the LifeLog platform and realised there is certain need for a android java library (as a wrapper over the REST API) for LifeLog. As an app developer wanting to quickly take advantage of LifeLog, it is too much to ask for to implement oauth and rest client side functionality.
So here goes a Work-in-progress repository
https://github.com/championswimmer/Lifelog-Android-Library
As of Apr 22, 2015, Login, auth_token generation is working. Also fetching location history data is also working. The activities data implementation is yet to be done. I intend to finish that in a couple of days maybe.
Code can be shoddy. If you can help me improve, I'd definitely love that.
Feel free to open up issues on the github repo to report any bugs or problems you have with it.
Hello everyone! I have a somewhat broad question(s) that I have some concerns about.
A recent search on the web revealed that many, if not all, of my apps published on Google Play are also being hosted on many, many apk mirror websites (such as ApkMania.com, or something like that along with PAGES of others). I like to stictly stick to Google Play for the distribution of my apps, and have not opted-in to distributing with 3rd parties, nor sharing my apps with anyone other than Google Play.
So my concerns/questions begin:
1) all of my apps are free, but have ads included in them so I can make a tiny bit of money from my hard work. Is it possible, or even more specifically, likely that my apps are being "hacked" or reverse-engineered to change the developer advertisement ID in which someone else would be getting revenue for my work? My apps are obfuscated so I'm sure it wouldn't be easy, but definitely not impossible.
2) I will begin checking the installer package name of my apps to make sure it is downloaded from Google Play. If it hasn't been, then the app(s) will show a dialog informing the user to download from Google Play, and close the app. Is there anything more that I can do to prevent this unwanted hosting?
3) Besides the above-mentioned, is there anything else I should be worried about?
I apologize if this is in the wrong section or is something I shouldn't be too concerned about, but I want my apps to ONLY be distributed through Google Play and was pretty frustrated when I found out that there were so many websites hosting my app. They would let you download directly from their website. If they redirected to Google Play, sure no problem. This is not the case :/
I would be much more concerned it these apps weren't free. I know this kind of stuff is bound to happen, but I would like to prevent/minimize it as much as possible.
Thank you for reading and your time. Any and all insight is appreciated. Cheers!
I haven't published an app yet and hopefully will publish one next month..
It is scary to read your experience.. do share anything you come across to minimize these things you have mentioned.. ( I would too if I see any article on this)
I will begin checking the installer package name of my apps to make sure it is downloaded from Google Play. If it hasn't been, then the app(s) will show a dialog informing the user to download from Google Play, and close the app
Click to expand...
Click to collapse
can you give a code example to do this?
ASIC SP said:
I haven't published an app yet and hopefully will publish one next month..
It is scary to read your experience.. do share anything you come across to minimize these things you have mentioned.. ( I would too if I see any article on this)
can you give a code example to do this?
Click to expand...
Click to collapse
I currently have 5 apps on the market (1st one was published in 2012) and have been learning on my own for about 4-5 years now, and just realized this unwanted hosting. It is a bit frightening in a way, but others have told me its "free hosting/marketing". I disagree since I opted out of 3rd party distribution. I know this stuff happens as with any other kind of digital goods though.
I am about to make a dialog class that will be easily put into any application that will do the above-mentioned (instruct the user to download from Google Play and close application) and will provide it here when it is complete It should be done in an hour or so, or at latest, tomorrow about the same time if I run into problems for some reason.
I wouldn't worry too much, just make sure you use proguard to obfuscate your code. There is documentation on the android developer website if you have questions about that. When/if you publish your app on Google Play, also opt-out of 3rd party marketing/distribution (if you so desire, it is with Google affiliates).
I'll post here again soon. Until then, happy coding!
Alright, it took a little longer than I anticipated, but this is satisfactory for my needs, simple yet effective.
@ASIC SP in your main activity, or Launcher activity (the one that starts when the application is opened)
Code:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final PackageManager pckManager = getPackageManager();
ApplicationInfo appInfo = null;
try {
appInfo = pckManager.getApplicationInfo(getPackageName(), 0);
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
// Check if your app was installed by Google Play
if (!"com.android.vending".equals(pckManager.getInstallerPackageName(appInfo.packageName))) {
//App was not installed by Google Play
// Create TextView with link
final TextView tvMessage = new TextView(this);
tvMessage.setText(R.string.dialog_message);
tvMessage.setMovementMethod(LinkMovementMethod.getInstance());
tvMessage.setGravity(Gravity.CENTER);
final AlertDialog alertDialog = new AlertDialog.Builder(this)
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
//Finish/close the activity when dialog is closed
finish();
}
})
.setTitle(getResources().getString(R.string.dialog_title))
.setView(tvMessage)
.create();
alertDialog.show();
} else {
//Do your normal stuff...
}
So this shows a dialog when the app is opened if the app was NOT installed by Google Play. I set the view of the dialog to a TextView because I have a link in the string resource that directs the user to the google play download page. The string resources i threw in there are as such:
Code:
<!-- Illegal download dialog -->
<string name="dialog_title">Illegal Download...</string>
<string name="dialog_message">This app was not downloaded from the Developer\'s desired distributor. Please download the correct application here</string>
Not really illegal, but at least it will get the user's attention
You will of course need to change this to your application's package name "https://play.google.com/store/apps/details?id=<your package name here>"
There are prettier ways of doing this, but this is a quick fix for me. Hope you can get some use of this, and anyone else are free to use this if they desire.
Happy Coding!
thanks
I suppose you can share it on github (that is what I see everyone doing when they have code stuff to share)
ASIC SP said:
thanks
I suppose you can share it on github (that is what I see everyone doing when they have code stuff to share)
Click to expand...
Click to collapse
Yeah but that's usually for entire projects though, this is only a few lines of code
I plan on making a dialog class out of it so it is easier to import to my other projects later on, so I may do it then.
Until I figure out why this happened and if its potentially harmful, I'm adding this to every app I publish. Good luck on your apps!
MattMatt0240 said:
Yeah but that's usually for entire projects though, this is only a few lines of code
I plan on making a dialog class out of it so it is easier to import to my other projects later on, so I may do it then.
Until I figure out why this happened and if its potentially harmful, I'm adding this to every app I publish. Good luck on your apps!
Click to expand...
Click to collapse
Thanks and good luck to you too
Hello all, this is my first post here!
In this article I will explain my method of hacking the Square G-Shocks that make use of a Bluetooth module (I have a GW-B5600, but it should theoretically work on the GMW-B5000 too) with the goal to create our own Android app that will allow to get info and set the watch via BLE (Bluetooth Low Energy) commands/requests.
The tools I am using are: (sorry no link I am too new)
nRF Connect for Android by Nordic Semiconductor from the Play Store
Wireshark desktop (Windows/Mac) from the official website
The official "G-Shock Connected" Android app from the Play Store
And adb that can be found in the Android platform tools (by default in "C:\Users\usrname\AppData\Local\Android\Sdk\platform-tools")
Your phone does not need to be rooted but needs the Developer options enabled.
1 Discover the services offered by the G-Shock
I am using nRF Connect installed from the Play Store to scan for BT devices.
Long-press the (C) (bottom left) button on the B5600 to enable BT on the watch.
Hit Scan in nRF and search for "CASIO GW-B5600" and tap it to show the following details:
Code:
Device BT Name: CASIO GW-B5600
Device BT Address: [B]EB:1C:FF:90:C2:34[/B]
Offered services: 0x1801 Generic Attribute
0x1800 Generic Access
0x2A00 (R) Device Name
0x2A01 (R) Appearance
0x1804 Tx Power
0x2A07 (R) Tx Power Level
0x26EB00 0D Unknown Service
(UUID 0x2902 for all)
[B]0x26EB002C (W*) Custom Service #2C[/B]
[B]0x26EB002D (NW) Custom Service #2D[/B]
0x26EB0023 (NW) Custom Service #23
0x26EB0024 (NW*)Custom Service #24
(R) is read only (W) write (W*) write no response (N) notify.
The important information has been set in bold: the BT address that we will use to analyze the packets, and the 2 services that I called #2C and #2D that are used by the official G-Shock app to get and set info from/to the watch.
2 Enable Bluetooth traces on the phone
After that, open the phone Developer options > Enable Bluetooth HCI snoop log.
Or use the USB debugging mode, plug the phone to the computer and type the following command in a prompt:
Code:
adb shell settings put secure bluetooth_hci_log 1
To know where the BT traces will be stored, type the following command:
Code:
adb shell cat /etc/bluetooth/bt_stack.conf
and look at the line starting with 'BtSnoopFileName=' to locate the BT log files.
3 Capture BT activity and save the logs on computer
Install and run the "G-Shock Connected" app on your phone from the Play Store.
Do manipulations between the watch and the app, take note of the time you make them.
Then plug the phone and type:
Code:
adb pull /data/log/bt/btsnoop_hci*.log
Note: the place and name of the logs are for my Huawei Mate 10. You will need to adapt the path with the one you got at step 2.
4 Analyze the BT traces in Wireshark
Open Wireshark and drag and drop one of the "btsnoop_hci*.log" files pulled to the computer onto the program.
Add a filter on the G-Shock BT address we got from nRF Connect at step 1:
Code:
bluetooth.addr==EB:1C:FF:90:C2:34
And hit enter to see the BLE activity on the watch.
Now the fun (or the boring part, it depends ) begins... Understanding the BT requests/answers (get info) and BT commands (set info)!
In Wireshark, the important information for each BT frame are contained in the fields
Bluetooth Attribute Protocol > Handle > UUID
and in Bluetooth Attribute Protocol > Value
The very first -easiest- command I was able to identify is the one to Get and Set the Home City and the 5 World Time (WT) Cities.
When you analyse the BT packets, you can see the name of the cities written in all letters in the Value field:
Code:
0000 1f 01 48 4f ..HO
0010 4e 47 20 4b 4f 4e 47 00 00 00 00 00 00 00 00 00 NG KONG.........
We can observe that to GET the Home City, we send a Write command with the value 1F00 to the service 0x26EB002C (aka Custom Service #2C). In return, we will receive a notification through the service 0x26EB002D (aka Custom Service #2D) containing an echo of the Command ID (1F00) followed by the name of the Home City in upper-case (e.g. "PARIS").
To SET the Home City is just as easy: we send a Write request to the service 0x26EB002D (Custom Service #2D) with the value 1F00 followed by the name of the new Home City on 18 Bytes (e.g. "PARIS"), tailed with 0x00.
GETting and SETting the 5 World Time Cities is very similar: you only need to use the Command IDs 1F01 to 1F05...
The next command I reverse engineered is the one to set the date and time.
I started to search for the hexadecimal value "07 E4" in the traces (2020 in decimal = the current year). The search returned zero result... If finding a WORD (value encoded on 2 bytes) in big endian* fails, you gotta try searching it in little endian* so I did another search for "E4 07" this time, and bingo! It appears in a SET command starting with the ID 0x09.
* search Wikipedia for "Endianness"
The full structure of the binary value is:
Code:
([B]09[/B]) YYYY MM DD HH mm ss ?? ?? 01 ?? ?? is the milliseconds in big endian(?)
[B]Mon.13-JAN (15:54:10) traces[/B]
([B]09[/B]) E4 07 01 0D 0F 36 0B 01 F2 01 --> 2020-01-13 15:54:11 (,498?)
[B]Wed.15-JAN (15:29:27) traces[/B]
([B]09[/B]) E4 07 01 0F 0F 1D 1E 03 44 01 --> 2020-01-15 15:29:30 (,836?)
You can notice there's a difference in the trace timestamp and the time sent, respectively 1 second and 3 seconds. That is quite normal: I disabled the time synchronization in the watch settings, so the watch time can deviate from the atomic time by a few seconds (the user guide states a tolerance of +/- 15s per month average).
Hey, did you ever manage to get any further with this @mougino ? I've also got one of these watches, and have been playing around with the BLE connection to it. I've managed to successfully set the alarm times and on/off state – but so far haven't had any luck with setting the actual time. I tried writing with the op-code you suggested of 0x09, but it doesn't seem to actually do anything for me.
Up its interesting.
Hope somebody can help me. I'm having trouble getting/setting time on my Casio GW-B5600BC-2BJF. I can get and Set most other things like alarms, home city, etc using the #2D command (Characteristic: 26eb002d-b012-49a8-b1f8-394fb2032b0f), but when I try to set the time, it has no effect. The command does not complain, but does not change the time. Should I be using a different characteristic? Here are supported BLE services on my watch:
[CD:85:24:01:62:17][LE]> connect
Attempting to connect to CD:85:24:01:62:17
Connection successful
[CD:85:24:01:62:17][LE]> characteristics
handle: 0x0003, char properties: 0x02, char value handle: 0x0004, uuid: 00002a00-0000-1000-8000-00805f9b34fb
handle: 0x0005, char properties: 0x02, char value handle: 0x0006, uuid: 00002a01-0000-1000-8000-00805f9b34fb
handle: 0x0008, char properties: 0x02, char value handle: 0x0009, uuid: 00002a07-0000-1000-8000-00805f9b34fb
handle: 0x000b, char properties: 0x04, char value handle: 0x000c, uuid: 26eb002c-b012-49a8-b1f8-394fb2032b0f
handle: 0x000d, char properties: 0x18, char value handle: 0x000e, uuid: 26eb002d-b012-49a8-b1f8-394fb2032b0f
handle: 0x0010, char properties: 0x18, char value handle: 0x0011, uuid: 26eb0023-b012-49a8-b1f8-394fb2032b0f
handle: 0x0013, char properties: 0x14, char value handle: 0x0014, uuid: 26eb0024-b012-49a8-b1f8-394fb2032b0f
[CD:85:24:01:62:17][LE]>
Here is the command I'm sending:
Wrote to characteristic 26eb002d-b012-49a8-b1f8-394fb2032b0f | value: 0x09 E6 07 03 19 0B 29 07 05 4F 01
Thanks in advance.
seanlano said:
Hey, did you ever manage to get any further with this @mougino ? I've also got one of these watches, and have been playing around with the BLE connection to it. I've managed to successfully set the alarm times and on/off state – but so far haven't had any luck with setting the actual time. I tried writing with the op-code you suggested of 0x09, but it doesn't seem to actually do anything for me.
Click to expand...
Click to collapse
Same here. Did you resolve this? See my message above. Thanks.
izivkov said:
Same here. Did you resolve this? See my message above. Thanks.
Click to expand...
Click to collapse
Nah I kind of dropped it, and haven't picked it up again for quite a while. I'd love to get it working though!
seanlano said:
Nah I kind of dropped it, and haven't picked it up again for quite a while. I'd love to get it working though!
Click to expand...
Click to collapse
OK, I will let you know if I figure it out.
Just curious, are you wring an Android app for the watch?
izivkov said:
OK, I will let you know if I figure it out.
Just curious, are you wring an Android app for the watch?
Click to expand...
Click to collapse
I was planning on having something running on a Raspberry Pi Zero W – I can program, but I've never made an Android app. My plan was to do something in Python, ideally having the Pi Zero running somewhere in my bedroom so that the Casio watch can do the time synchronisation at night. If I can get that working I'd also thought about setting some alarms and reminders for the day ahead, like maybe connect it to a calendar and put any important events into the reminders function of the watch, things that the existing Casio app can't do. An Android app would be a better way of doing this, but I figured I'd get it working in Python first since it's faster for me.
Ok, thanks for the info.
I more or less figured out how to set the time. It involves setting the DST for all world locations first. I guess makes sense, since the casio will update the time for all locations. I still don't understand some things so I will need to figure it out first, and I can share if you are interested.
I am working on an open source Android app to integrate the Casio watch with Google services on android, such as calendar and Alarm ckock. It will not replace the official app. I have been working on this app for about a month now, and got the alarms and now the time setting working. I think the callender integration will be the most challenging, since I don't know what the data means to Casio.
Currently the github is private, because it is WIP, but I will make it public when it is ready.
That would be very cool! I'll be happy to do some beta testing if you end up getting to that stage. Good luck!
@seanlano I have the basic app running, except for the reminders. If you like to try it, here is the github:
GitHub - izivkov/CasioGShockSmartSync
Contribute to izivkov/CasioGShockSmartSync development by creating an account on GitHub.
github.com
It is private, so not sure if you can access it, so let me know.
If you don't want to bother building the APK, I have put it on on my Google drive:
Google Drive: Sign-in
Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use).
drive.google.com
I'm curious to see if for you the local time works properly, and the battery level is correct. Where are you located?
Of course, use at your own risk. It might screw up some settings on your watch. In that case, you may have to reset it like this:
Google Drive: Sign-in
Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use).
drive.google.com
Ivo
izivkov said:
I'm curious to see if for you the local time works properly, and the battery level is correct. Where are you located?
Click to expand...
Click to collapse
Hey @izivkov, I tried it out and it seems to mostly work!
The time setting worked correctly (I made sure by manually setting the time to be very wrong, and your app brought it back to the correct time). The home time zone (Sydney) was correct too.
However, the battery level didn't work – the Casio app shows my watch at 100% but your app shows only maybe 20%.
The alarms worked well too, although I found that any time I set the alarms it turns off the hourly signal, and the app doesn't have a way to turn it back on (this isn't a big deal though, since it's only a couple of buttons to press on the watch).
Keep up the good work!
seanlano said:
Hey @izivkov, I tried it out and it seems to mostly work!
The time setting worked correctly (I made sure by manually setting the time to be very wrong, and your app brought it back to the correct time). The home time zone (Sydney) was correct too.
However, the battery level didn't work – the Casio app shows my watch at 100% but your app shows only maybe 20%.
The alarms worked well too, although I found that any time I set the alarms it turns off the hourly signal, and the app doesn't have a way to turn it back on (this isn't a big deal though, since it's only a couple of buttons to press on the watch).
Keep up the good work!
Click to expand...
Click to collapse
Hey, thanks for the feedback.
- I did not notice the hourly signal setting and will fix it. Possibly add a setting to the app to turn it on/off.
- For the battery level, I was not sure I was getting the right value, but for me seemed to be about right. Obviously, should look at other ways to set it.
- I'm working on Calendar events integration with Watch's reminders, and when I finish this and fix these issues you mentioned I will have another version and will let you know.
Cheers
izivkov said:
Hey, thanks for the feedback.
- I did not notice the hourly signal setting and will fix it. Possibly add a setting to the app to turn it on/off.
- For the battery level, I was not sure I was getting the right value, but for me seemed to be about right. Obviously, should look at other ways to set it.
- I'm working on Calendar events integration with Watch's reminders, and when I finish this and fix these issues you mentioned I will have another version and will let you know.
Cheers
Click to expand...
Click to collapse
Hay, thanks for starring my github. I moved the code to another repository: https://github.com/izivkov/CasioGShockPhoneSync, which is now public. Feel free to star the new one. ;-)
Basically, I added Google calendar event support, and fixed the issue with hourly chime getting reset. Still cannot figure out how the battery level is read. I get a value using command 0x28, but the value does not make sense. I get back something like 0x28 0x0f 0x17 0x00 for about 25% charged battery, and 0x28 0x13 0x19 0x00 for almost fully charged one. I think I will disable the battery icon until I can figure what is going on.
Anyway, adding some documentation now. Hope other people can contribute to this project and possibly support more watch models.
I'm a bit stuck. I'm trying to detect the difference between GW-B5600 long-press lower left button and short-press lower-right button as far at connection to the Android device is concerned. The app on the phone should be able to tell the difference, becase the official app acts differntly when the right button is pressed, i.e. sets the current location. This does not happen for left-button connection. But the data sent to the phone from the watch is identical. If somebody has figured this out, please let me know.
For those who are interested in how to communicate with the Casio G-Shock 5600 BT watches, here is the latest github I created:
GitHub - izivkov/CasioGShockSmartSync
Contribute to izivkov/CasioGShockSmartSync development by creating an account on GitHub.
github.com
And you can get the android app on PlayStore:
Casio G-Shock Smart Sync - Apps on Google Play
Add Smart functions to your Casio G-Shock Bluetooth (B5600, B5000, B2100) watch.
play.google.com
Enjoy
I've been working on a very similar app but for a slightly different Casio model. I'm not very familiar with the BLE and getting to a point where I'd happily pay someone for investigating the communication.
Would anyone be willing to figure it out?
drunkenHiker said:
I've been working on a very similar app but for a slightly different Casio model. I'm not very familiar with the BLE and getting to a point where I'd happily pay someone for investigating the communication.
Would anyone be willing to figure it out?
Click to expand...
Click to collapse
Sure, I can take a look. You can contact me by email directly at [email protected], or better still you can post to the github repository:
izivkov/CasioGShockSmartSync · Discussions
Explore the GitHub Discussions forum for izivkov CasioGShockSmartSync. Discuss code, ask questions & collaborate with the developer community.
github.com