Comments (9)
@mlumbroso Yes soon! Finally I have some time! weeeeeee
from react-native-linkedin-login.
I think I made it work, will update tomorrow with what I did at the end :-)
from react-native-linkedin-login.
I moved everything to cocoapods so you may want to pull
from react-native-linkedin-login.
is this issue fixed ?
from react-native-linkedin-login.
This component works on Android and iOS with RN v0.33.0
?
from react-native-linkedin-login.
On 0.32 it does (you need to try to put parts of MainActivity in MainApplication.java for Android, don't remember exactly I'll try to clarify this), so I don't think there should be any issue with 0.33
from react-native-linkedin-login.
Can you please update doc for RN 0.35? If you have already build application with new version RN, please help.
from react-native-linkedin-login.
Im trying to implement the component on Project with RN v0.33.0
.
At the moment:
android/app/build.gradle
:
include ':react-native-linkedin-login'
project(':react-native-linkedin-login').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linkedin-login/android')
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
android/build.gradle
:
compile project(":react-native-linkedin-login")
compile project(':react-native-vector-icons')
MainAplication
:
import net.jodybrewster.linkedinlogin.RNLinkedinLoginModule;
import net.jodybrewster.linkedinlogin.RNLinkedinLoginPackage;
import com.oblador.vectoricons.VectorIconsPackage;
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new VectorIconsPackage(),
new RNLinkedinLoginPackage()
);
}
MainActivity
:
import com.linkedin.platform.LISessionManager;
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
LISessionManager.getInstance(getApplicationContext()).onActivityResult(requestCode, resultCode, data);
super.onActivityResult(requestCode, resultCode, data);
MainApplication.getCallbackManager().onActivityResult(requestCode, resultCode, data);
}
On /node_modules/react-native-linkedin-login/android/src/main/java/net/jodybrewster/RNLinkedinLoginPackage.java
delete this function:
public RNLinkedinLoginPackage(Activity activity) {
super();
_activity = activity;
}
And app compile, but when i press Linkedin login button:
Attemp t invoke virtual method 'void android.app.Activity.runOnUiThread(java.lang.Runnable)' on a null object reference
on RNLinkedinLoginModule.java line 191.
EDIT: I have problems to implement this component on iOS too. I will wait to @jodybrewster update the component
from react-native-linkedin-login.
I'm having the same issue implementing this on Android as well - can you please update the docs for React Native > 0.35
Followed @luisfuertes steps but got different error:
MainApplication.java:46: error: constructor RNLinkedinLoginPackage in class RNLinkedinLoginPackage cannot be applied to given types;
new RNLinkedinLoginPackage()
^
UPDATE:
This fork seems to have a fix for React Native > 0.35 issue (uses getCurrentActivity): https://github.com/alma-connect/react-native-linkedin-login
Made it work with:
/android/settings.gradle
include ':react-native-linkedin-login'
project(':react-native-linkedin-login').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linkedin-login/android')
/android/app/build.gradle
dependencies {
...
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+"
compile project(":react-native-linkedin-login") // <-- add this one
}
/android/app/.../MainActivity.java
import com.linkedin.platform.LISessionManager; // <-- add this one
(...)
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
LISessionManager.getInstance(getApplicationContext()).onActivityResult(this, requestCode, resultCode, data); // <-- add this one
super.onActivityResult(requestCode, resultCode, data);
MainApplication.getCallbackManager().onActivityResult(requestCode, resultCode, data);
}
/android/.../MainApplicaiton.java
import net.jodybrewster.linkedinlogin.RNLinkedinLoginModule; // <-- add this one
import net.jodybrewster.linkedinlogin.RNLinkedinLoginPackage; // <-- add this one
(...)
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNGoogleSigninPackage(),
new ReactNativeOneSignalPackage(),
new RNLinkedinLoginPackage(), // <-- add this one here
new FBSDKPackage(mCallbackManager)
);
}
IMPORTANT
Make sure to generate hash as described here: http://stackoverflow.com/questions/29787977/android-linkedin-mobile-sdk-error and add it in your LinkedIn Developer Settings > Mobile under Package Name & Package Hash.
NOTE
At the time i'm testing this the LinkedIn API is bit buggy (UNKNOWN ERROR is returned in some cases even though i have everything setup properly).
Please ping me if i'm doing something wrong.
from react-native-linkedin-login.
Related Issues (20)
- Is this project still maintained? HOT 1
- Import syntax has changed for your Objective C file HOT 1
- Cannot setup the linkedin login HOT 12
- 'RCTLinkedinLogin/RCTLinkedinLogin.h' file not found HOT 4
- Linkedin share/post issue HOT 2
- Waiting time before dialog "Download LinkedIn App" appears is too long. HOT 4
- Bitcode bundle could not be generated ... HOT 7
- react-native-linkedin
- No linkedIn App Installed iOS HOT 2
- onActivityResult not invoked after login HOT 2
- LinkedinLogin was called with 1 argument, but expects 5. HOT 1
- Not receiving any respponse? HOT 7
- Android build failed HOT 4
- Unable to get profile images HOT 1
- Authenticating with OAuth 2.0
- Linkedin login not working properly in ios HOT 3
- Proper documentation
- Is your package working? HOT 2
- This library is not working. Please update or switch to react-native-linkedin
- error: cannot find symbol in PackageList.java
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-linkedin-login.