The best Total War?

I have played a few of the games in the Total War series, but I am not a big fan. Now I’m playing Total War: Arena, which isn’t a real Total War game at all, and like it much better. I’ve already played over 300 battles in the closed beta, in spite of knowing that my progress will be reset. So, why would I prefer this one?

I tend to think of games as having a core game, which in the case of Total War would be a battle, and a shell game, which is the rest of the game outside of battle. Now in the classic Total War games I feel that the core and the shell are at counter-purpose to each other. For maximum success in the shell game, the strategic map, you will always want to have battles in which your troops outnumber the enemy. You don’t want pitched battles, because even if you win, the losses will set you back in the strategic game. But if you consider the core game, the battles in which you are clearly superior in numbers and quality just aren’t any fun. The pitched battles are more fun, because they are more balanced and have a less certain outcome.

Total War: Arena gets rid of the strategic map, and thus resolves that conflict. And the matchmaking makes every battle balanced. I don’t really need to care about losses, because they are automatically bought back with silver, and playing aggressively earns you more silver than your losses cost you. The shell game around the battles is a game of simple progression of units and commanders. And as I said, I don’t even care much about that, as it will be reset at the end of the closed beta anyway.

Of course I can see how the battles in Total War: Arena might not be for everyone. You only control 3 units, and the action is mostly tactical. Due to the usual lack of coordination when playing with random strangers, the strategic positioning on the battle map is mostly non-existing. In fact the game appears to be designed to aggravate the kind of player that doesn’t suffer fools lightly, because there is friendly fire: Ranged units are not very accurate, and artillery is very slow and might fire on a spot where the enemy has moved away from and an ally moved into, so even with the best of intentions it is nearly impossible to completely avoid causing friendly fire when playing ranged. You can even suffer friendly fire from spearmen or pikemen in phalanx formation. Some players are extremely sensitive to losing units to friendly fire, or losing a battle due to allies playing badly or without coordination. I wouldn’t recommend Total War: Arena to them. Me, I’m having a lot of fun and even bought a founder pack.

This Visionary Sci-Fi Author Sees the Destruction of Human Civilization: Predatory Capitalism

Ted Chiang examines how Silicon Valley has become its own worst nightmare.

The political theorist Frederic Jameson once observed that “it has become easier to imagine the end of the world than the end of capitalism.” But what if predatory capitalism finally destroys life on earth? That’s the question posed by science fiction writer Ted Chiang, who argues that in “superintelligent AI,” Silicon Valley capitalists have “unconsciously created a devil in their own image, a boogeyman whose excesses are precisely their own.”

In a new essay for Buzzfeed, part of a series about the forces shaping our lives in 2017, the acclaimed author of “Arrival” (Stories of Your Life and Others) deconstructs our fear of artificial intelligence; specifically, that of tech titans like Tesla founder Elon Musk. For Musk, the real threat is not a malevolent computer program rising up against its creator like Skynet in the Terminator films as much as AI destroying humanity by accident. In a recent interview with Vanity Fair, Musk imagines a mechanized strawberry picker wiping out the species simply as a means of maximizing its production.

“This scenario sounds absurd to most people, yet there are a surprising number of technologists who think it illustrates a real danger. Why?” Chiang wonders. “Perhaps it’s because they’re already accustomed to entities that operate this way: Silicon Valley tech companies.”

In Musk’s hypothetical, the destruction of human civilization follows the logic of the free market.

“Consider: Who pursues their goals with monomaniacal focus, oblivious to the possibility of negative consequences? Who adopts a scorched-earth approach to increasing market share?” Chiang continues. “[The] strawberry-picking AI does what every tech startup wishes it could do—grows at an exponential rate and destroys its competitors until it’s achieved an absolute monopoly.”

Ultimately, the catastrophe Musk and others foretell has already arrived in the form of “no-holds-barred capitalism.”

“We are already surrounded by machines that demonstrate a complete lack of insight, we just call them corporations,” Chiang continues. “Corporations don’t operate autonomously, of course, and the humans in charge of them are presumably capable of insight, but capitalism doesn’t reward them for using it. On the contrary, capitalism actively erodes this capacity in people by demanding that they replace their own judgment of what ‘good’ means with ‘whatever the market decides.'”

For Chiang, the operative word is insight. Our capacity for self-reflection, or the “recognition of one’s own condition,” is what separates humans from the Googles, Facebooks and Amazons. And it is this deficiency that makes these monopolies so uniquely dangerous.

