GithubHelp home page GithubHelp logo

android-sdk's Issues

android .DexArchiveMergerException problem

hello to every one
i have a problem with android and i can't understand why appear to me when run app on mobile

Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

how i solve it please help me.
good luck

Cannot evaluate UbuduBeaconRegion.toString() at "areaEntered" method

Hi, I just run UbuduSDKDemo, after setting up every beacon in the web platform and im getting this error just when my app launch triggers areaEntered(UbuduArea area) method, its the parameter "area" wich is bringing the exception:

"Method threw 'java.lang.NullPointerException' exception. Cannot evaluate com.ubudu.sdk.implementation.UbuduBeaconRegion.toString()"

Any Ideas?

Methods missing

The methods:

com.ubudu.sdk.UbuduGeofenceManager#setGeofenceDelegate
com.ubudu.sdk.UbuduBeaconManager#setBeaconDelegate

are not present on the interfaces, but they exist on the implementation classes: com.ubudu.sdk.implementation.UbuduGeofenceManager and com.ubudu.sdk.implementation.UbuduBeaconManager.

The README should probably be updated or even better, the setXXXDelegate methods moved up to the interfaces.

I just download 1.4.9 btw.

Regards,

No Notification is being triggered

I setup some interactions and rules on the Ubudu manager, but they are not being triggered. Here's a sample of the code I setup. Am I missing something?

package com.test.demo;

import android.app.FragmentManager;
import android.location.Location;
import android.os.Bundle;
import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.os.Handler;
import android.os.Looper;

import com.test.demo.fragments.MainFragment;
import com.test.demo.fragments.MapFragment;
import com.test.demo.fragments.ScanFragment;
import com.ubudu.sdk.UbuduArea;
import com.ubudu.sdk.UbuduAreaDelegate;
import com.ubudu.sdk.UbuduBeaconManager;
import com.ubudu.sdk.UbuduEvent;
import com.ubudu.sdk.UbuduSDK;
import com.ubudu.sdk.UbuduRangedBeaconsNotifier;
import com.ubudu.sdk.UbuduBeacon;

import java.net.URL;
import java.util.List;
import java.util.Iterator;

