Linux

Who orchestrates navigation in “passive view” MVVM?

Developing Android Apps - Thu, 11/15/2018 - 18:13

Suppose we have an app whose presentation layer follows the MVVM pattern using Android Architecture Components. We would like to keep decision-making out of the View layer, but on Android, we must instigate navigation with an Activity or Fragment reference.

The ViewModel performs display-related business logic in response to user interaction with the View, but it should not reference the View. Who, then, can make - and facilitate the results of - decisions about which Activity to start, or which Fragment transaction to perform?

submitted by /u/jits_and_pieces
[link] [comments]
Categories: Android, Linux

Google rejected my app to have Call permissions. Do you think I should appeal?

Developing Android Apps - Thu, 11/15/2018 - 18:00

I was excited to read a post by Tasker dev, that Google has learned its lesson. But later today, I got rejection email from Google:

"We evaluated your declared feature Call recording (need to know when call is made and phone number in order to link recording to a call), however we determined it is not eligible for exceptions."

I wrote an article to show better what I'll have to remove from the app I'm working for over 7 years: https://skvalex.org/help/call-log-ban?style=dark

Do you think these features are not needed for my kind of app?

submitted by /u/skvalex
[link] [comments]
Categories: Android, Linux

VMWare P2V Linux CentOS Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Linux - Thu, 11/15/2018 - 17:39

Hi guys,

I've honestly spent over 16 hours on this and cannot figure it out for the life of me. I'm not too Linux-savvy. Anyways, we are trying to get a CentOS physical machine to a virtual machine and have done this in the past but for some reason, we get the error that is listed in the title. I've attached a screen shot and was hoping Reddit could save me as I searched the web for every other possibility.

Thanks!

https://i.redd.it/60vwebu9oky11.png

submitted by /u/apdunshiz
[link] [comments]
Categories: Linux

How do I get specific information from webpage to be used in KWGT widget?

Tasker: Total Automation for Android - Thu, 11/15/2018 - 17:29

I use Goodreads to track my reading for the year. I also like to have custom widgets on my phone screen using KWGT to track my progress. What I'd love to do is to have my widget automatically update when my Goodreads updates.

Ideally, I'd like a way to get the number of books I've completed for the Goodreads challenge from my profile page. I'm completely new to tasker, is this possible?

I also have no idea how to add a tag to this post, and the edit page won't let me edit my title.

submitted by /u/colorsneverfaded
[link] [comments]

Facebook's CEO on his latest almighty Zuck-up: OK, we did try to smear critics, but I was too out of the loop to know

The Register - Thu, 11/15/2018 - 17:25
Mark promises independent oversight and AI as Sheryl leans far, far away

Analysis Facebook on Thursday (again) reiterated its commitment to fighting misinformation, following a report that the data gathering biz hired a public relations firm, Definers Public Affairs, to promote content that undermine company critics.…

BluetoothSocket connect() fails with java.io.IOException: read failed, socket might closed or timeout, read ret: -1

Developing Android Apps - Thu, 11/15/2018 - 17:20

I'm creating two different applications that communicate over a Bluetooth channel. The client side (which uses bluetoothSocket.connect() in a connect thread) is paired with the server device, and can get its name, etc. The connect fails due to the exception mentioned in the title. In the verbose log, there are entries like "bt_btif_sock_rfcomm: find_rfc_slot_by_id unable to find RFCOMM slot id: 449" and "bt_rfcomm: PORT_StartCnf failed result:4". I've tried using secure, insecure connections, connecting the client using reflection and providing the channel number, to no avail. I have gone through the minute details of similar issues people were having on StackOverflow, and the Google Android documentation.

submitted by /u/andy_mann
[link] [comments]
Categories: Android, Linux

is it possible to speed up the thunderbolt 3 docking experience?

Linux - Thu, 11/15/2018 - 17:12

at least on archlinux when plugging in a thunderbolt 3 dock it takes ages until the hardware and especially the DisplayPort output works.

is there a way to speed this up?

submitted by /u/nemster
[link] [comments]
Categories: Linux