“We need for the machines to wake up, not in the sense of computers becoming self-aware, but in the sense of corporations recognizing the consequences of their behavior,” he concludes. “Just as a superintelligent AI ought to realize that covering the planet in strawberry fields isn’t actually in its or anyone else’s best interests, companies in Silicon Valley need to realize that increasing market share isn’t a good reason to ignore all other considerations.”

Read Chiang’s essay at Buzzfeed.

 

Related Stories

  • Are You Suffering from Selfitis?
  • Uber Stole Trade Secrets, Bribed Foreign Officials and Spied on Rivals, Filing Says
  • Dustin Hoffman Faces Disturbing New Allegations of Sexual Misconduct

Robert Reich: A Guide to Why the Trump-Republican Tax Plan Is a Disgrace (for When you Confront Your Republican Uncle Bob During the Holidays)

Shame on Trump and the Republicans who have lied to the pubic about its consequences.

Here are the 3 main Republican arguments in favor of the Republican tax plan, followed by the truth.

1. It will make American corporations competitive with foreign corporations, which are taxed at a lower rate.

Rubbish.

(1) American corporations now pay an effective rate (after taking deductions and tax credits) that’s just about the same as most foreign based corporations pay.

(2) Most of these other countries also impose a “Value Added Tax” on top of the corporate tax.

(3) When we cut our corporate rate from 35% to 20%, other nations will cut their corporate rates in order to be competitive with us – so we gain nothing anyway.

(4) Most big American corporations who benefit most from the Republican tax plan aren’t even “American.” Over 35 percent of their shareholders are foreign (which means that by cutting corporate taxes we’re giving a big tax cut to those foreign shareholders). 20 percent of their employees are foreign, while many Americans work for foreign-based corporations.

(5) The “competitiveness” of America depends on American workers, not on “American” corporations. But this tax plan will make it harder to finance public investments in education, health, and infrastructure, on which the future competitiveness of American workers depends.

(6) American corporations already have more money than they know what to do with. Their profits are at record levels. They’re using them to buy back their shares of stock, and raise executive pay. That’s what they’ll do with the additional $1 trillion they’ll receive in this tax cut.

***

2. With the tax cut, big corporations and the rich will invest and create more jobs.

Baloney.

(1) Job creation doesn’t trickle down. After Ronald Reagan and George W. Bush cut taxes on the top, few jobs and little growth resulted. America cut taxes on corporations in 2004 in an attempt to get them to bring their profits home from abroad, and what happened? They didn’t invest. They just bought up more shares of their own stock, and increased executive pay.

(2) Companies expand and create jobs when there’s more demand for their goods and services. That demand comes from customers who have the money to buy what companies sell. Those customers are primarily the middle class and poor, who spend far more of their incomes than the rich. But this tax bill mostly benefits the rich.

(3) At a time when the richest 1 percent already have 40 percent of all the wealth in the country, it’s immoral to give them even more – especially when financed partly by 13 million low-income Americans who will lose their health coverage as a result of this tax plan (according to the Congressional Budget Office), and by subsequent cuts in safety-net programs necessitated by increasing the deficit by $1.5 trillion.

***

3. It will give small businesses an incentive to invest and create more jobs.

Untrue.

(1) At least 85 percent of small businesses earn so little they already pay the lowest corporate tax rate, which this plan doesn’t change.

(2) In fact, because the tax plan bestows much larger rewards on big businesses, they’ll have more ability to use predatory tactics to squeeze small firms and force them out of business.

***

Don’t let your Uncle Bob be fooled: Republicans are voting for this because their wealthy patrons demand it. Their tax plan will weaken our economy for years – reducing demand, widening inequality, and increasing the national debt by at least $1.5 trillion over the next decade.

Shame on the greedy Republican backers who have engineered this. Shame on Trump and the Republicans who have lied to the pubic about its consequences.

 

 

Related Stories

  • As L.A. Burns, Republicans Vote for a Tax Hike on the Victims
  • Unbelievable Censorship: Trump Bans CDC from Using These 7 Words
  • Franken and Moore Lesson: ‘When It Comes to Sex Scandals, the Politicians… Most Guilty and Least Repentant Are The Ones Who Survive’

Firefox Focus gets a little bit better with autocomplete and more search engines

Mozilla

It’s been over a year since Firefox launched its privacy-focused Focus browser, and Mozilla hopes to double-down on the app’s popularity by giving you faster access to your most visited sites and the ability to add any search engine you want.

With the latest update, which Mozilla announced through its blog, you now have the option to turn on URL autocomplete. That way, you don’t have to fully type out the websites you visit the most — just type a few letters, and the search field takes care of the rest.

If you choose to enable autocomplete, Focus can tap into over 450 popular URLs and have them autocomplete in the address bar when you’re typing out a URL. If there are websites you frequent that are not part of that list, the app also lets you add and maintain custom autocomplete URLs in conjunction with what it knows.

Mozilla

Of course, you can disable URL autocomplete at any moment, and even though the feature doesn’t necessarily add anything to Focus, it does allow for greater convenience.

Focus’ update also lets you add search engines from any website that has a search field. For example, if you want to look up a movie on Rotten Tomatoes to see if it got good reviews, you can see the movie’s ranking without going to Rotten Tomatoes’ website.

Again, this doesn’t necessarily add anything to Focus except convenience, though that is what the app has strived for since it made its debut on iOS in 2016. Focus then hopped over to Android back in June, though the goal of being an ultra-lean, privacy-focused browser continued.

Editor’s Pick

By default, Focus blocks ad, analytics, and social trackers, though you are more than welcome to also block other content trackers. You can even block Web fonts, if you so choose, and once you’re done browsing, you can hit the Erase button on the top right to erase your browsing history.

Focus was designed to live side-by-side with the regular Firefox browser, not replace it, though folks certainly seem happy with it — Mozilla says Focus has been downloaded over one million times on Android within the first month of availability.

If you want to count yourself as one of those downloads, you can do so through the link below.

Download the app

Android WiFi: Android – LeaVe my baThRoom at-least !

android wifi


WiFi is a technology for wireless local area networking with devices based on the IEEE 802.11 standards. Devices that can use Wi-Fi technology include personal computers, video-game consoles, smartphones, digital cameras, tablet computers, digital audio players and modern printers. Wi-Fi compatible devices can connect to the Internet via a WLAN and a wireless access point. Such an access point (or hotspot) has a range of about 20 meters (66 feet) indoors and a greater range outdoors. Hotspot coverage can be as small as a single room with walls that block radio waves, or as large as many square kilometers achieved by using multiple overlapping access points.

Android allows applications to access to view the access the state of the wireless connections at very low level. Android provides WiFi API through which applications can communicate with the lower-level wireless stack that provides WiFi network access. Almost all information from the device supplicant is available, including the connected network’s link speed, IP address, negotiation state, and more, plus information about other networks that are available. Some other API features include the ability to scan, add, save, terminate and initiate WiFi connections.

WifiManager is the primary API for managing all aspects of WiFi connectivity. Get an instance of this class by calling Context.getSystemService(Context.WIFI_SERVICE). It’s Syntax is given below:-

WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);


WifiManager class provides different methods to control WiFi activities:-

  • int addNetwork(WifiConfiguration config): Add a new network description to the set of configured networks.
  • WifiManager.MulticastLock createMulticastLock(String tag): Create a new MulticastLock
  • WifiManager.WifiLock createWifiLock(String tag): This method creates a new WifiLock.
  • boolean disconnect(): This method disassociate from the currently active access point.
  • boolean enableNetwork(int netId, boolean disableOthers): This method allow a previously configured network to be associated with.
  • int getWifiState(): This method gets the Wi-Fi enabled state
  • boolean isWifiEnabled(): This method return whether Wi-Fi is enabled or disabled.
  • boolean setWifiEnabled(boolean enabled): This method enable or disable Wi-Fi.
  • int updateNetwork(WifiConfiguration config): This method update the network description of an existing configured network.
  • boolean disableNetwork (int netId): Disable a configured network.

In order to scan a list of wireless networks, you also need to register your BroadcastReceiver. It can be registered using registerReceiver method with argument of your receiver class object. Its syntax is given below −

class WifiScanReceiver extends BroadcastReceiver {

   public void onReceive(Context c, Intent intent) {
   }
}
WifiScanReceiver wifiReciever = new WifiScanReceiver();
registerReceiver(wifiReciever, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));

The wifi scan can be start by calling the startScan method of the WifiManager class. This method returns a list of ScanResult objects. You can access any object by calling the get method of list. Its syntax is given below :-


List wifiScanList = mainWifiObj.getScanResults();

String data = wifiScanList.get(0).toString();

Example

Let’s see the simple example of wifi to enable and disable the wifi service.
To run this example you need actual Android device.
  • You will use Android studio to create an Android application under a package net.suven.android.androidwifi.
  • Modify src/MainActivity.java file to add necessary code.
  • Modify the res/layout/activity_main to add respective XML components.
  • Modify the AndroidManifest.xml to add the necessary permissions
  • Run the application and choose a running android device and install the application on it and verify the results.
Following is the content of src/MainActivity.java

package net.suven.android.androidwifi;

import android.net.wifi.WifiManager;
import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;


public class MainActivity extends Activity {
Button enableButton,disableButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

enableButton=(Button)findViewById(R.id.button);
disableButton=(Button)findViewById(R.id.button1);

enableButton.setOnClickListener(new OnClickListener(){
public void onClick(View v){
WifiManager wifi = (WifiManager)getSystemService(Context.WIFI_SERVICE);
wifi.setWifiEnabled(true);
Toast.makeText(getBaseContext(), "WiFI Enabled",
Toast.LENGTH_LONG).show();

}
});

disableButton.setOnClickListener(new OnClickListener(){
public void onClick(View v){
WifiManager wifi = (WifiManager)getSystemService(Context.WIFI_SERVICE);
wifi.setWifiEnabled(false);
Toast.makeText(getBaseContext(), "WiFI Disabled",
Toast.LENGTH_LONG).show();
}
});
}
}
Following is the content of activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"

tools:context=".MainActivity">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView"
android:textSize="30dp"
android:text="ANDROID WIFI"
android:layout_above="@+id/textView2"
android:layout_centerHorizontal="true"
android:layout_marginBottom="11dp" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="SCTPL"
android:id="@+id/textView2"
android:textSize="35dp"
android:textColor="#ff16ff01"
android:layout_above="@+id/imageView"
android:layout_centerHorizontal="true" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageView"
android:src="@drawable/suvenlogo"
android:layout_centerVertical="true"
android:layout_alignEnd="@+id/textView" />

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Enable WiFi"
android:id="@+id/button"
android:layout_alignParentBottom="true"
android:layout_toStartOf="@+id/textView2"
android:layout_marginEnd="14dp"
android:layout_marginBottom="56dp" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="76dp"
android:text="Disable WiFI"
android:layout_alignBaseline="@+id/button"
android:layout_alignBottom="@+id/button"
android:layout_alignParentEnd="true"
android:layout_marginEnd="20dp" />

</RelativeLayout>
Following is the content of AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.suven.android.androidwifi">
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
Following is the output of Application

android wifi enabled

android wifi disabled
Click here to download Source Code and APK

 Learn Android Programming?


Elemental Evil: Session 9

In the previous session the group arrived at the base of Feathergale Spire. As Princes of the Apocalypse is designed as a sandbox adventure and doesn’t have a linear story-line and “quests” leading people to the next goal, this session started with a discussion between the players on what exactly they were looking for in Feathergale Spire. The one point where they could all agree upon was that they were looking for Glasstaff, the evil mage from the previous adventure, who had escaped them but left a letter indicating he could be found in this tower. Landry the halfling monk also had a larger view on fighting the evil elemental cults as a goal, while Theren the elf warrior was especially interested in finding the keys to magical portal they had found in the previous session.

With the help of their Aarakocra allies the group ascended the pillar to the base of the tower, one level below the main entrance with the drawbridge. Here they found 12 large stable doors, with signs that this was were the flying mounts were kept. Listening to the doors they found an unoccupied stable and entered there. Another door led to the central staircase of the tower, but one of the Feathergale Knights was in that room. The group managed to jump him with surprise, and kill him before he could raise the alarm.

Going up the staircase they found that at each level there was a central room with doors to the other rooms of the level. They decided to skip all those doors, and just continue to go up. That worked well, because I played the tower as written, with there not being any guards on the staircase. So the group arrived just below the top level, seeing open sky above them. Landry decided to sneak a peek to see who or what was on the top landing. However he miserably failed his stealth check, and was seen by Glasstaff, who fired a magic missile at him. That started a fight, with the enemy consisting of the mage, two Feathergale Knights on giant vultures, and Thurl Merosska.

The group concentrated on Glasstaff, killing him before he got another spell off (I should have let him cast Shield as a reaction on the first attack, but forgot about that). Then Theren wanted to call a truce, persuading Thurl that they only were here because of a previous beef with Glasstaff, which he assumed to be the boss of the tower. However it turned out that Thurl was the boss, and Glasstaff his invited guest, so the group reconsidered the truce idea and the fight continued.

That fight turned out to be tough. In fact the book says Feathergale Spire could be handled at level 3, and they had a hard time at level 4. I guess the book assumes that the players don’t actually fight the air cult, because there is an option of joining them on a hunt instead and then sending them off against the rival earth cult. As an alternative the book describes the group being captured and thrown off the tower, but then being rescued by the Aarakocra. As I had played up the fight against the evil elemental cults and the information the players got on them, as opposed to the “players are in the dark about what is going on while searching for a missing delegation” story of the book, and as I had added Glasstaff to the tower, the peaceful option was a lot less likely.

Fortunately it all ended well: The group defeated Thurl and his knights on the pinnacle. They got the mage’s glass staff of defense [DM’s note: I changed that one to be able to cast Shield as a reaction, not only as an action, which would have made the spell rather useless.], they got one of the four needed keys to the magic portal from Thurl, and they used the Wing Wear wondrous item they had found in the stables to paraglide down from the top of the tower before further inhabitants of the tower stormed up the stairs. So apart from them not getting the xp for having killed everybody (which would have been very difficult) they achieved a near perfect outcome.

The group returned via the Sighing Valley to Red Larch and rested over night. Then they discussed where to go next. From Popée’s Zhentarim contact, the town baker, they got the information that the warrior in stone armor they had found in one of the four graves was presumably an earth cultist. From the dwarven book from the previous adventure they had a rough idea where the four Haunted Keeps were, and the baker told them about the Sacred Stone Monastery. They also learned about the existence of Rivergard Keep, and the information they had from Landry’s Order of the Gauntlet contact suggested that this might be where the water cultists were hiding out. That seemed to be a good next target, but as it was getting late we ended the session there.

AIrrowy takes your mind off signals while keeping roads safe

Don’t you hate it when people don’t use their turn signals? I have to say most of my close calls have been due to drivers failing to use these handy lights. And it seems my experience is backed by a study from the Society of Automotive Engineers, which claims about 2 million accidents a year are caused by drivers not signaling a change of lane or turn. 

Other featured campaigns:

  • Elf Smart Plug makes your home intelligent for cheap
  • PLY is a motorcycle smart helmet that won’t break the bank
  • NOCABLE battery pack charges your smartphone wirelessly

Why is it such a hassle to simply move a lever. Not to defend those who don’t follow the rules, but driving is an attention hog. You have to look for cars, motorcycles, bicycles, lanes, signs, people, animals, debris, speed limits and more. There are plenty of distractions that could endanger your life, so maybe drivers just forget to reach for that lever in the middle of chaos. We are all human, after all, so a little help couldn’t hurt. 

We have come across a very neat tool being featured on Kickstarter. It goes by the name of AIrrowy and automates turn signal actions. The process is simple. Once installed on your vehicle (cars, motorcycles, etc.), it connects to your smartphone via Bluetooth and uses an app to predict your driving route. In essence, it is a simplified navigator that knows when and where you are turning. Signals will be activated accordingly.

Interested? The Kickstarter campaign only has a bit over 2 days to go, so you best make your move soon. You can get an AIrrowy for as low as €68. Shipments are estimated to start on April 2018, though, so you will have to wait a few months to stop worrying so much about signals. 

What do you guys think of these automated driving technologies? Will they spoil drivers? Should users still keep an eye on signals to make sure everything is functioning properly? After all, even big names like Tesla have had failures. 

Check out AIrowwy

Android LinkedIn Integration: Android – LeaVe my baThRoom at-least !

LinkedIn is a business and employment-oriented social networking service that operates via websites and mobile apps. It is mainly used for professional networking, including employers posting jobs and job seekers posting their curriculum vitae. LinkedIn allows members (both workers and employers) to create profiles and “connections” to each other in an online social network which may represent real-world professional relationships. It presents curriculum vitae of the individual which can be browsed by recruiters.

Android LinkedIn Integration

Android allow applications to connect to LinkedIn and share data or any kind of updates on LinkedIn.
Following are the ways through which you can integrate LinkedIn in application

  • LinkedIn SDK(Scribe)
  • Intent Share

1. LinkedIn SDK(Scribe)

The mobile SDK for Android increases your app’s time to market by providing out-of-box support for LinkedIn natively inside your Android applications. This allows you to boost your sign in conversion rates and provides you more time to work on the things that matter.

The SDK provides:
Single sign-on (SSO) authentication, in conjunction with the LinkedIn mobile app.
A convenient wrapper for making authenticated calls to LinkedIn’s REST APIs.
Deep linking” to additional member data in the LinkedIn mobile app.

Follow steps to integrate LinkedIn SDK 

