Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

samsung tablet 10.1/2014 - Sample-BackgroundScan - elements missing?

Rank

Total Posts: 3

Joined 2013-06-14

PM

(Easy on me - I'm a newbie to java / eclipse!)
I hope I put this in the correct forum classification.

We just finished ANT development on a 422 chipset and are moving some of the routines to a galaxy tablet. Prior was c++ w/ the ant.h /c files and all went very well. We're well familiar with the ANT stuff..

I've read lots of the other forum examples and ran into what looks like the same problem w/ no luck correcting it.
I've adjusted the project properties according to the referenced stackoverflow.com forums but still get the same results.

If the package is moved to the tablet we I get the following:

12-19 18:00:45.170: D/dalvikvm(21980): Late-enabling CheckJNI
12-19 18:00:45.270: D/AndroidRuntime(21980): Shutting down VM
12-19 18:00:45.270: W/dalvikvm(21980): threadid=1: thread exiting with uncaught exception (group=0x4195a700)
12-19 18:00:45.275: E/AndroidRuntime(21980): FATAL EXCEPTION: main
12-19 18:00:45.275: E/AndroidRuntime(21980): java.lang.Error: Unresolved compilation problems:
12-19 18:00:45.275: E/AndroidRuntime(21980): The import com.dsi.ant.channel cannot be resolved
12-19 18:00:45.275: E/AndroidRuntime(21980): The method openBackgroundScanChannel() from the type ChannelService.ChannelServiceComm refers to the missing type ChannelNotAvailableException
12-19 18:00:45.275: E/AndroidRuntime(21980): ChannelNotAvailableException cannot be resolved to a type
12-19 18:00:45.275: E/AndroidRuntime(21980): at com.dsi.ant.sample.backgroundscan.ChannelList.<init>(ChannelList.java:19)
12-19 18:00:45.275: E/AndroidRuntime(21980): at java.lang.Class.newInstanceImpl(Native Method)
12-19 18:00:45.275: E/AndroidRuntime(21980): at java.lang.Class.newInstance(Class.java:1130)
12-19 18:00:45.275: E/AndroidRuntime(21980): at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
12-19 18:00:45.275: E/AndroidRuntime(21980): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2210)
12-19 18:00:45.275: E/AndroidRuntime(21980): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2348)
12-19 18:00:45.275: E/AndroidRuntime(21980): at android.app.ActivityThread.access$700(ActivityThread.java:159)
12-19 18:00:45.275: E/AndroidRuntime(21980): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
12-19 18:00:45.275: E/AndroidRuntime(21980): at android.os.Handler.dispatchMessage(Handler.java:99)
12-19 18:00:45.275: E/AndroidRuntime(21980): at android.os.Looper.loop(Looper.java:137)
12-19 18:00:45.275: E/AndroidRuntime(21980): at android.app.ActivityThread.main(ActivityThread.java:5414)
12-19 18:00:45.275: E/AndroidRuntime(21980): at java.lang.reflect.Method.invokeNative(Native Method)
12-19 18:00:45.275: E/AndroidRuntime(21980): at java.lang.reflect.Method.invoke(Method.java:525)
12-19 18:00:45.275: E/AndroidRuntime(21980): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
12-19 18:00:45.275: E/AndroidRuntime(21980): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
12-19 18:00:45.275: E/AndroidRuntime(21980): at dalvik.system.NativeStart.main(Native Method)


I note that when a "clean" is done on the project, there are hundreds of errors related to the following in "Channel_Controller.java."

import com.dsi.ant.AntService;
import com.dsi.ant.channel.AntChannel;
import com.dsi.ant.channel.AntChannelProvider;
import com.dsi.ant.channel.Capabilities;
import com.dsi.ant.channel.ChannelNotAvailableException;
import com.dsi.ant.channel.PredefinedNetwork;


Could someone kindly get me pointed in the right direction. It couldn't be this difficult.
Blessings!
     
RankRankRankRank

Total Posts: 120

Joined 2013-05-07

PM

From what I understand from your post, you are trying to build the Sample_BackgroundScan application and run it on your Samsung Tablet. You have run into issues at both the compilation step and the run step, and you are using Android Developer Tools Plugin for Eclipse (ADT).

It looks like your issue is that when you imported the project, before you built it, you exported a signed application package and ran in on the tablet. This is when you saw the logCat errors. Then you cleaned the project (which runs a build) and saw compilation issues.

