Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
Terminal user interface- command line
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arjun Sundaram
Terminal user interface- command line
Commits
20eb09bf
Commit
20eb09bf
authored
9 years ago
by
Francesco Andreuzzi
Browse files
Options
Downloads
Patches
Plain Diff
created
parent
35bbe8f5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/src/main/java/ohi/andre/consolelauncher/commands/raw/donate.java
+74
-0
74 additions, 0 deletions
...n/java/ohi/andre/consolelauncher/commands/raw/donate.java
with
74 additions
and
0 deletions
app/src/main/java/ohi/andre/consolelauncher/commands/raw/donate.java
0 → 100644
+
74
−
0
View file @
20eb09bf
package
ohi.andre.consolelauncher.commands.raw
;
/*Copyright Francesco Andreuzzi
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.*/
import
android.content.Intent
;
import
android.net.Uri
;
import
ohi.andre.consolelauncher.R
;
import
ohi.andre.consolelauncher.commands.CommandAbstraction
;
import
ohi.andre.consolelauncher.commands.ExecInfo
;
public
class
donate
implements
CommandAbstraction
{
private
final
String
DONATE_URL
=
"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6PBTQ6L5F3WU6"
;
@Override
public
String
exec
(
ExecInfo
info
)
throws
Exception
{
Intent
donateIntent
=
new
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
DONATE_URL
));
info
.
context
.
startActivity
(
donateIntent
);
return
info
.
res
.
getString
(
R
.
string
.
output_rate
);
}
@Override
public
int
minArgs
()
{
return
0
;
}
@Override
public
int
maxArgs
()
{
return
0
;
}
@Override
public
int
[]
argType
()
{
return
null
;
}
@Override
public
int
priority
()
{
return
3
;
}
@Override
public
int
helpRes
()
{
return
R
.
string
.
help_donate
;
}
@Override
public
int
notFoundRes
()
{
return
0
;
}
@Override
public
String
onNotArgEnough
(
ExecInfo
info
,
int
nArgs
)
{
return
null
;
}
@Override
public
String
[]
parameters
()
{
return
null
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment