Note 3 Search Projection Help - Galaxy Note 3 Developer Discussion [Developers Onl

I am using the following code to retrieve search queries from the browser, it works well with all other devices except Samsung Galaxy Note 3, the cursor returns empty i.e no search is retrieved.
Cursor mCur = mCtx.getContentResolver().query(Browser.SEARCHES_URI,
Browser.SEARCHES_PROJECTION, null, null,
Browser.SearchColumns.DATE + " DESC");
My manifest contains the required permissions:
READ_EXTERNAL_STORAGE
READ_HISTORY_BOOKMARKS
Kindly let me know what can be wrong .

Related

Gear To Device Communication

Hi All,
I'm very new to app development. I have created an app on my Note3 and a client on the Gear but im not sure how to get them talking. Does any one know if there is a Samsung api for doing this or can I just use BLE. Also does any one have a good BLE tutorial?
Thanks in advance.
taylordw said:
Hi All,
I'm very new to app development. I have created an app on my Note3 and a client on the Gear but im not sure how to get them talking. Does any one know if there is a Samsung api for doing this or can I just use BLE. Also does any one have a good BLE tutorial?
Thanks in advance.
Click to expand...
Click to collapse
We are still waiting for sdk to be released
taylordw said:
Hi All,
I'm very new to app development. I have created an app on my Note3 and a client on the Gear but im not sure how to get them talking. Does any one know if there is a Samsung api for doing this or can I just use BLE. Also does any one have a good BLE tutorial?
Thanks in advance.
Click to expand...
Click to collapse
I don't see how you could use Bluetooth protocols for this kind of architecture. You can try to open a Bluetoothsocket and use your own script language to do the talking. http://developer.android.com/reference/android/bluetooth/BluetoothSocket.html
But I would wait for a SDK. Sony also has a SDK for their watches. It makes developing a lot easier with intent-based APIs
BluetoothSocket
appelflap said:
I don't see how you could use Bluetooth protocols for this kind of architecture. You can try to open a Bluetoothsocket and use your own script language to do the talking.
But I would wait for a SDK. Sony also has a SDK for their watches. It makes developing a lot easier with intent-based APIs
Click to expand...
Click to collapse
Thanks for the pointer, that works! :good:
On the watch:
Code:
BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();
BluetoothServerSocket bss = btAdapter.listenUsingRfcommWithServiceRecord("Test", UUID.fromString("c3f10dc0-677b-11e3-949a-0800200c9a66"));
BluetoothSocket bs = bss.accept();
byte[] buf = new byte[1024];
InputStream is = bs.getInputStream();
int read = is.read(buf);
is.close();
bs.close();
On the phone:
Code:
BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();
Set<BluetoothDevice> devices = btAdapter.getBondedDevices();
BluetoothDevice device = devices.iterator().next();
BluetoothSocket bs = device.createRfcommSocketToServiceRecord(UUID.fromString("c3f10dc0-677b-11e3-949a-0800200c9a66"));
bs.connect();
bs.getOutputStream().write("Hello!".getBytes("UTF-8"));
bs.getOutputStream().flush();
bs.getOutputStream().close();
bs.close();
This is just an example, but it works. Does anyone know if the the Bluetooth GATT APIs might be a better fit, and whether they might be able to control the lifecycle of the app on the watch?
Data Transfer between Samsung Galaxy Note 3 and Samsung Galaxy Gear?
surlydre said:
Thanks for the pointer, that works! :good:
On the watch:
Code:
BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();
BluetoothServerSocket bss = btAdapter.listenUsingRfcommWithServiceRecord("Test", UUID.fromString("c3f10dc0-677b-11e3-949a-0800200c9a66"));
BluetoothSocket bs = bss.accept();
byte[] buf = new byte[1024];
InputStream is = bs.getInputStream();
int read = is.read(buf);
is.close();
bs.close();
On the phone:
Code:
BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();
Set<BluetoothDevice> devices = btAdapter.getBondedDevices();
BluetoothDevice device = devices.iterator().next();
BluetoothSocket bs = device.createRfcommSocketToServiceRecord(UUID.fromString("c3f10dc0-677b-11e3-949a-0800200c9a66"));
bs.connect();
bs.getOutputStream().write("Hello!".getBytes("UTF-8"));
bs.getOutputStream().flush();
bs.getOutputStream().close();
bs.close();
This is just an example, but it works. Does anyone know if the the Bluetooth GATT APIs might be a better fit, and whether they might be able to control the lifecycle of the app on the watch?
Click to expand...
Click to collapse
Did you succeed in getting the Note 3 and Gear talking with this code, Is data transfer also possible? When I tried deploying such a client application on the watch it immediately crashed and so I thought it could be that the Bluetooth session cannot be started because of an existing Bluetooth connection via the Gear Manager.
After reading some content on different sites regarding this(I could not post those links as I got an error while posting), I thought real time data transfer via Bluetooth will not be possible but if you say it works then may be I should check my code, But is there any other way to transfer data by using the existing Bluetooth pairing via the Gear Manager App?

[Q] Modifying notification

Hi folks,
even though there are many nice 3rd party twitter clients available they are all missing an important feature: push notifications using GCM. The original Twitter app offers GCM based notifications but the app itself is more or less crap.
Therefore I thought about utilizing the original Twitter app for receiving GCM messages which create the Android notifications and then modify these notifications so that another (3rd party) app is started when clicking on them. I already managed to hook into the NotificationManager:
Code:
XposedHelpers.findAndHookMethod(android.app.NotificationManager.class, "notify", String.class, int.class, Notification.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
XposedBridge.log("NotificationManager.beforeHookedMethod(): param=" + param);
for (Object o : param.args) {
if (o instanceof Notification) {
Notification n = (Notification) o;
XposedBridge.log("NotificationManager.beforeHookedMethod(): notification=" + n);
}
}
}
}
);
At this stage, where simple things as changing Notification.tickeText work, I tried the following:
1) Creating a new PendingIntent and assigning it to Notification.contentIntent:
Code:
Intent LaunchIntent = context.getPackageManager().getLaunchIntentForPackage("it.mvilla.android.fenix");
PendingIntent contentIntent = PendingIntent.getActivity(context, 0, LaunchIntent, 0);
n.contentIntent = contentIntent;
This fails due to the fact that I did not succeed in getting my hand on a Context instance. Does anyone have got an idea on how to get a Context instance or can provide another possibility for creating the PendingIntend without a Context?
2) As the previous did not work due to a missing Context I tried to change the LauchIntent of the existing Notification. But I was not able to find the correct place - I did not even find the original LaunchIntent when studying the sources or even by dumping the notification by reflection.
I also started investigating on how to hook into the Twitter app itself. But as the source code is (of course) not public and additionally is obfuscated this seems to be even more complicated. In addition hooking into the NotificationManager is more generic and would allow - when adding configuration - the redirection also for other sources and targets.
As you see, I am somehow stucked. But I'm not hopeless respectively cannot imaging that it should not be possible. So now it's up to you to feed me with the correct ideas
So far and thanks in advance,
yaan04
yaan04 said:
1) Creating a new PendingIntent and assigning it to Notification.contentIntent:
This fails due to the fact that I did not succeed in getting my hand on a Context instance. Does anyone have got an idea on how to get a Context instance or can provide another possibility for creating the PendingIntend without a Context?
Click to expand...
Click to collapse
AndroidAppHelper.currentApplication() should do the trick. Otherwise see this, though if AndroidAppHelper fails most of these probably will, too.
yaan04 said:
2) As the previous did not work due to a missing Context I tried to change the LauchIntent of the existing Notification. But I was not able to find the correct place - I did not even find the original LaunchIntent when studying the sources or even by dumping the notification by reflection.
Click to expand...
Click to collapse
LaunchIntent?
yaan04 said:
I also started investigating on how to hook into the Twitter app itself. But as the source code is (of course) not public and additionally is obfuscated this seems to be even more complicated. In addition hooking into the NotificationManager is more generic and would allow - when adding configuration - the redirection also for other sources and targets.
Click to expand...
Click to collapse
Android API calls won't be obfuscated. Try searching for "NotificationManager" for example and see where it's used.
Yeah, AndroidAppHelper.currentApplication() provides a usable Context instance \o/
Thanks, GermainZ. Now I can go on...