Creating a new app in LinkedIn Developer account
Create a new LinkedIn application at https://www.linkedin.com/developer/apps. Click on Create new Application and follow the setup.
 create LinkedIn developer app
Fill following form
 create LinkedIn developer app form

 you will get Application ID for your Application

Create new Android Project
Open AndroidManifest.xml file and include the following code given below:
<uses-permission android:name=”android.permission.INTERNET” />
Download Mobile LinkedIn SDK 
Go to https://developer.linkedin.com/docs/android-sdk  and download a Mobile SDK for Android.
Unzip the file and add LinkedIn-sdk folder in your project.
Add Mobile LinkedIn SDK in project
Open setting.gradle file in your project and include linkedin-sdk folder in your project.
include ‘:app’,’:linkedin-sdk
Adding library in depencencies
Add the following code in the file’s (/app/build.gradle file) dependencies to compile linkedin-sdk
compile project(‘:linkedin-sdk’)
compile ‘com.squareup.picasso:picasso:2.5.2’
compile ‘de.hdodenhof:circleimageview:1.3.0’
Synchronize your project
Generate hash Key
We need to generate a hash key. This generated Hash key will integrate your app with LinkedIn account.
Adding hash key in your LinkedIn Developer account
Go to https://www.linkedin.com/developer/apps  select your application name and click the Mobile tab. Add the package name and generated hash key in your LinkedIn Application. This hash key will authenticate your mobile application.
LinkedIn developer app hash key
Once everything is complete, you can run the Linkedin sample application

2. Intent Share

An android share intent allow your app to share contents such as URL or text and Image to other apps installed in your Android device like Facebook, Twitter, Messaging, Instagram, whatsapp, etc.

 Android provides intent library to share data between activities and applications. In order to use it as share intent , we have to specify the type of the share intent to ACTION_SEND. Its syntax is given below

Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);

Next thing you need to is to define the type of data to pass , and then pass the data. Its syntax is given below 

shareIntent.setType("text/plain");
shareIntent.putExtra(Intent.EXTRA_TEXT, " From Suven Consultency");
startActivity(Intent.createChooser(shareIntent, "Hello!!!!"));
Example
here is an example to share data on Linkedin using intent share.
  • You will use Android studio to create an Android application under a package net.suven.android.android_linkedinintegration.
  • Modify src/MainActivity.java file to add necessary code.
  • Modify the res/layout/activity_main to add respective XML components.
  • Run the application and choose a running android device and install the application on it and verify the results.
MainActivity.java
package net.suven.android.android_linkedinintegration;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;

import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import java.io.FileNotFoundException;
import java.io.InputStream;

public class MainActivity extends AppCompatActivity {
private ImageView img;

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

img = (ImageView) findViewById(R.id.imageView);
Button b1 = (Button) findViewById(R.id.button);

b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
Uri screenshotUri = Uri.parse("android.
resource://net.suven.android.android_linkedinintegration/*");

try {
InputStream stream = getContentResolver().openInputStream(screenshotUri);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

sharingIntent.setType("suvenlogo/jpeg");
sharingIntent.putExtra(Intent.EXTRA_STREAM, screenshotUri);
startActivity(Intent.createChooser(sharingIntent, "Share image using"));
}
});
}
}
activity_main
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:textSize="30dp"
android:text="Linkedin Share" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tutorials Point"
android:id="@+id/textView2"
android:layout_below="@+id/textView"
android:layout_centerHorizontal="true"
android:textSize="35dp"
android:textColor="#ff16ff01" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageView"
android:layout_below="@+id/textView2"
android:layout_centerHorizontal="true"
android:src="@drawable/logo"/>

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Share"
android:id="@+id/button"
android:layout_marginTop="61dp"
android:layout_below="@+id/imageView"
android:layout_centerHorizontal="true" />

</RelativeLayout>

Following is the output of application.

android linkedin integration app
Click on share button. you will see list of share provider
share post
Now select LinkedIn from the list and then write your message shown in following image 

write linkedin post


Click here to download Source Code and APK

Are you interested to learn Android Programming?

A ‘Security Robot’ for the Homeless Has Already Been Tried—It Didn’t Go Well

The 400lb machine that once patrolled outside the San Francisco SPCA prompted a backlash, as some argued its real mission was to drive people away.

To some who are homeless, San Francisco’s latest security robot was a rolling friend on five wheels that they called “R2-D2 Two”. To others living in tents within the droid’s radius, it was the “anti-homeless robot”.

