Coder Social home page Coder Social logo

Comments (7)

cacheung avatar cacheung commented on July 17, 2024

@bgrajesh57
In your react native code, you import the Identity library from @adobe/react-native-aepedgeidentity (Identity for Edge Network)

In your android and iOS native code, you registered with import com.adobe.marketing.mobile.Identity (which is the identity for Experience Cloud ID Service)

They are two different identities libraries.

From your native code registration info, it seems like you are sending data to the solutions directly, not going through edge network. In this case, in your react native, you need to remove import {Identity} from '@adobe/react-native-aepedgeidentity';

And
import {Identity} from '@adobe/react-native-aepcore';

Identity.getExperienceCloudId()
.then(cloudId => console.log('experience Cloud id: ' + cloudId))
.catch(error => console.log('experience cloud id Error: ' + error));
};

from aepsdk-react-native.

cacheung avatar cacheung commented on July 17, 2024

Another thing, in your native code you have registered Assurance, Analytics. How did you get these extensions? I don't think you install them from react native dependencies, right?

Looking at your Android and iOS native registration code, it doesn't seem like you are using any aepedge libraries, however, you have them installed in react native dependencies.

What features you are trying to use?

from aepsdk-react-native.

bgrajesh57 avatar bgrajesh57 commented on July 17, 2024

@cacheung Thanks for the clarification 👍

When I import Identity from @adobe/react-native-aepcore I can see the Experience cloud id for iOS.
For Android still I can see time out error. Please assist me on this.

Android Error:

import {Identity, MobileCore, PrivacyStatus} from '@adobe/react-native-aepcore';

 Identity.getExperienceCloudId()
    .then(cloudId => console.log('experience Cloud id: ' + cloudId))
    .catch(error => console.log('experience cloud id Error: ' + error));


Error: getExperienceCloudId returned an unexpected error: general.callback.timeout

from aepsdk-react-native.

bgrajesh57 avatar bgrajesh57 commented on July 17, 2024

@cacheung We want to track analytics for the app. We want to use below methods.

MobileCore.trackState,
MobileCore.trackAction

In that we don't need for below dependency lib for React native? Please confirm , But in the documentation mentioned below lib required to install.

 "@adobe/react-native-aepedge": "^2.0.0",
 "@adobe/react-native-aepedgeidentity": "^2.0.0",
 "@adobe/react-native-aepedgeconsent": "^2.0.0",

from aepsdk-react-native.

cacheung avatar cacheung commented on July 17, 2024

Which documentation you are referring to?
For using AEP-prefix mobile sdk and sending data to Analytics, please take a look of this faq.

In your native code, you have for Android

import com.adobe.marketing.mobile.Analytics;
Analytics.registerExtension();

How did you get the Analytics extension?

from aepsdk-react-native.

bgrajesh57 avatar bgrajesh57 commented on July 17, 2024

Hi @cacheung Form Android registered import com.adobe.marketing.mobile.Analytics; and import com.adobe.marketing.mobile.MobileCore;

For you reference source below.


import com.adobe.marketing.mobile.AdobeCallback;
import com.adobe.marketing.mobile.Analytics;
import com.adobe.marketing.mobile.Assurance;
import com.adobe.marketing.mobile.Identity;
import com.adobe.marketing.mobile.InvalidInitException;
import com.adobe.marketing.mobile.Lifecycle;
import com.adobe.marketing.mobile.LoggingMode;
import com.adobe.marketing.mobile.MobileCore;
import com.adobe.marketing.mobile.Signal;
import com.adobe.marketing.mobile.UserProfile;

 MobileCore.setApplication(this);
         MobileCore.setLogLevel(LoggingMode.DEBUG);
         try {
             Assurance.registerExtension();
             Analytics.registerExtension();
             UserProfile.registerExtension();
             Identity.registerExtension();
             Lifecycle.registerExtension();
             Signal.registerExtension();

             MobileCore.configureWithAppID(getString('adobe_ID'));
             MobileCore.start(new AdobeCallback() {
                 @Override
                 public void call(Object o) {
                     MobileCore.lifecycleStart(null);
                 }
             });
         } catch (InvalidInitException e) {

         }

From React native to get the ECID getting below error. Pease let me know anything we missed out.

import {Identity, MobileCore, PrivacyStatus} from '@adobe/react-native-aepcore';

 Identity.getExperienceCloudId()
    .then(cloudId => console.log('experience Cloud id: ' + cloudId))
    .catch(error => console.log('experience cloud id Error: ' + error));


Error: getExperienceCloudId returned an unexpected error: general.callback.timeout

from aepsdk-react-native.

bgrajesh57 avatar bgrajesh57 commented on July 17, 2024

@cacheung I can see the experienceCloudId form Android as well :)

from aepsdk-react-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.