The following are the general steps to run ANT Android Projects from source successfully:

1. When you import the project into ADT, create a libs\ folder under the root directory. In that libs folder, add android_antlib.jar (found under Android_ANT_SDK_4.2\API of the SDK).

2. Ensure your Build Path is set-up correctly, and is set to export Android Private Libraries and Android Dependencies. See http://www.thisisant.com/forum/viewthread/3983/.

3. Clean the project. Then Run it as an Android Application. There is no need to export Sample_BackgroundScan as running it as an Android Application will suffice for development puproses. See Building and Running from Eclipse with ADT for more information.

I would recommend searching for general help on the internet on how to use ADT to develop Android Applications to help with you adjust to the new environment, as well as reading up on the documentation available at Android Developer Tools.      
Rank

Total Posts: 3

Joined 2013-06-14

PM

It's now been a week, same mess, same way.
I'm just curious (nicely) how many folks that have attempted to get this to run have done so...
I've contacted several folks who all request the same - "tell the vendor to publish some clean guides to setting this up."

After moving all of the supposed support jar's, etc

We are still stuck on...

package com.dsi.ant.sample.backgroundscan;

import android.os.RemoteException;
import android.util.Log;

import com.dsi.ant.channel.AntChannel;
import com.dsi.ant.channel.AntCommandFailedException;
import com.dsi.ant.channel.BackgroundScanState;
import com.dsi.ant.channel.BurstState;
import com.dsi.ant.channel.EventBufferSettings;
import com.dsi.ant.channel.IAntAdapterEventHandler;
import com.dsi.ant.channel.IAntChannelEventHandler;
import com.dsi.ant.message.ChannelId;
import com.dsi.ant.message.ChannelType;
import com.dsi.ant.message.ExtendedAssignment;
import com.dsi.ant.message.LibConfig;
import com.dsi.ant.message.fromant.AcknowledgedDataMessage;
import com.dsi.ant.message.fromant.BroadcastDataMessage;
import com.dsi.ant.message.fromant.ChannelEventMessage;
import com.dsi.ant.message.fromant.DataMessage;
import com.dsi.ant.message.fromant.MessageFromAntType;
import com.dsi.ant.message.ipc.AntMessageParcel;

import java.util.Random;

So kindly, let me ask again, what needs to happen to get this to run?

Merry Christmas to all!
rdh

     
RankRankRankRank

Total Posts: 120

Joined 2013-05-07

PM

Hi Kotam,

Following the steps of my last post has gotten me a functional .apk of Background Scan Sample. I'm curious as to what steps you are taking to set-up this project.

Is this your first attempt at an Android Project? If so, I would suggest trying out Android Sample Projects first to get you started. Getting Background Scan Sample going is fairly simple once you have a basic understanding of Java, Android, and Eclipse.

To help figure out what is going wrong, can you post up the specific build/logCat errors you get?      
Rank

Total Posts: 3

Joined 2013-06-14

PM

As it happens, yes - it is.
A simple list of what libs/paths the software needs access to would be a great luxury.

Your response does not mention the Antpluginlib_x_y.z file on the Android page of Ant. Does it need to be included or not?

I'll take this up with Ant directly.
tks,
     
RankRankRankRank

Total Posts: 120

Joined 2013-05-07

PM

The Background Scan Sample and Acquire Channel Sample require only the ant-lib jar file as they are ANT Android Samples. Plugins Sampler on the other hand utilizes ANT+ functionality and therefore requires ANT+ plugin-lib, but not ant-lib. Depending on your applications low-power wireless use-case (ANT or ANT+), you will need to import either ant-lib, or ANT+ plugin-lib, but not both.

The document "D00001576 - Creating ANT Android Applications Rev 4.2.0.pdf" included as part of the Android ANT SDK is a good resource if you are looking to develop applications that use ANT. "D00001446 - Creating ANT+ Android Applications Rev 4.1.pdf", included in the Android ANT+ SDK will help you through developing an ANT+ application for your Android Device.      
Avatar
RankRankRankRank

Total Posts: 129

Joined 2010-11-30

PM

Hi Kotam. I hope this information has helped you sort out your Android issues. This forum is the best way to "take this up with ANT directly", plus then other developers can benefit from any answers. FYI: BK is part of the team creating the SDK you are using.