API to check if BlackBerry device is password-protected - java

Is there an API to check if the device is currently password-protected?
I can only allow caching server login keys on the device if the device itself is password protected (recommending IT policy to the BES admins is not enough for the customer). Somehow I cannot find the suitable API call(s), looking up and down through the documentation and APIs.

Found it.
net.rim.device.api.system.DeviceInfo.isPasswordEnabled()

Related

How to access directly internet on WearOS app

I am looking for My data on wear OS app to send to my external apache server with php and mysql.
Ultimately I need watch sensor data in MySQL database, So i created a POST request page using php. How do I send POST request?
Note: I am not using mobile phone between WearOS app and My server. WearOS is connected to internet via WiFI
Please if you know any solution help me
FYI: I tried basic things given at https://developer.android.com/training/wearables
Using Smart Watch with API level 23
Regards
Unfortunately your watch system version is too old. I strongly recommend you to buy a new watch or try update to Wear OS 2.x (API25) if your device is still under maintain.
If you insist on using current device the only way to access the Internet is via mobile phone. You can not send HTTP requests directly.
But the old version system should not be able to connect the WiFi. Please confirm your version at first. If your API level equal or larger than 25, you can access the Internet as same as phone using OkHttp or others you like.

The proper way to manage a Google Drive account using Java console application?

I have enabled Google Drive API on Google Developer Console and created a service account credential which is bundled with a service account ID and key ID. Despite that I have tried various ways to manage my own Google Drive account, I could not find a solution which fits for my aim. I need to upload, download and delete the files stored in my own Google Drive. The application that I am going to connect Google Drive is a console one which will be solely used for an academic research.
it's pretty simple. The steps to achieve this are at How do I authorise an app (web or installed) without user intervention? (canonical ?)
Be careful about how securely the refresh token is being stored and what scopes you grant to the app.

Does Google Analytics method Tracker.getReferer() support android app URIs?

I want to track activity referrer information in my android application.
setReferrer in the Google Analytics API seems to be a suitable method (com.google.android.gms.analytics.Tracker.setReferrer)
But I can not find any documentation for it.
What can I pass to it? Only web links? Or android app URIs are supported too?
like: android-app://com.google.android.googlequicksearchbox/https/www.google.com
I get information about the referrer from:
android.app.Activity.getReferrer
android.content.Intent.EXTRA_REFERRER
android.content.Intent.EXTRA_REFERRER_NAME
Edit:
With additional research I found some more information about referrer in Google Analytics via it's Measurement Protocol Parameter dr:
developers.google.com/analytics/devguides/collection/protocol/v1/parameters#dr
Specifies which referral source brought traffic to a website. This value is also used to compute the traffic source. The format of this value is a URL.
But it also does not clarify whether or not android app URIs are supported.
It seems like Google Analytics for mobile apps does not support referrer information at all.
Only install referrer is shown. I can't find activity referrers anywhere even if I send this info.

Using Android license verification serverside

I've been thinking about implementing of Google Play licence check on my Java server. Is that even possible? I haven't been able to find anything on this matter. I know Android LVL is written in Java, but I'm not sure if it can run outside of dalvik machine. Is there a posibillty of checking Google account name or some kind of device ID against Google Play to check whether an app has been bought in a Java server application?
The answer above is simply verifying response data (returned by google LVL on android device) on app server.
I think the question is asking if it's possible to call some google web API to do Google Play license check on its app server. But it seems like google doesn't open the web API interface to its licensing server, all LVL calls need to be done using its google play service framework on android device.
Yes it's possible, the java sources are out there and could be downloaded (and afaik, the jar is not dexed until you compile your application) - see some kind of manual over there at developers.android.com to read about how to get the sources
I've heard about a PHP project trying to attempt it, but using java should be no problem at all - you do the same things on the server, the manuals state for the client - and let the client sends the encrypted response from the market directly to the server via SSL (e.g. byte[] post)
You should get a UID from ResponseData.userId
Read some more in this blog post and more info and links in another SO answer

Access Google Talk chat history

I'm looking for a method to access Google Talk chat history. Method to be used for an android device but does not have to be specific to it. I am looking for preferably an official method, but this is not required. AFAIK there is no official method. The method must pecifically not,
Through IMAP (requires chat and label to be enabled)
Through Talk.apk's ContentResolver (requires that the talk.apk be installed)
unless it somehow bypasses the problems listed after the methods above.
Googles different Google Talk applications are able to do chat history but there is no documentation that im aware of to how this works.
Google Apps Script has a getChatThreads() API Call.
You're going to face issues with any of these methods. I think the best (of the bad) solutions is to use IMAP and include steps for enabling the Chat label to be accessed via IMAP. One nice thing about OAuth 2.0 Gmail IMAP authentication is that it doesn't depend on the user turning IMAP on in GMail, it just works regardless of the user's IMAP setting.

Categories