sagemath / android Goto Github PK
View Code? Open in Web Editor NEWSage's Android App (GSoC 2014)
License: GNU General Public License v3.0
Sage's Android App (GSoC 2014)
License: GNU General Public License v3.0
While it is possible to print more than one line, eg with '\n', only the last input line leads to a change in output.
Where possible give the user a note not a dump.
Creating a new cell, restarting will not read the celldata.json file properly for unknown reasons:
01-10 04:55:56.520: E/CellCollectionJSONParser(1030): Issues when loading cell data from JSON.No value for description
01-10 04:55:56.520: I/CellCollection(1030): Loaded cell data from JSON!
Press the plus button, enter abc for title, Another for the group, and 45, which is opened and 45 output. When I go back to the list nothing has changed, no new group is there. As groups are defined on-the-fly, the main view listing the groups must be refreshed.
The most annoying recurring issue so far.
From the google documentation: The options menu is the primary collection of menu items for an activity. It's where you should place actions that have a global impact on the app, such as "Search," "Compose email," and "Settings."
No idea at the moment.
never mind, this went away by itself
Newly edited cells only keep the last line, contrary to the default ones (Calculus etc)
Happened half a minute after a simple entry, should be caught somewhere, not appear in Log.
01-07 10:11:24.691: D/WebSocketClient(961): WebSocket EOF!
01-07 10:11:24.691: D/WebSocketClient(961): java.io.EOFException
01-07 10:11:24.691: D/WebSocketClient(961): at java.io.DataInputStream.readByte(DataInputStream.java:77)
01-07 10:11:24.691: D/WebSocketClient(961): at com.codebutler.android_websockets.HybiParser.start(HybiParser.java:116)
01-07 10:11:24.691: D/WebSocketClient(961): at com.codebutler.android_websockets.WebSocketClient$1.run(WebSocketClient.java:134)
01-07 10:11:24.691: D/WebSocketClient(961): at java.lang.Thread.run(Thread.java:841)
01-07 10:11:24.691: D/ServerTask(961): Disconnected! Code: 0 Reason: EOF
(formerly "app crashes immediately if "My Worksheets" empty")
01-11 04:24:49.300: E/AndroidRuntime(857): Caused by: java.util.NoSuchElementException
01-11 04:24:49.300: E/AndroidRuntime(857): at java.util.LinkedList.getFirstImpl(LinkedList.java:538)
01-11 04:24:49.300: E/AndroidRuntime(857): at java.util.LinkedList.getFirst(LinkedList.java:530)
01-11 04:24:49.300: E/AndroidRuntime(857): at org.sagemath.droid.CellCollection.initialize(CellCollection.java:50)
01-11 04:24:49.300: E/AndroidRuntime(857): at org.sagemath.droid.CellActivity.onCreate(CellActivity.java:24)
01-11 04:24:49.300: E/AndroidRuntime(857): at android.app.Activity.performCreate(Activity.java:5231)
There is nothing in the source doing anything with the flag except setting and saving it. What would be useful is floating favourite cells to the top of the sorted cell list.
To make sure no regressions happen, write a test suite, see
http://developer.android.com/tools/testing/index.html
It is now saved onPause() of SageActivity, and onDestroy() of CellGroupsFragment. Ideally it should be saved after creation of a new cell, and after each new result from the cellserver, additionally.
Update. This issue was raised on the assumption that it was the reason for some data losses. This turned out to be wrong and there remains no reason for leaving this open.
It is not a good design to force the user to open a cell in order to create one, so allow creation from list view. Even more, the help menu should be available everywhere.
first probably save to sd the most important, then people can upload to wherever they want; needs more permissions however
01-12 11:22:39.659: E/AndroidRuntime(830): java.lang.NullPointerException
01-12 11:22:39.659: E/AndroidRuntime(830): at org.sagemath.droid.CellCollection.addCell(CellCollection.java:122)
01-12 11:22:39.659: E/AndroidRuntime(830): at org.sagemath.droid.NewCellDialog$1.onClick(NewCellDialog.java:62)
01-12 11:22:39.659: E/AndroidRuntime(830): at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:166)
and then
01-12 11:22:52.239: E/AndroidRuntime(1131): junit.framework.AssertionFailedError
01-12 11:22:52.239: E/AndroidRuntime(1131): at junit.framework.Assert.fail(Assert.java:48)
01-12 11:22:52.239: E/AndroidRuntime(1131): at junit.framework.Assert.assertTrue(Assert.java:20)
01-12 11:22:52.239: E/AndroidRuntime(1131): at junit.framework.Assert.assertNotNull(Assert.java:218)
01-12 11:22:52.239: E/AndroidRuntime(1131): at junit.framework.Assert.assertNotNull(Assert.java:211)
01-12 11:22:52.239: E/AndroidRuntime(1131): at org.sagemath.droid.SageActivity.onCreate(SageActivity.java:71)
01-12 11:22:52.239: E/AndroidRuntime(1131): at android.app.Activity.performCreate(Activity.java:5231)
give at least an informative message. can we execute java at all?
Somewhere after new cell creation, long click, new group:
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.support.v4.app.FragmentActivity.getApplicationContext()' on a null object reference
at org.sagemath.droid.CellGroupsFragment.onResume(CellGroupsFragment.java:72)
at org.sagemath.droid.CellGroupsFragment$1.onReceive(CellGroupsFragment.java:47)
For some reason the group list is not redrawn. Not reproducible in emulator.
Except when in history or with group fragment visible and no group selected, prefilling of group field in new cell dialog is always useful.
Could you use git tags for the releases?
Presumably Google+ accesses the link without getting output. Not sure how to resolve this. Ideally G+ would show the generated HTML like a browser but is this possible, at all?
Solution needing Google Play Service is to share an image and give the URL in the accompanying text. See the PlusShare documentation: When you share media to Google+, you cannot also use the setContentUrl method. If you want to include a URL in the post with the media, you should append the URL to the prefilled text in the setText() method.
However, this solution would mean a minimum API 2.3 (Level 9) and an annoying message to the user "This app wants access to your G+ data etc.". Also, other social networks still don't show images. So, I prefer offering #48, and enhancing the server.
No widget or menu entry to remove cells exists.
01-12 11:22:25.519: E/SageActivity(830): Error pausing activity...null
This is here:
https://github.com/sagemath/android/blob/master/src/org/sagemath/droid/SageActivity.java#L292
after restart cell html data should be presented when cell is opened. why else would we save it?
long-click cell, change its name etc., leave app. after app restart, changes are gone.
Press the plus button, enter abc for title, and 45, which is opened and 45 output. When I go back to the list nothing has changed, no new cell is there.
Reason is that without group new cells get assigned to the "Uncategorized" group which isn't shown because the main group list is not refreshed.
Better solution than fiddling with g+ and GPS (which if bug free will not cover other social networks).
Since textual output in the WebView can already be copied&shared, a button above the view "Share image" would be convenient. However this needs write permissions unless we use FileProvider to give other apps access to our internal storage.
I get this since a few days, makes no usage of cellserver possible from android sage.
01-12 12:25:30.400: I/SageSingleCell(854): sageInput is 1
01-12 12:25:30.400: I/ServerTask(854): SageSingleCell.init() called
01-12 12:25:30.400: I/ServerTask(854): SageSingleCell run() called
01-12 12:25:30.400: I/CommandRequest(854): CommandRequest.sendRequest() called
01-12 12:25:54.590: I/ServerTask(854): output = <html><body><h1>504 Gateway Time-out</h1>
01-12 12:25:54.590: I/ServerTask(854): The server didn't respond in time.
01-12 12:25:54.590: I/ServerTask(854): </body></html>
01-12 12:25:54.620: E/ServerTask(854): Error creating ShareURI
01-12 12:25:54.710: I/ServerTask(854): SageSingleCell: postTask() called
From the desktop Chrome, the cellserver site :80 is fine, :10080 is not.
No reaction from >3 seconds press on Example cell card.
Cursor should ideally move before very first character in text input area when in first line of text and up is pressed, but not disappear. Focus should stay in area, however it moves to () button.
Update: this may only be an issue with nonstandard keyboard apps.
Instead of preselecting History, display a welcome, and present the Sage, Tutorial, SMC, and ref man links. Recommend using Hacker's Keyboard.
java.lang.IndexOutOfBoundsException
at java.util.LinkedList.get(LinkedList.java:519)
at org.sagemath.droid.CellListAdapter.getView(CellListAdapter.java:73)
at android.widget.AbsListView.obtainView(AbsListView.java:2255)
At the moment, most important would be not to save yet another cell every time the pause event happens (#37).
Then, either a "clear history" menu item or a limit (20,100?) looks the most natural solution. One way to reduce growth rate is to only keep unique cells (eg those with unique command), probably removing old versions of cells when a new one enters history.
Make new cell, go back. This displays previous cell (where new cell button was pressed) instead of group of new cell.
The Insert menu contains an item "Insert..." suggesting further dialog but nothing happens, at all. What is intended to happen?
One user would like to have "Custom addition of inserts for blocks I frequently use." This would mean a macro facility. I think useful would also be to present insert options for "symbolic variable", "polynomial ring", "power series ring", and intmod.
Enter cell, change input, back out, enter again. The output from server is saved but not the input.
Possible Fix:
Optional
According to user. Somehow. Well, a menu item that starts the browser at the cloud directly instead of starting it at the Sage main page.
triggered in OutputView.clear(), from the log:
01-06 03:17:30.092: E/OutputView(843): Error clearing output blocks null
01-06 03:17:30.092: E/SageActivity(843): Error clearing output view.null
After the switch to AppCompat v7 for the Action Bar support, setIndeterminateProgressVisibility() causes a separate ProgressBar to be shown in addition to the refresh menu button.
Possible Fixes:
var('a')
polar_plot(a,(a,0,1))
What's more, it again wiped out all my cells, see next issue.
"Select a group." is shown but no selection is possible.
remove all cells from group, it still shows in status bar
Enter a cell, add something without sending to server, back out, enter again. The input is saved to history. Every time.
How will the user be able to indent python-style?
atm if no code is given the other inputs are lost.
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.