Best single board pc for Linux (64-bit, and 2gb ram min)

Linux - Thu, 11/15/2018 - 16:46

Hi,

I'm looking for a good single board computer that I can use as a Linux Dev machine for docker, and playing around with Ansible etc. I figure in the medium term it will be cheaper than getting a vps.

It should be able to: * run Linux (don't mind what distros really), or possibly a bsd variant * have at least 2 GB ram * a 64 bit processor * have hdmi output * and finally also have a microsd card slot

I think raspberry pi's only have 1gb ram, so they're off the table.

Any suggestions for well supported Linux boards please? Happy to answer any questions :)

submitted by /u/jamithy2
[link] [comments]
Categories: Linux

Up to three million kids' GPS watches can be tracked by parents... and any miscreant: Flaws spill pick-and-choose catalog for perverts

The Register - Thu, 11/15/2018 - 16:43
Gadgets can be hacked to spy on, find youngsters – claim

Parents could be unwittingly putting their children's safety and privacy at risk, thanks to security vulnerabilities in potentially millions of kids' GPS-tracker watches.…

[REQUEST] Send sms on incoming call and deactivating silent

Tasker: Total Automation for Android - Thu, 11/15/2018 - 16:41

I'm looking for a tasty recipe, I'd like to send an automated sms if someone (only from a cellphone) calls when I'm at work, it should read some thing in the lines of "oi its important call twice in under 3 minutes) and when/if the caller calls a second time it deactivates my silent profile based on my schedule in Google calendar. And then returns to my work task.

submitted by /u/Hampa_D
[link] [comments]

Should I switch to Linux

Linux - Thu, 11/15/2018 - 16:36

I do web design for work in HTML, CSS, JS, PHP, Java, C, and C#, but also some gaming for fun. Are there any good reasons to switch to Linux from Windows 10.

submitted by /u/alexnf8
[link] [comments]
Categories: Linux

Stupid question about unzipping

Linux - Thu, 11/15/2018 - 16:18

Is there some way to use the unzip command to automatically make a new directory and extract into it instead of just dumping all of the files in the current directory? Like if I download an album in zip form and unzip it, it just dumps all of the .flac files in the directory the .zip file is in (or the working directory, not sure which). Can I pass a flag that will extract album_name.zip to album_name/ and put all the songs in there like album_name/song_1.flac? I know I can do it by creating a directory the same name as the archive beforehand and then extracting into it, but it'd be nice if I could just pass a flag to do that for me.

submitted by /u/TheWayWill
[link] [comments]
Categories: Linux

Apache Guacamole Installation Script for RHEL/CentOS

I have created an installation script for Apache Guacamole in RHEL/CentOS 7.x and up. I was hoping to get some feedback on it and maybe even some help improving it.

The Github repo can be found at https://github.com/Zer0CoolX/guacamole-install-rhel

Some key features of the script are:

  • Allows installing from Stable version or git source
  • Installs and configures dependent packages including Nginx, JDBC/LDAP extensions, MariaDB, Java KeyStore, etc.
  • Can use LDAP as an authentication method without modifying the LDAP server (sign in with AD credentials)
  • Has options for LetsEncrypt cert or self-signed cert
  • Hardened Nginx SSL settings option (scored A+ on Qualys SSL Labs SSL Test)
  • Hardens MariaDB
  • Nginx URI Path parameter (changes URL from default to something shorter like http://domain.com/)
  • Option for DHE/Forward Secrecy via ssl_dhparam in Nginx
  • Logging the script activities
  • etc.

I am interested in feedback, constructive criticism, and help testing and updating the script. Please be kind I am not a programmer by trade and I am well aware the script isn't perfect. The Github repo (especially the documentation) is very much still a work in progress.

Currently I am unable to test the LetsEncrypt portion of the script as I would like. I want to move away from downloading the standalone version of Certbot and instead install it from the Distros repo. The scripts silent/unattended and help portions need attention too. I have listed in the wiki on my Github repo some additional features I would like to add as well.

I am hoping the script will help others and that I/We can further refine it to make it a great option for those looking to setup Apache Guacamole without the fuss of doing it entirely manually.

Thanks

submitted by /u/Zer0CoolXI
[link] [comments]

5.. 4.. 3.. 2.. 1... Runty-birds are go: 12,000+ internet-beaming mini-satellites OK'd by USA

The Register - Thu, 11/15/2018 - 15:47
FCC signs off on broadband-in-space plans, plus connections to Europe's GPS

America's broadband and telly regulator, the FCC, today approved a vast expansion in satellite networks around Earth.…

How to resume an activity by intent-filter? (Java)

Developing Android Apps - Thu, 11/15/2018 - 15:47

I'm very new to Android development, so please excuse for any obvious questions or wrongly described processes.

I'm working on a Reddit app and currently implementing the login function. When pressing the login button, a browser activity will start with a Reddit login page.

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(AUTH_URL)); startActivity(intent);