For a month, the 400lb, bullet-shaped bot patrolled outside the not-for-profit San Francisco SPCA animal shelter, rolling around the organization’s parking lots and sidewalks, capturing security video and reading up to 300 license plates per minute. Homeless people who pitched their tents in an alleyway nearby complained they felt the beeping, whirring droid’s job was to run them off.

“We called it the anti-homeless robot,” said John Alvarado, who was one of numerous people camping next to the animal shelter when the robot arrived. He said he quickly decided to move his tent half a block away: “I guess that was the reason for the robot.”

Officials of both the SF SPCA and Knightscope, who rented the robot to the shelter, denied that the intention was to dislodge homeless encampments.

“The SPCA has the right to protect its property, employees and visitors, and Knightscope is dedicated to helping them achieve this goal,” Knightscope said in a statement.

SF SPCA staff members said the facility had been plagued with break-ins, staff members had been harassed as they went to the parking lot and sidewalks were littered with hypodermic needles. Jennifer Scarlett, the SF SPCA president, said in a release that her organization “was exploring the use of a robot to prevent additional burglaries at our facility and to deter other crimes that frequently occur on our campus – like car break-ins, harassment, vandalism, and graffiti – not to disrupt homeless people”.

But after complaints about the program were shared widely on social media, the organization quickly admitted it had made a mistake in its choice of security guards – and fired the robot.

“Since this story has gone viral, we’ve received hundreds of messages inciting violence and vandalism against our facility, and encouraging people to take retribution,” said Scarlett, noting that their campus had since been vandalized twice. “We are taking this opportunity to reflect on the ‘teachable moment’.”

Some of the homeless people who crossed paths with the white security robot, which bore images of dogs and cats, as it patrolled outside of San Francisco SPCA this month thought it was a cute and a positive addition to the area.

TJ Thornton, whose tent is still pitched across the street from the shelter’s parking lot, nicknamed the bot “R2-D2 Two”. He liked how the machine made little whistling sounds as it moved along the sidewalk and how it would even say “hello” if you walked past it.

Thornton said he thought the bot had a positive influence on the neighborhood and relieved the pressure on local homeless people to always keep an eye on cars parked nearby. “People living on the streets actually watch out for the cars. If anyone does anything stupid, like breaking into cars, it reflects on us.”

Others saw the robot as Big Brother, surveilling their every move with video cameras. “That SPCA robot was the bane of our existence,” said Lexi Evans, 26, who has been living on San Francisco’s streets for 13 years. “It was driving us crazy.”

She said her group of friends had a tent encampment behind the SPCA. When they first saw the robot looking at them, they found it creepy. Then they noticed its white light flashing and thought it was recording their every move on video. Later they observed police officers coming to interact with the robot and wondered whether it was feeding information to law enforcement.

“We started feeling like this thing was surveilling us for the police,” said Evans, whose whole tent encampment has now moved around the block outside another business. “That’s officially invasion of privacy. That’s uncool.”

Evans said that once, someone became so angry with the thing that they knocked it over. The robot made a “whee-ooh wah” sound.

In another instance, somebody “put a tarp over it, knocked it over and put barbecue sauce on all the sensors”, Scarlett, the SPCA president, told the San Francisco Business Times.

Trouble really started for the robot last week, when the city issued an order for it to stay off the public sidewalk or face a daily penalty of up to $1,000 for operating in the public right of way without a permit. Then the story hit the internet, with Scarlett telling the Business Times that “from a walking standpoint, I find the robot much easier to navigate than an encampment”.

But by Friday, SF SPCA was apologizing for having brought in the machine.

“We regret that our words were ill-chosen. They did not properly convey the pilot program’s intent and they inaccurately reflected our values,” said Scarlett. “We are a nonprofit that is extremely sensitive to the issues of homelessness.”

Knightscope’s robots have gotten into trouble in other cities. Last year, a similar robot allegedly ran over a 16-month-old toddler at the Stanford Shopping Center in the town of Palo Alto, causing minor injuries. Another Knightscope security robot became famous on social media for drowning itself in the fountain of the Washington DC office complex it was policing.

“I already miss it,” said Danica Dito, who works in the SPCA administrative offices. “Just the fact that it rolled around discouraged crime.”

 

Related Stories

  • O’Reilly Accuser: Time Bomb of Info on Sex Harasser Executives in ‘Highest Positions’ at Fox News Is Counting Down
  • How One American Journalist Took Down Militiamen Who Raped 50 Young Girls
  • Police Shoot a Lot More People Than Previously Known

A Guide To Better Google Search Techniques

