This app was built during Google Summer of Code program (2012, 2013). It is no longer actively supported and might be incompatible with latest version of OpenNMS.
Latest version of Android Studio is recommended.
OpenNMS Android Client
Home Page: http://www.opennms.org/
Example from NodesParser
:
ERROR/AndroidRuntime(26297): FATAL EXCEPTION: Thread-14590
java.lang.NullPointerException
at org.opennms.android.nodes.NodesParser.parse(NodesParser.java:46)
at org.opennms.android.nodes.NodesServerCommunicationImpl.getNodes(NodesServerCommunicationImpl.java:30)
at org.opennms.android.nodes.NodesServerCommunicationImpl.getNodes(NodesServerCommunicationImpl.java:14)
at org.opennms.android.MainService$2.run(MainService.java:88)
at java.lang.Thread.run(Thread.java:856)
Advantages are described here: https://developer.android.com/training/sync-adapters/index.html.
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.IllegalStateException: Content view not yet created
at android.support.v4.app.ListFragment.ensureList(ListFragment.java:328)
at android.support.v4.app.ListFragment.getListView(ListFragment.java:222)
at org.opennms.android.ui.alarms.AlarmsListFragment.showDetails(AlarmsListFragment.java:119)
at org.opennms.android.ui.alarms.AlarmsListFragment.onLoadFinished(AlarmsListFragment.java:99)
at org.opennms.android.ui.alarms.AlarmsListFragment.onLoadFinished(AlarmsListFragment.java:34)
at android.support.v4.app.LoaderManagerImpl$LoaderInfo.callOnLoadFinished(LoaderManager.java:427)
at android.support.v4.app.LoaderManagerImpl$LoaderInfo.onLoadComplete(LoaderManager.java:395)
at android.support.v4.content.Loader.deliverResult(Loader.java:103)
at android.support.v4.content.CursorLoader.deliverResult(CursorLoader.java:81)
at android.support.v4.content.CursorLoader.deliverResult(CursorLoader.java:35)
at android.support.v4.content.AsyncTaskLoader.dispatchOnLoadComplete(AsyncTaskLoader.java:221)
at android.support.v4.content.AsyncTaskLoader$LoadTask.onPostExecute(AsyncTaskLoader.java:61)
at android.support.v4.content.ModernAsyncTask.finish(ModernAsyncTask.java:461)
at android.support.v4.content.ModernAsyncTask.access$500(ModernAsyncTask.java:47)
at android.support.v4.content.ModernAsyncTask$InternalHandler.handleMessage(ModernAsyncTask.java:474)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
Tested on list of alarms.
When one of the lists is opened it should automatically refresh contents if
If in dual pane mode and list is not empty.
In addition to lists of nodes, outages, and alarms, list of latest events can be added. User will be able to see events without having to open a web app.
Add information about status.
To make user's life even more easier, notifications about new alarms can be implemented. User will not have to open application periodically to find out if something requires attention, Android's service can do this job in background, even when device is not being used. If something new comes up, service will create a new notification and vibrate or/and play the sound. If user would like to know more information about received notification, he can click on it to activate the appropriate activity.
User will have options that will allow changing interval of background checks, choosing whether it is allowed to use cellular connection or Wi-Fi, or disabling that service completely.
Refresh button is "not responding". Probable cause may be described here: http://stackoverflow.com/a/5255360/272770
For example, if user clicks on event in alarm details view, open event section and show details about that event.
Right now it is very unstable. If some kind of error occurs during access to RESTful interface user will not know about it. Network may be unavailable, or information about OpenNMS server entered in settings incorrect. There are no error messages that will notify user about these kinds of issues. He will just see an empty list that says nothing.
One way to fix this issue is to add toasts with error messages that will be shown if something goes wrong during list updates. We can also add checker to settings activity that will try to access server before saving information to help user identify connectivity problems easily. Or create dialogs with information about the error and suggestions about possible ways to fix it.
Also, I discovered several issues related to unset variables in parsers (#1) and the process of updating list contents (#3). These issues need to be resolved.
06-02 06:17:27.153 6866-6866/org.opennms.android E/AndroidRuntime: FATAL EXCEPTION: main
android.view.InflateException: Binary XML file line #1: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:518)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
at android.view.LayoutInflater.inflate(LayoutInflater.java:386)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:332)
at android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
at android.widget.AbsListView.obtainView(AbsListView.java:1467)
at android.widget.ListView.makeAndAddView(ListView.java:1745)
at android.widget.ListView.fillDown(ListView.java:670)
at android.widget.ListView.fillFromTop(ListView.java:727)
at android.widget.ListView.layoutChildren(ListView.java:1598)
at android.widget.AbsListView.onLayout(AbsListView.java:1273)
at android.view.View.layout(View.java:7192)
at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:672)
at android.view.View.layout(View.java:7192)
at android.widget.FrameLayout.onLayout(FrameLayout.java:338)
at android.view.View.layout(View.java:7192)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1254)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1130)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1047)
at android.view.View.layout(View.java:7192)
at android.widget.FrameLayout.onLayout(FrameLayout.java:338)
at android.view.View.layout(View.java:7192)
at android.widget.FrameLayout.onLayout(FrameLayout.java:338)
at android.view.View.layout(View.java:7192)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1145)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1865)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3835)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
at android.view.LayoutInflater.createView(LayoutInflater.java:505)
... 35 more
Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x2/d=0x10102fd a=-1}
at android.content.res.Resources.loadDrawable(Resources.java:1757)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1967)
at android.widget.TextView.<init>(TextView.java:350)
at android.widget.TextView.<init>(TextView.java:343)
... 38 more
Users should be able to acknowledge alarms from activities showing specific alarms. It should make application more useful and interactive.
This feature can be implemented using /acks/ interface and Google's Resting library that is already used to get information about nodes, outages, and alarms.
Probably because multiple sync processes are running simultaneously.
E/AndroidRuntime: FATAL EXCEPTION: IntentService[OutagesSyncService]
android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5)
at android.database.sqlite.SQLiteConnection.nativeExecuteForChangedRowCount(Native Method)
at android.database.sqlite.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:727)
at android.database.sqlite.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:754)
at android.database.sqlite.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:64)
at android.database.sqlite.SQLiteDatabase.delete(SQLiteDatabase.java:1494)
at org.opennms.android.dao.outages.OutagesListProvider.delete(OutagesListProvider.java:44)
at android.content.ContentProvider$Transport.delete(ContentProvider.java:228)
at android.content.ContentResolver.delete(ContentResolver.java:958)
at org.opennms.android.service.OutagesSyncService.onHandleIntent(OutagesSyncService.java:33)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:60)
If you will change server, old lists will not be updated/removed. So you will see old items that are completely unrelated to your current server state.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.