Once the permission for the app is granted, the URL, which is specified as the redirect, is called (it's part of the OAuth process). The Reddit app has an intent-filter in the AndroidManifest which (as far as I have understood) opens the app-activity automatically once the redirect-URL is called.

<intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:host="example.com" android:scheme="https" android:path="/reddit" /> </intent-filter>

Once the app resumes, my goal is to make a call on the reddit api, now that I can get the access token.

@Override protected void onResume() { super.onResume(); if (getIntent() != null && getIntent().getAction().equals(Intent.ACTION_VIEW)) { Uri uri = getIntent().getData(); if (uri.getQueryParameter("error") == null) { String state = uri.getQueryParameter("state"); if (state.equals(RANDOM_STRING)) { String code = uri.getQueryParameter("code"); getAccessToken(code); OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .addHeader("Authorization", "bearer " + accessToken) .url("https://oauth.reddit.com/subreddits/mine/subscriber") .build(); client.newCall(request).enqueue(new Callback() { @Override public void onFailure(Call call, IOException e) { e.printStackTrace(); } @Override public void onResponse(Call call, final Response response) throws IOException { if (!response.isSuccessful()) { throw new IOException("Unexpected code " + response); } else { System.out.println(response.body().string()); } } }); } } } } private void getAccessToken(String code) { OkHttpClient client = new OkHttpClient(); String authString = CLIENT_ID + ":"; String encodedAuthString = Base64.encodeToString(authString.getBytes(), Base64.NO_WRAP); Request request = new Request.Builder() .addHeader("User-Agent", "android:tif16-app:v1.0 (by /u/argschlimm)") .addHeader("Authorization", "Basic " + encodedAuthString) .url(ACCESS_TOKEN_URL) .post(RequestBody.create(MediaType.parse("application/x-www-form-urlencoded"), "grant_type=authorization_code&code=" + code + "&redirect_uri=" + REDIRECT_URI)) .build(); client.newCall(request).enqueue(new Callback() { @Override public void onFailure(Call call, IOException e) { } @Override public void onResponse(Call call, Response response) throws IOException { String json = response.body().string(); JSONObject data = null; try { data = new JSONObject(json); accessToken = data.getString("access_token"); refreshToken = data.getString("refresh_token"); } catch (JSONException e) { e.printStackTrace(); } } }); }

Now this works fine, it resumes "correctly", retrieves the token up to the point where it makes a call. The answer I get is some HTML source code of a reddit login page. But once I leave the activity by switching apps or navigating within the app itself, the desired JSON response gets printed.

I'm honestly confused by what's happening here. I assume the resumption by the intent-filter is not handled correctly, but I have not found any help how to handle this specific problem.

submitted by /u/ArgSchlimm
[link] [comments]
Categories: Android, Linux

intercepting button sequence using autoinput

Tasker: Total Automation for Android - Thu, 11/15/2018 - 15:44

this might be an easy question but i am wondering how to set up a profile to intercept a button sequence. basically i want to be able to quickly press volume down then volume up and have the phone say the time. i can get it to work if i press both buttons together but am not sure how to have it look for a sequence. thanks

submitted by /u/psychic_O2_sensor
[link] [comments]

Pages