public class MainActivity extends AppCompatActivity
        implements NavigationView.OnNavigationItemSelectedListener, UbuduAreaDelegate {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);


        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
        ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
                this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
        drawer.setDrawerListener(toggle);
        toggle.syncState();

        NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
        navigationView.setNavigationItemSelectedListener(this);

        FragmentManager fm = getFragmentManager();
        fm.beginTransaction().replace(R.id.content_frame, new MainFragment()).commit();

        UbuduSDK sdk = UbuduSDK.getSharedInstance(getApplicationContext());
        sdk.setNamespace("xxxx");
        sdk.setFileLogEnabled(true);
        UbuduBeaconManager beaconManager = sdk.getBeaconManager();
        beaconManager.setAreaDelegate(this);
        beaconManager.setEnableAutomaticServerNotificationSending(true);
        beaconManager.setEnableAutomaticUserNotificationSending(true);
        beaconManager.setRangedBeaconsNotifier(new UbuduRangedBeaconsNotifier() {

            @Override
            public void didRangeBeacons(final List<UbuduBeacon> rangedBeacons) {
                Handler refresh = new Handler(Looper.getMainLooper());
                refresh.post(new Runnable() {
                    public void run() {
                        android.util.Log.e("", "beacons ranged: " + rangedBeacons.size());
                        Iterator<UbuduBeacon> iter = rangedBeacons.iterator();
                        while (iter.hasNext()) {
                            UbuduBeacon b = iter.next();
                            Log.d("test", "name: " + b.name() + ", rssi: " + b.rssi() + ", minor: " + b.minor() + ", major: " + b.major());
                        }
                    }
                });
            }
        });
        beaconManager.start(getApplicationContext());
    }

    @Override
    public void onBackPressed() {
        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
        if (drawer.isDrawerOpen(GravityCompat.START)) {
            drawer.closeDrawer(GravityCompat.START);
        } else {
            super.onBackPressed();
        }
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }

    @SuppressWarnings("StatementWithEmptyBody")
    @Override
    public boolean onNavigationItemSelected(MenuItem item) {

        FragmentManager fm = getFragmentManager();

        int id = item.getItemId();

        if (id == R.id.nav_home) {
            fm.beginTransaction().replace(R.id.content_frame, new MainFragment()).commit();
        } else if (id == R.id.nav_map) {
            fm.beginTransaction().replace(R.id.content_frame, new MapFragment()).commit();
        } else if (id == R.id.nav_scan) {
            fm.beginTransaction().replace(R.id.content_frame, new ScanFragment()).commit();
        }

        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
        drawer.closeDrawer(GravityCompat.START);
        return true;
    }

    @Override
    public boolean statusChanged(int i) {
        if(i == UbuduAreaDelegate.SERVICE_STARTED) {
            Log.d("UbuduManagerDelegate", "Beacon monitoring has started");
        }
        return true;
    }

    @Override
    public void positionChanged(Location location) {
        Log.d("UbuduManagerDelegate", location.toString());
    }

    @Override
    public void areaEntered(UbuduArea ubuduArea) {
        Log.d("UbuduManagerDelegate", ubuduArea.toString());
    }

    @Override
    public void areaExited(UbuduArea ubuduArea) {
        Log.d("UbuduManagerDelegate", ubuduArea.toString());
    }

    @Override
    public boolean notifyServer(URL url) {
        return true;
    }

    @Override
    public void ruleFiredForEvent(UbuduEvent ubuduEvent) {
        Log.d("UbuduManagerDelegate", ubuduEvent.toString());
    }

    @Override
    public void notifyUserForEvent(UbuduEvent ubuduEvent) {
        Log.d("UbuduManagerDelegate", ubuduEvent.toString());
    }
}

UbuduSDK eclipse

I tested both of the SDK, android studio version works fine and smooth, but something went wrong when i launched the eclipse demo app, here it's some of the log.

Rejecting re-init on previously-failed class java.lang.Class<com.ubudu.sdk.implementation.UbuduGeofenceManager>

java.lang.NoClassDefFoundError: com.ubudu.sdk.implementation.UbuduGeofenceManager

Geofence SDK App Demo

Hi,

While some tests with your SDKAppDemo, I experience a trouble.
The second page (geofence) had some issues. I just launch the page, then touch "Start" & issue message appears.
07-30 15:30:28.722 5739-5739/com.ubudu.sdk.studiodemo E/ubudu.UbuduGeofenceManager﹕ Got error while requesting geofences (url https://manager.ubudu.com/u_geofences/query.json?&api_version=3&namespace=ed2f594c2eb20f3a1213e387af53cd86fa1f70e0&lat=48.8977525&lng=2.2783038&radius=100.0&udid=ea9ee09214cbb4a5) (exception com.android.volley.NoConnectionError: java.net.UnknownHostException: Unable to resolve host "manager.ubudu.com": No address associated with hostname)

BR,
Bastien.

Conflicting with Firebase

Hello!
I'm using Firebase in my application and it seems that it is conflicting with the UbuduSDK dependency. Here's my Gradle (clean project):

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:26.1.0'
    
    implementation 'com.google.firebase:firebase-messaging:11.4.2'

    implementation('com.ubudu.sdk:ubudu-sdk:2.7.3@aar') { transitive = true }
}

If you try to compile this you will receive an error:

Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

And Android Studio will pup up a warning next to the Firebase dependency:
All gms/firebaselibraries must use the same version specification

The problem is that UbuduSDK uses GMS version 10.2.1 and Firebase version 11.4.2.

So in order to make thing work add explicitly those dependencies which are used by Ubudu in newer version:

implementation 'com.google.android.gms:play-services-base:11.4.2'
implementation 'com.google.android.gms:play-services-location:11.4.2'

and the conflict will be resolved.

Please update your Wiki!

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.