Dialer codes

I was messing around with an app I found that shows all the dialer codes on the phone and I found a code that opens a remote support app, and another that opens a RLZ Debug menu? I just thought it was interesting and wanted to share...I have no idea what the RLZ menu does. The code for the remote support app is *#*#737283#*#* and the RLZ menu is *#*#759#*#* the link to the app is https://play.google.com/store/apps/details?id=org.freespirit.hms if anyone wants to mess around with the others
Big_Red77 said:
I have no idea what the RLZ menu does.
Click to expand...
Click to collapse
Appears to be a part of GooglePartnersSetup you can see the "Enable OEM mode" and other RLZ stuff here : https://github.com/Chairshot215/Har...PKs/GooglePartnerSetup/res/values/strings.xml
RLZ appears to allow non-google aps use google features like auto correct, calender importing ect.
If you click on "client ids" you see:
maps = motorola
youtube = verizon
market = verizon
voicesearch = null
shopperclient = null
wallet = null
chrom = verizon
(your device may be different for youtube/wallet/chrome, if you removed stock apps and reinstalled google versions)
(Before anyone asks, OEM mode does not appear to have anything to do with the bootloader)
not a single dialer code works on my droid tubro XT 1254 except *#06# imei code

Can an app access the phone line?

<>not sure if im posting in the right are. please move if so</>
I have an idea for an app but it would need to act as a dialer without going through the main dialer app, is this possible? i haven't even seen alternate dialers on the play store
It's such as a great idea to do...
If you want to dial a phone, the code is simple:
Code:
Uri number = Uri.parse("tel:123456789");
Intent callIntent = new Intent(Intent.ACTION_DIAL, number);
startActivity(callIntent);
This will require CALL_PHONE permission.

by note 4 to mate s: problems with evernote / s note

hello, I have the following problem.
I made the change from note 4 to hauwei mate s both with Android 5.1.1 and I can not change the notes in evernote. I try to explain better: for years use the app's notes, with which I edit of customer files (estimates and advances).
s account and the notes' synchronized with evernote. not having known s the mate's, I installed on the latter evenote.sono entered my evernotein account which I find all the notes previously saved. The problem 'that these notes open the mate's, me and displays them in .spd clicking formed above me opens in .jpeg displaying them as if they were photographs. my need, as described above, and 'to update these notes periodically (for example, entering any deposit left by the customer, as I did on notes 4), but the mate, I do not do' do.
at this point, I ask if anyone knows the method of operating the apk's notes on non samsung terminals ... I think it's the only solution.
The same question applies to s health, that 'if there is possibility' of use of non-Samsung terminals to meet up the data of the steps / activities' carried out that are memeorizzati in the backup.
the last request (s health) is not 'imperative. the previous one (s notes), instead, for business reasons you can imagine.
Thanks in advance

Categories

Resources