A web search engine is a software system that is designed to search for information on the World Wide Web. The search results are generally presented in a line of results often referred to as search engine results pages (SERPs). The information may be a mix of web pages, images, and other types of files.
The Internet is so full of information that it’s nearly impossible to check its limits. That’s why, search engines were developed to maintain a search-able database of the web’s content. People employ the use of search engines to look up for information on the web.
Google Search, commonly referred to as Google Web Search or simply Google, is a web search engine developed by Google. It is the most-used search engine on the World Wide Web, handling more than three billion searches each day. You type in the query, and the search engine provides you with the search results. In most cases you’re satisfied but sometimes, you’re not. This is where learning the proper techniques to type in your search query comes in handy

Why The Need To Learn Proper Search Techniques?
Everyone including students, researchers, writers, etc. requires information, and they use search engines for that very reason. People spend most of their time continuously looking for the right information because they’re not aware of the proper search techniques. Learning and using good search techniques will help you in the following ways:
  • Better search results
  • Saves your time

How To Use Google.com

Google is a smart and intelligent search engine with many exciting features. But not all the features are rolled out instantly for all versions. Google.com is always first to get feature updates, and then updates are provided in versions specific to different countries such as google.co.uk, google.co.in, or google.sh.
Google’s version for your country might not support all the search techniques described below. That’s why, it’s suggested to use google.com to avail maximum benefits of the search features and techniques.
 Note: Typing google.com automatically redirects you to its version for your country, but you can override this behavior by going to www.google.com/ncr.

Basic Search Techniques

1. Keep It Simple

Keep your search simple and web-friendly. Start by entering one or two words, and gradually adding relevant or important words, if you’re unsatisfied with the results. Less is more for a search engine; meaning the less words you query for, the more results the search engine provides as output.
For example:
Query: [who is the prime minister of India]
Better query: [prime minister of India]

2. Order Of Keywords

Select the right keywords to make your search. Search results completely depend on the given keywords, and if keywords are chosen wisely, then results are more efficient.
Put yourself in the shoes of the author, and think of what words he/she would use to write/describe what you’re trying to find. If you’re looking for a phrase or quote, then keep the order of the words as accurate as possible to get the optimum search results.

3. Skip Unnecessary Parts

Google is smart enough to handle most of your typos, and other things that could just be ignored. That’s why you should skip those things in your query to save time.
You should not worry about the following when writing a search query:
  • Spelling
  • Cases (uppercase or lowercase)
  • Punctuation (dot, question mark, exclamation mark, and more)
  • Special characters (plus, minus, brackets, and more)

4. Social Search

Google is really good at handling searches related to people and social networks. You can search for people and their social profiles using:
+[profile-name]
By adding a ‘+’ before a profile-name, you can search for Google+ profiles and pages.
#[word]
Using the ‘#’ before a word enables you to search for hashtags in Google+, Twitter, and more social networks.
For example: [#privacy]
@[person-name]
You can search for social accounts associated with a person’s name by putting the ‘@’ sign before his/her name.
For example: [@rocky jagtiani]

5. Get Sunrise And Sunset Times

You can use Google to get sunrise and sunset times for many cities of the world. Type your search query in the format of [sunrise place-name] or [sunrise zip-code] to get the sunrise time for the specified location. For sunset times, just substitute the words as per the following style of [sunset place-name] or [sunset zip-code].
For example:
  • [sunrise chembur] 
  • [sunset pune]

Advanced Search techniques

You can use the Google Advanced Search form for a more convenient search

6. Synonym Search:

You can use the synonym search feature to tell Google to even search for synonyms of a specified word in the search query. This is helpful for when you want to search for a word and all its similar words without having to spend time looking for them individually.
Using the tilde symbol (~) before a word tells Google to search for the words and its synonyms too. Type your search query in the format of [~synonymWord otherWords] to search for the word and its synonyms in a single search.

7. Search For Numbers In A Range

You can tell Google to search within a range of numbers, such as dates, prices, and measurements. Using two periods (dots) between two numbers makes Google search within that number range and skip other results.
Using two periods after a number indicates a lower minimum (number..) while putting it before the number indicates a higher maximum (..number). Type your search query in the format of [firstNumber..secondNumber otherWords] to search between a specified lower and upper bounds.

8. Search Using File Types

You can tell Google to search for a specified type of file for your query. Using filetype operators before a type of file tells Google to search only for specified file types and skip other files. Type your search query in the format of [filetype:type otherWords] to search for a specific file type.
For example: [filetype:pdf free java tutorial]

Want to learn Data Analytics?